mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 22:44:07 +01:00
NPE
This commit is contained in:
parent
d0be7428aa
commit
6cf80c60de
@ -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 New Issue
Block a user