Merge remote-tracking branch 'origin/dev' into animation-events

# Conflicts:
#	src/api
#	src/main/java/noppes/npcs/controllers/data/AnimationData.java
This commit is contained in:
luisc committed 2024-04-01 16:32:45 -05:00
commit d055d434df
377 files changed
+2385 -1098

No files matched your search

@@ -112,15 +112,20 @@ public class PacketHandlerClient extends PacketHandlerServer{
RecipeController.Instance.anvilRecipes = RecipeController.syncRecipes;
RecipeController.syncRecipes = new HashMap<Integer, RecipeCarpentry>();
}
else if(type == EnumPacketClient.LARGE_NBT_PART){
byte[] chunk = new byte[buffer.readShort()];
buffer.readBytes(chunk);
NoppesUtil.handleLargeData(chunk);
}
else if(type == EnumPacketClient.SYNC_PLAYER){
boolean sync = buffer.readBoolean();
NoppesUtil.handlePlayerDataEnd(sync);
}
else if(type == EnumPacketClient.SYNC_ADD || type == EnumPacketClient.SYNC_END){
int synctype = buffer.readInt();
NBTTagCompound compound = Server.readNBT(buffer);
SyncController.clientSync(synctype, compound, type == EnumPacketClient.SYNC_END);
if(synctype == SyncType.PLAYER_DATA){
ClientCacheHandler.playerData.setNBT(compound);
}
}
else if(type == EnumPacketClient.SYNC_UPDATE){
int synctype = buffer.readInt();
@@ -360,6 +365,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
ClientCacheHandler.playerAnimations.put(sendingPlayer.getUniqueID(), new AnimationData(sendingPlayer));
}
animationData = ClientCacheHandler.playerAnimations.get(sendingPlayer.getUniqueID());
animationData.parent = sendingPlayer;
}
}