Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @NetworkField(index = 7)
- float progress = 0;
- @NetworkField(index = 8)
- float recipeOperation = 200.0F;
- boolean processing = false;
- protected InventoryHandler handler = new InventoryHandler(this);
- public NonNullList<ItemStack> inventory;
- public int slotCount;
- GTTileSluice(EnumFacing... validRotations) {
- super(validRotations);
- this.slotCount = 10;
- this.inventory = NonNullList.withSize(10, ItemStack.EMPTY);
- this.addSlots(this.handler);
- this.handler.validateSlots();
- }
- public float getProgress() {
- return progress;
- }
- public float getMaxProgress() {
- return recipeOperation;
- }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return !this.isInvalid();
- }
- @Override
- public Class<? extends GuiScreen> getGuiClass(EntityPlayer player) {
- return GTSluiceGui.class;
- }
- @Override
- public ContainerIC2 getGuiContainer(EntityPlayer player) {
- return new GTContainerSluice(player.inventory, this);
- }
- @Override
- public boolean hasGui(EntityPlayer var1) {
- return true;
- }
- @Override
- public void onGuiClosed(EntityPlayer var1) {
- }
- @Override
- public void update() {
- // TODO Everything!
- }
- public void setStackInSlot(int slot, ItemStack stack) {
- this.inventory.set(slot, stack);
- }
- public ItemStack getStackInSlot(int slot) {
- return (ItemStack) this.inventory.get(slot);
- }
- public int getSlotCount() {
- return this.slotCount;
- }
- public int getMaxStackSize(int slot) {
- return 64;
- }
- public boolean canInsert(int slot, ItemStack stack) {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement