Naga speed NBT change
ShyNieke opened this issue ยท 4 comments
Forge version: forge-14.23.5.2831
Twilight Forest version: 1.12.2-3.8.689
Steps to reproduce:
- have a naga in the world
- use the /entitydata command to change the naga's speed
- The naga's speed does not get changed
What I expected to happen:
the ability to change the naga's speed by modefying it's entitydata
What happened instead:
nothing at all sadly
Yeah I need to move all of our bosses to use the attribute system for various AIs and they currently do not. It's on my todo list but I should make an actual ticket for this.
Given that the naga is a multipart entity, I think it might be a more complicated matter than just using entitydata to modify its speed, I'm afraid.
So, looking into the code, perhaps this might have something to do with setSegmentsPerHealth
, which calculates a new speed and then applies that as the base value depending on the number of segments?
if (!world.isRemote) {
double newSpeed = DEFAULT_SPEED - newSegments * (-0.2F / 12F);
if (newSpeed < 0)
newSpeed = 0;
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(newSpeed);
}