Skip to content

Commit 3ae52b8

Browse files
committed
Further decrease max buffer size
Maybe helps with #359.
1 parent cd13f97 commit 3ae52b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/dave/compactmachines3/network/MessageMachineChunk.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ public void toBytes(ByteBuf buf) {
4040
ByteBuf tmpBuf = Unpooled.buffer();
4141
ByteBufUtils.writeTag(tmpBuf, data);
4242

43-
if(tmpBuf.writerIndex() >= 2097152 - 8) {
43+
if(tmpBuf.writerIndex() >= 1900000 - 8) {
4444
Logz.debug("Chunk data to big to send. Stripping TileEntity nbt data!");
45+
4546
data.removeTag("TileEntities");
4647

4748
ByteBuf tmpBufNoTiles = Unpooled.buffer();
4849
ByteBufUtils.writeTag(tmpBufNoTiles, data);
4950

50-
if(tmpBufNoTiles.writerIndex() >= 2097152 - 8) {
51+
if(tmpBufNoTiles.writerIndex() >= 1900000 - 8) {
5152
Logz.warn("Chunk data to big even without nbt data. Sending no chunk data!");
5253
ByteBufUtils.writeTag(buf, new NBTTagCompound());
5354
} else {

0 commit comments

Comments
 (0)