Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make queen bee turning a bit more stable #460

Closed

Conversation

SkyyWasTaken
Copy link

Heya! Is me again. I took a look at the rotation issue (#165) you requested help on. I'm by no means extremely versed in mod development these days, but this is the best I could do without modifying the Queen Bee's model or creating a mixin.

The issue seems to mostly stem from the Queen Bee not having a dedicated head in its model.

This solution only tries to turn towards the player's position every 20 ticks and stays locked on that position for the full duration. Minecraft waits 10 ticks for the head to be stable before rotating the body, then takes 10 ticks to rotate the body.

I had also experimented with manually updating the body rotation to match the head rotation in the queen bee's tick() function, but that looked pretty jittery compared to Minecraft's built-in body rotation handler.

It's possible there's a better solution, but this is the best I've got. Notably, it's not incredibly snappy and it'll rotate twice (the body will spin to accommodate the head for the first 40 degrees or so, then stop until the head is stable for 10 ticks) if the turn is far enough.

Also prevented the look location from updating if the player has moved less than 2 blocks so players can get a closer look at what she's holding without her spinning the item away from them.

@TelepathicGrunt
Copy link
Owner

TelepathicGrunt commented Nov 12, 2024

Apologies but testing this and it looks much worse and not what I was going for. The Bee Queen is supposed to turn extremely slowly to the player because she is a giant fat bee that can barley move. With this PR, she just whips around to face the player like she weighs nothing. It does not look good.

2024-11-12.07-30-32.mp4

What I was going for was this speed but less jittery. I have great difficulty in smoothing out the rotation.

2024-11-12.07-35-00.mp4

@SkyyWasTaken
Copy link
Author

That makes a lot more sense LOL

I'll take another look with that in mind. I think I've got an idea to get it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants