fix some guis
This commit is contained in:
parent
8d6957d6e1
commit
24e249913d
16 changed files with 449 additions and 1306 deletions
|
@ -7,7 +7,6 @@ import common.block.tech.BlockAnvil;
|
|||
import common.enchantment.Enchantment;
|
||||
import common.enchantment.EnchantmentHelper;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.init.Blocks;
|
||||
import common.init.Items;
|
||||
import common.item.ItemStack;
|
||||
import common.util.BlockPos;
|
||||
|
@ -421,7 +420,7 @@ public class ContainerRepair extends Container
|
|||
|
||||
public boolean canInteractWith(EntityNPC playerIn)
|
||||
{
|
||||
return this.theWorld.getState(this.selfPosition).getBlock() != Blocks.anvil ? false : playerIn.getDistanceSq((double)this.selfPosition.getX() + 0.5D, (double)this.selfPosition.getY() + 0.5D, (double)this.selfPosition.getZ() + 0.5D) <= 64.0D;
|
||||
return !(this.theWorld.getState(this.selfPosition).getBlock() instanceof BlockAnvil) ? false : playerIn.getDistanceSq((double)this.selfPosition.getX() + 0.5D, (double)this.selfPosition.getY() + 0.5D, (double)this.selfPosition.getZ() + 0.5D) <= 64.0D;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,6 +14,7 @@ import common.block.artificial.BlockStairs;
|
|||
import common.block.foliage.LeavesType;
|
||||
import common.block.liquid.BlockLiquid;
|
||||
import common.block.natural.BlockSnow;
|
||||
import common.block.tech.BlockAnvil;
|
||||
import common.block.tech.BlockHopper;
|
||||
import common.collect.Lists;
|
||||
import common.collect.Sets;
|
||||
|
@ -1811,7 +1812,7 @@ public abstract class World implements IWorldAccess {
|
|||
Block block = this.getState(pos).getBlock();
|
||||
BoundingBox axisalignedbb = p_175716_3_ ? null : blockIn.getCollisionBoundingBox(this, pos, blockIn.getState());
|
||||
return axisalignedbb != null && !this.checkNoEntityCollision(axisalignedbb, entityIn) ? false
|
||||
: (block.getMaterial() == Material.SMALL && blockIn == Blocks.anvil ? true
|
||||
: (block.getMaterial() == Material.SMALL && blockIn instanceof BlockAnvil ? true
|
||||
: block.getMaterial().isReplaceable() && blockIn.canReplace(this, pos, side, itemStackIn));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue