Update to Minecraft 1.19.4

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2023-03-15 03:30:00 +11:00
parent 86d3c9caa7
commit b76cbe36c5
32 changed files with 1379 additions and 7 deletions

View File

@@ -388,6 +388,7 @@ public abstract class InventoryView {
}
break;
case LOOM:
case SMITHING_NEW:
if (slot == 3) {
type = InventoryType.SlotType.RESULT;
} else {

View File

@@ -0,0 +1,36 @@
package org.bukkit.inventory;
import org.bukkit.NamespacedKey;
import org.jetbrains.annotations.NotNull;
/**
* Represents a smithing transform recipe.
*/
public class SmithingTransformRecipe extends SmithingRecipe {
private final RecipeChoice template;
/**
* Create a smithing recipe to produce the specified result ItemStack.
*
* @param key The unique recipe key
* @param result The item you want the recipe to create.
* @param template The template item.
* @param base The base ingredient
* @param addition The addition ingredient
*/
public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
super(key, result, base, addition);
this.template = template;
}
/**
* Get the template recipe item.
*
* @return template choice
*/
@NotNull
public RecipeChoice getTemplate() {
return template.clone();
}
}

View File

@@ -0,0 +1,36 @@
package org.bukkit.inventory;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.jetbrains.annotations.NotNull;
/**
* Represents a smithing trim recipe.
*/
public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe {
private final RecipeChoice template;
/**
* Create a smithing recipe to produce the specified result ItemStack.
*
* @param key The unique recipe key
* @param template The template item.
* @param base The base ingredient
* @param addition The addition ingredient
*/
public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
super(key, new ItemStack(Material.AIR), base, addition);
this.template = template;
}
/**
* Get the template recipe item.
*
* @return template choice
*/
@NotNull
public RecipeChoice getTemplate() {
return template.clone();
}
}