Update to Minecraft 1.13-pre7

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-07-15 10:00:00 +10:00
parent d1e91a8adb
commit 7e0a66fdd5
608 changed files with 17788 additions and 9378 deletions

View File

@@ -1,9 +1,9 @@
--- a/net/minecraft/server/ShapedRecipes.java
+++ b/net/minecraft/server/ShapedRecipes.java
@@ -14,6 +14,10 @@
@@ -13,6 +13,10 @@
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import javax.annotation.Nullable;
+// CraftBukkit start
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.craftbukkit.inventory.CraftShapedRecipe;
@@ -11,22 +11,7 @@
public class ShapedRecipes implements IRecipe {
@@ -22,6 +26,14 @@
private final NonNullList<RecipeItemStack> items;
private final ItemStack result;
private final String e;
+ // CraftBukkit start
+ public MinecraftKey key;
+
+ @Override
+ public void setKey(MinecraftKey key) {
+ this.key = key;
+ }
+ // CraftBukkit end
public ShapedRecipes(String s, int i, int j, NonNullList<RecipeItemStack> nonnulllist, ItemStack itemstack) {
this.e = s;
@@ -31,6 +43,63 @@
@@ -32,6 +36,64 @@
this.result = itemstack;
}
@@ -77,9 +62,10 @@
+ }
+ char c = 'a';
+ for (RecipeItemStack list : this.items) {
+ if (list != null && list.choices.length > 0) {
+ list.buildChoices();
+ if (list.choices.length > 0) {
+ net.minecraft.server.ItemStack stack = list.choices[0];
+ recipe.setIngredient(c, org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(stack.getItem()), (list.choices.length) > 1 ? 32767 : stack.getData());
+ recipe.setIngredient(c, org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(stack.getItem()), (list.choices.length) > 1 ? 32767 : 0);
+ }
+ c++;
+ }
@@ -87,6 +73,20 @@
+ }
+ // CraftBukkit end
+
public ItemStack b() {
return this.result;
public MinecraftKey getKey() {
return this.e;
}
@@ -302,11 +364,11 @@
packetdataserializer.a(shapedrecipes.result);
}
- public IRecipe a(MinecraftKey minecraftkey, PacketDataSerializer packetdataserializer) {
+ public ShapedRecipes a(MinecraftKey minecraftkey, PacketDataSerializer packetdataserializer) { // CraftBukkit - decompile error
return this.b(minecraftkey, packetdataserializer);
}
- public IRecipe a(MinecraftKey minecraftkey, JsonObject jsonobject) {
+ public ShapedRecipes a(MinecraftKey minecraftkey, JsonObject jsonobject) { // CraftBukkit - decompile error
return this.b(minecraftkey, jsonobject);
}
}