Request: More World Generation Events
AJ4real opened this issue ยท 4 comments
Please add the following to your API, I would really appreciate it.
- Event that is fired when a tree is generated in the world
- Method that returns
HashMap<Location, Material>
for what material was generated at what location - Method that returns
String
for the Object ID of what tree has been generated
- Method that returns
- Event that is fired when an ore is placed in the world
- Method that returns
HashMap<Location, Material>
for what material was generated at what location - Method that returns
String
for the Object ID of what ore has been generated
- Method that returns
Those hashmaps sound horrible, but the rest is plausible.
But I'm sure we could do something with the same effect.
Those events can be implemented, but will definitely be made stateless. If you want to change how those objects generate, implement Tree
or extend Ore
and insert your implementation into a registry, then use it in a pack. You shouldn't change behaviour invisibly, especially when there is a clear, supported, and expected way to do the same thing.
For the trees, an ImmutableBuffer
could be implemented and passed to the event, but due to how ores generate it is impractical to re-generate them into a buffer. If you need to view the blocks, you can generate the Ore
passed to the event in a dummy world.