@@ -13,7 +13,7 @@
|
||||
public abstract class EntityHanging extends Entity {
|
||||
|
||||
protected static final Predicate<Entity> b = (entity) -> {
|
||||
@@ -37,28 +43,39 @@
|
||||
@@ -37,26 +43,37 @@
|
||||
|
||||
protected void updateBoundingBox() {
|
||||
if (this.direction != null) {
|
||||
@@ -43,32 +43,28 @@
|
||||
+ d0 -= (double) direction.getAdjacentX() * 0.46875D;
|
||||
+ d2 -= (double) direction.getAdjacentZ() * 0.46875D;
|
||||
d1 += d5;
|
||||
- EnumDirection enumdirection = this.direction.f();
|
||||
+ EnumDirection enumdirection = direction.f();
|
||||
- EnumDirection enumdirection = this.direction.g();
|
||||
+ EnumDirection enumdirection = direction.g();
|
||||
|
||||
d0 += d4 * (double) enumdirection.getAdjacentX();
|
||||
d2 += d4 * (double) enumdirection.getAdjacentZ();
|
||||
- this.locX = d0;
|
||||
- this.locY = d1;
|
||||
- this.locZ = d2;
|
||||
- this.setPositionRaw(d0, d1, d2);
|
||||
- double d6 = (double) this.getHangingWidth();
|
||||
- double d7 = (double) this.getHangingHeight();
|
||||
- double d8 = (double) this.getHangingWidth();
|
||||
+ if (entity != null) {
|
||||
+ entity.locX = d0;
|
||||
+ entity.locY = d1;
|
||||
+ entity.locZ = d2;
|
||||
+ entity.setPositionRaw(d0, d1, d2);
|
||||
+ }
|
||||
+ double d6 = (double) width;
|
||||
+ double d7 = (double) height;
|
||||
+ double d8 = (double) width;
|
||||
|
||||
- if (this.direction.k() == EnumDirection.EnumAxis.Z) {
|
||||
+ if (direction.k() == EnumDirection.EnumAxis.Z) {
|
||||
- if (this.direction.m() == EnumDirection.EnumAxis.Z) {
|
||||
+ if (direction.m() == EnumDirection.EnumAxis.Z) {
|
||||
d8 = 1.0D;
|
||||
} else {
|
||||
d6 = 1.0D;
|
||||
@@ -67,11 +84,12 @@
|
||||
@@ -65,11 +82,12 @@
|
||||
d6 /= 32.0D;
|
||||
d7 /= 32.0D;
|
||||
d8 /= 32.0D;
|
||||
@@ -83,7 +79,7 @@
|
||||
return i % 32 == 0 ? 0.5D : 0.0D;
|
||||
}
|
||||
|
||||
@@ -83,6 +101,24 @@
|
||||
@@ -78,6 +96,24 @@
|
||||
if (this.e++ == 100 && !this.world.isClientSide) {
|
||||
this.e = 0;
|
||||
if (!this.dead && !this.survives()) {
|
||||
@@ -108,7 +104,7 @@
|
||||
this.die();
|
||||
this.a((Entity) null);
|
||||
}
|
||||
@@ -139,6 +175,22 @@
|
||||
@@ -134,6 +170,22 @@
|
||||
return false;
|
||||
} else {
|
||||
if (!this.dead && !this.world.isClientSide) {
|
||||
@@ -131,7 +127,7 @@
|
||||
this.die();
|
||||
this.velocityChanged();
|
||||
this.a(damagesource.getEntity());
|
||||
@@ -151,6 +203,18 @@
|
||||
@@ -146,6 +198,18 @@
|
||||
@Override
|
||||
public void move(EnumMoveType enummovetype, Vec3D vec3d) {
|
||||
if (!this.world.isClientSide && !this.dead && vec3d.g() > 0.0D) {
|
||||
@@ -150,10 +146,10 @@
|
||||
this.die();
|
||||
this.a((Entity) null);
|
||||
}
|
||||
@@ -159,7 +223,7 @@
|
||||
@@ -154,7 +218,7 @@
|
||||
|
||||
@Override
|
||||
public void f(double d0, double d1, double d2) {
|
||||
public void h(double d0, double d1, double d2) {
|
||||
- if (!this.world.isClientSide && !this.dead && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
|
||||
+ if (false && !this.world.isClientSide && !this.dead && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) { // CraftBukkit - not needed
|
||||
this.die();
|
||||
|
||||
Reference in New Issue
Block a user