-
Notifications
You must be signed in to change notification settings - Fork 16
KubeJS API
Andrii edited this page May 16, 2026
·
1 revision
Create: Propulsion exposes ThrusterFuelManager as a global in KubeJS scripts.
This API registers fuels for both:
- Thrusters
- Liquid Burners
Both systems share the same fuel registry.
ThrusterFuelManager
-
registerScriptedFuel(String fluidId, Map<String, Object> settings)- Single supported KubeJS registration API.
- Supports keys:
-
thrustMultiplier/thrust_multiplier -
consumptionMultiplier/consumption_multiplier particle-
overrideTextures/override_textures -
overrideColor/override_color -
useFluidColor/use_fluid_color
-
- Returns
truewhen registration succeeds.
-
overrideFuel(String fluidIdToOverride, Map<String, Object> settings)- Explicit alias for overriding an existing fuel entry.
-
removeFuel(String fuelIdToRemove)- Removes/disables a fuel id from all active sources (datapack/config/KubeJS).
-
plume(default) plasma-
none(disables thruster exhaust particles for that fuel)
ServerEvents.loaded(event => {
// Prevent duplicate registrations on script reloads.
ThrusterFuelManager.clearScriptedFuels()
ThrusterFuelManager.registerScriptedFuel('minecraft:lava', {
thrustMultiplier: 1.0,
consumptionMultiplier: 1.0,
particle: 'plume'
})
ThrusterFuelManager.registerScriptedFuel('createpropulsion:turpentine', {
thrustMultiplier: 1.2,
consumptionMultiplier: 0.8,
particle: 'plasma'
})
// Example with custom textures + RGB tint.
ThrusterFuelManager.registerScriptedFuel('minecraft:water', {
thrustMultiplier: 0.05,
consumptionMultiplier: 1.0,
particle: 'plume',
overrideTextures: ['createpropulsion:plume_0', 'createpropulsion:plume_1'],
useFluidColor: true
})
// Override existing fuel behavior explicitly.
ThrusterFuelManager.overrideFuel('minecraft:lava', {
thrustMultiplier: 0.8,
consumptionMultiplier: 1.25,
particle: 'plasma'
})
// Remove a fuel entirely.
ThrusterFuelManager.removeFuel('minecraft:water')
})- Fuel matching is strict: only declared entries are valid.
- There is no implicit fallback for
minecraft:lavaorforge:fuel. - Effective precedence is
removed > KubeJS > datapack+config. - Invalid fluid ids are ignored and logged.
-
particleNamefalls back toplumeif unknown. -
overrideTextureIdsaccepts resource ids in the particle atlas (e.g.modid:plume_0). -
overrideColoris optional and clamped to0x000000..0xFFFFFF. -
useFluidColortints particles using the actual fluid color from the fluid stack.