@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityItemFrame.java
|
||||
+++ b/net/minecraft/server/EntityItemFrame.java
|
||||
@@ -52,15 +52,29 @@
|
||||
@@ -52,16 +52,27 @@
|
||||
@Override
|
||||
protected void updateBoundingBox() {
|
||||
if (this.direction != null) {
|
||||
@@ -14,42 +14,42 @@
|
||||
+ public static AxisAlignedBB calculateBoundingBox(@Nullable Entity entity, BlockPosition blockPosition, EnumDirection direction, int width, int height) {
|
||||
+ {
|
||||
double d0 = 0.46875D;
|
||||
|
||||
- this.locX = (double) this.blockPosition.getX() + 0.5D - (double) this.direction.getAdjacentX() * 0.46875D;
|
||||
- this.locY = (double) this.blockPosition.getY() + 0.5D - (double) this.direction.getAdjacentY() * 0.46875D;
|
||||
- this.locZ = (double) this.blockPosition.getZ() + 0.5D - (double) this.direction.getAdjacentZ() * 0.46875D;
|
||||
- double d1 = (double) this.getHangingWidth();
|
||||
- double d2 = (double) this.getHangingHeight();
|
||||
- double d3 = (double) this.getHangingWidth();
|
||||
- EnumDirection.EnumAxis enumdirection_enumaxis = this.direction.k();
|
||||
+ double locX = (double) blockPosition.getX() + 0.5D - (double) direction.getAdjacentX() * 0.46875D;
|
||||
+ double locY = (double) blockPosition.getY() + 0.5D - (double) direction.getAdjacentY() * 0.46875D;
|
||||
+ double locZ = (double) blockPosition.getZ() + 0.5D - (double) direction.getAdjacentZ() * 0.46875D;
|
||||
- double d1 = (double) this.blockPosition.getX() + 0.5D - (double) this.direction.getAdjacentX() * 0.46875D;
|
||||
- double d2 = (double) this.blockPosition.getY() + 0.5D - (double) this.direction.getAdjacentY() * 0.46875D;
|
||||
- double d3 = (double) this.blockPosition.getZ() + 0.5D - (double) this.direction.getAdjacentZ() * 0.46875D;
|
||||
-
|
||||
- this.setPositionRaw(d1, d2, d3);
|
||||
- double d4 = (double) this.getHangingWidth();
|
||||
- double d5 = (double) this.getHangingHeight();
|
||||
- double d6 = (double) this.getHangingWidth();
|
||||
- EnumDirection.EnumAxis enumdirection_enumaxis = this.direction.m();
|
||||
+ double d1 = (double) blockPosition.getX() + 0.5D - (double) direction.getAdjacentX() * 0.46875D;
|
||||
+ double d2 = (double) blockPosition.getY() + 0.5D - (double) direction.getAdjacentY() * 0.46875D;
|
||||
+ double d3 = (double) blockPosition.getZ() + 0.5D - (double) direction.getAdjacentZ() * 0.46875D;
|
||||
+
|
||||
+ if (entity != null) {
|
||||
+ entity.locX = locX;
|
||||
+ entity.locY = locY;
|
||||
+ entity.locZ = locZ;
|
||||
+ entity.setPositionRaw(d1, d2, d3);
|
||||
+ }
|
||||
+ double d1 = (double) width;
|
||||
+ double d2 = (double) height;
|
||||
+ double d3 = (double) width;
|
||||
+ EnumDirection.EnumAxis enumdirection_enumaxis = direction.k();
|
||||
+ double d4 = (double) width;
|
||||
+ double d5 = (double) height;
|
||||
+ double d6 = (double) width;
|
||||
+ EnumDirection.EnumAxis enumdirection_enumaxis = direction.m();
|
||||
|
||||
switch (enumdirection_enumaxis) {
|
||||
case X:
|
||||
@@ -76,9 +90,10 @@
|
||||
d1 /= 32.0D;
|
||||
d2 /= 32.0D;
|
||||
d3 /= 32.0D;
|
||||
- this.a(new AxisAlignedBB(this.locX - d1, this.locY - d2, this.locZ - d3, this.locX + d1, this.locY + d2, this.locZ + d3));
|
||||
+ return new AxisAlignedBB(locX - d1, locY - d2, locZ - d3, locX + d1, locY + d2, locZ + d3);
|
||||
@@ -77,9 +88,10 @@
|
||||
d4 /= 32.0D;
|
||||
d5 /= 32.0D;
|
||||
d6 /= 32.0D;
|
||||
- this.a(new AxisAlignedBB(d1 - d4, d2 - d5, d3 - d6, d1 + d4, d2 + d5, d3 + d6));
|
||||
+ return new AxisAlignedBB(d1 - d4, d2 - d5, d3 - d6, d1 + d4, d2 + d5, d3 + d6);
|
||||
}
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
|
||||
@Override
|
||||
public boolean survives() {
|
||||
@@ -108,6 +123,11 @@
|
||||
@@ -109,6 +121,11 @@
|
||||
return false;
|
||||
} else if (!damagesource.isExplosion() && !this.getItem().isEmpty()) {
|
||||
if (!this.world.isClientSide) {
|
||||
@@ -61,7 +61,7 @@
|
||||
this.b(damagesource.getEntity(), false);
|
||||
this.a(SoundEffects.ENTITY_ITEM_FRAME_REMOVE_ITEM, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -193,6 +213,12 @@
|
||||
@@ -194,6 +211,12 @@
|
||||
}
|
||||
|
||||
public void setItem(ItemStack itemstack, boolean flag) {
|
||||
@@ -74,7 +74,7 @@
|
||||
if (!itemstack.isEmpty()) {
|
||||
itemstack = itemstack.cloneItemStack();
|
||||
itemstack.setCount(1);
|
||||
@@ -200,7 +226,7 @@
|
||||
@@ -201,7 +224,7 @@
|
||||
}
|
||||
|
||||
this.getDataWatcher().set(EntityItemFrame.ITEM, itemstack);
|
||||
|
||||
Reference in New Issue
Block a user