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

[1.18.2] FTB Chunks Compatibility #291

Merged
merged 7 commits into from
Jan 3, 2023
Merged

[1.18.2] FTB Chunks Compatibility #291

merged 7 commits into from
Jan 3, 2023

Conversation

TechTastic
Copy link
Contributor

Allows Ships to fall under the protection of FTB Chunks if the blocks are in said chunk!

  • Added MixinClaimedChunkManager to pass Shipyard positions to worldspace to be tested against
  • Edited build.gradle:common to add FTB Chunks, Utilities, and Teams, as well as the CurseMaven repository
  • Edited valkyrienskies-common.mixins.json to add MixinClaimedChunkManager

…ce to be tested against

Edited build.gradle:common to add FTB Chunks, Utilities, and Teams, as well as the CurseMaven repository
Edited valkyrienskies-common.mixins.json to add MixinClaimedChunkManager
if (ship != null) {
final Vector3d vec =
ship.getShipToWorld().transformPosition(new Vector3d(pos.getX(), pos.getY(), pos.getZ()));
cir.setReturnValue(getChunk(new ChunkDimPos(entity.level, new BlockPos(vec.x, vec.y, vec.z))));
Copy link
Member

Choose a reason for hiding this comment

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

Can you make this not trigger when vec.y is > max world Y or < min world Y? That way ships can fly over other factions claims.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding

@@ -1,3 +1,12 @@
repositories {
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove this section? The VS2 Maven will automatically shade the repository when it builds on github.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly, when I do, IntelliJ yells at me when I refresh Gradle

@TechTastic
Copy link
Contributor Author

Added Check for Min/Max Build Height to allow ships to fly over and under chunk claims to avoid being stuck in a claim

@TechTastic
Copy link
Contributor Author

Latest after my last change is broken for now and I am using a compupter that i cant test out of dev on

Edited MixinClaimedChunkManager to change the position passed to the newly created ChunkDimPos instance for getChunk
@TechTastic
Copy link
Contributor Author

This PR is now ready to be merged minus the CurseMaven repo that IntelliJ wont let me remove without losing the ability to build

@Rubydesic
Copy link
Contributor

Can you add a config option for this behaviour? Otherwise lgtm

…sable ships being protected and to disable ships being protected above/below build height
@TechTastic
Copy link
Contributor Author

Config Options for toggling protection and protection outside of build height have been added

@Rubydesic Rubydesic merged commit 4ed0dd4 into ValkyrienSkies:1.18.x/main Jan 3, 2023
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.

3 participants