Skip to content

Commit e7dc6a4

Browse files
committed
getter is fast enough
1 parent c4fbc7e commit e7dc6a4

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherCeilingOnChunkload.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ public void disable() {
4646
private void onChunkLoad(ChunkLoadEvent event) {
4747
if (ChunkUtil.isRetrievalUnsafe(event.getChunk())) return;
4848
if (!alsoCheckNewChunks && event.isNewChunk()) return;
49-
World world = event.getWorld();
50-
if (world.getEnvironment() != World.Environment.NETHER) return;
51-
if (exemptedWorlds.contains(world.getName())) return;
49+
if (event.getWorld().getEnvironment() != World.Environment.NETHER) return;
50+
if (exemptedWorlds.contains(event.getWorld().getName())) return;
5251

5352
if (!checkShouldPauseOnLowTPS || AnarchyExploitFixes.tickReporter().getTPS() >= pauseTPS) {
5453
ChunkUtil.createBedrockLayer(event.getChunk(), config.nether_ceiling_max_y);

AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillNetherFloorOnChunkload.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ public void disable() {
4646
private void onChunkLoad(ChunkLoadEvent event) {
4747
if (ChunkUtil.isRetrievalUnsafe(event.getChunk())) return;
4848
if (!alsoCheckNewChunks && event.isNewChunk()) return;
49-
World world = event.getWorld();
50-
if (world.getEnvironment() != World.Environment.NETHER) return;
51-
if (exemptedWorlds.contains(world.getName())) return;
49+
if (event.getWorld().getEnvironment() != World.Environment.NETHER) return;
50+
if (exemptedWorlds.contains(event.getWorld().getName())) return;
5251

5352
if (!checkShouldPauseOnLowTPS || AnarchyExploitFixes.tickReporter().getTPS() >= pauseTPS) {
54-
ChunkUtil.createBedrockLayer(event.getChunk(), world.getMinHeight());
53+
ChunkUtil.createBedrockLayer(event.getChunk(), event.getWorld().getMinHeight());
5554
}
5655
}
5756
}

AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/modules/bedrock/FillOverworldFloorOnChunkload.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ public void disable() {
4646
private void onChunkLoad(ChunkLoadEvent event) {
4747
if (ChunkUtil.isRetrievalUnsafe(event.getChunk())) return;
4848
if (!alsoCheckNewChunks && event.isNewChunk()) return;
49-
World world = event.getWorld();
50-
if (world.getEnvironment() != World.Environment.NETHER) return;
51-
if (exemptedWorlds.contains(world.getName())) return;
49+
if (event.getWorld().getEnvironment() != World.Environment.NETHER) return;
50+
if (exemptedWorlds.contains(event.getWorld().getName())) return;
5251

5352
if (!checkShouldPauseOnLowTPS || AnarchyExploitFixes.tickReporter().getTPS() >= pauseTPS) {
54-
ChunkUtil.createBedrockLayer(event.getChunk(), world.getMinHeight());
53+
ChunkUtil.createBedrockLayer(event.getChunk(), event.getWorld().getMinHeight());
5554
}
5655
}
5756
}

0 commit comments

Comments
 (0)