Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra examples, a small PR with minor changes #81

Merged
merged 28 commits into from
Aug 4, 2023

Conversation

WaitingIdly
Copy link
Collaborator

This started as "What if I added examples to the mods which have compat but no examples", easily moved into "Well I should also touch up the existing examples", and turned into "wow our compat has some bugs. should fix those. oh yeah and also should add...".
oops.

What this PR adds:

  • Sets the examples folder as the script location when running GroovyScript in a development environment.
  • Adjusted the runConfig.json example to reflect current capabilities (removed packmodes & asm, added packId and debug)
  • Added preInit examples for
    • Vanilla: creating items, blocks, creative tabs, setting their textures and localization.
    • Mekanism: adding infusion textures
  • Added postInit examples for
    • Vanilla: Crafting, Furnace, OreDict, Starting Inventory, Item Rarity, and the Event Manager.
    • Immersive Engineering: Alloy Kiln, Arc Furnace, Blast Furnace, Blast Furnace Fuel, Blueprint Crafting, Bottling Machine, Coke Oven, Crusher, Excavator, Fermenter, Metal Press, Mixer, Refinery, and Squeezer.
  • Touched up the postInit examples for Mekanism, EnderIO, Draconic Evolution, Botania, Astral Sorcery, Blood Magic, and Extended Crafting. Added descriptions of what each registry does, and any bracket handlers added by the mod.
  • Bugfixes:
    • Fixed item capabilities (such as those by Astral Sorcery) preventing removing Alchemy Array by output by making AlchemyArray#removeByOutput(ItemStack) check via isItemEqual rather than areItemStacksEqual.
    • Fixed a bunch of error logging not being properly logged by changing a bunch of %s into {} because objects were being logged, not strings, and {} is generally preferred.
    • Fixed IC2 not being debuggable by splitting IC2 debugging into classic and experimental, and noted that the mod order in the build.gradle must be in the order of experimental > classic.
    • Fixed thermal not being debuggable by making codechicken_lib be loaded if either thermal or draconic evolution is being debugged.
    • Fixed Blood Magic's Tranquility having its onReload functions inverted (was trying to remove backups and adding duplicate scripted).
    • Fixed Apothecary#removeByInput(IIngredient...) not checking both required variables to determine if they are strings.
    • Fixed Pure Daisy having inverted validation, causing any valid recipe to fail.
    • Fixed Draconic Evolution's Fusion capping at 20 items instead of the real cap of 54.
    • Fixed FluidFuel and FluidCoolant erroring on reloading when an entry was removed.
    • Fixed Arc Furnace, Blueprint Crafting, and Mixer erroring on adding most recipes.
    • Fixed reloading not removing Metal Press recipes.
    • Fixed player starting inventory not adding items when a slot is specified.
    • Fixed IIngredient transformers and conditions modifying the object instead of creating a new object, which causes unexpected behavior when using IIngredients in crafting recipes.
    • Fixed all added Constellations without a set color being set to the default Minor color.
    • Fixed a NPE crash on worldgen if all entries in the Fountain were removed.
    • Fixed Lightwell.RecipeBuilder#validate() always returning false, and thus any Lightwell recipes not being added.
    • Fixed all four ore chance registries having the same aliases and thus all but the last being unusable, split them into MineralisRitualRegistry, AevitasPerkRegistry, TrashPerkRegistry, TreasureShrineRegistry.
    • Prevented Starlight Crafting Recipes from being set to take 0 ticks, as 0-tick Trait recipes would skip all external ingredients.
    • Fixed the Blood Magic Alchemy Table not accepting tier 0 Blood Orbs.
  • Added compat for:
    • Mekanism Infusion bracket handler.
    • EnderIO Sag Mill Grinding Balls, allowing custom items to be registered as Grinding Balls.
    • Mekanism Energized Smelter compat, allowing adding and removing smelting recipes unique to the Energized Smelter. Resolves GrS lacks a recipe modification by MEK's Energized Smelter #28.
    • Mekanism Infusion types, to create new types and to modify already existing types.
    • Immersive Engineering Blast Furnace Fuel, allowing custom items to give burn time uniquely to the Blast Furnace.
    • Immersive Engineering Excavator Mineral Mix veins, allowing custom veins minable by the Excavator to be created and manipulated.
    • Vanilla's starting inventory to set armor slots and the offhand slot, added a boolean on if it replaces the prior inventory, and created a single-use method to easily set all items in an inventory.
  • Added missing functionality (streamRecipes(), removeAll(), RecipeBuilder):
    • Added a RecipeBuilder to EnderIO's TankMachineRecipe.
    • Added streamRecipes() and removeAll() methods to any EnderIO compat that was missing them.
    • Added streamRecipes() and removeAll() methods to any Astral Sorcery compat that was missing them.
    • Added a RecipeBuilder and removeAll() method to all Mekanism recipes.
    • Added a RecipeBuilder and removeAll() method to the Vanilla Furnace.
    • Added a removeAll() method to Draconic Evolution's Fusion.
    • Added a removeAll() method to Vanilla OreDict.
    • Added a removeAll() method to Vanilla Crafting.
    • Added additional remove options for Botania's Lexicon.
    • Added ManaInfusion#removeByCatalyst(IBlockState) to remove all recipes with a given catalyst for Botania's Mana Infusion.
    • Added Squeezer#removeByOutput(ItemStack) to remove an Immersive Engineering Squeezer recipe that has no fluid output.
    • Added an alternative method in many places involving a String being turned into a ResourceLocation to input a ResourceLocation directly.
    • Added a way to inset an entire map of char: IIngredients into all Shaped crafting recipes (Arcane, Ender, Table, Astral, Crafting).
    • Added alternate ways to specify the color for the Lightwell.
    • Added the ability to specify the Starlight type of Light Transmutation recipes.
    • Added the ability for the Infusion Altar to control if a recipe is impacted by the time reducing effect of a nearby chalice, if consuming starlight will consume all 12 sources, and how long the Infusion takes.
  • Minor changes:
    • Added PetalApothecary as an alias to Botania's Apothecary.
    • Added a GasRecipeBuilder for gasInput and gasOutput use.
    • Added GroovyHelper.getPackId(), a shorthand way to get the pack ID that is automatically imported into every Groovy file.
    • Added the ability to set item rarity off an ItemStack via ItemStack#setRarity(TextFormatting).
    • Deprecated EnergyRecipeBuilder and TimeRecipeBuilder (adding an int time and int energy to the builder, respectively) and moved the 4 lines of code into relevant classes.
    • Moved Brew Recipes and Brew Effects into different files, fixed validation.
    • Moved the Metal Press RecipeBuilder's mold into its own variable, instead of being the second of an input list.
    • Prevented Runic Altar recipes from registering with a Livingrock item input (makes recipes impossible).
    • Renamed Alloy Smelter's Recipe Builder's xpChance method to xp (its an 100% chance and controls the amount of xp).
    • Renamed the mod container DRACONIC_EVO to DRACONIC_EVOLUTION. should be an entirely internal change.
    • Standardized use of replace() and replaceByName() in Crafting.
    • Renamed GroovyPerkTree to PerkTree.

@brachy84 brachy84 added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Aug 3, 2023
Copy link
Member

@brachy84 brachy84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably fine and definitly read everything

@brachy84 brachy84 merged commit d4565da into CleanroomMC:master Aug 4, 2023
@WaitingIdly WaitingIdly deleted the extra-examples branch August 5, 2023 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GrS lacks a recipe modification by MEK's Energized Smelter
2 participants