Closed Jakllp closed 3 years ago
changing EntityMyPet to extend AgeableMob fixes this issue but breaks the baby system. Could possibly workaround this by reworking the baby system to have another class for EntityMyPetBaby that extends mob with EntityMyPet to extend AgeableMob
c net/minecraft/world/entity/AgeableMob net/minecraft/world/entity/EntityAgeable
m (Lnet/minecraft/nbt/CompoundTag;)V addAdditionalSaveData saveData
m ()V ageBoundaryReached n
m (I)V ageUp setAge
m (IZ)V ageUp setAge
m ()V aiStep movementTick
m ()V defineSynchedData initDatawatcher
m (Lnet/minecraft/world/level/ServerLevelAccessor;Lnet/minecraft/world/DifficultyInstance;Lnet/minecraft/world/entity/MobSpawnType;Lnet/minecraft/world/entity/SpawnGroupData;Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/world/entity/SpawnGroupData; finalizeSpawn prepare
m (Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/AgeableMob;)Lnet/minecraft/world/entity/AgeableMob; getBreedOffspring createChild
m (Lnet/minecraft/network/syncher/EntityDataAccessor;)V onSyncedDataUpdated a
m (Lnet/minecraft/nbt/CompoundTag;)V readAdditionalSaveData loadData
m (I)V setAge setAgeRaw
f I BABY_START_AGE b
f Lnet/minecraft/network/syncher/EntityDataAccessor; DATA_BABY_ID bT
f I FORCED_AGE_PARTICLE_TICKS bU
f I age c
f I forcedAge d
f I forcedAgeTimer e
setAge and ageLock are of interest. Need to experiment with the values a bit and put some thought into mobs with various stages of growth. This will require us to rework the current way that baby pets are implemented, but seems to be the correct way to achieve the desired result. Will not be working on this for the next 14 hours due to work commitments, if anyone wants to take a crack at it between now and then feel free to. I'll give it a shot tomorrow night
Done in https://github.com/Jakllp/MyPet/commit/2b468585fbfb62328e27635b2aaac048d6483d2a
Now using age -1 and 1 (baby, not baby) in the inbuild age-system
Pet-Axolotls let normal Axolotls despawn when they get too close to them
This seems related to some Vanilla behaviour of Axolotls