Fixed crate bug and imprinter crash
This commit is contained in:
parent
b35557d581
commit
b9de76e2a2
3 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ import java.io.File;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
|
|
@ -147,6 +147,10 @@ public class BlockCrate extends BlockMachine
|
|||
if (requestStack.isItemEqual(currentStack))
|
||||
{
|
||||
player.inventory.setInventorySlotContents(i, this.putIn(tileEntity, currentStack));
|
||||
if (player instanceof EntityPlayerMP)
|
||||
{
|
||||
((EntityPlayerMP) player).sendContainerToPlayer(player.inventoryContainer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public class SlotCraftingResult extends Slot
|
|||
@Override
|
||||
public boolean canTakeStack(EntityPlayer player)
|
||||
{
|
||||
return this.container.tileEntity.getIdealRecipe(this.getStack()) != null;
|
||||
return this.getStack() == null ? false : this.container.tileEntity.getIdealRecipe(this.getStack()) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue