Move Aikar's EAR 1 into EAR 2 patch

This commit is contained in:
Nassim Jahnke
2024-12-16 14:08:25 +01:00
parent 47c06357f7
commit f8cb014d20
13 changed files with 666 additions and 645 deletions

View File

@@ -15,24 +15,6 @@
public class Villager extends AbstractVillager implements ReputationEventHandler, VillagerDataHolder {
private static final Logger LOGGER = LogUtils.getLogger();
private static final EntityDataAccessor<VillagerData> DATA_VILLAGER_DATA = SynchedEntityData.defineId(Villager.class, EntityDataSerializers.VILLAGER_DATA);
@@ -257,6 +_,17 @@
return this.assignProfessionWhenSpawned;
}
+ // Spigot Start
+ @Override
+ public void inactiveTick() {
+ // SPIGOT-3874, SPIGOT-3894, SPIGOT-3846, SPIGOT-5286 :(
+ if (this.level().spigotConfig.tickInactiveVillagers && this.isEffectiveAi()) {
+ this.customServerAiStep((ServerLevel) this.level());
+ }
+ super.inactiveTick();
+ }
+ // Spigot End
+
@Override
protected void customServerAiStep(ServerLevel level) {
ProfilerFiller profilerFiller = Profiler.get();
@@ -275,7 +_,7 @@
this.increaseProfessionLevelOnUpdate = false;
}