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

Refactoring after update, new connector GUI features, #551 fix, optimisation patch #570

Merged
merged 6 commits into from
Apr 12, 2024

Conversation

Dertiende
Copy link

@Dertiende Dertiende commented Apr 6, 2024

Refactoring after update

  • remove temporary casts and imports

New connector GUI features + #551 fix

  • Now in GUI you can see connected block for each direction (also info about block when hovered)
  • Connector name is now correctly displayed when reconnecting for other players as well
  • Directional name toggle buttons now do not lose state after reopening the interface.
  • Not connected direction always disabled
  • Direction connected to other connectors and cables is always active
    New GUI Example:
    image

Optimisation "ticking" code for all channel types

Description Before After Channels
1 Combining simulation and real insertion methods Doing work twice, simulate then real Unified method based on pipez one. Still safe but faster Item channel Fluid channel
2 Cache connector position Request position every tick for every connector Stored as new field in cached connectors All channels
3 Skip processing of full inventories if there are many extractors Trying to insert to full inventory for every extractor in cycle If we have more than 2 extractors, we memorize the full inventory and skip it for the next one. We perform this operation when processing the first and middle extractor Item channel
4 Cache rate for energy channel Check limit rate every tick for every connector Stored as new field in cached connectors Energy channel
5 Check required energy Iterate over all extractors Stop the iteration if we have obtained enough energy to fill all consumers Energy channel

@McJty McJty merged commit 26348ef into McJtyMods:1.19 Apr 12, 2024
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.

2 participants