mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 01:32:02 -07:00
Remove move this.update() usages
These can be removed as these values can now be updated on the client through synched values, additionally remove the extra bit that triggered redstone on rotation update which is not vanilla behavior.
This commit is contained in:
@@ -22,35 +22,6 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
|
||||
return (net.minecraft.world.entity.decoration.ItemFrame) this.entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setFacingDirection(BlockFace face, boolean force) {
|
||||
HangingEntity hanging = this.getHandle();
|
||||
Direction oldDir = hanging.getDirection();
|
||||
Direction newDir = CraftBlock.blockFaceToNotch(face);
|
||||
|
||||
Preconditions.checkArgument(newDir != null, "%s is not a valid facing direction", face);
|
||||
|
||||
this.getHandle().setDirection(newDir);
|
||||
if (!force && !this.getHandle().generation && !hanging.survives()) {
|
||||
hanging.setDirection(oldDir);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.update();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void update() {
|
||||
super.update();
|
||||
|
||||
// update redstone
|
||||
if (!this.getHandle().generation) {
|
||||
this.getHandle().level().updateNeighbourForOutputSignal(this.getHandle().getPos(), Blocks.AIR);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItem(org.bukkit.inventory.ItemStack item) {
|
||||
this.setItem(item, true);
|
||||
|
@@ -44,14 +44,4 @@ public class CraftPainting extends CraftHanging implements Painting {
|
||||
//this.update(); Paper - Don't resent entity on art update
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setFacingDirection(BlockFace face, boolean force) {
|
||||
if (super.setFacingDirection(face, force)) {
|
||||
this.update();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user