mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Merge pull request #315 from howtonotwin/258-bhtalisman
Limit BH Talisman to world height. Fixes #258
This commit is contained in:
commit
30c208aa55
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);
|
||||
|
||||
Reference in new issue
Block a user