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

fix: magnet & freezing upgrade particles now respect player handedness #238

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nat212
Copy link

@nat212 nat212 commented Nov 20, 2023

Fixes #229 #179

Makes magnet & freezing upgrade particles respect player's selected main hand, and whether or not the gadget is in their off hand/main hand.

Demonstration:

2023-11-20.15-39-07.1.mp4

@nat212 nat212 marked this pull request as draft November 20, 2023 14:22
@nat212
Copy link
Author

nat212 commented Nov 20, 2023

Drafted as I forgot servers existed...

@nat212 nat212 marked this pull request as ready for review November 20, 2023 14:45
@nat212
Copy link
Author

nat212 commented Nov 20, 2023

Made it work on servers, and also made it respect whether the gadget is in the off hand/main hand.

@@ -132,6 +133,8 @@ public void tick() {
Vec3 playerPos = player.position().add(0, player.getEyeHeight(), 0);
Vec3 blockPos = new Vec3(sourceX, sourceY, sourceZ);
Vec3 look = player.getLookAngle(); // or getLook(partialTicks)


//The next 3 variables are directions on the screen relative to the players look direction. So right = to the right of the player, regardless of facing direction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Can this only have 1 enter, not 2?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, missed that from moving some lines around, thanks for the find

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.

Block Breaking Particle Effects Emitting at Right Hand instead of Left
2 participants