Limit BH Talisman to world height. Fixes #258

This commit is contained in:
Howtonotwin committed 2016-05-31 17:17:20 -04:00
1 parent 2065f01b8d
commit fd35d25423
1 file changed
+2 -1
@@ -115,8 +115,9 @@ public class ItemBlackHoleTalisman extends ItemMod implements IBlockProvider {
}
} else {
int entities = par3World.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(pos.offset(side), pos.offset(side).add(1, 1, 1))).size();
BlockPos correctedPos = bBlock.isReplaceable(par3World, pos) ? pos : pos.offset(side);
if(entities == 0) {
if(entities == 0 && !(correctedPos.getY() < 0) && !(correctedPos.getY() >= 256)) {
int remove = par2EntityPlayer.capabilities.isCreativeMode ? 1 : remove(par1ItemStack, 1);
if(remove > 0) {
ItemStack stack = new ItemStack(bBlock, 1, bmeta);