Fix axolotl dying after 300 ticks (#1769)

This commit is contained in:
Amine Kacimi
2026-04-04 23:22:05 +01:00
committed by GitHub
parent 0eafe23898
commit f57bd8659b

View File

@@ -52,7 +52,7 @@
this.type = type;
this.level = level;
this.dimensions = type.getDimensions();
+ this.maxAirTicks = level == null ? Entity.TOTAL_AIR_SUPPLY : this.level.purpurConfig.drowningAirTicks; // Purpur - Drowning Settings
+ this.maxAirTicks = level == null || this.getDefaultMaxAirSupply() != Entity.TOTAL_AIR_SUPPLY ? this.getDefaultMaxAirSupply() : this.level.purpurConfig.drowningAirTicks; // Purpur - Drowning Settings
+ // Purpur start - Add toggle for RNG manipulation
+ this.random = level == null || level.purpurConfig.entitySharedRandom ? SHARED_RANDOM : RandomSource.create();
+ this.uuid = Mth.createInsecureUUID(this.random);