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 turtle canEnter logic #1051

Open
wants to merge 5 commits into
base: 1.18.x/main
Choose a base branch
from

Conversation

zyxkad
Copy link

@zyxkad zyxkad commented Jan 1, 2025

No description provided.

.anyMatch(BlockState::isAir);
.map(pos -> new BlockPos(ValkyrienSkies.toMinecraft(pos)))
// Ignore turtle itself
.filter(pos -> !pos.equals(turtlePlayer.blockPosition()))
Copy link
Author

@zyxkad zyxkad Jan 1, 2025

Choose a reason for hiding this comment

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

I do not know if there are better way to do this, because if the turtle is on a ship, blockPosition seems will return the turtle position in actual world, but it should return a shipyard position I'm not sure?

@Rubydesic
Copy link
Contributor

Are these first two maps necessary? Aren't these two code snippets identical?

Streams.stream(ValkyrienSkies.positionToNearbyShipsAndWorld(world, position.getX() + 0.5, position.getY() + 0.5, position.getZ() + 0.5, 0.1))
    .map(pos -> ValkyrienSkies.getShipManagingBlock(world, pos))
    .map(s -> ValkyrienSkies.positionToShip(s, new Vector3d(position.getX() + 0.5, position.getY() + 0.5, position.getZ() + 0.5)))
Streams.stream(ValkyrienSkies.positionToNearbyShipsAndWorld(world, position.getX() + 0.5, position.getY() + 0.5, position.getZ() + 0.5, 0.1))

@zyxkad
Copy link
Author

zyxkad commented Jan 2, 2025

I don't know actually? if you sure they are same then I'll remove extra maps

@zyxkad
Copy link
Author

zyxkad commented Jan 2, 2025

I have no idea that what position is positionToNearbyShipsAndWorld returning.

@Rubydesic
Copy link
Contributor

Can you test the code in

  1. the game and check that it works as you expected
  2. the debugger and set a breakpoint and check that the positions are as you expected

@zyxkad
Copy link
Author

zyxkad commented Jan 2, 2025

Can you test the code in

  1. the game and check that it works as you expected
  2. the debugger and set a breakpoint and check that the positions are as you expected

uhh i do not know how to test this. I can build this mod but it's unable load in game

@zyxkad
Copy link
Author

zyxkad commented Jan 2, 2025

I'll try again tomorrow anyway.

@zyxkad
Copy link
Author

zyxkad commented Jan 2, 2025

@zyxkad
Copy link
Author

zyxkad commented Jan 2, 2025

Yeah I need Eureka to create ship, I don't know if I can make a ship by vs2 itself, but if you can provide any information it will be helpful.

@Rubydesic
Copy link
Contributor

Please do not modify the build files in your PR. You can create a ship using the ship creator item in the creative menu.

@zyxkad
Copy link
Author

zyxkad commented Jan 2, 2025

Please do not modify the build files in your PR. You can create a ship using the ship creator item in the creative menu.

Uh but without strict kotlin version I cannot build the mod?

$ ./gradlew forge:build                                     
                                                                                                                                 
> Configure project :                                                                                                            
Architect Plugin: 3.4.146
Architectury Loom: 1.3.355
This version of Architectury Loom is in beta! Please report any issues you encounter: https://github.com/architectury/architectury-loom/issues
                                                                                                                                 
> Task :common:compileKotlin FAILED                                                                                              
                                                                                                                                 
FAILURE: Build failed with an exception.                                                                                         

* What went wrong:
Execution failed for task ':common:compileKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileJava' (17) and 'compileKotlin' (18).
  
  Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain
  Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation 

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 3s
1 actionable task: 1 executed

@zyxkad
Copy link
Author

zyxkad commented Jan 2, 2025

So without eureka there still problem when I create/load a world:

crash-2025-01-02_06.51.59-server.txt
latest.log

@zyxkad
Copy link
Author

zyxkad commented Jan 4, 2025

@Rubydesic

@zyxkad
Copy link
Author

zyxkad commented Jan 10, 2025

@Rubydesic Any updates?

@blockninja124
Copy link

blockninja124 commented Jan 12, 2025

The crash report I seem to remember is krunch not having enough (un-allocated?) RAM. I think somewhere theres a file that controls how much RAM is allocated while testing, maybe its more than your computers RAM?

(Or I'm completely wrong and the crash is something different)

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