コード例 #1
0
 @Override
 public void onPickupFromSlot(
     int slotNumber, IInventory inventory, EntityPlayer player, ItemStack stack) {
   if (slotNumber == 0 && tile.getStackInSlot(0) != null && tile.getStackInSlot(0).stackSize > 0) {
     tile.decrementCraftingField();
   }
 }
コード例 #2
0
 @Override
 public void render(TileEntity tile, double x, double y, double z, float f) {
   super.render(tile, x, y, z, f);
   if (tile instanceof TileStructureCrafter) {
     TileStructureCrafter structureCrafter = (TileStructureCrafter) tile;
     ItemStack stack = structureCrafter.getStackInSlot(0);
     if (stack != null && stack.stackSize > 0) {
       // TODO render result on top
     }
   }
 }