Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -19,14 +19,14 @@
public ContainerSmithing(int i, PlayerInventory playerinventory) {
this(i, playerinventory, ContainerAccess.NULL);
@@ -61,13 +66,15 @@
List<RecipeSmithing> list = this.level.getCraftingManager().b(Recipes.SMITHING, this.inputSlots, this.level);
List<RecipeSmithing> list = this.level.getRecipeManager().getRecipesFor(Recipes.SMITHING, this.inputSlots, this.level);
if (list.isEmpty()) {
- this.resultSlots.setItem(0, ItemStack.EMPTY);
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareSmithingEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
} else {
this.selectedRecipe = (RecipeSmithing) list.get(0);
ItemStack itemstack = this.selectedRecipe.a(this.inputSlots);
ItemStack itemstack = this.selectedRecipe.assemble(this.inputSlots);
this.resultSlots.setRecipeUsed(this.selectedRecipe);
- this.resultSlots.setItem(0, itemstack);
@@ -37,8 +37,8 @@
}
@@ -83,4 +90,18 @@
public boolean a(ItemStack itemstack, Slot slot) {
return slot.container != this.resultSlots && super.a(itemstack, slot);
public boolean canTakeItemForPickAll(ItemStack itemstack, Slot slot) {
return slot.container != this.resultSlots && super.canTakeItemForPickAll(itemstack, slot);
}
+
+ // CraftBukkit start