Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ final def mod_dependencies = [
'lemonlib-306926:2639879' : [project.debug_arcane_world],
'arcane-world-302852:2972860' : [project.debug_arcane_world],
'astralsorcery-sorcery-241721:3044416' : [project.debug_astral],
'baubles-227083:2518667' : [project.debug_blood_arsenal, project.debug_astral, project.debug_botania, project.debug_botania_tweaks, project.debug_botanic_additions, project.debug_essentialcraft_4, project.debug_extra_botany, project.debug_thaum],
'baubles-227083:2518667' : [project.debug_blood_arsenal, project.debug_astral, project.debug_bewitchment, project.debug_botania, project.debug_botania_tweaks, project.debug_botanic_additions, project.debug_essentialcraft_4, project.debug_extra_botany, project.debug_thaum],
'the-aurorian-352137:4981736' : [project.debug_aurorian],
'avaritia_1_10-261348:3143349' : [project.debug_avaritia],
'atum-2-59621:3116599' : [project.debug_atum],
'better-with-addons-268326:2899407' : [project.debug_better_with_addons],
'bwm-core-294335:2624990' : [project.debug_better_with_addons, project.debug_better_with_mods],
'bwm-suite-246760:3289033' : [project.debug_better_with_addons, project.debug_better_with_mods],
'bewitchment-legacy-285439:6379256' : [project.debug_bewitchment],
'blood-arsenal-228823:2904183' : [project.debug_blood_arsenal],
'blood-magic-224791:2822288' : [project.debug_blood_arsenal, project.debug_blood_magic],
'guide-api-228832:2645992' : [project.debug_blood_arsenal, project.debug_blood_magic, project.debug_woot],
Expand Down Expand Up @@ -103,7 +104,7 @@ final def mod_dependencies = [
'pyrotech-306676:4956838' : [project.debug_pyrotech],
'random-things-59816:2905241' : [project.debug_random_things],
'mystical_world-282940:3460961' : [project.debug_roots],
'patchouli-306770:3162874' : [project.debug_roots, project.debug_natures_aura, project.debug_prodigytech],
'patchouli-306770:3162874' : [project.debug_bewitchment, project.debug_roots, project.debug_natures_aura, project.debug_prodigytech],
'prodigytech-297414:2769520' : [project.debug_prodigytech],
'roots-246183:3905074' : [project.debug_roots],
'rustic-256141:3107974' : [project.debug_rustic],
Expand Down
223 changes: 223 additions & 0 deletions examples/postInit/bewitchment.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@

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

log.info 'mod \'bewitchment\' detected, running script'

// Altar Upgrades:
// Controls the valid upgrades placed atop the Witches' Altar, a multiblock that gain Magic Power from nearby plants and
// logs based on their uniqueness. The upgrades modify the amount gained per second and the maximum Magic Power the Altar
// can hold.

mods.bewitchment.altar_upgrade.remove(blockstate('bewitchment:goblet'))
mods.bewitchment.altar_upgrade.remove(item('bewitchment:garnet'))
mods.bewitchment.altar_upgrade.removeByType(com.bewitchment.api.registry.AltarUpgrade.Type.WAND)
// mods.bewitchment.altar_upgrade.removeAll()

mods.bewitchment.altar_upgrade.recipeBuilder()
.cup()
.predicate(blockstate('minecraft:clay'))
.gain(-10)
.multiplier(500)
.register()

mods.bewitchment.altar_upgrade.recipeBuilder()
.pentacle()
.predicate(item('minecraft:gold_ingot'))
.gain(1000)
.register()

mods.bewitchment.altar_upgrade.recipeBuilder()
.sword()
.predicate(blockstate('minecraft:gold_block'))
.multiplier(50)
.register()

mods.bewitchment.altar_upgrade.recipeBuilder()
.wand()
.predicate(item('minecraft:iron_ingot'))
.multiplier(0.5)
.register()


// Athame Loot:
// When killing a mob with the Athame in the main hand, drops a random amount between `0` and `stackSize + lootingLevel` of
// each item that the entity passes the predicate of.

mods.bewitchment.athame_loot.removeByOutput(item('bewitchment:spectral_dust'))
// mods.bewitchment.athame_loot.removeAll()

mods.bewitchment.athame_loot.add(entity('minecraft:pig'), item('minecraft:gold_ingot'))
mods.bewitchment.athame_loot.add(entity('minecraft:cow'), item('minecraft:clay') * 5, item('minecraft:iron_sword'))

// Witches' Cauldron Brew:
// After throwing a `bewitchment:mandrake_root` in the Witches' Cauldron while Magic Power is provided, all items thrown in
// will add their potion effects when extracted via a `minecraft:glass_bottle`. Each fill of the Cauldron can create 3
// bottles. An ingredient can also refund an itemstack.

mods.bewitchment.brew.removeByInput(item('bewitchment:dragons_blood_resin'))
mods.bewitchment.brew.removeByOutput(item('minecraft:bowl'))
mods.bewitchment.brew.removeByPotion(potion('minecraft:instant_health'))
// mods.bewitchment.brew.removeAll()

mods.bewitchment.brew.recipeBuilder()
.input(ore('netherStar'))
.outputCheck(item('minecraft:nether_star'))
.effect(new PotionEffect(potion('minecraft:strength'), 1800, 3))
.output(item('bewitchment:catechu_brown'))
.register()

mods.bewitchment.brew.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.effect(new PotionEffect(potion('minecraft:instant_health'), 1, 3))
.output(item('minecraft:clay'))
.register()

mods.bewitchment.brew.recipeBuilder()
.input(item('minecraft:deadbush'))
.effect(new PotionEffect(potion('minecraft:resistance'), 1800, 3))
.register()


// Witches' Cauldron:
// Converts up to 10 input ingredients into up to 3 output itemstacks in the Witches' Cauldron while Magic Power is
// provided.

mods.bewitchment.cauldron.remove(resource('bewitchment:catechu_brown'))
mods.bewitchment.cauldron.removeByInput(item('bewitchment:tongue_of_dog'))
mods.bewitchment.cauldron.removeByOutput(item('bewitchment:iron_gall_ink'))
// mods.bewitchment.cauldron.removeAll()

mods.bewitchment.cauldron.recipeBuilder()
.input(ore('logWood'))
.input(item('minecraft:deadbush'))
.input(item('minecraft:dye', 3))
.output(item('bewitchment:catechu_brown'))
.register()


// Curses:
// Allows applying curses to a player to cause unique effects in the Brazier with a `bewitchment:taglock` targeting the
// desired player.

mods.bewitchment.curse.remove(resource('bewitchment:berserker'))
mods.bewitchment.curse.removeByInput(item('minecraft:blaze_rod'))
// mods.bewitchment.curse.removeAll()

// Distillery:
// Converts up to 6 input ingredients into up to 6 output itemstacks in the Distillery at the cost of 1 Magic Power per
// tick. Takes 10 seconds.

mods.bewitchment.distillery.remove(resource('bewitchment:bottled_frostfire'))
mods.bewitchment.distillery.removeByInput(item('bewitchment:perpetual_ice'))
mods.bewitchment.distillery.removeByOutput(item('bewitchment:demonic_elixir'))
// mods.bewitchment.distillery.removeAll()

mods.bewitchment.distillery.recipeBuilder()
.input(item('minecraft:glass_bottle'))
.input(item('minecraft:snow'))
.input(item('bewitchment:cleansing_balm'))
.input(item('bewitchment:fiery_unguent'))
.output(item('bewitchment:bottled_frostfire'))
.output(item('bewitchment:empty_jar') * 2)
.register()


// Fortune:
// Modifies potential Fortunes, with a random one being selected from the list when interacting with a Crystal Ball. Some
// amount of time will pass before the Fortune occurs, whereupon a customizable effect will happen.

mods.bewitchment.fortune.remove(resource('bewitchment:cornucopia'))
// mods.bewitchment.fortune.removeAll()

// Frostfire:
// Converts an input ingredient into an output itemstack once a second while inside a Frostfire block.

mods.bewitchment.frostfire.removeByInput(item('minecraft:iron_ore'))
// mods.bewitchment.frostfire.removeByOutput(item('bewitchment:cold_iron_ingot'))
// mods.bewitchment.frostfire.removeAll()

mods.bewitchment.frostfire.recipeBuilder()
.input(item('minecraft:water_bucket'))
.output(item('minecraft:ice'))
.register()


// Incense:
// Converts up to 8 input ingredients in the Brazier when activated by a Flint and Steel for any number of potion effects
// that apply whenever a player wakes up nearby.

mods.bewitchment.incense.removeByInput(item('bewitchment:essence_of_vitality'))
mods.bewitchment.incense.removeByPotion(potion('minecraft:haste'))
// mods.bewitchment.incense.removeAll()

mods.bewitchment.incense.recipeBuilder()
.input(item('minecraft:clay'), item('minecraft:gold_ingot') * 5, item('minecraft:iron_ingot'))
.potion(potion('minecraft:strength'), potion('minecraft:resistance'))
.time(10000)
.register()


// Oven:
// Converts an input itemstack into an output itemstack, with the ability to have a chance to produce an optional
// itemstack, and if producing the optional itemstack will consume a `bewitchment:empty_jar`. Requires furnace fuel to run
// and takes 10 seconds per recipe.

mods.bewitchment.oven.removeByInput(item('minecraft:sapling'))
mods.bewitchment.oven.removeByOutput(item('bewitchment:tallow'))
mods.bewitchment.oven.removeByOutput(item('bewitchment:garlic_grilled'))
// mods.bewitchment.oven.removeAll()

mods.bewitchment.oven.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.requiresJar(false)
.byproduct(item('minecraft:gold_nugget'))
.byproductChance(0.2f)
.register()


// Pets:
// Sets what animals are valid for summoning via the `FortuneMeetPet` effect.

mods.bewitchment.pet.remove(entity('minecraft:ocelot'))
// mods.bewitchment.pet.removeAll()

mods.bewitchment.pet.add(entity('minecraft:cow'))

// Rituals:
// Converts up to 10 input ingredients into a ritual. The ritual can output up to 5 items, can require specific small,
// medium, and large circle sizes, can require a specific type for each circle, can require a specific entity nearby as a
// sacrifice, can set the time the ritual takes, and can set the Magic Power consumed to start and run the ritual.

mods.bewitchment.ritual.removeByInput(item('minecraft:poisonous_potato'))
mods.bewitchment.ritual.removeByOutput(item('bewitchment:purifying_earth'))
// mods.bewitchment.ritual.removeAll()



// Sigils:
// Converts up to 25 itemstacks into a single output itemstack.

mods.bewitchment.sigil.remove(resource('bewitchment:mending'))
mods.bewitchment.sigil.removeByInput(item('bewitchment:bottle_of_blood'))
mods.bewitchment.sigil.removeByOutput(item('bewitchment:sigil_disorientation'))
// mods.bewitchment.sigil.removeAll()



// Spinning Wheel:
// Converts up to 4 itemstacks into up to 2 output itemstacks in the Spinning Wheel at the cost of 1 Magic Power per tick.
// Takes 10 seconds.

mods.bewitchment.spinning_wheel.remove(resource('bewitchment:cobweb'))
mods.bewitchment.spinning_wheel.removeByInput(item('minecraft:string'))
mods.bewitchment.spinning_wheel.removeByOutput(item('bewitchment:spirit_string'))
// mods.bewitchment.spinning_wheel.removeAll()

mods.bewitchment.spinning_wheel.recipeBuilder()
.input(item('minecraft:string'), item('minecraft:string'), item('minecraft:string'), item('minecraft:string'))
.output(item('minecraft:gold_ingot') * 4, item('minecraft:web'))
.register()


1 change: 0 additions & 1 deletion examples/postInit/botania.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Auto generated groovyscript example file
// MODS_LOADED: botania

import net.minecraft.potion.PotionEffect
import net.minecraft.util.text.TextFormatting

log.info 'mod \'botania\' detected, running script'
Expand Down
2 changes: 0 additions & 2 deletions examples/postInit/industrialforegoing.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Auto generated groovyscript example file
// MODS_LOADED: industrialforegoing

import net.minecraft.potion.PotionEffect

log.info 'mod \'industrialforegoing\' detected, running script'

// Bioreactor:
Expand Down
2 changes: 0 additions & 2 deletions examples/postInit/rustic.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Auto generated groovyscript example file
// MODS_LOADED: rustic

import net.minecraft.potion.PotionEffect

log.info 'mod \'rustic\' detected, running script'

// Alchemy Condenser:
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ debug_better_with_addons = false
debug_better_with_everything = false
debug_better_with_mods = false
debug_betweenlands = false
debug_bewitchment = false
debug_blood_arsenal = false
debug_blood_magic = false
debug_botania = false
Expand All @@ -57,7 +58,7 @@ debug_extended_crafting = false
debug_extra_botany = false
debug_extra_utilities_2 = false

debug_factory_tech = true
debug_factory_tech = false
debug_forestry = false
debug_future_mc = false

Expand Down Expand Up @@ -275,6 +276,7 @@ curseForgeRelations = req:mixin-booter;\
opt:atum;\
opt:avaritia-1-10;\
opt:better-with-addons;\
opt:bewitchment;\
opt:blood-arsenal;\
opt:blood-magic;\
opt:botania;\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.cleanroommc.groovyscript.compat.mods.betterwithaddons.BetterWithAddons;
import com.cleanroommc.groovyscript.compat.mods.betterwithmods.BetterWithMods;
import com.cleanroommc.groovyscript.compat.mods.betweenlands.Betweenlands;
import com.cleanroommc.groovyscript.compat.mods.bewitchment.Bewitchment;
import com.cleanroommc.groovyscript.compat.mods.bloodarsenal.BloodArsenal;
import com.cleanroommc.groovyscript.compat.mods.bloodmagic.BloodMagic;
import com.cleanroommc.groovyscript.compat.mods.botania.Botania;
Expand Down Expand Up @@ -107,6 +108,7 @@ public class ModSupport {
public static final GroovyContainer<BetterWithAddons> BETTER_WITH_ADDONS = new InternalModContainer<>("betterwithaddons", "Better With Addons", BetterWithAddons::new);
public static final GroovyContainer<BetterWithMods> BETTER_WITH_MODS = new InternalModContainer<>("betterwithmods", "Better With Mods", BetterWithMods::new);
public static final GroovyContainer<Betweenlands> BETWEENLANDS = new InternalModContainer<>("thebetweenlands", "The Betweenlands", Betweenlands::new, "betweenlands");
public static final GroovyContainer<Bewitchment> BEWITCHMENT = new InternalModContainer<>("bewitchment", "Bewitchment", Bewitchment::new);
public static final GroovyContainer<BloodArsenal> BLOOD_ARSENAL = new InternalModContainer<>("bloodarsenal", "Blood Arsenal", BloodArsenal::new);
public static final GroovyContainer<BloodMagic> BLOOD_MAGIC = new InternalModContainer<>("bloodmagic", "Blood Magic: Alchemical Wizardry", BloodMagic::new, "bm");
public static final GroovyContainer<Botania> BOTANIA = new InternalModContainer<>("botania", "Botania", Botania::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.cleanroommc.groovyscript.api.GroovyLog;
import com.cleanroommc.groovyscript.api.documentation.annotations.*;
import com.cleanroommc.groovyscript.compat.mods.ModSupport;
import com.cleanroommc.groovyscript.helper.EnumHelper;
import com.cleanroommc.groovyscript.helper.ingredient.IngredientHelper;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
Expand Down Expand Up @@ -82,7 +83,7 @@ public RecipeBuilder type(InscriberProcessType type) {

@RecipeBuilderMethodDescription
public RecipeBuilder type(String type) {
this.type = InscriberProcessType.valueOf(type.toUpperCase(Locale.ROOT));
this.type = EnumHelper.valueOfNullable(InscriberProcessType.class, type, false);
return this;
}

Expand Down
Loading