Skip to content

Example_PressurePipe

LiangquHMF edited this page Aug 14, 2026 · 1 revision

If you want to register a pressure pipe for a new material at the same time as registering that material.Then:

event.create('gtuf_pressure_alloy')
    .ingot()
    .color(0x9eabb4)
    .pressurePipe(9000, 10)
    //.pressurePipe(MaxPressure,MinPreesure)

If you want to inject pressure pipe PropertyKeys into an existing material.

Method 1

[gtuf-common.toml][pressure]
pressurePipeTolerances = ["bronze=3000:10", "steel=6000:10", "titanium=12000:5", "tungstensteel=24000:5"]

Method 2

 [Kubejs][StartupEvents]
 GTCEuStartupEvents.registry('gtceu:material', event => {
   const GTCEuAPI = Java.loadClass('com.gregtechceu.gtceu.api.GTCEuAPI')
   const MaterialPropertyKeys = Java.loadClass('com.liangqu.gtuf.api.data.material.GTUF_MaterialPropertyKeys')
   const PressurePipeProperties = Java.loadClass('com.liangqu.gtuf.api.data.material.PressurePipeProperties')

   const iron = GTCEuAPI.materialManager.getRegistry('gtceu').get('iron')
   if (iron != null) {
       iron.setProperty(MaterialPropertyKeys.PRESSURE_PIPE, new PressurePipeProperties(9000, 30))  // (max, min)
   }
})

Clone this wiki locally