Skip to content

Commit

Permalink
fixed block updates invalidating structures with fake tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Jun 6, 2024
1 parent 98d1faf commit 99aa070
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public boolean check(T machine, Level world, int x, int y, int z) {
BlockState state = world.getBlockState(pos);
if (pred.evaluate(machine.getLevel(), pos, state)) {
BlockEntity tile = world.getBlockEntity(pos);
if (tile instanceof BlockEntityFakeBlock) {
return StructureCache.refCount(world, pos) == 0;
if (tile instanceof BlockEntityFakeBlock fakeBlock) {
return fakeBlock.getController() == machine || StructureCache.refCount(world, pos) == 0;
}
return false;
}
Expand Down

0 comments on commit 99aa070

Please sign in to comment.