Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // The comments are not in the actual code i just added them to this pastebin
- @Override
- public boolean matches(InventoryCrafting inventoryCrafting, World world) {
- ItemStack itemStack = null;
- ItemStack itemStack1 = null;
- 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(?)*/
- ItemStack itemStack2 = inventoryCrafting.getStackInSlot(i); /*Declares the ItemStack itemStack2 to check the stack in the slot the integer i is */
- if (itemStack2 != null) { //An if statement to check if the slot itemStack2 is assigned to is not empty
- if (itemStack2.getItem() == ModItems.itemSaw) { //An if statement that checks if the slot itemStack2 is assigned to has ModItems.itemSaw in it*/
- return false; //returns false if the previous two statements are ture?
- }
- }
- }
- return itemStack != null; // no idea what this returns
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement