Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean matches(InventoryCrafting inventoryCrafting, World world) {
- ItemStack saw = null;
- ItemStack plank = null;
- for (int i = 0; i < inventoryCrafting.getSizeInventory(); ++i) {
- ItemStack stackInSlot = inventoryCrafting.getStackInSlot(i);
- if (stackInSlot != null) {
- if (stackInSlot.getItem() == ModItems.itemSaw) {
- if (saw != null) return false;
- saw = stackInSlot;
- }
- }
- if (stackInSlot != null) {
- if (stackInSlot.getItem() == Item.getItemFromBlock(Blocks.wooden_slab)) {
- if (plank != null) return false;
- plank = stackInSlot;
- }
- }
- }
- return saw != null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement