SPIGOT-6851: removeRecipe not unregistering recipe ID
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
});
|
||||
MinecraftKey minecraftkey = irecipe.getId();
|
||||
IRecipe<?> irecipe1 = (IRecipe) map1.put(minecraftkey, irecipe);
|
||||
@@ -160,6 +186,18 @@
|
||||
@@ -160,6 +186,26 @@
|
||||
}
|
||||
});
|
||||
this.recipes = ImmutableMap.copyOf(map);
|
||||
@@ -125,6 +125,14 @@
|
||||
+ }
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ public boolean removeRecipe(MinecraftKey mcKey) {
|
||||
+ for (Object2ObjectLinkedOpenHashMap<MinecraftKey, IRecipe<?>> recipes : recipes.values()) {
|
||||
+ recipes.remove(mcKey);
|
||||
+ }
|
||||
+
|
||||
+ return byName.remove(mcKey) != null;
|
||||
+ }
|
||||
+
|
||||
+ public void clearRecipes() {
|
||||
+ this.recipes = Maps.newHashMap();
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user