mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-21 15:23:50 -07:00
Update to Minecraft 1.16.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityItemFrame.java
|
||||
+++ b/net/minecraft/server/EntityItemFrame.java
|
||||
@@ -52,16 +52,27 @@
|
||||
@@ -53,16 +53,27 @@
|
||||
@Override
|
||||
protected void updateBoundingBox() {
|
||||
if (this.direction != null) {
|
||||
@@ -22,7 +22,7 @@
|
||||
- double d4 = (double) this.getHangingWidth();
|
||||
- double d5 = (double) this.getHangingHeight();
|
||||
- double d6 = (double) this.getHangingWidth();
|
||||
- EnumDirection.EnumAxis enumdirection_enumaxis = this.direction.m();
|
||||
- EnumDirection.EnumAxis enumdirection_enumaxis = this.direction.n();
|
||||
+ 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;
|
||||
@@ -33,11 +33,11 @@
|
||||
+ double d4 = (double) width;
|
||||
+ double d5 = (double) height;
|
||||
+ double d6 = (double) width;
|
||||
+ EnumDirection.EnumAxis enumdirection_enumaxis = direction.m();
|
||||
+ EnumDirection.EnumAxis enumdirection_enumaxis = direction.n();
|
||||
|
||||
switch (enumdirection_enumaxis) {
|
||||
case X:
|
||||
@@ -77,9 +88,10 @@
|
||||
@@ -78,9 +89,10 @@
|
||||
d4 /= 32.0D;
|
||||
d5 /= 32.0D;
|
||||
d6 /= 32.0D;
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
@Override
|
||||
public boolean survives() {
|
||||
@@ -109,6 +121,11 @@
|
||||
@@ -130,6 +142,11 @@
|
||||
return false;
|
||||
} else if (!damagesource.isExplosion() && !this.getItem().isEmpty()) {
|
||||
if (!this.world.isClientSide) {
|
||||
@@ -59,9 +59,9 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.b(damagesource.getEntity(), false);
|
||||
this.a(SoundEffects.ENTITY_ITEM_FRAME_REMOVE_ITEM, 1.0F, 1.0F);
|
||||
this.playSound(SoundEffects.ENTITY_ITEM_FRAME_REMOVE_ITEM, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -194,6 +211,12 @@
|
||||
@@ -217,6 +234,12 @@
|
||||
}
|
||||
|
||||
public void setItem(ItemStack itemstack, boolean flag) {
|
||||
@@ -74,12 +74,12 @@
|
||||
if (!itemstack.isEmpty()) {
|
||||
itemstack = itemstack.cloneItemStack();
|
||||
itemstack.setCount(1);
|
||||
@@ -201,7 +224,7 @@
|
||||
@@ -224,7 +247,7 @@
|
||||
}
|
||||
|
||||
this.getDataWatcher().set(EntityItemFrame.ITEM, itemstack);
|
||||
- if (!itemstack.isEmpty()) {
|
||||
+ if (!itemstack.isEmpty() && playSound) { // CraftBukkit
|
||||
this.a(SoundEffects.ENTITY_ITEM_FRAME_ADD_ITEM, 1.0F, 1.0F);
|
||||
this.playSound(SoundEffects.ENTITY_ITEM_FRAME_ADD_ITEM, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user