tutorial:recipe_type
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:recipe_type [2021/12/01 11:20] – corrected two compiler errors ayutac | tutorial:recipe_type [2021/12/01 11:46] (current) – added commentary that RecipeSerializer is missing ayutac | ||
---|---|---|---|
Line 102: | Line 102: | ||
public ItemStack craft(CraftingInventory inv) { | public ItemStack craft(CraftingInventory inv) { | ||
return this.getOutput().copy(); | return this.getOutput().copy(); | ||
+ | } | ||
+ | |||
+ | @Override | ||
+ | public boolean fits(int width, int height) { | ||
+ | return true; | ||
} | } | ||
} | } | ||
Line 113: | Line 118: | ||
@Override | @Override | ||
public boolean matches(CraftingInventory inv, World world) { | public boolean matches(CraftingInventory inv, World world) { | ||
- | if(inv.getInvSize(0) < 2) return false; | + | if(inv.size(0) < 2) return false; |
- | return inputA.test(inventory.getInvStack(0)) && inputB.test(inventory.getInvStack(1)); | + | return inputA.test(inventory.getStack(0)) && inputB.test(inventory.getStack(1)); |
} | } | ||
} | } | ||
Line 136: | Line 141: | ||
</ | </ | ||
+ | What's still missing is the RecipeSerializer, | ||
SOURCE: | SOURCE: | ||
[[https:// | [[https:// | ||
tutorial/recipe_type.1638357638.txt.gz · Last modified: 2021/12/01 11:20 by ayutac