Event will trigger when the setMerged method is called for a stargate base. For now, not using this for anything in the base mod itself, but having this will make it easier for other modders to react to a Stargate being created. Doesn't directly address any open issue, but will make addressing several easier in the future.
Implemented by adding a new class extending Forge's base Event, and registering it to the normal Forge event bus.
Event exposes:
The address of the gate that was just created or removed
A boolean indicating whether the gate was created (true) or removed (false)
A BlockPos which points at the Stargate base block's position
A World - whichever World the gate was made/destroyed in.
I've got a working example of using this to do a variety of things (generate address loot, list and teleport to gates) in another project (https://github.com/bsixel/etheralt-pack-utils) but since I was unsure how you'd prefer the loot and data storage be handled, I kept it separate. If that looks reasonable I can move the storage and loot portion to this mod in another PR.
Event will trigger when the setMerged method is called for a stargate base. For now, not using this for anything in the base mod itself, but having this will make it easier for other modders to react to a Stargate being created. Doesn't directly address any open issue, but will make addressing several easier in the future.
Implemented by adding a new class extending Forge's base Event, and registering it to the normal Forge event bus. Event exposes:
I've got a working example of using this to do a variety of things (generate address loot, list and teleport to gates) in another project (https://github.com/bsixel/etheralt-pack-utils) but since I was unsure how you'd prefer the loot and data storage be handled, I kept it separate. If that looks reasonable I can move the storage and loot portion to this mod in another PR.