Fix build
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Implement FixMySpawnR
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 64d911bee1607880514061c75116d8672df8bb8f..61c2d84c136da81a0d6c286b4875b010f8ef9328 100644
|
||||
index 64d911bee1607880514061c75116d8672df8bb8f..7868590696f620cc5f0785125c9573d7494d8477 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -46,6 +46,8 @@ public abstract class BaseSpawner {
|
||||
@@ -22,9 +22,9 @@ index 64d911bee1607880514061c75116d8672df8bb8f..61c2d84c136da81a0d6c286b4875b010
|
||||
|
||||
public void serverTick(ServerLevel world, BlockPos pos) {
|
||||
+ // Plazma start - Implement FixMySpawnR
|
||||
+ if (world.plazmaLevelConfiguration().entity.spawning.deadlockTimer.enabled) {
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().gameMechanics.spawning.deadlockTimer.enabled) {
|
||||
+ if (!this.blockLockedByTime) {
|
||||
+ if (this.blockExistsTick > world.plazmaLevelConfiguration().entity.spawning.deadlockTimer.timerTimeout)
|
||||
+ if (this.blockExistsTick > org.plazmamc.plazma.configurations.GlobalConfiguration.get().gameMechanics.spawning.deadlockTimer.timerTimeout)
|
||||
+ blockLockedByTime = true;
|
||||
+ else blockExistsTick++;
|
||||
+ }
|
||||
@@ -35,12 +35,13 @@ index 64d911bee1607880514061c75116d8672df8bb8f..61c2d84c136da81a0d6c286b4875b010
|
||||
if (spawnCount <= 0 || maxNearbyEntities <= 0) return; // Paper - Ignore impossible spawn tick
|
||||
// Paper start - Configurable mob spawner tick rate
|
||||
if (spawnDelay > 0 && --tickDelay > 0) return;
|
||||
@@ -286,6 +299,13 @@ public abstract class BaseSpawner {
|
||||
@@ -286,6 +299,14 @@ public abstract class BaseSpawner {
|
||||
this.spawnRange = nbt.getShort("SpawnRange");
|
||||
}
|
||||
|
||||
+ // Plazma start - Implement FixMySpawnR
|
||||
+ if (world.plazmaLevelConfiguration().entity.spawning.deadlockTimer.enabled && nbt.contains("Plazma.SpawnerTicks", 99)) {
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().gameMechanics.spawning.deadlockTimer.enabled
|
||||
+ && nbt.contains("Plazma.SpawnerTicks", 99)) {
|
||||
+ this.blockExistsTick = nbt.getInt("Plazma.SpawnerTicks");
|
||||
+ this.blockLockedByTime = nbt.getBoolean("Plazma.SpawnerLocked");
|
||||
+ }
|
||||
@@ -49,7 +50,7 @@ index 64d911bee1607880514061c75116d8672df8bb8f..61c2d84c136da81a0d6c286b4875b010
|
||||
this.displayEntity = null;
|
||||
}
|
||||
|
||||
@@ -314,6 +334,9 @@ public abstract class BaseSpawner {
|
||||
@@ -314,6 +335,9 @@ public abstract class BaseSpawner {
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -59,14 +60,17 @@ index 64d911bee1607880514061c75116d8672df8bb8f..61c2d84c136da81a0d6c286b4875b010
|
||||
nbt.put("SpawnPotentials", (Tag) SpawnData.LIST_CODEC.encodeStart(NbtOps.INSTANCE, this.spawnPotentials).result().orElseThrow());
|
||||
return nbt;
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
index 914cc4f9a5598d2d70c7338d7cfc9be0fe5f0e31..bb0f561f0b0d71697de52c834d2ed1798b2022df 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
@@ -49,6 +49,19 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index fa9e3df5be290acfbfecdda93d042b0797e3d0f6..5aec79d987c2e9b401c98409460c032f111c37ba 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -34,6 +34,24 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+ public GameMechanics gameMechanics;
|
||||
+ public class GameMechanics extends ConfigurationPart {
|
||||
+
|
||||
+ public Spawning spawning;
|
||||
+ public class Spawning extends ConfigurationPart {
|
||||
+
|
||||
@@ -80,6 +84,8 @@ index 914cc4f9a5598d2d70c7338d7cfc9be0fe5f0e31..bb0f561f0b0d71697de52c834d2ed179
|
||||
+
|
||||
+ }
|
||||
+
|
||||
}
|
||||
+ }
|
||||
+
|
||||
public Player player;
|
||||
public class Player extends ConfigurationPart {
|
||||
|
||||
public Structure structure;
|
||||
|
||||
Reference in New Issue
Block a user