@Vyoejp I don’t think they are the same bug.
In MC-307069, despite the wolf stops attacking mobs after a world reload, they’ll attack again if you hit another mob. They simply forget the target.
In this bug, however, hitting another mob will not make the wolf attack. It is a persistent AI behaviour flag that can only be solved by changing the NBT fields or leash+unleashing them.
More technical information and why the bug is happening:
The reason wolves do not attack seems to be caused by
net.minecraft.world.entity.ai.goal.target.TargetGoal.canAttackchecking ifthis.mob.isWithinHome(target).If the target (the enemy) is not within the bounding boxes defined by its home and radius position (and after travelling to the nether, it’s highly unlikely), the wolf simply does nothing.
The reason why their
home_radiusandhome_posare not unset despite being unleashed is the order of operations in which the teleport occurs innet.minecraft.world.entity.Entity.teleportCrossDimension:A new Entity
copyis created in the destination worldcopy.restoreFrom(this)is called, which copies all NBT properties of the entity. At this point the entity still has the home position set.this.removeAfterChangingDimensions()is called which unleashes the entity and clears the home position.The solution is very simple: the unleash operation should be performed in the
teleportCrossDimensionmethod BEFORE callingcopy.restoreFrom(this).