Skip to content

Conversation

@M-W-K
Copy link
Contributor

@M-W-K M-W-K commented Dec 15, 2023

What

Completely rewrites the pipenet system from the ground up, with three major goals:

  1. Ease of future expansion & general modularity
  2. Better routing for all pipenets, most importantly the fluidnet
  3. Use of a graph abstraction instead of walking the world during routing

Outcome

Future expansion of pipenets, or just graphnets in general, will be much easier for gtceu and addon mods. Half of this is because the mess of generics lying around everywhere has been drastically cut back. The other half is due to a more modular approach to storage of properties on the net; the system is very reminiscent of material properties. In addition, the abstract 'graphnet' api backing pipenets has been made separate, allowing for graphnets that aren't pipenets.

Since routing of things is now based on the more abstract graphnet, all pipenets can use any of the traversal algorithms that are defined, if they are made compatible with the traversal algorithm. This means things like round robin fluid distribution.
In addition, moving to the graph abstraction means that traversal can be across the graph instead of the world. By updating the topology of the graph based on changes to the world, but not relying on the world itself, this allows for avoiding things like chunkloading for traversal, as well as the application of graph theory principles.

Additional Information

Also fixes #2582

Minor change or fix

dependencies.gradle
gradle.properties
gregtech.api.pattern
gregtech.common.command
gregtech.common.creativetab
gregtech.common.gui.widget.monitor
gregtech.common.items
gregtech.core

Small API expansions or fixes

gregtech.api.block
gregtech.api.metatileentity (might want to do this after gregtech.api.cover)

Pipe-Independent API changes

gregtech.api.capability
gregtech.api.fluids
gregtech.api.items.metaitem (do this after gregtech.api.capability)
gregtech.api.util
gregtech.common.metatileentities (do this after gregtech.api.capability)

Kind of Independent API changes

gregtech.api.cover (touches some new rendering classes)

Moved

gregtech.api.longdist

Deleted

gregtech.api.pipenet

The Big Stuff

gregtech.api.graphnet
gregtech.client
gregtech.common.pipelike
gregtech.common.covers

Dependent API changes

gregtech.api.unification
gregtech.common.CommonProxy
gregtech.common.blocks
gregtech.datafix
gregtech.integration
gregtech.loaders.recipe

Potential Compatibility Issues

The entire pipenet API and internals is getting rewritten. There will be very large compatibility issues with any mod that touched the pipenet.

@M-W-K M-W-K marked this pull request as ready for review December 21, 2023 23:59
@M-W-K M-W-K requested review from a team as code owners December 21, 2023 23:59
M-W-K added 29 commits December 19, 2024 20:46
# Conflicts:
#	src/main/java/gregtech/api/capability/SimpleCapabilityManager.java
#	src/main/java/gregtech/api/capability/impl/ComputationRecipeLogic.java
#	src/main/java/gregtech/api/pipenet/tile/TileEntityPipeBase.java
#	src/main/java/gregtech/client/ClientProxy.java
#	src/main/java/gregtech/client/renderer/pipe/CableRenderer.java
#	src/main/java/gregtech/client/renderer/pipe/PipeRenderer.java
#	src/main/java/gregtech/common/covers/CoverEnderFluidLink.java
#	src/main/java/gregtech/common/covers/CoverFluidFilter.java
#	src/main/java/gregtech/common/covers/CoverItemFilter.java
#	src/main/java/gregtech/common/items/behaviors/TricorderBehavior.java
#	src/main/java/gregtech/common/metatileentities/electric/MetaTileEntityWorldAccelerator.java
#	src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityComputationHatch.java
#	src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityLaserHatch.java
#	src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityOpticalDataHatch.java
#	src/main/java/gregtech/common/metatileentities/storage/MetaTileEntityDrum.java
#	src/main/java/gregtech/common/metatileentities/storage/MetaTileEntityLongDistanceEndpoint.java
#	src/main/java/gregtech/common/pipelike/fluidpipe/tile/TileEntityFluidPipeTickable.java
#	src/main/java/gregtech/common/pipelike/itempipe/BlockItemPipe.java
#	src/main/java/gregtech/common/pipelike/laser/BlockLaserPipe.java
#	src/main/java/gregtech/common/pipelike/longdistance/fluid/MetaTileEntityLDFluidEndpoint.java
#	src/main/java/gregtech/common/pipelike/longdistance/item/MetaTileEntityLDItemEndpoint.java
#	src/main/java/gregtech/common/pipelike/optical/BlockOpticalPipe.java
#	src/main/java/gregtech/integration/theoneprobe/TheOneProbeModule.java
# Conflicts:
#	src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
#	src/main/java/gregtech/client/ClientProxy.java
#	src/main/java/gregtech/common/items/MetaItem1.java
#	src/main/java/gregtech/common/items/behaviors/ColorSprayBehaviour.java
#	src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityLaserHatch.java
# Conflicts:
#	src/main/java/gregtech/api/capability/impl/ItemHandlerList.java
#	src/main/java/gregtech/api/unification/material/Material.java
#	src/main/java/gregtech/integration/groovy/MaterialPropertyExpansion.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing frames from pipes in structure won't cause multiblock structure invalidization

3 participants