mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-28 07:56:11 +00:00
Optimized networking.
Sends a compressed packet containing the description of all tiles on chunk load. Uses position in chunk as an integer rather than world coords. Combines and compresses all updates packets (change, add, remove) for each player at the end of tick.
This commit is contained in:
1 parent
b067a08b34
commit
626a9ed50e
8 files changed
+191
-88
No files matched your search
@@ -15,8 +15,9 @@ import codechicken.multipart.JCuboidPart;
|
||||
import codechicken.multipart.JNormalOcclusion;
|
||||
import codechicken.multipart.NormalOcclusionTest;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
import codechicken.core.data.MCDataInput;
|
||||
import codechicken.core.data.MCDataOutput;
|
||||
import codechicken.core.inventory.InventoryUtils;
|
||||
import codechicken.core.packet.PacketCustom;
|
||||
import codechicken.core.vec.BlockCoord;
|
||||
import codechicken.core.vec.Cuboid6;
|
||||
import codechicken.core.vec.Vector3;
|
||||
@@ -56,13 +57,13 @@ public class TorchPart extends JCuboidPart implements JNormalOcclusion, IPartMet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(PacketCustom packet)
|
||||
public void writeDesc(MCDataOutput packet)
|
||||
{
|
||||
packet.writeByte(meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(PacketCustom packet)
|
||||
public void readDesc(MCDataInput packet)
|
||||
{
|
||||
meta = packet.readByte();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user