Fixed NPE when using an empty bucket
This commit is contained in:
parent
ad97710dda
commit
f9bf63ccf1
|
@ -1,3 +1,8 @@
|
||||||
|
------------------------------------------------------
|
||||||
|
Version 2.0.0-31
|
||||||
|
------------------------------------------------------
|
||||||
|
- Fixed NPE when using an empty bucket.
|
||||||
|
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
Version 2.0.0-30
|
Version 2.0.0-30
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
|
@ -46,6 +46,24 @@ public class BlockDimensionalPortal extends BlockIntegerContainer
|
||||||
return new TileDimensionalPortal();
|
return new TileDimensionalPortal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpaqueCube(IBlockState state)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isVisuallyOpaque()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos)
|
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos)
|
||||||
{
|
{
|
||||||
|
|
|
@ -391,6 +391,11 @@ public class EventHandler
|
||||||
|
|
||||||
ItemStack result = null;
|
ItemStack result = null;
|
||||||
|
|
||||||
|
if (event.getTarget() == null || event.getTarget().getBlockPos() == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Block block = event.getWorld().getBlockState(event.getTarget().getBlockPos()).getBlock();
|
Block block = event.getWorld().getBlockState(event.getTarget().getBlockPos()).getBlock();
|
||||||
|
|
||||||
if (block != null && (block.equals(ModBlocks.lifeEssence)) && block.getMetaFromState(event.getWorld().getBlockState(event.getTarget().getBlockPos())) == 0)
|
if (block != null && (block.equals(ModBlocks.lifeEssence)) && block.getMetaFromState(event.getWorld().getBlockState(event.getTarget().getBlockPos())) == 0)
|
||||||
|
|
Loading…
Reference in a new issue