nineMinecraft is a joke site.
nineMinecraft is in no way affiliated with Modrinth or 9minecraft. (And frankly, who wants to be affiliated with the latter?)
Transport-Lib

Transport-Lib

Mod

A simple library allowing modders to create custom pipe networks

Client and server LibraryTransportation

88 downloads
0 followers

Transport Lib

A library to streamline the process of creating transport networks for any resource.

The library supports the following parameters by default:

  • Resource loss per block (Energy loss, Fluids leaking…)
  • Custom Transport Handlers for merging/splitting resources
  • Syncing resource amounts to the client for visual display
  • Accessing resources in cables through block capabilities (WIP)

Here is a concrete example of how to register a network.

    public static final DeferredHolder<TransportNetwork<?>, TransportNetworkImpl<Integer>> MANA_NETWORK = NETWORKS.register("mana",
            () -> TransportNetworkImpl.builder(ManaTransportingHandler.INSTANCE)
                    .synced(ByteBufCodecs.INT)
                    .lossPerBlock((level, node) -> 1f)
                    .transferSpeed(TransferSpeed::instant)
                    .interactorCheck(((level, pos, direction) -> level.getBlockEntity(pos.relative(direction)) instanceof ManaBatteryBlockEntity))
                    .build());

External resources


Project members

Thepigcat76

Member


Technical information

License
MIT
Client side
required
Server side
required
Project ID