Skip to content
5thlayerPublic

About

Pipes and tanks on Factorio 2.0's fluid model for NeoForge: a connected run is one segment holding one fluid, with no pressure.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Pipeworks

Pipeworks is a simple fluid logistics mod. It adds pipes, a storage tank, a pump to draw fluid from a source and an outlet to place it in the world.

Why?

Because I wanted my own fluid logistics for the -Works mods suite. Nothing special here, simplicity rules.

NeoForge, Minecraft 26.1.2 only. Pipeworks is early work, so please report any issues you find on GitHub.

To play Pipeworks beside every other FactoryWorks mod, install the FactoryWorks Showcase modpack from CurseForge.

Pipeworks is built for modpacks and other mods. It registers no fluid and no machine. It carries whatever fluid another mod puts in, as Beltworks carries any item, and the creative pipe lets you try it with nothing else installed.

Features

  • Pipes and a storage tank. A pipe holds 100 mB and a tank 25,000 mB by default, Factorio's volumes; pipeworks-server.toml sets both, for the pipes and tanks placed afterwards. Pipes draw an arm toward each pipe, tank or port they link to, and toward any block beside them that holds fluid.
  • Buckets. A bucket, or any mod's item that holds fluid, used on a pipe or tank fills or empties its segment. A full one empties only if the segment has room for all of it and holds that fluid or none; an empty or part-full one fills from the segment. In creative the item is left as it is.
  • One fluid per segment. A pipe or tank that would join two segments holding different fluids is refused, with a message saying so.
  • Breaking splits fairly. Breaking a pipe, tank or port splits its segment by capacity, and the broken block takes its share of the fluid. Segments are saved with the world and keep their fluid while their chunks are unloaded.
  • See the level. A storage tank shows how full its segment is, in fifteen steps, as fluid of the right colour in its glass. With Jade installed, looking at a pipe, tank or port shows its segment's fluid, amount and capacity.
  • The creative pipe. pipeworks:creative_pipe, in the Works creative tab, keeps its segment full of the fluid its screen sets. Click its slot with a bucket, or any item holding a fluid, to set it, and with an empty cursor to clear it. With JEI or EMI installed, a fluid can be dragged onto the slot.
  • A Pump. pipeworks:pump draws a still source block beside it into its segment. A source in the fluid tag pipeworks:infinite_sources, water by default, is left in place and gives 1,200 mB a second; any other is taken whole, as a bucket would, once the segment has room for 1,000 mB.
  • An Outlet. pipeworks:outlet sets its segment's fluid down as a source block in the space it faces, a bucket's worth at a time, once that space is empty or replaceable. It never picks fluid up.
  • Dismantle and drag-laying. Pipes are a Groundworks Dismantle Family and are laid by its Stretch: sneak-click a pipe with a pickaxe, then click another to take up the run between them; drag a line of pipes the way belts are laid.

Not yet: the in-line pump and pipe-to-ground.

For pack authors

  • Closing a pipe's sides. A pipe's side can be closed, to keep two runs apart or cut a pipe off from a block holding fluid. A right-click on a pipe with an item in the item tag pipeworks:closes_sides toggles the side clicked. The tag ships a stick; a pack replaces the tag to name other items, or adds to it and keeps the stick. Opening a side that would mix two fluids is refused.

For mod authors

  • Ports. A block entity joins the segments beside it by implementing FluidPort (io.github._5thlayer.pipeworks.api) and calling FluidPorts.join(this) from onLoad. Its block calls FluidPorts.leave(level, pos) when removed, and it fills and drains the segment through FluidPorts.segment(level, pos), a NeoForge ResourceHandler<FluidResource>. A pipe or tank also exposes that handler as Capabilities.Fluid.BLOCK, except on a closed side.
  • Planning pipes. FluidPipes.wouldLink and FluidPipes.wouldDrawArm read what a pipe placed at a position would link to and draw, for a mod that lays pipes for the player. FluidPipes.toggle, close, open and isClosed close sides from a mod's own tool.
  • CHANGELOG.md lists what each version changed for a mod building against it.

Dependencies

Groundworks 0.5.5 or later in the 0.5 series is required, and is a separate download. Jade, JEI and EMI are optional, as above.

Art

The pipe, tank and creative pipe models and textures are from Oritech v1.2.12 by Rearth, CC0 1.0. They are renamed and retextured to Pipeworks' ids; none is from the ArtOfTecharium or unused-textures sets Oritech credits under other licences. REUSE.toml records each file.

Developing

A 5thlayer Library: a mod its Consumers, other Libraries or a pack, read from the local maven repository by version. See GLOSSARY.md for the domain glossary. sh ./gradlew build runs the JUnit tests on a plain JVM, and sh ./gradlew runGameTestServer the game tests headless. The segment rules are segment/SegmentGraph, with no Minecraft types, so they are tested without a world.

License

MIT, with the art above under CC0 1.0. Source is on GitHub. Releases are on Modrinth and CurseForge.

About

Pipes and tanks on Factorio 2.0's fluid model for NeoForge: a connected run is one segment holding one fluid, with no pressure.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

Generated from 5thlayer/libworks