Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.server;
- import java.util.Comparator;
- class RecipeSorter
- implements Comparator
- {
- RecipeSorter(CraftingManager craftingmanager)
- {
- a = craftingmanager;
- }
- public int compare(Object obj, Object obj1)
- {
- if(!(obj instanceof CraftingRecipe) || !(obj1 instanceof CraftingRecipe))
- throw new IllegalArgumentException();
- else
- return a((CraftingRecipe)obj, (CraftingRecipe)obj);
- }
- public int a(CraftingRecipe craftingrecipe, CraftingRecipe craftingrecipe1)
- {
- int i = craftingrecipe.getClass().toString().compareTo(craftingrecipe1.getClass().toString());
- if(i != 0)
- return i;
- else
- return craftingrecipe1.a() - craftingrecipe.a();
- }
- final CraftingManager a;
- }
Add Comment
Please, Sign In to add comment