mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Add some changes
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user