mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 03:59:45 +00:00
49 lines
1.8 KiB
Java
Executable File
49 lines
1.8 KiB
Java
Executable File
/*******************************************************************************
|
|
* Copyright (c) 2011-2014 SirSengir.
|
|
* All rights reserved. This program and the accompanying materials
|
|
* are made available under the terms of the GNU Lesser Public License v3
|
|
* which accompanies this distribution, and is available at
|
|
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
|
*
|
|
* Various Contributors including, but not limited to:
|
|
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
|
******************************************************************************/
|
|
package forestry.food.gui;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.entity.player.InventoryPlayer;
|
|
|
|
import forestry.core.gui.ContainerItemInventory;
|
|
import forestry.core.gui.slots.SlotFiltered;
|
|
import forestry.core.gui.slots.SlotOutput;
|
|
import forestry.core.utils.InventoryUtil;
|
|
import forestry.food.items.ItemInfuser.InfuserInventory;
|
|
|
|
public class ContainerInfuser extends ContainerItemInventory<InfuserInventory> {
|
|
|
|
public ContainerInfuser(InventoryPlayer inventoryplayer, InfuserInventory inventory) {
|
|
super(inventory, inventoryplayer, 8, 103);
|
|
|
|
// Input
|
|
this.addSlotToContainer(new SlotFiltered(inventory, 0, 152, 12));
|
|
|
|
// Output
|
|
this.addSlotToContainer(new SlotOutput(inventory, 1, 152, 72));
|
|
|
|
// Ingredients
|
|
this.addSlotToContainer(new SlotFiltered(inventory, 2, 12, 12));
|
|
this.addSlotToContainer(new SlotFiltered(inventory, 3, 12, 32));
|
|
this.addSlotToContainer(new SlotFiltered(inventory, 4, 12, 52));
|
|
this.addSlotToContainer(new SlotFiltered(inventory, 5, 12, 72));
|
|
}
|
|
|
|
@Override
|
|
public void onContainerClosed(EntityPlayer entityplayer) {
|
|
if (entityplayer.worldObj.isRemote) {
|
|
return;
|
|
}
|
|
|
|
InventoryUtil.dropInventory(inventory, entityplayer.worldObj, entityplayer.posX, entityplayer.posY, entityplayer.posZ);
|
|
}
|
|
}
|