chore: cleanup annotations in api adventure patch

This commit is contained in:
Riley Park
2023-03-23 09:49:24 -07:00
parent c4351787c6
commit 39255145b6
64 changed files with 1308 additions and 1246 deletions

View File

@@ -44,7 +44,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Random player selection moved up for per player spawning and configuration
+ int j = world.players().size();
+ if (j < 1) {
return 0;
+ return 0;
+ }
+
+ net.minecraft.server.level.ServerPlayer entityhuman = world.players().get(randomsource.nextInt(j));
@@ -56,16 +56,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if (world.paperConfig().entities.behavior.pillagerPatrols.spawnDelay.perPlayer) {
+ --entityhuman.patrolSpawnDelay;
+ patrolSpawnDelay = entityhuman.patrolSpawnDelay;
} else {
- this.nextTick += 12000 + randomsource.nextInt(1200);
- long i = world.getDayTime() / 24000L;
+ } else {
+ this.nextTick--;
+ patrolSpawnDelay = this.nextTick;
+ }
+
+ if (patrolSpawnDelay > 0) {
+ return 0;
+ } else {
return 0;
} else {
- this.nextTick += 12000 + randomsource.nextInt(1200);
- long i = world.getDayTime() / 24000L;
+ long days;
+ if (world.paperConfig().entities.behavior.pillagerPatrols.start.perPlayer) {
+ days = entityhuman.getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.PLAY_TIME)) / 24000L; // PLAY_ONE_MINUTE is actually counting in ticks, a misnomer by Mojang