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:
Owen1212055
2025-06-23 22:28:24 -04:00
parent c2e1beaec8
commit 10c7914592
2 changed files with 0 additions and 39 deletions

View File

@@ -22,35 +22,6 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
return (net.minecraft.world.entity.decoration.ItemFrame) this.entity; 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 @Override
public void setItem(org.bukkit.inventory.ItemStack item) { public void setItem(org.bukkit.inventory.ItemStack item) {
this.setItem(item, true); this.setItem(item, true);

View File

@@ -44,14 +44,4 @@ public class CraftPainting extends CraftHanging implements Painting {
//this.update(); Paper - Don't resent entity on art update //this.update(); Paper - Don't resent entity on art update
return true; return true;
} }
@Override
public boolean setFacingDirection(BlockFace face, boolean force) {
if (super.setFacingDirection(face, force)) {
this.update();
return true;
}
return false;
}
} }