fixed the altar not accepting items that require catalysts from players in multiplayer

Closes #30
This commit is contained in:
Ellpeck 2019-02-13 11:11:21 +01:00
parent f6bd264b99
commit 8fba5c7f90

View file

@ -66,6 +66,18 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable {
public void update() { public void update() {
Random rand = this.world.rand; Random rand = this.world.rand;
if (this.world.getTotalWorldTime() % 40 == 0) {
int index = 0;
for (int x = -2; x <= 2; x += 4) {
for (int z = -2; z <= 2; z += 4) {
BlockPos offset = this.pos.add(x, 1, z);
IBlockState state = this.world.getBlockState(offset);
this.catalysts[index] = state.getBlock().getItem(this.world, offset, state);
index++;
}
}
}
if (!this.world.isRemote) { if (!this.world.isRemote) {
if (this.world.getTotalWorldTime() % 40 == 0) { if (this.world.getTotalWorldTime() % 40 == 0) {
boolean fine = Multiblocks.ALTAR.isComplete(this.world, this.pos); boolean fine = Multiblocks.ALTAR.isComplete(this.world, this.pos);
@ -73,18 +85,6 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable {
this.structureFine = fine; this.structureFine = fine;
this.sendToClients(); this.sendToClients();
} }
if (this.structureFine) {
int index = 0;
for (int x = -2; x <= 2; x += 4) {
for (int z = -2; z <= 2; z += 4) {
BlockPos offset = this.pos.add(x, 1, z);
IBlockState state = this.world.getBlockState(offset);
this.catalysts[index] = state.getBlock().getItem(this.world, offset, state);
index++;
}
}
}
} }
if (this.structureFine) { if (this.structureFine) {