#How to rewrite the beginning of the following paragraph to apply to version 1.19?
4 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
i think its CreateEvents.spoutHandler(e => {}) in startup, by looking at the KJS Create code 
let spoutInteraction = (blockId, fluidId, fluidAmount, result, requiredAmount) => {
event.add(blockId + "_spout_interaction", blockId, (block, fluid, simulate) => {
/*
blockId = The block required below the spout
fluidId = The fluid to be used
fluidAmount = The amount of fluid consumed in an interaction and the amount needed to start an interaction if requiredAmount is left undefined. 0 wont work, even if requiredAmount is defined.
result = The block that is placed instead of the old block. A random tick will be called if left undefined.
requiredAmount = the amount of fluid required to start an interaction. 0 doesnt work.
*/
if (!requiredAmount)
requiredAmount = fluidAmount
if (fluid.id == fluidId && fluid.amount >= requiredAmount) {
if (!simulate)
if (result)
block.setBlockState(Block.getBlock(result).defaultBlockState(), 2);
else
block.blockState.randomTick(block.level.minecraftLevel, block.pos, block.level.minecraftLevel.getBlock.randomTick)
return fluidAmount;
}
return 0;
});
}
spoutInteraction("minecraft:wheat", "minecraft:water", 100)
// spoutInteraction("ars_nouveau:blue_archwood_sapling", "kubejs:cascading_juice", 1000, "chipped:moss_block_1")
let corundum = ["red", "orange", "yellow", "green", "blue", "indigo", "violet", "white", "black"]
corundum.forEach(Color => {
spoutInteraction("quark:" + Color + "_corundum", "minecraft:water", 100)
});
})```