Skip to content

Commit

Permalink
Fix dupe with crafting station #1509
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Apr 2, 2015
1 parent 774239b commit 864f9be
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/tconstruct/tools/gui/CraftingStationGui.java
Expand Up @@ -9,6 +9,7 @@
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.world.World;

Expand All @@ -25,6 +26,7 @@
import tconstruct.library.modifier.IModifyable;
import tconstruct.library.tools.*;
import tconstruct.library.util.HarvestLevels;
import tconstruct.mechworks.logic.TileEntityLandmine;
import tconstruct.tools.logic.CraftingStationLogic;

@Optional.Interface(iface = "codechicken.nei.api.INEIGuiHandler", modid = "NotEnoughItems")
Expand Down Expand Up @@ -102,6 +104,14 @@ protected void drawGuiContainerForegroundLayer (int par1, int par2)
{
if (logic.chest != null)
{
if(logic.chest.get() instanceof TileEntity) {
TileEntity te = (TileEntity)logic.chest.get();
if(te.getWorldObj().getTileEntity(te.xCoord, te.yCoord, te.zCoord) == null && te.getWorldObj().isRemote)
{
mc.thePlayer.closeScreen();
return;
}
}
this.fontRendererObj.drawString(StatCollector.translateToLocal(logic.chest.get().getInventoryName()), 8, 6, 0x202020);
}

Expand Down

0 comments on commit 864f9be

Please sign in to comment.