mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Hotfix
This commit is contained in:
parent
3dfe67cd1e
commit
db3c296792
1 changed files with 2 additions and 3 deletions
|
@ -385,11 +385,10 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
||||||
CompoundNBT compound = new CompoundNBT();
|
CompoundNBT compound = new CompoundNBT();
|
||||||
writeAdditional(compound, true);
|
writeAdditional(compound, true);
|
||||||
|
|
||||||
byte[] byteArray = null;
|
|
||||||
try {
|
try {
|
||||||
ByteArrayDataOutput dataOutput = ByteStreams.newDataOutput();
|
ByteArrayDataOutput dataOutput = ByteStreams.newDataOutput();
|
||||||
CompressedStreamTools.write(compound, dataOutput);
|
CompressedStreamTools.write(compound, dataOutput);
|
||||||
byteArray = dataOutput.toByteArray();
|
byte[] byteArray = dataOutput.toByteArray();
|
||||||
int estimatedPacketSize = byteArray.length;
|
int estimatedPacketSize = byteArray.length;
|
||||||
if (estimatedPacketSize > 2_000_000) {
|
if (estimatedPacketSize > 2_000_000) {
|
||||||
Create.logger.warn("Could not send Contraption Spawn Data (Packet too big): "
|
Create.logger.warn("Could not send Contraption Spawn Data (Packet too big): "
|
||||||
|
@ -404,7 +403,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer.writeByteArray(byteArray);
|
buffer.writeCompoundTag(compound);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue