mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 12:15:11 +00:00
Syncing and Large Packet Completion
This commit is contained in:
1 parent
dcf3a0d8b0
commit
de56032118
39 files changed
+648
-862
No files matched your search
@@ -111,31 +111,6 @@ 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);
|
||||
}
|
||||
else if(type == EnumPacketClient.SYNC_UPDATE){
|
||||
int synctype = buffer.readInt();
|
||||
NBTTagCompound compound = Server.readNBT(buffer);
|
||||
SyncController.clientSyncUpdate(synctype, compound, buffer);
|
||||
}
|
||||
else if(type == EnumPacketClient.SYNC_REMOVE){
|
||||
int synctype = buffer.readInt();
|
||||
int id = buffer.readInt();
|
||||
|
||||
SyncController.clientSyncRemove(synctype, id);
|
||||
}
|
||||
else if(type == EnumPacketClient.SYNC_CONFIG){
|
||||
NBTTagCompound configNBT = Server.readNBT(buffer);
|
||||
SyncController.receiveConfigs(configNBT);
|
||||
@@ -450,8 +425,5 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
if(gui instanceof IPartyData)
|
||||
((IPartyData)gui).setPartyData(Server.readNBT(buffer));
|
||||
}
|
||||
else if(type == EnumPacketClient.DBC_FORM){
|
||||
NoppesUtil.handleFormEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user