might as well fix two issues while here:

* electrolyser metal outputs not clearing on client
* unused chunk allocation wasting RAM
This commit is contained in:
George Paton 2025-09-12 17:12:06 +10:00
parent 8c752488ee
commit ada1b5245d
2 changed files with 3 additions and 9 deletions

View File

@ -266,12 +266,8 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
for(int i = 0; i < 4; i++) tanks[i].deserialize(buf);
boolean left = buf.readBoolean();
boolean right = buf.readBoolean();
if(left) {
this.leftStack = new MaterialStack(Mats.matById.get(buf.readInt()), buf.readInt());
}
if(right) {
this.rightStack = new MaterialStack(Mats.matById.get(buf.readInt()), buf.readInt());
}
this.leftStack = left ? new MaterialStack(Mats.matById.get(buf.readInt()), buf.readInt()) : null;
this.rightStack = right ? new MaterialStack(Mats.matById.get(buf.readInt()), buf.readInt()) : null;
this.lastSelectedGUI = buf.readInt();
}

View File

@ -1098,9 +1098,7 @@ public class NBTStructure {
private SpawnCondition nextSpawn;
public void generateStructures(World world, Random rand, IChunkProvider chunkProvider, int chunkX, int chunkZ) {
Block[] ablock = new Block[65536];
func_151539_a(chunkProvider, world, chunkX, chunkZ, ablock);
func_151539_a(chunkProvider, world, chunkX, chunkZ, null);
generateStructuresInChunk(world, rand, chunkX, chunkZ);
}