Updated Upstream (CraftBukkit/Spigot)
Doesn't compile yet. CraftBukkit Changes: 90d6905b Repackage NMS 69cf961d Repackage patches Spigot Changes: 79d53c28 Repackage NMS
This commit is contained in:
@@ -4,52 +4,11 @@ Date: Sat, 22 Sep 2018 00:33:08 -0500
|
||||
Subject: [PATCH] Add LivingEntity#getTargetEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
||||
+++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
||||
@@ -0,0 +0,0 @@ public class AxisAlignedBB {
|
||||
return this.b(vec3d.x, vec3d.y, vec3d.z);
|
||||
}
|
||||
|
||||
+ public final AxisAlignedBB expand(double x, double y, double z) { return b(x, y, z); } // Paper - OBFHELPER
|
||||
public AxisAlignedBB b(double d0, double d1, double d2) {
|
||||
double d3 = this.minX;
|
||||
double d4 = this.minY;
|
||||
@@ -0,0 +0,0 @@ public class AxisAlignedBB {
|
||||
return new AxisAlignedBB(d3, d4, d5, d6, d7, d8);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ public AxisAlignedBB grow(double d0) {
|
||||
+ return grow(d0, d0, d0);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public AxisAlignedBB grow(double d0, double d1, double d2) {
|
||||
double d3 = this.minX - d0;
|
||||
double d4 = this.minY - d1;
|
||||
@@ -0,0 +0,0 @@ public class AxisAlignedBB {
|
||||
return this.minX < d3 && this.maxX > d0 && this.minY < d4 && this.maxY > d1 && this.minZ < d5 && this.maxZ > d2;
|
||||
}
|
||||
|
||||
+ public final boolean contains(Vec3D vec3d) { return d(vec3d); } // Paper - OBFHELPER
|
||||
public boolean d(Vec3D vec3d) {
|
||||
return this.e(vec3d.x, vec3d.y, vec3d.z);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class AxisAlignedBB {
|
||||
return this.g(-d0);
|
||||
}
|
||||
|
||||
+ public final Optional<Vec3D> calculateIntercept(Vec3D vec3d, Vec3D vec3d1) { return b(vec3d, vec3d1); } // Paper - OBFHELPER
|
||||
public Optional<Vec3D> b(Vec3D vec3d, Vec3D vec3d1) {
|
||||
double[] adouble = new double[]{1.0D};
|
||||
double d0 = vec3d1.x - vec3d.x;
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return this.c(f - 90.0F, f1);
|
||||
}
|
||||
|
||||
@@ -57,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public final Vec3D j(float f) {
|
||||
if (f == 1.0F) {
|
||||
return new Vec3D(this.locX(), this.getHeadY(), this.locZ());
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return this.getPassengers().size() < 1;
|
||||
}
|
||||
|
||||
@@ -65,10 +24,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public float bg() {
|
||||
return 0.0F;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
return world.rayTrace(raytrace);
|
||||
}
|
||||
@@ -107,10 +66,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public int shieldBlockingDelay = world.paperConfig.shieldBlockingDelay;
|
||||
|
||||
public int getShieldBlockingDelay() {
|
||||
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/IEntitySelector.java b/src/main/java/net/minecraft/world/entity/IEntitySelector.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
--- a/src/main/java/net/minecraft/world/entity/IEntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/IEntitySelector.java
|
||||
@@ -0,0 +0,0 @@ public final class IEntitySelector {
|
||||
public static final Predicate<Entity> e = (entity) -> {
|
||||
return !(entity instanceof EntityHuman) || !entity.isSpectator() && !((EntityHuman) entity).isCreative();
|
||||
@@ -119,6 +78,47 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public static final Predicate<Entity> f = (entity) -> {
|
||||
return !(entity instanceof EntityHuman) || !entity.isSpectator() && !((EntityHuman) entity).isCreative() && entity.world.getDifficulty() != EnumDifficulty.PEACEFUL;
|
||||
};
|
||||
diff --git a/src/main/java/net/minecraft/world/phys/AxisAlignedBB.java b/src/main/java/net/minecraft/world/phys/AxisAlignedBB.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/phys/AxisAlignedBB.java
|
||||
+++ b/src/main/java/net/minecraft/world/phys/AxisAlignedBB.java
|
||||
@@ -0,0 +0,0 @@ public class AxisAlignedBB {
|
||||
return this.b(vec3d.x, vec3d.y, vec3d.z);
|
||||
}
|
||||
|
||||
+ public final AxisAlignedBB expand(double x, double y, double z) { return b(x, y, z); } // Paper - OBFHELPER
|
||||
public AxisAlignedBB b(double d0, double d1, double d2) {
|
||||
double d3 = this.minX;
|
||||
double d4 = this.minY;
|
||||
@@ -0,0 +0,0 @@ public class AxisAlignedBB {
|
||||
return new AxisAlignedBB(d3, d4, d5, d6, d7, d8);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ public AxisAlignedBB grow(double d0) {
|
||||
+ return grow(d0, d0, d0);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public AxisAlignedBB grow(double d0, double d1, double d2) {
|
||||
double d3 = this.minX - d0;
|
||||
double d4 = this.minY - d1;
|
||||
@@ -0,0 +0,0 @@ public class AxisAlignedBB {
|
||||
return this.minX < d3 && this.maxX > d0 && this.minY < d4 && this.maxY > d1 && this.minZ < d5 && this.maxZ > d2;
|
||||
}
|
||||
|
||||
+ public final boolean contains(Vec3D vec3d) { return d(vec3d); } // Paper - OBFHELPER
|
||||
public boolean d(Vec3D vec3d) {
|
||||
return this.e(vec3d.x, vec3d.y, vec3d.z);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class AxisAlignedBB {
|
||||
return this.g(-d0);
|
||||
}
|
||||
|
||||
+ public final Optional<Vec3D> calculateIntercept(Vec3D vec3d, Vec3D vec3d1) { return b(vec3d, vec3d1); } // Paper - OBFHELPER
|
||||
public Optional<Vec3D> b(Vec3D vec3d, Vec3D vec3d1) {
|
||||
double[] adouble = new double[]{1.0D};
|
||||
double d0 = vec3d1.x - vec3d.x;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
|
||||
Reference in New Issue
Block a user