Dan_Ender

Untitled

Aug 21st, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. @EventHandler
  2. public void onPreItemCraft(PrepareItemCraftEvent e) {
  3. Recipe craft = e.getRecipe();
  4. if (craft==null) return;
  5. ItemStack result = craft.getResult();
  6. if (result==null || result.getType()!=Material.QUARTZ_BLOCK) return;
  7. ShapedRecipe shapedCraft = (ShapedRecipe) craft;
  8. if (shapedCraft.getIngredientMap().size()==4) {
  9. e.getInventory().setResult(null);
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment