Skip to main content
Version: 4.2.0

KubeJS

Ex Nihilo: Sequentia supports KubeJS scripts. Be sure to check the KubeJS Documentation before getting started here to make sure you understand how KubeJS works.

Compost Recipes

MethodParametersDescriptionAccepted Values
compost(input, amount)inputItem to be compostedItem or Tag
amountAmount of solid to be insertedA value greater than 0

Example

script.js
onEvent('recipes', event => {
event.recipes.exnihilosequentia.compost('minecraft:cobblestone', 750)
}

Crook Recipes

MethodParametersDescriptionAccepted Values
crook(input)inputBlock to be crookedBlock or Tag
addDrop(drop, count, chance)dropItem to be droppedItem
countNumber of items to dropA value greater than 0
chancePercent that the item will be droppedA value between 0.0 and 1.0

addDrop can be chained multiple times to add more drops to the recipe.

Example

Pre KubeJS 6.1 script.js
ServerEvents.recipes(event => {
event.recipes.exnihilosequentia.crook('minecraft:grass_block')
.addDrop('minecraft:coal', 4, 0.5)
.addDrop('minecraft:iron_ingot', 1, 0.25)
}
KubeJS 6.1+ script.js
ServerEvents.recipes(event => {
event.recipes.exnihilosequentia.crook('minecraft:grass_block',[
{
chance: 0.5,
count: 4,
item: 'minecraft:coal'
},
{
chance: 0.25,
count: 1,
item: 'minecraft:iron_ingot'
}
])
}

Crucible Recipes

MethodParametersDescriptionAccepted Values
crucible(input, crucibleType, amount, resultFluid)inputItem to be meltedItem or Tag
crucibleTypeType of crucible that is required for recipe.wood or fired
amountAmount of fluid created by inputA value greater than 0
resultFluidFluid created from inputFluid

Example

script.js
onEvent('recipes', event => {
event.recipes.exnihilosequentia.crucible('minecraft:dirt', 'fired', 500, 'minecraft:water')
}

Fluid Item Transformation Recipes

MethodParametersDescriptionAccepted Values
fluid_item(inputItem, output, inputFluid)inputItemItem to start transformationItem or Tag
outputBlock as the result of the transformationBlock
inputFluidFluid needed in the barrelFluid

Example

script.js
onEvent('recipes', event => {
event.recipes.exnihilosequentia.fluid_item('minecraft:stone', 'minecraft:stone_bricks', 'exnihilosequentia:witch_water')
}

Fluid on Top Recipes

MethodParametersDescriptionAccepted Values
fluid_on_top(fluidInBarrel, fluidOnTop, output)fluidInBarrelFluid required in the barrelFluid
fluidOnTopFluid in the block space above barrelFluid
outputResulting blockBlock

Example

script.js
onEvent('recipes', event => {
event.recipes.exnihilosequentia.fluid_on_top('exnihilosequentia:witch_water', 'exnihilosequentia:sea_water', 'minecraft:coarse_dirt')
}

Fluid Transform Recipes

MethodParametersDescriptionAccepted Values
fluid_transform(inputFluid, outputFluid, catalyst)inputFluidFluid required in the barrelFluid
outputFluidResult fluid of the transformFluid
catalystItem required to start transformationItem or Tag

Example

script.js
onEvent('recipes', event => {
event.recipes.exnihilosequentia.fluid_transform('minecraft:lava', 'minecraft:water', '#forge:ores')
}

Hammer Recipes

MethodParametersDescriptionAccepted Values
hammer(input)inputBlock to be hammeredBlock or Tag
addDrop(drop, count, chance)dropItem to be droppedItem
countNumber of items to dropA value greater than 0
chancePercent that the item will be droppedA value between 0.0 and 1.0

addDrop can be chained multiple times to add more drops to the recipe.

Example

Pre KubeJS 6.1 script.js
ServerEvents.recipes(event => {
event.recipes.exnihilosequentia.hammer('minecraft:pumpkin')
.addDrop('minecraft:melon_slice', 20, 0.75)
.addDrop('minecraft:pumpkin_seeds', 1, 1)
}
KubeJS 6.1+ script.js
ServerEvents.recipes(event => {
event.recipes.exnihilosequentia.hammer('minecraft:pumpkin',[
{
chance: 0.75,
count: 20,
item: 'minecraft:melon_slice'
},
{
chance: 1.0,
count: 1,
item: 'minecraft:pumpkin_seeds'
}
])
}

Heat Recipes

MethodParametersDescriptionAccepted Values
heat(input, amount, properties)inputBlock acting as heat sourceBlock
amountAmount of heat generatedA value greater than 0
propertiesBlock State properties required to act as heat sourceA JSON map. Optional value

Example

script.js
onEvent('recipes', event => {
event.recipes.exnihilosequentia.heat('minecraft:hay_block', 200)
event.recipes.exnihilosequentia.heat('minecraft:campfire', 4, {"lit": "true"})
}

Sieve Recipes

MethodParametersDescriptionAccepted Values
sieve(input, output)inputBlock to be sieved sourceBlock or Tag
outputItem dropped from sieved block generatedItem
addRoll(chance, meshType)chanceChance associated with this mesh typeA value between 0.0 and 1.0
meshTypeMesh required for item to be dropped at specified ratestring, flint, iron, diamond, emerald, netherite
setWaterlogged()Makes recipe require sieve to be waterloggedIf present, recipe is waterlogged. If absent, recipe is not waterlogged.

addRoll can be chained multiple times to add more rolls that can trigger the drop.

Example

Pre KubeJS 6.1 script.js
ServerEvents.recipes(event => {
event.recipes.exnihilosequentia.sieve('minecraft:coarse_dirt', 'minecraft:cobblestone')
.addRoll(1, 'iron')
.addRoll(1, 'diamond')
}
KubeJS 6.1+ script.js
ServerEvents.recipes(event => {
event.recipes.exnihilosequentia.sieve('minecraft:coarse_dirt', 'minecraft:cobblestone', [
{
chance: 1.0,
mesh: 'iron'
},
{
chance: 1.0,
mesh: 'diamond'
}
])
}