now it will be hell

This commit is contained in:
Ben Kerllenevich
2022-06-08 13:25:16 -04:00
parent ed5b0fda9e
commit 856416cca4
9 changed files with 45 additions and 22 deletions

View File

@@ -17,6 +17,19 @@ index 9f07b6bb89b2f7424d874aca8399c9a31f3bf669..c4677bac7a09133513cbeed9c712b931
// this function is so hot that removing the map lookup call can have an order of magnitude impact on its performance
// tested and confirmed via System.nanoTime()
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> playersInRange = reducedRange ? playerchunk.playersInMobSpawnRange : playerchunk.playersInChunkTickRange;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 53d0ccf95a6e07a00918f05ddaeeca699737d2eb..0e06db15572bf7d23d61f93c0b6de1b78ea4f990 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -286,7 +286,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public double yo;
public double zo;
private Vec3 position;
- private BlockPos blockPosition;
+ public BlockPos blockPosition; // Purpur - private->public
private ChunkPos chunkPosition;
private Vec3 deltaMovement;
public float yRot; // Paper - private->public
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
index 3a633f369af8005de3c06cfa715a42e3b248b2f0..a7b878f97128e530c5b47873dd226490d471406b 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java