Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,13 @@ protected boolean recolorBlock(BlockState state, LevelAccessor world, BlockPos p
if (blockEntity instanceof FridgeBlockEntity fridge) {
BlockPos bottomPos = fridge.getBaseFridge().getBlockPos();
BlockPos topPos = bottomPos.above();
return super.recolorBlock(world.getBlockState(bottomPos), world, bottomPos, facing, color) && super.recolorBlock(world.getBlockState(topPos),
world,
topPos,
facing,
color);

if (world.getBlockState(bottomPos).getBlock().equals(world.getBlockState(topPos).getBlock())) {
return super.recolorBlock(world.getBlockState(bottomPos), world, bottomPos, facing, color) &&
super.recolorBlock(world.getBlockState(topPos), world, topPos, facing, color);
} else {
return super.recolorBlock(world.getBlockState(bottomPos), world, bottomPos, facing, color);
}
}

return false;
Expand Down