Update to Minecraft 1.12-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-05-19 21:00:13 +10:00
parent 5284eb89a3
commit 530fe41851
47 changed files with 222 additions and 283 deletions

View File

@@ -551,13 +551,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public void setAI(boolean ai) {
if (this.getHandle() instanceof EntityInsentient) {
((EntityInsentient) this.getHandle()).setAI(!ai);
((EntityInsentient) this.getHandle()).setNoAI(!ai);
}
}
@Override
public boolean hasAI() {
return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).hasAI(): false;
return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).isNoAI(): false;
}
@Override

View File

@@ -51,7 +51,7 @@ public class CraftShapedRecipe extends ShapedRecipe implements CraftRecipe {
for (int i = 0; i < shape.length; i++) {
String row = shape[i];
for (int j = 0; j < row.length(); j++) {
data.set(i * width + j, new RecipeItemStack(CraftItemStack.asNMSCopy(ingred.get(row.charAt(j)))));
data.set(i * width + j, RecipeItemStack.a(new net.minecraft.server.ItemStack[]{CraftItemStack.asNMSCopy(ingred.get(row.charAt(j)))}));
}
}

View File

@@ -40,7 +40,7 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe
List<ItemStack> ingred = this.getIngredientList();
NonNullList<RecipeItemStack> data = NonNullList.a(ingred.size(), RecipeItemStack.a);
for (int i = 0; i < ingred.size(); i++) {
data.set(i, new RecipeItemStack(CraftItemStack.asNMSCopy(ingred.get(i))));
data.set(i, RecipeItemStack.a(new net.minecraft.server.ItemStack[]{CraftItemStack.asNMSCopy(ingred.get(i))}));
}
CraftingManager.a(CraftNamespacedKey.toMinecraft(this.getKey()), new ShapelessRecipes("", CraftItemStack.asNMSCopy(this.getResult()), data));