Skip to content

Instantly share code, notes, and snippets.

Created February 16, 2016 10:22
Show Gist options
  • Save anonymous/9c57f12d747c4ca36c69 to your computer and use it in GitHub Desktop.
Save anonymous/9c57f12d747c4ca36c69 to your computer and use it in GitHub Desktop.
Container
package com.ae.GUI;
import com.ae.TileEntities.ChargerTE;
import com.ae.TileEntities.BaseClasses.EnergyChargerTE;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
public class ContainerCharger extends Container{
public ContainerCharger(InventoryPlayer inventory, ChargerTE te) {
this.addSlotToContainer(new Slot(te, 0, 55, 32));
for(int i = 0; i < 3; i++){
for(int j = 0; j < 9; j++){
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j*18, 84 + i*18));
}
}
for(int i = 0; i < 9; i++){
this.addSlotToContainer(new Slot(inventory, i, 8 + i*18, 142));
}
}
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
}
@Override
public boolean canInteractWith(EntityPlayer playerIn) {
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment