Skip to content

Commit

Permalink
Update examples scripts (#138)
Browse files Browse the repository at this point in the history
* fix incorrect Constellation logic

* fix incorrectly named files

* update examples, fix errors in examples
  • Loading branch information
WaitingIdly authored Mar 14, 2024
1 parent 4f1ec82 commit 67fc28f
Show file tree
Hide file tree
Showing 24 changed files with 2,060 additions and 2,003 deletions.
156 changes: 89 additions & 67 deletions examples/postInit/actuallyadditions.groovy
Original file line number Diff line number Diff line change
@@ -1,93 +1,112 @@

// Auto generated groovyscript example file
// MODS_LOADED: actuallyadditions

println 'mod \'actuallyadditions\' detected, running script'


// Atomic Reconstructor
// Atomic Reconstructor:
// The Atomic Reconstructor is a block which uses energy to convert a block or item in front of it into other items.
mods.actuallyadditions.atomicreconstructor.recipeBuilder()

mods.actuallyadditions.atomic_reconstructor.removeByInput(item('minecraft:diamond'))
mods.actuallyadditions.atomic_reconstructor.removeByOutput(item('actuallyadditions:block_crystal'))
// mods.actuallyadditions.atomic_reconstructor.removeAll()

mods.actuallyadditions.atomic_reconstructor.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.energyUse(1000)
.register()

mods.actuallyadditions.atomic_reconstructor.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.energyUse(1000) // Optional, int
.energy(1000)
.register()

mods.actuallyadditions.atomicreconstructor.recipeBuilder()
mods.actuallyadditions.atomic_reconstructor.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay') * 2)
.register()

mods.actuallyadditions.atomicreconstructor.removeByInput(item('minecraft:diamond'))
mods.actuallyadditions.atomicreconstructor.removeByOutput(item('actuallyadditions:block_crystal'))
//mods.actuallyadditions.atomicreconstructor.removeAll()

// Ball of Fur
// Ball of Fur:
// A weighted itemstack output for using a Ball of Fur, dropped by a cat.
mods.actuallyadditions.balloffur.recipeBuilder()

mods.actuallyadditions.ball_of_fur.removeByOutput(item('minecraft:feather'))
// mods.actuallyadditions.ball_of_fur.removeAll()

mods.actuallyadditions.ball_of_fur.recipeBuilder()
.output(item('minecraft:clay') * 32)
.weight(15)
.register()

mods.actuallyadditions.balloffur.removeByOutput(item('minecraft:feather'))
//mods.actuallyadditions.balloffur.removeAll()

// Compost
// Compost:
// Converts an input item into an output item after 150 seconds. Requires an input and output display blockstate.

mods.actuallyadditions.compost.removeByInput(item('actuallyadditions:item_canola_seed'))
mods.actuallyadditions.compost.removeByOutput(item('actuallyadditions:item_fertilizer'))
// mods.actuallyadditions.compost.removeAll()

mods.actuallyadditions.compost.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.inputDisplay(blockstate('minecraft:clay'))
.outputDisplay(blockstate('minecraft:diamond_block'))
.register()

mods.actuallyadditions.compost.removeByInput(item('actuallyadditions:item_canola_seed'))
mods.actuallyadditions.compost.removeByOutput(item('actuallyadditions:item_fertilizer'))
//mods.actuallyadditions.compost.removeAll()

// Crusher
// Converts an input itemstack into an output itemstack with a chance of a second itemstack
// Crusher:
// Converts an input itemstack into an output itemstack with a chance of a second itemstack.

mods.actuallyadditions.crusher.removeByInput(item('minecraft:bone'))
mods.actuallyadditions.crusher.removeByOutput(item('minecraft:sugar'))
// mods.actuallyadditions.crusher.removeAll()

mods.actuallyadditions.crusher.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'), item('minecraft:diamond')) // Second output is optional, and modified by chance
.chance(100) // Optional, int
.output(item('minecraft:diamond'), item('minecraft:diamond'))
.chance(100)
.register()

mods.actuallyadditions.crusher.recipeBuilder()
.input(item('minecraft:diamond_block'))
.output(item('minecraft:diamond') * 12)
.register()

mods.actuallyadditions.crusher.removeByInput(item('minecraft:bone'))
mods.actuallyadditions.crusher.removeByOutput(item('minecraft:sugar'))
//mods.actuallyadditions.crusher.removeAll()

// Empowerer
// Turns 5 input items into an output item at the cost of power and time. Has a configurable color
// Empowerer:
// Turns 5 input items into an output item at the cost of power and time. Has a configurable color.

mods.actuallyadditions.empowerer.removeByInput(item('actuallyadditions:item_crystal'))
mods.actuallyadditions.empowerer.removeByOutput(item('actuallyadditions:item_misc:24'))
// mods.actuallyadditions.empowerer.removeAll()

mods.actuallyadditions.empowerer.recipeBuilder()
.mainInput(item('minecraft:clay')) // Optional, itemstack. if undefined and input has 5 items, mainInput uses the first itemstack input. Otherwise, errors.
.mainInput(item('minecraft:clay'))
.input(item('minecraft:clay'),item('minecraft:clay'),item('minecraft:clay'),item('minecraft:clay'))
.output(item('minecraft:diamond'))
.time(50)
.energy(1000) // Optional, int
.red(0.5) // Optional, float (default 0)
.green(0.3) // Optional, float (default 0)
.blue(0.2) // Optional, float (default 0)
.energy(1000)
.red(0.5)
.green(0.3)
.blue(0.2)
.register()

mods.actuallyadditions.empowerer.recipeBuilder()
.mainInput(item('minecraft:clay'))
.input(item('minecraft:diamond'),item('minecraft:clay'),item('minecraft:clay'),item('minecraft:clay'))
.output(item('minecraft:diamond') * 2)
.time(50)
.color(0.5, 0.3, 0.2) // Optional, float... shorthand for (red, green, blue). Must contain exactly 3 entries. "particleColor" and "color" are aliases
.color(0.5, 0.3, 0.2)
.register()

mods.actuallyadditions.empowerer.recipeBuilder()
.mainInput(item('minecraft:diamond'))
.input(item('minecraft:diamond'),item('minecraft:gold_ingot'),item('minecraft:diamond'),item('minecraft:gold_ingot'))
.output(item('minecraft:dirt') * 8)
.time(50)
.particleColor(0x00FF88) // Optional, int. Hexadecimal color. "particleColor" and "color" are aliases
.particleColor(0x00FF88)
.register()

mods.actuallyadditions.empowerer.recipeBuilder()
Expand All @@ -96,74 +115,77 @@ mods.actuallyadditions.empowerer.recipeBuilder()
.time(50)
.register()

mods.actuallyadditions.empowerer.removeByInput(item('actuallyadditions:item_crystal'))
mods.actuallyadditions.empowerer.removeByOutput(item('actuallyadditions:item_misc:24'))
//mods.actuallyadditions.empowerer.removeAll()

// Nether Mining Lens
// A weighted oredict for the block obtained via firing a Mining Lens at a block of Netherrack. The oredict must have a block, or the world will hang.
mods.actuallyadditions.nethermininglens.recipeBuilder()
// Nether Mining Lens:
// A weighted oredict for the block obtained via firing a Mining Lens at a block of Netherrack. The oredict must have a
// block, or the world will hang.

mods.actuallyadditions.nether_mining_lens.removeByOre(ore('oreQuartz'))
mods.actuallyadditions.nether_mining_lens.removeByOre('oreQuartz')
// mods.actuallyadditions.nether_mining_lens.removeAll()

mods.actuallyadditions.nether_mining_lens.recipeBuilder()
.ore(ore('blockDiamond'))
.weight(100)
.register()

mods.actuallyadditions.nethermininglens.recipeBuilder()
mods.actuallyadditions.nether_mining_lens.recipeBuilder()
.ore('blockGold')
.weight(100)
.register()

mods.actuallyadditions.nethermininglens.removeByOre(ore('oreQuartz'))
mods.actuallyadditions.nethermininglens.removeByOre('oreQuartz')
//mods.actuallyadditions.nethermininglens.removeAll()

// Oil Gen
// Turns a fluid into power at a rate
mods.actuallyadditions.oilgen.recipeBuilder()
// Oil Gen:
// Turns a fluid into power at a rate.

mods.actuallyadditions.oil_gen.removeByInput(fluid('canolaoil').getFluid())
mods.actuallyadditions.oil_gen.removeByInput(fluid('canolaoil'))
mods.actuallyadditions.oil_gen.removeByInput('refinedcanolaoil')
// mods.actuallyadditions.oil_gen.removeAll()

mods.actuallyadditions.oil_gen.recipeBuilder()
.fluidInput(fluid('water'))
.amount(1000) // Optional, uses the FluidStack amount if not defined.
.amount(1000)
.time(50)
.register()

mods.actuallyadditions.oilgen.recipeBuilder()
mods.actuallyadditions.oil_gen.recipeBuilder()
.fluidInput(fluid('lava') * 50)
.time(100)
.register()

mods.actuallyadditions.oilgen.removeByInput(fluid('canolaoil').getFluid())
mods.actuallyadditions.oilgen.removeByInput('refinedcanolaoil')
//mods.actuallyadditions.oilgen.removeAll()

// Stone Mining Lens:
// A weighted oredict for the block obtained via firing a Mining Lens at a block of Stone. The oredict must have a block,
// or the world will hang.

mods.actuallyadditions.stone_mining_lens.removeByOre(ore('oreCoal'))
mods.actuallyadditions.stone_mining_lens.removeByOre('oreLapis')
// mods.actuallyadditions.stone_mining_lens.removeAll()

// Stone Mining Lens
// A weighted oredict for the block obtained via firing a Mining Lens at a block of Stone. The oredict must have a block, or the world will hang.
mods.actuallyadditions.stonemininglens.recipeBuilder()
mods.actuallyadditions.stone_mining_lens.recipeBuilder()
.ore(ore('blockDiamond'))
.weight(100)
.register()

mods.actuallyadditions.stonemininglens.recipeBuilder()
mods.actuallyadditions.stone_mining_lens.recipeBuilder()
.ore('blockGold')
.weight(100)
.register()

mods.actuallyadditions.stonemininglens.removeByOre(ore('oreCoal'))
mods.actuallyadditions.stonemininglens.removeByOre('oreLapis')
//mods.actuallyadditions.stonemininglens.removeAll()

// Treasure Chest
// A weighted item, with a weight to obtain and a minimum and maximum amount. Obtained via right clicking a Treasure Chest spawning randomly on the sea floor.
mods.actuallyadditions.treasurechest.recipeBuilder()
// Treasure Chest:
// A weighted item, with a weight to obtain and a minimum and maximum amount. Obtained via right-clicking a Treasure Chest
// spawning randomly on the sea floor.

mods.actuallyadditions.treasure_chest.removeByOutput(item('minecraft:iron_ingot'))
// mods.actuallyadditions.treasure_chest.removeAll()

mods.actuallyadditions.treasure_chest.recipeBuilder()
.output(item('minecraft:clay'))
.weight(50)
.min(16)
.max(32)
.register()

mods.actuallyadditions.treasurechest.removeByOutput(item('minecraft:iron_ingot'))
//mods.actuallyadditions.treasurechest.removeAll()






84 changes: 34 additions & 50 deletions examples/postInit/advancedmortars.groovy
Original file line number Diff line number Diff line change
@@ -1,54 +1,38 @@

// Auto generated groovyscript example file
// MODS_LOADED: advancedmortars

println 'mod \'advancedmortars\' detected, running script'

// Mortar

// add(List<String> types, ItemStack output, int duration, List<IIngredient> inputs)
mods.advancedmortars.Mortar.add(
['stone'],
item('minecraft:diamond') * 4,
4,
[ore('ingotGold')]
)

mods.advancedmortars.Mortar.add(
['stone'],
item('minecraft:tnt'),
4,
[ore('ingotGold')]
)

// add(List<String> types, ItemStack output, int duration, ItemStack secondaryOutput, float secondaryOutputChance, List<IIngredient> inputs)
mods.advancedmortars.Mortar.add(
['iron', 'wood'],
item('minecraft:tnt') * 5,
4,
item('minecraft:tnt'),
0.7,
[ore('ingotIron'), ore('ingotIron'), ore('ingotIron'), ore('ingotIron'), // max 8
ore('ingotIron'), ore('ingotIron'), ore('ingotIron'), ore('ingotIron')]
)

mods.advancedmortars.Mortar.recipeBuilder()
.type('stone') // EnumMortarType ('wood', 'stone', 'iron', 'diamond', 'gold', 'obsidian', 'emerald')
.duration(2) // int
.output(item('minecraft:grass')) // ItemStack
.input(item('minecraft:dirt')) // IIngredient
.register()

mods.advancedmortars.Mortar.recipeBuilder()
.type('emerald')
.duration(4)
.output(item('minecraft:wheat_seeds') * 16)
.secondaryOutput(item('minecraft:melon_seeds')) // ItemStack
.input(ore('cropWheat'))
.register()

mods.advancedmortars.Mortar.recipeBuilder()
.type('obsidian')
.duration(8)
.output(item('minecraft:wheat_seeds') * 16)
.secondaryOutput(item('minecraft:melon_seeds'), 0.5) // ItemStack, float
.input(ore('cropWheat'))
.register()
// Mortar:
// Uses any number of specific types of Mortars to convert multiple items into a single output with a possible chance
// output after a number of player interactions.

mods.advancedmortars.mortar.recipeBuilder()
.type('stone')
.duration(2)
.output(item('minecraft:grass'))
.input(item('minecraft:dirt'))
.register()

mods.advancedmortars.mortar.recipeBuilder()
.type('emerald')
.duration(4)
.output(item('minecraft:wheat_seeds') * 16)
.secondaryOutput(item('minecraft:melon_seeds'))
.input(ore('cropWheat'))
.register()

mods.advancedmortars.mortar.recipeBuilder()
.type('obsidian')
.duration(8)
.output(item('minecraft:wheat_seeds') * 16)
.secondaryOutput(item('minecraft:melon_seeds'), 0.5)
.input(ore('cropWheat'))
.register()


mods.advancedmortars.mortar.add(['iron', 'wood'], item('minecraft:tnt') * 5, 4, item('minecraft:tnt'), 0.7, [ore('ingotIron'), ore('ingotIron'), ore('ingotIron'), ore('ingotIron'),ore('ingotIron'), ore('ingotIron'), ore('ingotIron'), ore('ingotIron')])
mods.advancedmortars.mortar.add(['stone'], item('minecraft:tnt'), 4, [ore('ingotGold')])
mods.advancedmortars.mortar.add(['stone'], item('minecraft:diamond') * 4, 4, [ore('ingotGold')])

Loading

0 comments on commit 67fc28f

Please sign in to comment.