RAT's Mischief

RAT's Mischief

3M Downloads

Rat seemingly lost its AI and collision

erynth opened this issue ยท 1 comments

commented

I opened a shulker box while my rat was standing on it, and instead of falling down into it like usual it got lifted up, then when I closed the shulker the rat stayed in the air, floating about a block above the shulker. I tried nudging it or breaking the box under it to get it down but it didn't work, so I picked it up with a pouch and placed it back down.

However, it still wasn't able to move (even after I restarted my game), and although it still has a visible and proper hitbox when using F3+B nothing collides with it and it's not possible to move it with water. None of the other rats are affected, the sit mechanic still works, the rat can teleport, and all the animations play as they are supposed to.

Is there a way to fix it on my end, or did I just stumble upon the randomest bug?

commented

I figured it out the problem was that its motion data's y value got turned into NaN, and I was able to fix it by changing its nbt.

I don't think it's likely that this bug will occur again, but in case it does, this is the command I used:
/data modify entity @e[type=ratsmischief:rat,limit=1,sort=nearest] Motion set value [0.0d,-0.07844000015258789d,0.0d]

(I got the value from a different nearby rat which seems to be a foolproof solution)