mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
fix(ridables): "only use brain if no rider" code was missing on some mobs
This commit is contained in:
@@ -9,14 +9,10 @@
|
||||
i = 7;
|
||||
} else if (randomSource.nextBoolean()) {
|
||||
return false;
|
||||
@@ -245,6 +_,11 @@
|
||||
@@ -245,6 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // Pufferfish start - only check for spooky season once an hour
|
||||
+ //private static boolean isSpookySeason = false;
|
||||
+ //private static final int ONE_HOUR = 20 * 60 * 60;
|
||||
+ //private static int lastSpookyCheck = -ONE_HOUR;
|
||||
+ public static boolean isHalloweenSeason(Level level) { return level.purpurConfig.forceHalloweenSeason || isHalloween(); } // Purpur - Halloween options and optimizations
|
||||
private static boolean isHalloween() {
|
||||
LocalDate localDate = LocalDate.now();
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
@Override
|
||||
public Brain<Villager> getBrain() {
|
||||
return (Brain<Villager>)super.getBrain();
|
||||
@@ -292,11 +_,24 @@
|
||||
@@ -292,11 +_,22 @@
|
||||
// Paper start - EAR 2
|
||||
this.customServerAiStep(level, false);
|
||||
}
|
||||
@@ -85,12 +85,10 @@
|
||||
+ this.isLobotomized = false;
|
||||
+ }
|
||||
+ // Purpur end - Lobotomize stuck villagers
|
||||
+ // Pufferfish start
|
||||
+ if (!inactive /*&& this.behaviorTick++ % this.activatedPriority == 0*/) {
|
||||
+ if (!inactive) {
|
||||
+ this.getBrain().tick(level, this); // Paper - EAR 2
|
||||
+ }
|
||||
+ else if (this.isLobotomized && shouldRestock()) restock(); // Purpur - Lobotomize stuck villagers
|
||||
+ // Pufferfish end
|
||||
profilerFiller.pop();
|
||||
if (this.assignProfessionWhenSpawned) {
|
||||
this.assignProfessionWhenSpawned = false;
|
||||
|
||||
Reference in New Issue
Block a user