Add some changes

This commit is contained in:
Alexander committed 2014-04-18 00:49:00 -04:00
1 parent da42896f1d
commit 89ee0077be
13 files changed
+131 -19

No files matched your search

@@ -1,5 +1,6 @@
package tconstruct.inventory;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@@ -12,6 +13,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.world.World;
import tconstruct.blocks.logic.CraftingStationLogic;
import tconstruct.common.TRepo;
import tconstruct.library.armor.ArmorCore;
import tconstruct.library.crafting.ToolBuilder;
import tconstruct.library.tools.ToolCore;
@@ -152,9 +154,13 @@ public class CraftingStationContainer extends Container
}
@Override
public boolean canInteractWith (EntityPlayer par1EntityPlayer)
public boolean canInteractWith (EntityPlayer player)
{
return par1EntityPlayer.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
Block block = worldObj.getBlock(this.posX, this.posY, this.posZ);
if (block != TRepo.craftingStationWood && block != TRepo.craftingSlabWood)
return false;
return player.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
}
@Override