Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. @NetworkField(index = 7)
  2. float progress = 0;
  3. @NetworkField(index = 8)
  4. float recipeOperation = 200.0F;
  5. boolean processing = false;
  6.  
  7. protected InventoryHandler handler = new InventoryHandler(this);
  8. public NonNullList<ItemStack> inventory;
  9. public int slotCount;
  10.  
  11. GTTileSluice(EnumFacing... validRotations) {
  12. super(validRotations);
  13. this.slotCount = 10;
  14. this.inventory = NonNullList.withSize(10, ItemStack.EMPTY);
  15. this.addSlots(this.handler);
  16. this.handler.validateSlots();
  17. }
  18.  
  19. public float getProgress() {
  20. return progress;
  21. }
  22.  
  23. public float getMaxProgress() {
  24. return recipeOperation;
  25. }
  26.  
  27. @Override
  28. public boolean canInteractWith(EntityPlayer player) {
  29. return !this.isInvalid();
  30. }
  31.  
  32. @Override
  33. public Class<? extends GuiScreen> getGuiClass(EntityPlayer player) {
  34. return GTSluiceGui.class;
  35. }
  36.  
  37. @Override
  38. public ContainerIC2 getGuiContainer(EntityPlayer player) {
  39. return new GTContainerSluice(player.inventory, this);
  40. }
  41.  
  42. @Override
  43. public boolean hasGui(EntityPlayer var1) {
  44. return true;
  45. }
  46.  
  47. @Override
  48. public void onGuiClosed(EntityPlayer var1) {
  49. }
  50.  
  51. @Override
  52. public void update() {
  53. // TODO Everything!
  54. }
  55.  
  56. public void setStackInSlot(int slot, ItemStack stack) {
  57. this.inventory.set(slot, stack);
  58. }
  59.  
  60. public ItemStack getStackInSlot(int slot) {
  61. return (ItemStack) this.inventory.get(slot);
  62. }
  63.  
  64. public int getSlotCount() {
  65. return this.slotCount;
  66. }
  67.  
  68. public int getMaxStackSize(int slot) {
  69. return 64;
  70. }
  71.  
  72. public boolean canInsert(int slot, ItemStack stack) {
  73. return true;
  74. }
  75.  
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement