Update to Minecraft 1.20.3

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-12-06 03:40:00 +11:00
parent afdb1d9bc3
commit 8398e12b34
256 changed files with 2745 additions and 1911 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/item/crafting/ShapedRecipes.java
+++ b/net/minecraft/world/item/crafting/ShapedRecipes.java
@@ -18,6 +18,14 @@
@@ -10,6 +10,14 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.World;
import org.apache.commons.lang3.NotImplementedException;
+// CraftBukkit start
+import org.bukkit.NamespacedKey;
@@ -14,9 +14,9 @@
+
public class ShapedRecipes implements RecipeCrafting {
final int width;
@@ -42,6 +50,68 @@
this(s, craftingbookcategory, i, j, nonnulllist, itemstack, true);
final ShapedRecipePattern pattern;
@@ -30,6 +38,68 @@
this(s, craftingbookcategory, shapedrecipepattern, itemstack, true);
}
+ // CraftBukkit start
@@ -27,9 +27,9 @@
+ recipe.setGroup(this.group);
+ recipe.setCategory(CraftRecipe.getCategory(this.category()));
+
+ switch (this.height) {
+ switch (this.pattern.height()) {
+ case 1:
+ switch (this.width) {
+ switch (this.pattern.width()) {
+ case 1:
+ recipe.shape("a");
+ break;
@@ -42,7 +42,7 @@
+ }
+ break;
+ case 2:
+ switch (this.width) {
+ switch (this.pattern.width()) {
+ case 1:
+ recipe.shape("a","b");
+ break;
@@ -55,7 +55,7 @@
+ }
+ break;
+ case 3:
+ switch (this.width) {
+ switch (this.pattern.width()) {
+ case 1:
+ recipe.shape("a","b","c");
+ break;
@@ -69,7 +69,7 @@
+ break;
+ }
+ char c = 'a';
+ for (RecipeItemStack list : this.recipeItems) {
+ for (RecipeItemStack list : this.pattern.ingredients()) {
+ RecipeChoice choice = CraftRecipe.toBukkit(list);
+ if (choice != null) {
+ recipe.setIngredient(c, choice);