mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Optimize short circuit evaluation of sign check (#5348)
This commit is contained in:
parent
24c27bdb18
commit
012a401d1e
@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.player.resetIdleTimer();
|
||||
if (blockposition.getY() < this.minecraftServer.getMaxBuildHeight()) {
|
||||
- if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.a((EntityHuman) this.player, blockposition)) {
|
||||
+ if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.a((EntityHuman) this.player, blockposition) || (worldserver.getType(blockposition).getBlock() instanceof BlockSign && worldserver.paperConfig.allowUsingSignsInsideSpawnProtection))) { // Paper
|
||||
+ if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.a((EntityHuman) this.player, blockposition) || (worldserver.paperConfig.allowUsingSignsInsideSpawnProtection && worldserver.getType(blockposition).getBlock() instanceof BlockSign))) { // Paper
|
||||
// CraftBukkit start - Check if we can actually do something over this large a distance
|
||||
// Paper - move check up
|
||||
this.player.clearActiveItem(); // SPIGOT-4706
|
||||
|
Loading…
Reference in New Issue
Block a user