@@ -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
|
||||
|
||||
@@ -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)))}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user