コード例 #1
0
 @Override
 public ItemStack getRecipeOutput() {
   Optional<Item> nominalOutput = recipe.getNominalOutput();
   if (nominalOutput.isPresent()) {
     return Game.natives().toNative(nominalOutput.get());
   }
   return null;
 }
コード例 #2
0
 @Override
 public ItemStack getCraftingResult(InventoryCrafting inventoryCrafting) {
   Optional<Item> craftingResult = recipe.getCraftingResult(MCCraftingGrid.get(inventoryCrafting));
   if (craftingResult.isPresent()) {
     return Game.natives().toNative(craftingResult.get());
   } else {
     return null;
   }
 }
コード例 #3
0
 @Override
 public boolean matches(InventoryCrafting inventoryCrafting, World world) {
   return recipe.matches(MCCraftingGrid.get(inventoryCrafting));
 }