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

Inconsistent raycasting techniques. #807

Open
6 tasks
SpecialBuilder32 opened this issue Oct 18, 2022 · 2 comments
Open
6 tasks

Inconsistent raycasting techniques. #807

SpecialBuilder32 opened this issue Oct 18, 2022 · 2 comments
Labels
quality-update Improves efficiency or structure without affecting functionality of a module

Comments

@SpecialBuilder32
Copy link
Member

SpecialBuilder32 commented Oct 18, 2022

Different modules use inconsistent techniques for raycasting from the player to a block they just placed or interacted with.

It is possible to raycast without the need for a temporary entity (AEC or Marker), and this is likely preferable for performance (less selector resolution). Note Block Interface uses this technique currently, see that for reference. Note that raycasting for the sake of block placement will need some additional checks; see backup ray behavior in lib_brewing

This bug will track the conversion of the scattered raycasting methods to entityless versions.

  • Liquid Tanks ink sign interaction
  • Machine Blocks (CC creation - right click with crafting table)
  • Book Binders Placement
  • Trapped Signs placement and interaction
  • lib_brewing Brewing Stand Placement
  • gm4_fruiting_trees Sapling Placement

any additional instances, please comment in this bugs thread and this main comment will be updated.

@SpecialBuilder32 SpecialBuilder32 added the quality-update Improves efficiency or structure without affecting functionality of a module label Oct 18, 2022
@Bloo-dev
Copy link
Member

It would be so nice if we could somehow pass parameters to functions and dynamically call functions, Then we could make a library for this and avoid this issue by reducing duplicate code.

I guess this would be possible if we had something like beet parse the files and generate the raycast, but that would make development quite a bit more complicated.

@SpecialBuilder32
Copy link
Member Author

That was the thought I had. There was a discussion with some of the beet/bolt people in #technical regarding some of the things gm4 should consider if we started incorporating beet into development more fully. https://discord.com/channels/151141188961828864/294610104270192651/1031763397483700304

Though I also think we shouldn't move to incorporate beet/bolt into any existing modules until we've like, tried making a new one entirely in the beet ecosystem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality-update Improves efficiency or structure without affecting functionality of a module
Projects
None yet
Development

No branches or pull requests

2 participants