Skip to content

Commit

Permalink
Optimize TransparentCraftingTable update
Browse files Browse the repository at this point in the history
  • Loading branch information
YocyCraft committed Jan 5, 2025
1 parent 0c90acc commit d65e894
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ protected MenuProvider getMenuProvider(BlockState state, Level level, BlockPos p

@Override
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) {
if (oldState.is(this)) return;
travelAndCheck(level, pos);
}

@Override
protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) {
if (newState.is(this)) return;
for (Direction direction : Util.HORIZONTAL_DIRECTIONS) {
travelAndCheck(level, pos.relative(direction));
}
Expand Down

0 comments on commit d65e894

Please sign in to comment.