mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 00:30:25 +01:00
f956f185c8
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 47b9cf30 SPIGOT-4372: LightningStrikeEvent cause API a9ceda75 Include the plugin channel name in the exception message CraftBukkit Changes:a4bdecff
SPIGOT-4372: LightningStrikeEvent cause API34caaf6d
SPIGOT-4371: Trident damaged when event cancelled97315374
SPIGOT-4369: Handle cancelled trident eventbf1c8273
SPIGOT-4370: Remove vehicle if its passenger spawn event was cancelled Spigot Changes: 6b015b4b SPIGOT-4370: Remove vehicle if its passenger spawn event was cancelled
42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
From 34f5225d34a59ceeef04a55bf248cb688351094c Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Tue, 5 Apr 2016 19:42:22 -0400
|
|
Subject: [PATCH] Don't spam reload spawn chunks in nether/end
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
index 75e2de1a22..4bed101c08 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -2863,6 +2863,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
|
return this.K;
|
|
}
|
|
|
|
+ public boolean isSpawnChunk(int i, int j) { return e(i, j); } // Paper - OBFHELPER
|
|
public boolean e(int i, int j) {
|
|
BlockPosition blockposition = this.getSpawn();
|
|
int k = i * 16 + 8 - blockposition.getX();
|
|
@@ -2879,6 +2880,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
|
return (LongSet) (forcedchunk != null ? LongSets.unmodifiable(forcedchunk.a()) : LongSets.EMPTY_SET);
|
|
}
|
|
|
|
+ public boolean isForcedChunk(int i, int j) { return f(i, j); } // Paper - OBFHELPER
|
|
public boolean f(int i, int j) {
|
|
ForcedChunk forcedchunk = (ForcedChunk) this.a(this.worldProvider.getDimensionManager(), ForcedChunk::new, "chunks");
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
|
|
index 517b1e7124..0e654ebf70 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
|
@@ -72,7 +72,7 @@ public abstract class WorldProvider {
|
|
}
|
|
|
|
public boolean a(int i, int j) {
|
|
- return !this.b.f(i, j);
|
|
+ return !this.b.isSpawnChunk(i, j) && !this.b.isForcedChunk(i, j); // Paper - Use spawn chunks check for all worlds
|
|
}
|
|
|
|
protected abstract void m();
|
|
--
|
|
2.19.0
|
|
|