Skip to content

Commit 56d1f88

Browse files
committed
[Savestates] Compress NBT data when sending it to the client on load
1 parent d9b63c8 commit 56d1f88

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/com/minecrafttas/tasmod/networking/TASmodBufferBuilder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import com.minecrafttas.tasmod.tickratechanger.TickrateChangerServer.TickratePauseState;
1515

1616
import net.minecraft.nbt.CompressedStreamTools;
17-
import net.minecraft.nbt.NBTSizeTracker;
1817
import net.minecraft.nbt.NBTTagCompound;
1918

2019
public class TASmodBufferBuilder extends ByteBufferBuilder {
@@ -43,7 +42,7 @@ public TASmodBufferBuilder writeNBTTagCompound(NBTTagCompound compound) {
4342
DataOutputStream dataout = new DataOutputStream(out);
4443

4544
try {
46-
CompressedStreamTools.write(compound, dataout);
45+
CompressedStreamTools.writeCompressed(compound, dataout);
4746
} catch (IOException e) {
4847
e.printStackTrace();
4948
}
@@ -86,7 +85,7 @@ public static NBTTagCompound readNBTTagCompound(ByteBuffer buf) throws IOExcepti
8685

8786
DataInputStream datain = new DataInputStream(input);
8887

89-
NBTTagCompound compound = CompressedStreamTools.read(datain, NBTSizeTracker.INFINITE);
88+
NBTTagCompound compound = CompressedStreamTools.readCompressed(datain);
9089

9190
input.close();
9291
datain.close();

0 commit comments

Comments
 (0)