Advertisement
Guest User

Untitled

a guest
Dec 27th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.14 KB | None | 0 0
  1. // The comments are not in the actual code i just added them to this pastebin
  2. @Override
  3.     public boolean matches(InventoryCrafting inventoryCrafting, World world) {
  4.         ItemStack itemStack = null;
  5.         ItemStack itemStack1 = null;
  6.  
  7.         for (int i = 0; i < inventoryCrafting.getSizeInventory() ++i;) {  /*First this loop declares the integer i to be 0, then it checks if the integer i is smalelr than the size of the craftin inventory, in the end the loop add 1 to the integer i(?)*/
  8.             ItemStack itemStack2 = inventoryCrafting.getStackInSlot(i); /*Declares the ItemStack itemStack2 to check the stack in the slot the integer i is */
  9.                 if (itemStack2 != null) { //An if statement to check if the slot itemStack2 is assigned to is not empty
  10.                     if (itemStack2.getItem() == ModItems.itemSaw) { //An if statement that checks if the slot itemStack2 is assigned to has ModItems.itemSaw in it*/
  11.                         return false; //returns false if the previous two statements are ture?
  12.                     }
  13.                 }
  14.         }
  15.         return itemStack != null; // no idea what this returns
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement