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

Add RayTraceConfiguration #10237

Closed
wants to merge 5 commits into from

Conversation

notTamion
Copy link
Contributor

@notTamion notTamion commented Feb 10, 2024

closes #9942
Adds a RayTraceBuilder which can be constructed using a starting Location, direction and max distance.
I am currently still unsure of how to integrate the raytrace methods on Block. I would definitely love to hear some feedback on that.
post hardfork #11907

@notTamion notTamion requested a review from a team as a code owner February 10, 2024 11:49
Copy link
Member

@Machine-Maker Machine-Maker left a comment

Choose a reason for hiding this comment

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

I think this should be setup in a way similar to adventure's JoinConfiguration. interfaces+builder that are then used in a method on World rather than calling some method on the builder itself to get the ray trace result.

@notTamion
Copy link
Contributor Author

notTamion commented Feb 10, 2024

Could you give me an example explanation specifically for RayTrace in mind? (i don't exactly understand what you mean) do you mean like a RayTrace class that can be constructed which holds all the info about the direction etc. and then gets passed into the raytrace method on World, LivingEntity etc.?

EDIT: i think i know what you mean now but i don't see the benefit in it. imo that just complicates stuff more

@notTamion notTamion force-pushed the add-raytracebuilder branch 2 times, most recently from e8f162f to 2892bf9 Compare February 11, 2024 07:53
@notTamion
Copy link
Contributor Author

what should be done regarding LivingEntity or Block? those interfaces only have methods for raytracing with the target of there own type

@notTamion notTamion changed the title Add RayTraceBuilder Add RayTraceConfiguration Feb 11, 2024
@notTamion
Copy link
Contributor Author

Alright i am really not sure about this. I feel like the kind of RayTraceBuilder or RayTraceExecutor we had in the beginnning just feels better. Using a configuration where stuff like starting point, distance, direction all need to be adjusted for each use specificly doesn't seem very convenient. I guess in the example of the JoinConfiguration that just works better cause not that many variables need to be adjusted for each use.

@notTamion notTamion force-pushed the add-raytracebuilder branch 2 times, most recently from cc1427a to ea1febd Compare April 28, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Allow changing the raySize of LivingEntity#rayTraceEntities
3 participants