update codegen for component checker method
This commit is contained in:
parent
7858cc83ee
commit
13997acdf7
@ -1521,7 +1521,6 @@ Rearchitecting
|
||||
- Cache busting for particle atlas cache
|
||||
|
||||
Code cleanup
|
||||
- Rename "BehaviorTree" to be "Component" (what it actually is)
|
||||
- Refactor ground movement components
|
||||
|
||||
Build system to allow specifying certain audio files to load as stereo
|
||||
|
||||
@ -789,4 +789,15 @@ public class ClientAttackTree implements BehaviorTree {
|
||||
this.setState(newState);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientAttackTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientAttackTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTATTACKTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -770,4 +770,15 @@ public class ServerAttackTree implements BehaviorTree {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerAttackTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerAttackTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERATTACKTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -292,4 +292,15 @@ public class ClientBlockTree implements BehaviorTree {
|
||||
this.currentBlockVariant = currentBlockVariant;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientBlockTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientBlockTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTBLOCKTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -260,4 +260,15 @@ public class ServerBlockTree implements BehaviorTree {
|
||||
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStringStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERBLOCKTREE_ID, FieldIdEnums.TREE_SERVERBLOCKTREE_SYNCEDFIELD_CURRENTBLOCKVARIANT_ID, currentBlockVariant));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerBlockTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerBlockTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERBLOCKTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -491,4 +491,15 @@ public class ClientEquipState implements BehaviorTree {
|
||||
return (ClientEquipState)entity.getData(EntityDataStrings.TREE_CLIENTEQUIPSTATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientEquipState component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientEquipState(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTEQUIPSTATE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -362,4 +362,15 @@ public class ClientToolbarState implements BehaviorTree {
|
||||
public void simulate(float deltaTime) {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientToolbarState component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientToolbarState(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTTOOLBARSTATE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -496,4 +496,15 @@ public class ServerEquipState implements BehaviorTree {
|
||||
return (ServerEquipState)entity.getData(EntityDataStrings.TREE_SERVEREQUIPSTATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerEquipState component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerEquipState(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVEREQUIPSTATE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -413,4 +413,15 @@ public class ServerToolbarState implements BehaviorTree {
|
||||
public void simulate(float deltaTime) {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerToolbarState component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerToolbarState(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERTOOLBARSTATE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -237,4 +237,15 @@ public class ClientGravityTree implements BehaviorTree {
|
||||
public void setState(GravityTreeState state){
|
||||
this.state = state;
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientGravityTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientGravityTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTGRAVITY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -221,4 +221,15 @@ public class ServerGravityTree implements BehaviorTree {
|
||||
public static ServerGravityTree getServerGravityTree(Entity entity){
|
||||
return (ServerGravityTree)entity.getData(EntityDataStrings.TREE_SERVERGRAVITY);
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerGravityTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerGravityTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERGRAVITY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -210,4 +210,15 @@ public class ClientIdleTree implements BehaviorTree {
|
||||
public static ClientIdleTree getClientIdleTree(Entity entity){
|
||||
return (ClientIdleTree)entity.getData(EntityDataStrings.TREE_IDLE);
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientIdleTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientIdleTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_IDLE);
|
||||
}
|
||||
|
||||
}
|
||||
@ -217,4 +217,15 @@ public class ServerIdleTree implements BehaviorTree {
|
||||
public static ServerIdleTree getServerIdleTree(Entity entity){
|
||||
return (ServerIdleTree)entity.getData(EntityDataStrings.TREE_SERVERIDLE);
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerIdleTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerIdleTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERIDLE);
|
||||
}
|
||||
|
||||
}
|
||||
@ -175,4 +175,15 @@ public class ClientLifeTree implements BehaviorTree {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientLifeTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientLifeTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTLIFETREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -335,17 +335,6 @@ public class ServerLifeTree implements BehaviorTree {
|
||||
return (ServerLifeTree)entity.getData(EntityDataStrings.TREE_SERVERLIFETREE);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a copy of this tree
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity has a copy of this tree, false otherwise
|
||||
*/
|
||||
public static boolean hasServerLifeTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERLIFETREE);
|
||||
}
|
||||
|
||||
/**
|
||||
* A single collision event
|
||||
*/
|
||||
@ -401,4 +390,15 @@ public class ServerLifeTree implements BehaviorTree {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerLifeTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerLifeTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERLIFETREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -470,6 +470,10 @@ public class ClientEditorMovementTree implements BehaviorTree {
|
||||
return 6;
|
||||
case BACKWARD_RIGHT:
|
||||
return 7;
|
||||
case UP:
|
||||
return 8;
|
||||
case DOWN:
|
||||
return 9;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@ -500,6 +504,10 @@ public class ClientEditorMovementTree implements BehaviorTree {
|
||||
return MovementRelativeFacing.BACKWARD_LEFT;
|
||||
case 7:
|
||||
return MovementRelativeFacing.BACKWARD_RIGHT;
|
||||
case 8:
|
||||
return MovementRelativeFacing.UP;
|
||||
case 9:
|
||||
return MovementRelativeFacing.DOWN;
|
||||
default:
|
||||
return MovementRelativeFacing.FORWARD;
|
||||
}
|
||||
@ -535,4 +543,15 @@ public class ClientEditorMovementTree implements BehaviorTree {
|
||||
Globals.entityValueTrackingService.detatchTreeFromEntity(entity, BehaviorTreeIdEnums.BTREE_CLIENTEDITORMOVEMENTTREE_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientEditorMovementTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientEditorMovementTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTEDITORMOVEMENTTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -539,4 +539,15 @@ public class ServerEditorMovementTree implements BehaviorTree {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerEditorMovementTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerEditorMovementTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVEREDITORMOVEMENTTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -918,4 +918,15 @@ public class ClientGroundMovementTree implements BehaviorTree {
|
||||
return MovementRelativeFacing.FORWARD;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientGroundMovementTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientGroundMovementTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTGROUNDMOVEMENTTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -845,4 +845,15 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
||||
return (ServerGroundMovementTree)entity.getData(EntityDataStrings.TREE_SERVERGROUNDMOVEMENTTREE);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerGroundMovementTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerGroundMovementTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERGROUNDMOVEMENTTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -332,4 +332,15 @@ public class ClientJumpTree implements BehaviorTree {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientJumpTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientJumpTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTJUMPTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -239,4 +239,15 @@ public class ServerJumpTree implements BehaviorTree {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerJumpTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerJumpTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERJUMPTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -216,4 +216,15 @@ public class ClientSprintTree implements BehaviorTree {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientSprintTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientSprintTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTSPRINTTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -196,4 +196,15 @@ public class ServerSprintTree implements BehaviorTree {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerSprintTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerSprintTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERSPRINTTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -227,4 +227,15 @@ public class ClientWalkTree implements BehaviorTree {
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientWalkTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientWalkTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTWALKTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -166,4 +166,15 @@ public class ServerWalkTree implements BehaviorTree {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerWalkTree component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerWalkTree(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERWALKTREE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -203,4 +203,15 @@ public class ClientStanceComponent implements BehaviorTree {
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ClientStanceComponent component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasClientStanceComponent(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_CLIENTSTANCECOMPONENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -126,4 +126,15 @@ public class ServerStanceComponent implements BehaviorTree {
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the entity has a ServerStanceComponent component
|
||||
* </p>
|
||||
* @param entity the entity
|
||||
* @return true if the entity contains the component, false otherwise
|
||||
*/
|
||||
public static boolean hasServerStanceComponent(Entity entity){
|
||||
return entity.containsKey(EntityDataStrings.TREE_SERVERSTANCECOMPONENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user