WIP: eternal portals

This commit is contained in:
Aleksey 2020-10-26 17:39:38 +03:00
parent 29ea99ae11
commit 74403c297a
4 changed files with 75 additions and 4 deletions

View file

@ -31,6 +31,7 @@ public class RunedFlavolite extends BlockBase {
@Override
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
super.onBreak(world, pos, state, player);
BlockPos bottom = PortalFrameHelper.findBottomCorner((World) world, pos, this);
BlockPos top = PortalFrameHelper.findTopCorner((World) world, pos, this);
if (bottom == null || top == null) return;
@ -43,6 +44,5 @@ public class RunedFlavolite extends BlockBase {
world.removeBlock(position, false);
}
}
super.onBreak(world, pos, state, player);
}
}