Update to Minecraft 1.12-pre2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-05-14 12:00:00 +10:00
parent b8446f770b
commit 40c8954e17
210 changed files with 2280 additions and 1974 deletions

View File

@@ -1,17 +1,17 @@
--- a/net/minecraft/server/ShapedRecipes.java
+++ b/net/minecraft/server/ShapedRecipes.java
@@ -1,5 +1,10 @@
package net.minecraft.server;
@@ -12,6 +12,10 @@
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;
+// CraftBukkit end
+
public class ShapedRecipes implements IRecipe {
private final int width;
@@ -22,6 +27,62 @@
public class ShapedRecipes extends IRecipe {
@@ -28,6 +32,63 @@
this.result = itemstack;
}
@@ -61,8 +61,9 @@
+ break;
+ }
+ char c = 'a';
+ for (ItemStack stack : this.items) {
+ if (stack != null) {
+ for (RecipeItemStack list : this.items) {
+ if (list != null && list.choices.length > 0) {
+ net.minecraft.server.ItemStack stack = list.choices[0];
+ recipe.setIngredient(c, org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(stack.getItem()), stack.getData());
+ }
+ c++;