geforkt von Mirrors/Paper
ea855e2b46
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 Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this Also, restore a patch that was dropped in the last upstream Bukkit Changes: 279eeab3 Fix command description not being set 96e2bb18 Remove debug print from SyntheticEventTest CraftBukkit Changes:d3ed1516
Fix dangerously threaded beacons217a293d
Don't relocate joptsimple to allow --help to work.1be05a21
Prepare for imminent Java 12 releasea49270b2
Mappings Update5259d80c
SPIGOT-4669: Fix PlayerTeleportEvent coordinates for relative teleports Spigot Changes: e6eb36f2 Rebuild patches
36 Zeilen
2.5 KiB
Diff
36 Zeilen
2.5 KiB
Diff
From 8b1bb76c61044895a83195a93978c5ba1af14de5 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 12 Sep 2018 21:12:57 -0400
|
|
Subject: [PATCH] Prevent mob spawning from loading/generating chunks
|
|
|
|
also prevents if out of world border bounds
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
index bfbe4d3e3..e2bf17f44 100644
|
|
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
@@ -129,9 +129,9 @@ public final class SpawnerCreature {
|
|
int i2 = blockposition1.getX();
|
|
int j2 = blockposition1.getY();
|
|
int k2 = blockposition1.getZ();
|
|
- IBlockData iblockdata = worldserver.getType(blockposition1);
|
|
+ IBlockData iblockdata = worldserver.getTypeIfLoadedAndInBounds(blockposition1); // Paper - don't load chunks for mob spawn
|
|
|
|
- if (!iblockdata.isOccluding()) {
|
|
+ if (iblockdata != null && !iblockdata.isOccluding()) { // Paper - don't load chunks for mob spawn
|
|
int l2 = 0;
|
|
int i3 = 0;
|
|
|
|
@@ -171,7 +171,7 @@ public final class SpawnerCreature {
|
|
i4 = biomebase_biomemeta.c + worldserver.random.nextInt(1 + biomebase_biomemeta.d - biomebase_biomemeta.c);
|
|
}
|
|
|
|
- if (worldserver.a(enumcreaturetype, biomebase_biomemeta, (BlockPosition) blockposition_mutableblockposition)) {
|
|
+ if (worldserver.isLoadedAndInBounds(blockposition_mutableblockposition) && worldserver.a(enumcreaturetype, biomebase_biomemeta, (BlockPosition) blockposition_mutableblockposition)) { // Paper - don't load chunks for mob spawn
|
|
EntityPositionTypes.Surface entitypositiontypes_surface = EntityPositionTypes.a(biomebase_biomemeta.b);
|
|
if (entitypositiontypes_surface != null && a(entitypositiontypes_surface, worldserver, blockposition_mutableblockposition, biomebase_biomemeta.b)) {
|
|
EntityInsentient entityinsentient;
|
|
--
|
|
2.21.0
|
|
|