Structurize icon indicating copy to clipboard operation
Structurize copied to clipboard

Extensible handlers for entities

Open uecasm opened this issue 8 months ago • 2 comments

Closes discord request Closes discord request

Changes proposed in this pull request

  • Moves the "Remove Filtered" button below the resource list to hopefully reduce misclicks.
  • Fixes some off-by-one errors when converting bounding boxes to AABBs (particularly for entity searches).
  • Adds "entity handlers", which similar to placement handlers are extensible by addon mods to hook into UI and placement behaviour, instead of relying on hard-coded checks.
    • As before, only certain entities will place in survival mode (assuming Minecolonies or another survival handler is installed).
    • Entities without any handler are not placeable in survival (but can still be placed in creative). When a handler is defined then the entity becomes placeable by default, unless the handler says otherwise.
    • Glow item frames now require themselves as resources, instead of being a free upgrade from normal item frames.
  • The scan tool entity list now shows some extra icons:
    • Up to four item icons showing the resource types that will be required in survival mode.
    • A red/green indicator showing whether this entity can be placed in survival mode. (This is somewhat irrelevant to Structurize alone but useful if there's any survival mod on top.)

image

Testing

  • [x] Yes I tested this before submitting it.
  • [ ] I also did a multiplayer test.

Review please (should port)

uecasm avatar Apr 19 '25 11:04 uecasm

testing

image

You can see most of the test blueprints I was using in the description screenshot. Mostly paintings and item frames, but I tried several other things too. Pictured here is your blueprint rotated twice, placed, and scan-boxed again, it looks ok AFAICT.

uecasm avatar Apr 30 '25 08:04 uecasm

I've DMed you @uecasm, I'm generally fine with changes but I would like to test it myself on 1.21, so either you or I need to port this branch first, tell me whatever works best for you

Nightenom avatar May 28 '25 16:05 Nightenom