Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.onVoid.helpfuladdons.charger;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- import net.minecraft.client.Minecraft;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.inventory.Container;
- import net.minecraft.inventory.Slot;
- import net.minecraft.inventory.SlotFurnace;
- import net.minecraft.item.ItemStack;
- public class ContainerCharger extends Container {
- private ChargerTileEntity charger;
- public ContainerCharger (InventoryPlayer pi, ChargerTileEntity ent){
- this.charger = ent;
- this.addSlotToContainer(new Slot(ent, 0, 44, 17));
- this.addSlotToContainer(new Slot(ent, 1, 62, 17));
- this.addSlotToContainer(new Slot(ent, 2, 80, 17));
- this.addSlotToContainer(new Slot(ent, 3, 44, 35));
- this.addSlotToContainer(new Slot(ent, 4, 62, 35));
- this.addSlotToContainer(new Slot(ent, 5, 80, 35));
- this.addSlotToContainer(new Slot(ent, 6, 44, 53));
- this.addSlotToContainer(new Slot(ent, 7, 62, 53));
- this.addSlotToContainer(new Slot(ent, 8, 80, 53));
- this.addSlotToContainer(new SlotFurnace(pi.player, ent, 9, 138, 35));
- this.addSlotToContainer(new SlotFurnace(pi.player, ent, 10, 107, 35));
- for (int i = 0; i < 3; i++){
- for (int j = 0; j < 9; j++){
- this.addSlotToContainer(new Slot(pi, j + i*9 + 9, 8 + j*18, 84 + i*18));
- }
- }
- for (int i = 0; i < 9; i++){
- this.addSlotToContainer(new Slot(pi, i, 8 + i * 18, 142));
- }
- }
- @Override
- public ItemStack transferStackInSlot(EntityPlayer p, int i)
- {
- p.getEntityWorld().playSoundAtEntity(p, "fire.ignite", 1.0F, 1.0F);
- return null;
- }
- @SideOnly (Side.CLIENT)
- public void updateProgressBar (int slot, int newValue){
- }
- @Override
- public boolean canInteractWith(EntityPlayer arg0) {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement