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

feat(JOML): migrate BlockPlacingWeatherSystem #18

Merged
merged 4 commits into from
Dec 31, 2020

Conversation

pollend
Copy link
Member

@pollend pollend commented Dec 28, 2020

No description provided.

Comment on lines 73 to 75
Vector3i playerPos = blockPos.set(locComp.getWorldPosition(position), RoundingMode.FLOOR);

placeSnow(playerPos);
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like we don't need playerPos at all here:

Suggested change
Vector3i playerPos = blockPos.set(locComp.getWorldPosition(position), RoundingMode.FLOOR);
placeSnow(playerPos);
blockPos.set(locComp.getWorldPosition(position), RoundingMode.FLOOR);
placeSnow(blockPos);

* @param event The event that means it is time to place snow
* @param worldEntity The entity that sent the event (assumed to be the player)
*/
@ReceiveEvent
public void onPlaceEvent(PeriodicActionTriggeredEvent event, EntityRef worldEntity) {
final Vector3f position = new Vector3f();
final Vector3i blockPos = new Vector3i();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really the blockPos or is this the "player position in block coordinates"?

@skaldarnar skaldarnar merged commit 7d87430 into develop Dec 31, 2020
@skaldarnar skaldarnar deleted the feature/joml-migrate-BlockPlacingWeatherSystem branch December 31, 2020 14:47
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