mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:02:48 +01:00
NPE
This commit is contained in:
parent
d0be7428aa
commit
6cf80c60de
1 changed files with 5 additions and 1 deletions
|
@ -41,9 +41,13 @@ public class PeculiarBellBlock extends AbstractBellBlock<PeculiarBellTileEntity>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState getStateForPlacement(BlockItemUseContext ctx) {
|
public BlockState getStateForPlacement(BlockItemUseContext ctx) {
|
||||||
|
BlockState newState = super.getStateForPlacement(ctx);
|
||||||
|
if (newState == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
World world = ctx.getWorld();
|
World world = ctx.getWorld();
|
||||||
BlockPos pos = ctx.getPos();
|
BlockPos pos = ctx.getPos();
|
||||||
return tryConvert(world, pos, super.getStateForPlacement(ctx), world.getBlockState(pos.offset(Direction.DOWN)));
|
return tryConvert(world, pos, newState, world.getBlockState(pos.offset(Direction.DOWN)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue