@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalBreakDoor.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalBreakDoor.java
|
||||
@@ -66,6 +66,12 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java
|
||||
@@ -71,6 +71,12 @@
|
||||
}
|
||||
|
||||
if (this.a == this.f() && this.a(this.entity.world.getDifficulty())) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalEatTile.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalEatTile.java
|
||||
@@ -3,6 +3,10 @@
|
||||
import java.util.EnumSet;
|
||||
import java.util.function.Predicate;
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java
|
||||
@@ -11,6 +11,10 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.level.block.state.predicate.BlockStatePredicate;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
@@ -11,7 +11,7 @@
|
||||
public class PathfinderGoalEatTile extends PathfinderGoal {
|
||||
|
||||
private static final Predicate<IBlockData> a = BlockStatePredicate.a(Blocks.GRASS);
|
||||
@@ -55,7 +59,8 @@
|
||||
@@ -63,7 +67,8 @@
|
||||
BlockPosition blockposition = this.b.getChunkCoordinates();
|
||||
|
||||
if (PathfinderGoalEatTile.a.test(this.c.getType(blockposition))) {
|
||||
@@ -21,7 +21,7 @@
|
||||
this.c.b(blockposition, false);
|
||||
}
|
||||
|
||||
@@ -64,7 +69,8 @@
|
||||
@@ -72,7 +77,8 @@
|
||||
BlockPosition blockposition1 = blockposition.down();
|
||||
|
||||
if (this.c.getType(blockposition1).a(Blocks.GRASS_BLOCK)) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalFollowOwner.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalFollowOwner.java
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
import java.util.EnumSet;
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalFollowOwner.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalFollowOwner.java
|
||||
@@ -15,6 +15,12 @@
|
||||
import net.minecraft.world.level.pathfinder.PathType;
|
||||
import net.minecraft.world.level.pathfinder.PathfinderNormal;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -13,7 +13,7 @@
|
||||
public class PathfinderGoalFollowOwner extends PathfinderGoal {
|
||||
|
||||
private final EntityTameableAnimal a;
|
||||
@@ -104,7 +110,18 @@
|
||||
@@ -117,7 +123,18 @@
|
||||
} else if (!this.a(new BlockPosition(i, j, k))) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalPanic.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalPanic.java
|
||||
@@ -68,6 +68,12 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.java
|
||||
@@ -11,6 +11,10 @@
|
||||
import net.minecraft.world.level.IBlockAccess;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.entity.EntityLiving;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class PathfinderGoalPanic extends PathfinderGoal {
|
||||
|
||||
protected final EntityCreature a;
|
||||
@@ -76,6 +80,12 @@
|
||||
|
||||
@Override
|
||||
public boolean b() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
@@ -3,6 +3,11 @@
|
||||
import java.util.Random;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java
|
||||
@@ -20,6 +20,11 @@
|
||||
import net.minecraft.world.level.chunk.IChunkAccess;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.block.CraftBlock;
|
||||
@@ -12,7 +12,7 @@
|
||||
public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
|
||||
|
||||
private final Block g;
|
||||
@@ -81,6 +86,14 @@
|
||||
@@ -98,6 +103,14 @@
|
||||
}
|
||||
|
||||
if (this.i > 60) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalSit.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalSit.java
|
||||
@@ -19,7 +19,7 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.java
|
||||
@@ -22,7 +22,7 @@
|
||||
@Override
|
||||
public boolean a() {
|
||||
if (!this.entity.isTamed()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalTame.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalTame.java
|
||||
@@ -57,7 +57,8 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.java
|
||||
@@ -62,7 +62,8 @@
|
||||
int i = this.entity.getTemper();
|
||||
int j = this.entity.getMaxDomestication();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalTempt.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalTempt.java
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
import java.util.EnumSet;
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.java
|
||||
@@ -11,6 +11,13 @@
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.RecipeItemStack;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||
@@ -14,7 +14,7 @@
|
||||
public class PathfinderGoalTempt extends PathfinderGoal {
|
||||
|
||||
private static final PathfinderTargetCondition c = (new PathfinderTargetCondition()).a(10.0D).a().b().d().c();
|
||||
@@ -12,7 +19,7 @@
|
||||
@@ -21,7 +28,7 @@
|
||||
private double g;
|
||||
private double h;
|
||||
private double i;
|
||||
@@ -23,7 +23,7 @@
|
||||
private int j;
|
||||
private boolean k;
|
||||
private final RecipeItemStack l;
|
||||
@@ -40,7 +47,17 @@
|
||||
@@ -49,7 +56,17 @@
|
||||
return false;
|
||||
} else {
|
||||
this.target = this.a.world.a(PathfinderGoalTempt.c, (EntityLiving) this.a);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalDefendVillage.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalDefendVillage.java
|
||||
@@ -49,7 +49,7 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.java
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
@Override
|
||||
public void c() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalHurtByTarget.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalHurtByTarget.java
|
||||
@@ -53,7 +53,7 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.java
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
@Override
|
||||
public void c() {
|
||||
@@ -9,7 +9,7 @@
|
||||
this.g = this.e.getGoalTarget();
|
||||
this.c = this.e.da();
|
||||
this.h = 300;
|
||||
@@ -100,6 +100,6 @@
|
||||
@@ -109,6 +109,6 @@
|
||||
}
|
||||
|
||||
protected void a(EntityInsentient entityinsentient, EntityLiving entityliving) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java
|
||||
@@ -52,7 +52,7 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.java
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
@Override
|
||||
public void c() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalOwnerHurtByTarget.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalOwnerHurtByTarget.java
|
||||
@@ -34,7 +34,7 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.java
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
@Override
|
||||
public void c() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalOwnerHurtTarget.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalOwnerHurtTarget.java
|
||||
@@ -34,7 +34,7 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.java
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
@Override
|
||||
public void c() {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalTarget.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalTarget.java
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.java
|
||||
@@ -13,6 +13,8 @@
|
||||
import net.minecraft.world.level.pathfinder.PathPoint;
|
||||
import net.minecraft.world.scores.ScoreboardTeamBase;
|
||||
|
||||
+import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit
|
||||
+
|
||||
public abstract class PathfinderGoalTarget extends PathfinderGoal {
|
||||
|
||||
protected final EntityInsentient e;
|
||||
@@ -59,7 +61,7 @@
|
||||
@@ -70,7 +72,7 @@
|
||||
if (entityliving instanceof EntityHuman && ((EntityHuman) entityliving).abilities.isInvulnerable) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -18,7 +18,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -80,7 +82,7 @@
|
||||
@@ -91,7 +93,7 @@
|
||||
|
||||
@Override
|
||||
public void d() {
|
||||
|
||||
Reference in New Issue
Block a user