mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 19:58:34 +01:00
fixed the altar not accepting items that require catalysts from players in multiplayer
Closes #30
This commit is contained in:
parent
f6bd264b99
commit
8fba5c7f90
1 changed files with 12 additions and 12 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue