mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 07:34:48 +01:00
#1238: Remove unnecessary sign ticking
By: Miles Holder <mwholder2005@gmail.com>
This commit is contained in:
parent
6f023adfe9
commit
bbb64e5e0e
4 changed files with 39 additions and 1 deletions
|
@ -25,3 +25,11 @@
|
|||
tileentitysign.setAllowedPlayerEditor(entityhuman.getUUID());
|
||||
entityhuman.openTextEdit(tileentitysign, flag);
|
||||
}
|
||||
@@ -184,6 +193,6 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public <T extends TileEntity> BlockEntityTicker<T> getTicker(World world, IBlockData iblockdata, TileEntityTypes<T> tileentitytypes) {
|
||||
- return createTickerHelper(tileentitytypes, TileEntityTypes.SIGN, TileEntitySign::tick);
|
||||
+ return null; // Craftbukkit - remove unnecessary sign ticking
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--- a/net/minecraft/world/level/block/CeilingHangingSignBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CeilingHangingSignBlock.java
|
||||
@@ -161,6 +161,6 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public <T extends TileEntity> BlockEntityTicker<T> getTicker(World world, IBlockData iblockdata, TileEntityTypes<T> tileentitytypes) {
|
||||
- return createTickerHelper(tileentitytypes, TileEntityTypes.HANGING_SIGN, TileEntitySign::tick);
|
||||
+ return null; // Craftbukkit - remove unnecessary sign ticking
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
--- a/net/minecraft/world/level/block/WallHangingSignBlock.java
|
||||
+++ b/net/minecraft/world/level/block/WallHangingSignBlock.java
|
||||
@@ -186,6 +186,6 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public <T extends TileEntity> BlockEntityTicker<T> getTicker(World world, IBlockData iblockdata, TileEntityTypes<T> tileentitytypes) {
|
||||
- return createTickerHelper(tileentitytypes, TileEntityTypes.HANGING_SIGN, TileEntitySign::tick);
|
||||
+ return null; // Craftbukkit - remove unnecessary sign ticking
|
||||
}
|
||||
}
|
|
@ -132,7 +132,17 @@
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -281,7 +342,7 @@
|
||||
@@ -276,12 +337,17 @@
|
||||
|
||||
@Nullable
|
||||
public UUID getPlayerWhoMayEdit() {
|
||||
+ // CraftBukkit start - unnecessary sign ticking removed, so do this lazily
|
||||
+ if (this.level != null && this.playerWhoMayEdit != null) {
|
||||
+ clearInvalidPlayerWhoMayEdit(this, this.level, this.playerWhoMayEdit);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
return this.playerWhoMayEdit;
|
||||
}
|
||||
|
||||
private void markUpdated() {
|
||||
this.setChanged();
|
||||
|
|
Loading…
Reference in a new issue