Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package neg2013.acsension.inventory;
- import com.ibm.icu.util.Region;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- import neg2013.acsension.slot.CrusherInputSlot;
- import neg2013.acsension.slot.CrusherOutputSlot;
- import neg2013.acsension.slot.GenericSlot;
- import neg2013.acsension.tile_entity.TECrusher;
- import neg2013.acsension.tile_entity.TEDecomp;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.inventory.Container;
- import net.minecraft.inventory.Slot;
- public class DecompContainer extends Container{
- private TEDecomp decomp;
- private int slotId = -1;
- private int nextId(){
- slotId++;
- return slotId;
- }
- public DecompContainer(InventoryPlayer invPlayer, TEDecomp decomp){
- this.decomp = decomp;
- // player inv
- //hot bar
- for(int x = 0; x < 9; x++){
- addSlotToContainer(new Slot(invPlayer, x, 8 + (18 * x), 146));
- }
- for(int x = 0; x < 9; x++)
- for(int y = 0; y < 3; y++)
- addSlotToContainer(new Slot(invPlayer, x + y * 9 + 9, 8 + 18 * x, 88 + 18 * y));
- // player inv
- addSlotToContainer(new GenericSlot(decomp, nextId(), 80, 15));
- addSlotToContainer(new GenericSlot(decomp, nextId(), 60, 64));
- addSlotToContainer(new GenericSlot(decomp, nextId(), 80, 64));
- addSlotToContainer(new GenericSlot(decomp, nextId(), 100, 64));
- }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return decomp.isUseableByPlayer(player);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment