Skip to content

[FEAT] Area events #37

Description

@Auseawesome

Is your feature request related to a problem? Please describe.
It is easy to subscribe to neoforge events, or subscribe to the special area event system to detect entities entering an area etc, but being able to subscribe to neoforge events only within an area would be very useful.
This could allow for things like detecting blocks being broken in an area, or anything else.

Describe the solution you'd like
The implementation could consist of just looping through areas when an event is called and checkign whether the position lies in the area. This could get expensive with a lot of areas so some sort of caching such as making sure the chunk is correct before checking the bounds could help reduce the number of checks needed.

Describe alternatives you've considered
Add some extra events to the area event system such as blocks being broken inside, this could be easier to implement efficiently but wouldn't be as flexible.

Additional context
When making a tree you can break and regenerate, I want to detect the trunk being broken, then destroy the tree and set a timer until it spawns back. Subscribing to the block broken event only within the area of the trunk would be incredibly useful.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttodoIs written in the Todo List

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions