null check on server setter packet send
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2024-09-05 16:53:39 -04:00
parent 969e49251e
commit 199d1b925c
9 changed files with 42 additions and 14 deletions

View File

@ -560,8 +560,10 @@ public class ServerAttackTree implements BehaviorTree {
public void setState(AttackTreeState state){ public void setState(AttackTreeState state){
this.state = state; this.state = state;
int value = ClientAttackTree.getAttackTreeStateEnumAsShort(state); int value = ClientAttackTree.getAttackTreeStateEnumAsShort(state);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructServerNotifyBTreeTransitionMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERATTACKTREE_ID, FieldIdEnums.TREE_SERVERATTACKTREE_SYNCEDFIELD_STATE_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructServerNotifyBTreeTransitionMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERATTACKTREE_ID, FieldIdEnums.TREE_SERVERATTACKTREE_SYNCEDFIELD_STATE_ID, value));
} }
}
/** /**
* <p> Automatically generated </p> * <p> Automatically generated </p>
* <p> * <p>
@ -581,8 +583,10 @@ public class ServerAttackTree implements BehaviorTree {
public void setDriftState(AttackTreeDriftState driftState){ public void setDriftState(AttackTreeDriftState driftState){
this.driftState = driftState; this.driftState = driftState;
int value = ClientAttackTree.getAttackTreeDriftStateEnumAsShort(driftState); int value = ClientAttackTree.getAttackTreeDriftStateEnumAsShort(driftState);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERATTACKTREE_ID, FieldIdEnums.TREE_SERVERATTACKTREE_SYNCEDFIELD_DRIFTSTATE_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERATTACKTREE_ID, FieldIdEnums.TREE_SERVERATTACKTREE_SYNCEDFIELD_DRIFTSTATE_ID, value));
} }
}
/** /**
* <p> (initially) Automatically generated </p> * <p> (initially) Automatically generated </p>
* <p> * <p>
@ -640,6 +644,8 @@ public class ServerAttackTree implements BehaviorTree {
*/ */
public void setCurrentMoveId(String currentMoveId){ public void setCurrentMoveId(String currentMoveId){
this.currentMoveId = currentMoveId; this.currentMoveId = currentMoveId;
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStringStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERATTACKTREE_ID, FieldIdEnums.TREE_SERVERATTACKTREE_SYNCEDFIELD_CURRENTMOVEID_ID, currentMoveId)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStringStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERATTACKTREE_ID, FieldIdEnums.TREE_SERVERATTACKTREE_SYNCEDFIELD_CURRENTMOVEID_ID, currentMoveId));
} }
} }
}

View File

@ -194,8 +194,10 @@ public class ServerBlockTree implements BehaviorTree {
public void setState(BlockState state){ public void setState(BlockState state){
this.state = state; this.state = state;
int value = ClientBlockTree.getBlockStateEnumAsShort(state); int value = ClientBlockTree.getBlockStateEnumAsShort(state);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructServerNotifyBTreeTransitionMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERBLOCKTREE_ID, FieldIdEnums.TREE_SERVERBLOCKTREE_SYNCEDFIELD_STATE_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructServerNotifyBTreeTransitionMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERBLOCKTREE_ID, FieldIdEnums.TREE_SERVERBLOCKTREE_SYNCEDFIELD_STATE_ID, value));
} }
}
/** /**
* <p> (initially) Automatically generated </p> * <p> (initially) Automatically generated </p>
* <p> * <p>
@ -254,6 +256,8 @@ public class ServerBlockTree implements BehaviorTree {
*/ */
public void setCurrentBlockVariant(String currentBlockVariant){ public void setCurrentBlockVariant(String currentBlockVariant){
this.currentBlockVariant = currentBlockVariant; this.currentBlockVariant = currentBlockVariant;
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStringStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERBLOCKTREE_ID, FieldIdEnums.TREE_SERVERBLOCKTREE_SYNCEDFIELD_CURRENTBLOCKVARIANT_ID, currentBlockVariant)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStringStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERBLOCKTREE_ID, FieldIdEnums.TREE_SERVERBLOCKTREE_SYNCEDFIELD_CURRENTBLOCKVARIANT_ID, currentBlockVariant));
} }
} }
}

View File

@ -165,8 +165,10 @@ public class ServerGravityTree implements BehaviorTree {
public void setState(GravityTreeState state){ public void setState(GravityTreeState state){
this.state = state; this.state = state;
int value = ClientGravityTree.getGravityTreeStateEnumAsShort(state); int value = ClientGravityTree.getGravityTreeStateEnumAsShort(state);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERGRAVITY_ID, FieldIdEnums.TREE_SERVERGRAVITY_SYNCEDFIELD_STATE_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERGRAVITY_ID, FieldIdEnums.TREE_SERVERGRAVITY_SYNCEDFIELD_STATE_ID, value));
} }
}
/** /**
* <p> (initially) Automatically generated </p> * <p> (initially) Automatically generated </p>
* <p> * <p>

View File

@ -199,8 +199,10 @@ public class ServerIdleTree implements BehaviorTree {
public void setState(IdleTreeState state){ public void setState(IdleTreeState state){
this.state = state; this.state = state;
int value = ClientIdleTree.getIdleTreeStateEnumAsShort(state); int value = ClientIdleTree.getIdleTreeStateEnumAsShort(state);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERIDLE_ID, FieldIdEnums.TREE_SERVERIDLE_SYNCEDFIELD_STATE_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERIDLE_ID, FieldIdEnums.TREE_SERVERIDLE_SYNCEDFIELD_STATE_ID, value));
} }
}
/** /**
* <p> * <p>

View File

@ -219,8 +219,10 @@ public class ServerLifeTree implements BehaviorTree {
public void setState(LifeStateEnum state){ public void setState(LifeStateEnum state){
this.state = state; this.state = state;
int value = ClientLifeTree.getLifeStateEnumEnumAsShort(state); int value = ClientLifeTree.getLifeStateEnumEnumAsShort(state);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERLIFETREE_ID, FieldIdEnums.TREE_SERVERLIFETREE_SYNCEDFIELD_STATE_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERLIFETREE_ID, FieldIdEnums.TREE_SERVERLIFETREE_SYNCEDFIELD_STATE_ID, value));
} }
}
/** /**
* <p> (initially) Automatically generated </p> * <p> (initially) Automatically generated </p>

View File

@ -773,8 +773,10 @@ public class ServerGroundMovementTree implements BehaviorTree {
public void setFacing(MovementRelativeFacing facing){ public void setFacing(MovementRelativeFacing facing){
this.facing = facing; this.facing = facing;
int value = ClientGroundMovementTree.getMovementRelativeFacingEnumAsShort(facing); int value = ClientGroundMovementTree.getMovementRelativeFacingEnumAsShort(facing);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERGROUNDMOVEMENTTREE_ID, FieldIdEnums.TREE_SERVERGROUNDMOVEMENTTREE_SYNCEDFIELD_FACING_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERGROUNDMOVEMENTTREE_ID, FieldIdEnums.TREE_SERVERGROUNDMOVEMENTTREE_SYNCEDFIELD_FACING_ID, value));
} }
}
/** /**
* <p> (initially) Automatically generated </p> * <p> (initially) Automatically generated </p>

View File

@ -152,8 +152,10 @@ public class ServerJumpTree implements BehaviorTree {
public void setState(JumpState state){ public void setState(JumpState state){
this.state = state; this.state = state;
int value = ClientJumpTree.getJumpStateEnumAsShort(state); int value = ClientJumpTree.getJumpStateEnumAsShort(state);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructServerNotifyBTreeTransitionMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERJUMPTREE_ID, FieldIdEnums.TREE_SERVERJUMPTREE_SYNCEDFIELD_STATE_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructServerNotifyBTreeTransitionMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERJUMPTREE_ID, FieldIdEnums.TREE_SERVERJUMPTREE_SYNCEDFIELD_STATE_ID, value));
} }
}
/** /**
* <p> (initially) Automatically generated </p> * <p> (initially) Automatically generated </p>
@ -205,8 +207,10 @@ public class ServerJumpTree implements BehaviorTree {
*/ */
public void setCurrentFrame(int currentFrame){ public void setCurrentFrame(int currentFrame){
this.currentFrame = currentFrame; this.currentFrame = currentFrame;
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientIntStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERJUMPTREE_ID, FieldIdEnums.TREE_SERVERJUMPTREE_SYNCEDFIELD_CURRENTFRAME_ID, currentFrame)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientIntStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERJUMPTREE_ID, FieldIdEnums.TREE_SERVERJUMPTREE_SYNCEDFIELD_CURRENTFRAME_ID, currentFrame));
} }
}
/** /**
* <p> Automatically generated </p> * <p> Automatically generated </p>
@ -227,7 +231,9 @@ public class ServerJumpTree implements BehaviorTree {
*/ */
public void setCurrentJumpForce(float currentJumpForce){ public void setCurrentJumpForce(float currentJumpForce){
this.currentJumpForce = currentJumpForce; this.currentJumpForce = currentJumpForce;
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientFloatStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERJUMPTREE_ID, FieldIdEnums.TREE_SERVERJUMPTREE_SYNCEDFIELD_CURRENTJUMPFORCE_ID, currentJumpForce)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientFloatStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERJUMPTREE_ID, FieldIdEnums.TREE_SERVERJUMPTREE_SYNCEDFIELD_CURRENTJUMPFORCE_ID, currentJumpForce));
} }
}
} }

View File

@ -189,7 +189,9 @@ public class ServerSprintTree implements BehaviorTree {
public void setState(SprintTreeState state){ public void setState(SprintTreeState state){
this.state = state; this.state = state;
int value = ClientSprintTree.getSprintTreeStateEnumAsShort(state); int value = ClientSprintTree.getSprintTreeStateEnumAsShort(state);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERSPRINTTREE_ID, FieldIdEnums.TREE_SERVERSPRINTTREE_SYNCEDFIELD_STATE_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERSPRINTTREE_ID, FieldIdEnums.TREE_SERVERSPRINTTREE_SYNCEDFIELD_STATE_ID, value));
} }
}
} }

View File

@ -159,7 +159,9 @@ public class ServerWalkTree implements BehaviorTree {
public void setState(WalkState state){ public void setState(WalkState state){
this.state = state; this.state = state;
int value = ClientWalkTree.getWalkStateEnumAsShort(state); int value = ClientWalkTree.getWalkStateEnumAsShort(state);
if(DataCellSearchUtils.getEntityDataCell(parent) != null){
DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERWALKTREE_ID, FieldIdEnums.TREE_SERVERWALKTREE_SYNCEDFIELD_STATE_ID, value)); DataCellSearchUtils.getEntityDataCell(parent).broadcastNetworkMessage(SynchronizationMessage.constructUpdateClientStateMessage(parent.getId(), BehaviorTreeIdEnums.BTREE_SERVERWALKTREE_ID, FieldIdEnums.TREE_SERVERWALKTREE_SYNCEDFIELD_STATE_ID, value));
} }
}
} }