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 block networks #15

Merged
merged 1 commit into from
Jan 9, 2021

Conversation

pollend
Copy link
Member

@pollend pollend commented Dec 31, 2020

pollend added a commit to Terasology/Signalling that referenced this pull request Dec 31, 2020
public ImmutableBlockLocation(Vector3i location) {
this(location.x, location.y, location.z);

public ImmutableBlockLocation(Vector3ic location) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this whole class just be removed in favor of Vector3ic?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can but the module doesn't really work and the way it works is very limited. I rather just make the changes to drop the dependencies to the deprecated methods.

Comment on lines 65 to 68
public ImmutableBlockLocation move(Side side) {
final Vector3i directionVector = side.getVector3i();
return new ImmutableBlockLocation(x + directionVector.x, y + directionVector.y, z + directionVector.z);
final Vector3ic directionVector = side.direction();
return new ImmutableBlockLocation(x + directionVector.x(), y + directionVector.y(), z + directionVector.z());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

this is equivalent to the following, and I think we don't need a full class for this.

immutablePos.translate(side.getVector3i(), new Vector3i());

@pollend pollend merged commit 16d6295 into develop Jan 9, 2021
@pollend pollend deleted the feat/joml-migrate-BlockNetworks branch January 9, 2021 16:29
skaldarnar added a commit to Terasology/Signalling that referenced this pull request Jan 9, 2021
Adjust for changes in Terasology/BlockNetwork#15

Co-authored-by: Tobias Nett <skaldarnar@googlemail.com>
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