Workaround for some hacky environments that mess up things
2 people had issues where some plugin is doing some reallly insane NMS hackery that created invalid worlds, which caused some errors... Really don't understand what in the world they did, but putting in a dumb guard that shouldn't even be necessary to just not send the sound effect rather than erroring.
This commit is contained in:
@@ -3014,10 +3014,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ public WorldServer world; // Paper - store ref to world this manager is for
|
||||
public WorldProvider getWorldProvider(World world) {
|
||||
+ if (this.world == null) this.world = (WorldServer) world; // Paper
|
||||
return (WorldProvider) this.providerFactory.apply(world, this);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -4372,6 +4370,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
// CraftBukkit end
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
|
||||
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper
|
||||
this.generator = gen;
|
||||
+ dimensionmanager.world = (WorldServer) this; // Paper
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
return (Chunk) this.getChunkAt(i, j, ChunkStatus.FULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user