@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/inventory/ContainerSmithing.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerSmithing.java
|
||||
@@ -13,6 +13,8 @@
|
||||
@@ -14,6 +14,8 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class ContainerSmithing extends ContainerAnvilAbstract {
|
||||
|
||||
public static final int TEMPLATE_SLOT = 0;
|
||||
@@ -28,6 +30,9 @@
|
||||
@@ -29,6 +31,9 @@
|
||||
@Nullable
|
||||
private RecipeHolder<SmithingRecipe> selectedRecipe;
|
||||
private final List<RecipeHolder<SmithingRecipe>> recipes;
|
||||
@@ -19,16 +19,16 @@
|
||||
|
||||
public ContainerSmithing(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.NULL);
|
||||
@@ -97,7 +102,7 @@
|
||||
List<RecipeHolder<SmithingRecipe>> list = this.level.getRecipeManager().getRecipesFor(Recipes.SMITHING, this.inputSlots, this.level);
|
||||
@@ -103,7 +108,7 @@
|
||||
List<RecipeHolder<SmithingRecipe>> list = this.level.getRecipeManager().getRecipesFor(Recipes.SMITHING, smithingrecipeinput, this.level);
|
||||
|
||||
if (list.isEmpty()) {
|
||||
- this.resultSlots.setItem(0, ItemStack.EMPTY);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareSmithingEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
|
||||
} else {
|
||||
RecipeHolder<SmithingRecipe> recipeholder = (RecipeHolder) list.get(0);
|
||||
ItemStack itemstack = ((SmithingRecipe) recipeholder.value()).assemble(this.inputSlots, this.level.registryAccess());
|
||||
@@ -105,7 +110,9 @@
|
||||
ItemStack itemstack = ((SmithingRecipe) recipeholder.value()).assemble(smithingrecipeinput, this.level.registryAccess());
|
||||
@@ -111,7 +116,9 @@
|
||||
if (itemstack.isItemEnabled(this.level.enabledFeatures())) {
|
||||
this.selectedRecipe = recipeholder;
|
||||
this.resultSlots.setRecipeUsed(recipeholder);
|
||||
@@ -39,7 +39,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,4 +144,18 @@
|
||||
@@ -143,4 +150,18 @@
|
||||
return !this.getSlot(i).hasItem();
|
||||
}).findFirst();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user