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

unified-core module and some fixes / minor changes #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

NichtStudioCode
Copy link
Member

This pull requests adds the unified-core module. Previously, the project was lacking a way of listening to custom block placing / breaking, so it wasn't possible to register newly placed energy storages. I've decided not to put those methods into the unified-energy module, so that the project can be expanded in the future without needing to listen to both placing of energy storages and (for example) item storages.
The current idea is to implement the UnifiedBlockListener in your project and then call UnifiedEnergy.getInstance().getEnergyStoragesAt (and in the future also something like UnifiedItems.getInstance().getItemStorageAt). I've also already started to implement this in Nova. You can look at our implementation here.

I've also updated the EnergyNetworkManager#getEnergyStoragesIn method to return a map of Location, EnergyStorage and fixed a ConcurrentModificationException in the corresponding UnifiedEnergy methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant