Adding pipes - Paril/exppipes GitHub Wiki
Do you have an idea for a new pipe ? Great, here's how to create it !
First, create a TileEntity for your pipe, extending either the TileEntityPipe or TileEntityRoutingPipe class. Make sure you know the difference before starting anything, this page won't explain that.
As a rule of thumb, if your TileEntity should ever override the serverUpdate method, extend TileEntityRoutingPipe.
Here, we will focus on adding routing pipes. For normal pipes, check TileEntityNoInsertionPipe.
The TileEntity
A pipe's TE contains a lot of fields. Don't be afraid of them, they're all useful.
itemHandleris the ... item handler of the pipe. Don't forget to.tick(this.world.getTotalWorldTime())before you do anything with it !disableConnectionis a map associatingEnumFacings to booleans. Values are not guaranteed to be present, and default tofalse.truemeans "connection disabled".- Any
ConfigRoutingPipefield contains the filters configuration that you see when right-clicking the pipe, and the filters set with OpenComputers.
All the routing logic, node connection, item traveling, etc. is done in the superclass, so you don't have to worry about it.
// TODO finish this
A note on pipe textures
- When creating a pipe texture, please add it to the
resources/assets/exppipes/textures/blocks/pipe.xcffile. It'll make my job, and texture packs makers', easier if the design ever changes. - Please avoid blue textures, except for fluid-related pipes.
- Please leave some transparent pixels in the texture. (Yes, I know for
polyproviderpipe.png) - Stick to one pattern for each pipe family.