mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 04:32:11 -07:00
death to more obfhelpers
This commit is contained in:
@@ -65,14 +65,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.CustomSpawner;
|
||||
import net.minecraft.world.level.GameRules;
|
||||
@@ -0,0 +0,0 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class PatrolSpawner implements CustomSpawner {
|
||||
|
||||
- private int nextTick;
|
||||
+ private int nextTick;@Deprecated private int getSpawnDelay() { return nextTick; } @Deprecated private void setSpawnDelay(int spawnDelay) { this.nextTick = spawnDelay; } // Paper - OBFHELPER
|
||||
|
||||
public PatrolSpawner() {}
|
||||
@@ -0,0 +0,0 @@ public class PatrolSpawner implements CustomSpawner {
|
||||
|
||||
@Override
|
||||
public int tick(ServerLevel world, boolean spawnMonsters, boolean spawnAnimals) {
|
||||
@@ -106,8 +99,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
} else {
|
||||
- this.nextTick += 12000 + random.nextInt(1200);
|
||||
- long i = world.getDayTime() / 24000L;
|
||||
+ setSpawnDelay(getSpawnDelay() - 1);
|
||||
+ patrolSpawnDelay = getSpawnDelay();
|
||||
+ this.nextTick--;
|
||||
+ patrolSpawnDelay = this.nextTick;
|
||||
+ }
|
||||
+
|
||||
+ if (patrolSpawnDelay > 0) {
|
||||
@@ -122,7 +115,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ if (world.paperConfig.patrolPerPlayerDelay) {
|
||||
+ entityhuman.patrolSpawnDelay += world.paperConfig.patrolDelay + random.nextInt(1200);
|
||||
+ } else {
|
||||
+ setSpawnDelay(getSpawnDelay() + world.paperConfig.patrolDelay + random.nextInt(1200));
|
||||
+ this.nextTick += world.paperConfig.patrolDelay + random.nextInt(1200);
|
||||
+ }
|
||||
|
||||
- if (i >= 5L && world.isDay()) {
|
||||
|
Reference in New Issue
Block a user