Fix Small Dust, Tiny Dust & Dye Conversion Recipes (#696)

[EXPAND]
[[messages]]
messageTitle = "Fix Small Dust & Tiny Dust Crafting Conversion Recipes (#696)"
messageBody = '''
[BUG]
[DETAILS]
detail = "Recipes are now as Shown in JEI! Change your AE2 Patterns!"
[DETAILS]
'''

[[messages]]
messageTitle = "Fix Dust to Dye Conversion Recipes (#696)"
messageBody = '''
[BUG]

[IGNORE]
compareNot = "1.7-alpha-3"
[IGNORE]

[DETAILS]
details = ["Dust to Dye Conversion Recipes are no longer Shapeless."]
[DETAILS]
'''
This commit is contained in:
Integer Limit 2024-03-30 18:23:42 +11:00 committed by GitHub
parent 3b121668a3
commit 388b670ed1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 106 additions and 121 deletions

View File

@ -763,7 +763,7 @@
},
{
"projectID": 932060,
"fileID": 5215193,
"fileID": 5217682,
"required": true
},
{

View File

@ -0,0 +1,105 @@
import com.cleanroommc.groovyscript.helper.ingredient.OreDictIngredient
import com.nomiceu.nomilabs.groovy.ShapedConversionRecipe
import net.minecraft.item.EnumDyeColor
import gregtech.api.unification.material.MarkerMaterials
import gregtech.api.unification.material.Materials
import gregtech.api.unification.ore.OrePrefix
import static gregtech.api.GTValues.*
// Backport MC 1.14 Dye Mechanics
ore('dyeBlack').remove(item('minecraft:dye', 0))
ore('dye').remove(item('minecraft:dye', 0))
addShapedConversionRecipe(metaitem('dye.black'), item('minecraft:dye', 0))
ore('dyeBrown').remove(item('minecraft:dye', 3))
ore('dye').remove(item('minecraft:dye', 3))
addShapedConversionRecipe(metaitem('dye.brown'), item('minecraft:dye', 3))
ore('dyeBrown').remove(item('nuclearcraft:cocoa_solids'))
addShapedConversionRecipe(metaitem('dye.brown'), item('nuclearcraft:cocoa_solids'))
addShapedConversionRecipe(metaitem('dye.brown'), metaitem('dustCocoa')); //NC cocoa solids and vanilla cocoa stop being a dye when turned into GT cocoa dust
ore('dyeBrown').remove(metaitem('dustMetalMixture'))
addShapedConversionRecipe(metaitem('dye.brown'), metaitem('dustMetalMixture'))
ore('dyeBlue').remove(item('minecraft:dye', 4))
ore('dye').remove(item('minecraft:dye', 4))
addShapedConversionRecipe(metaitem('dye.blue'), item('minecraft:dye', 4))
ore('dyeBlue').remove(metaitem('gemLazurite'))
addShapedConversionRecipe(metaitem('dye.blue'), metaitem('gemLazurite'))
ore('dyeBlue').remove(metaitem('gemSodalite'))
addShapedConversionRecipe(metaitem('dye.blue'), metaitem('gemSodalite'))
ore('dyeBlue').remove(metaitem('dustLapis'))
addShapedConversionRecipe(metaitem('dye.blue'), metaitem('dustLapis'))
ore('dyeBlue').remove(metaitem('dustLazurite'))
addShapedConversionRecipe(metaitem('dye.blue'), metaitem('dustLazurite'))
ore('dyeBlue').remove(metaitem('dustSodalite'))
addShapedConversionRecipe(metaitem('dye.blue'), metaitem('dustSodalite'))
ore('dyeMagenta').remove(item('extrautils2:ingredients', 3))
addShapedConversionRecipe(metaitem('dye.magenta'), item('extrautils2:ingredients', 3))
ore('dyeWhite').remove(item('minecraft:dye', 15))
ore('dye').remove(item('minecraft:dye', 15))
addShapedConversionRecipe(metaitem('dye.white'), item('minecraft:dye', 15))
def dyeHelperMap = [:]
for (def color : EnumDyeColor.values()) {
dyeHelperMap.put(color.getName(), ore('dye' + color.getName().capitalize()))
}
// Fix Elevator Redyeing
for (def entry in dyeHelperMap.entrySet()) {
crafting.remove('elevatorid:redye_' + entry.key)
crafting.addShapeless(item('elevatorid:elevator_' + entry.key), [ore('blockElevator'), entry.value])
}
// Fix Slime Block Redyeing
for (def color : EnumDyeColor.values()) {
def name = color.getName()
def meta = color.getMetadata()
def oreIng = dyeHelperMap.get(name)
crafting.remove('darkutils:dyed_slime_block_' + name)
crafting.shapedBuilder()
.output(item('darkutils:slime_dyed', meta) * 8)
.matrix('SSS',
'SDS',
'SSS')
.key('S', ore('blockSlime'))
.key('D', oreIng)
.register()
}
// Fix Satchel Redeying
addOreDictToOreDict(ore('dye'), dyeHelperMap.values())
// Re-Generate Chemical Dye Reactor Recipes (Breaks when OreDict Changes for Some Reason)
// Copied with some Groovy Changes from
// https://github.com/GregTechCEu/GregTech/blob/master/src/main/java/gregtech/loaders/recipe/chemistry/ReactorRecipes.java#L619-L626
// Update when they update.
for (int i = 0; i < Materials.CHEMICAL_DYES.length; i++) {
// Technically the amount being 288 doesn't matter, but calling without amount returns Fluid, and we need FluidStack
mods.gregtech.chemical_reactor.removeByOutput(null, [Materials.CHEMICAL_DYES[i].getFluid(288)], null, null)
mods.gregtech.chemical_reactor.recipeBuilder()
.input(OrePrefix.dye, MarkerMaterials.Color.VALUES[i])
.inputs(metaitem('dustSalt') * 2)
.fluidInputs(fluid('sulfuric_acid') * 250)
.fluidOutputs(Materials.CHEMICAL_DYES[i].getFluid(288))
.duration(600).EUt(VA[LV]) // Original is 24, but not in GTValues, so just increase to 30
.buildAndRegister()
}
void addOreDictToOreDict(OreDictIngredient addTo, Collection<OreDictIngredient> from) {
for (def ing in from) {
for (def stack in ing) {
addTo.add(stack)
}
}
}
void addShapedConversionRecipe(ItemStack outputStack, ItemStack inputStack) {
crafting.shapedBuilder()
.output(outputStack)
.matrix([[inputStack]])
.recipeClassFunction((output, width, height, ingredients) -> new ShapedConversionRecipe(output, ingredients, width, height))
.register()
}

View File

@ -1,120 +0,0 @@
//backport 1.14 dye mechanics
<ore:dyeBlack>.remove(<minecraft:dye:0>);
<ore:dye>.remove(<minecraft:dye:0>);
recipes.addShapeless(<metaitem:dye.black>, [<minecraft:dye:0>]);
<ore:dyeBrown>.remove(<minecraft:dye:3>);
<ore:dye>.remove(<minecraft:dye:3>);
recipes.addShapeless(<metaitem:dye.brown>, [<minecraft:dye:3>]);
<ore:dyeBrown>.remove(<nuclearcraft:cocoa_solids>);
recipes.addShapeless(<metaitem:dye.brown>, [<nuclearcraft:cocoa_solids>]);
recipes.addShapeless(<metaitem:dye.brown>, [<metaitem:dustCocoa>]); //NC cocoa solids and vanilla cocoa stop being a dye when turned into GT cocoa dust
<ore:dyeBrown>.remove(<metaitem:dustMetalMixture>);
recipes.addShapeless(<metaitem:dye.brown>, [<metaitem:dustMetalMixture>]);
<ore:dyeBlue>.remove(<minecraft:dye:4>);
<ore:dye>.remove(<minecraft:dye:4>);
recipes.addShapeless(<metaitem:dye.blue>, [<minecraft:dye:4>]);
<ore:dyeBlue>.remove(<metaitem:gemLazurite>);
recipes.addShapeless(<metaitem:dye.blue>, [<metaitem:gemLazurite>]);
<ore:dyeBlue>.remove(<metaitem:gemSodalite>);
recipes.addShapeless(<metaitem:dye.blue>, [<metaitem:gemSodalite>]);
<ore:dyeBlue>.remove(<metaitem:dustLapis>);
recipes.addShapeless(<metaitem:dye.blue>, [<metaitem:dustLapis>]);
<ore:dyeBlue>.remove(<metaitem:dustLazurite>);
recipes.addShapeless(<metaitem:dye.blue>, [<metaitem:dustLazurite>]);
<ore:dyeBlue>.remove(<metaitem:dustSodalite>);
recipes.addShapeless(<metaitem:dye.blue>, [<metaitem:dustSodalite>]);
<ore:dyeMagenta>.remove(<extrautils2:ingredients:3>);
recipes.addShapeless(<metaitem:dye.magenta>, [<extrautils2:ingredients:3>]);
<ore:dyeWhite>.remove(<minecraft:dye:15>);
<ore:dye>.remove(<minecraft:dye:15>);
recipes.addShapeless(<metaitem:dye.white>, [<minecraft:dye:15>]);
//fix elevator redyeing recipes
recipes.removeByRecipeName("elevatorid:redye_white");
recipes.addShapeless(<elevatorid:elevator_white>, [<ore:blockElevator>,<ore:dyeWhite>]);
recipes.removeByRecipeName("elevatorid:redye_orange");
recipes.addShapeless(<elevatorid:elevator_orange>, [<ore:blockElevator>,<ore:dyeOrange>]);
recipes.removeByRecipeName("elevatorid:redye_magenta");
recipes.addShapeless(<elevatorid:elevator_magenta>, [<ore:blockElevator>,<ore:dyeMagenta>]);
recipes.removeByRecipeName("elevatorid:redye_light_blue");
recipes.addShapeless(<elevatorid:elevator_light_blue>, [<ore:blockElevator>,<ore:dyeLightBlue>]);
recipes.removeByRecipeName("elevatorid:redye_yellow");
recipes.addShapeless(<elevatorid:elevator_yellow>, [<ore:blockElevator>,<ore:dyeYellow>]);
recipes.removeByRecipeName("elevatorid:redye_lime");
recipes.addShapeless(<elevatorid:elevator_lime>, [<ore:blockElevator>,<ore:dyeLime>]);
recipes.removeByRecipeName("elevatorid:redye_pink");
recipes.addShapeless(<elevatorid:elevator_pink>, [<ore:blockElevator>,<ore:dyePink>]);
recipes.removeByRecipeName("elevatorid:redye_gray");
recipes.addShapeless(<elevatorid:elevator_gray>, [<ore:blockElevator>,<ore:dyeGray>]);
recipes.removeByRecipeName("elevatorid:redye_silver");
recipes.addShapeless(<elevatorid:elevator_silver>, [<ore:blockElevator>,<ore:dyeLightGray>]);
recipes.removeByRecipeName("elevatorid:redye_cyan");
recipes.addShapeless(<elevatorid:elevator_cyan>, [<ore:blockElevator>,<ore:dyeCyan>]);
recipes.removeByRecipeName("elevatorid:redye_purple");
recipes.addShapeless(<elevatorid:elevator_purple>, [<ore:blockElevator>,<ore:dyePurple>]);
recipes.removeByRecipeName("elevatorid:redye_blue");
recipes.addShapeless(<elevatorid:elevator_blue>, [<ore:blockElevator>,<ore:dyeBlue>]);
recipes.removeByRecipeName("elevatorid:redye_brown");
recipes.addShapeless(<elevatorid:elevator_brown>, [<ore:blockElevator>,<ore:dyeBrown>]);
recipes.removeByRecipeName("elevatorid:redye_green");
recipes.addShapeless(<elevatorid:elevator_green>, [<ore:blockElevator>,<ore:dyeGreen>]);
recipes.removeByRecipeName("elevatorid:redye_red");
recipes.addShapeless(<elevatorid:elevator_red>, [<ore:blockElevator>,<ore:dyeRed>]);
recipes.removeByRecipeName("elevatorid:redye_black");
recipes.addShapeless(<elevatorid:elevator_black>, [<ore:blockElevator>,<ore:dyeBlack>]);
//fix slime block redyeing recipes
recipes.removeByRecipeName("darkutils:dyed_slime_block_white");
recipes.addShaped(<darkutils:slime_dyed:0> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeWhite>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_orange");
recipes.addShaped(<darkutils:slime_dyed:1> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeOrange>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_magenta");
recipes.addShaped(<darkutils:slime_dyed:2> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeMagenta>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_light_blue");
recipes.addShaped(<darkutils:slime_dyed:3> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeLightBlue>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_yellow");
recipes.addShaped(<darkutils:slime_dyed:4> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeYellow>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_lime");
recipes.addShaped(<darkutils:slime_dyed:5> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeLime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_pink");
recipes.addShaped(<darkutils:slime_dyed:6> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyePink>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_gray");
recipes.addShaped(<darkutils:slime_dyed:7> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeGray>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_silver");
recipes.addShaped(<darkutils:slime_dyed:8> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeLightGray>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_cyan");
recipes.addShaped(<darkutils:slime_dyed:9> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeCyan>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_purple");
recipes.addShaped(<darkutils:slime_dyed:10> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyePurple>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_blue");
recipes.addShaped(<darkutils:slime_dyed:11> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeBlue>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_brown");
recipes.addShaped(<darkutils:slime_dyed:12> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeBrown>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_green");
recipes.addShaped(<darkutils:slime_dyed:13> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeGreen>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_red");
recipes.addShaped(<darkutils:slime_dyed:14> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeRed>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
recipes.removeByRecipeName("darkutils:dyed_slime_block_black");
recipes.addShaped(<darkutils:slime_dyed:15> * 8, [[<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>], [<ore:blockSlime>,<ore:dyeBlack>,<ore:blockSlime>], [<ore:blockSlime>,<ore:blockSlime>,<ore:blockSlime>]]);
//fix satchel redyeing
<ore:dye>.addAll(<ore:dyeWhite>);
<ore:dye>.addAll(<ore:dyeOrange>);
<ore:dye>.addAll(<ore:dyeMagenta>);
<ore:dye>.addAll(<ore:dyeLightBlue>);
<ore:dye>.addAll(<ore:dyeYellow>);
<ore:dye>.addAll(<ore:dyeLime>);
<ore:dye>.addAll(<ore:dyePink>);
<ore:dye>.addAll(<ore:dyeGray>);
<ore:dye>.addAll(<ore:dyeLightGray>);
<ore:dye>.addAll(<ore:dyeCyan>);
<ore:dye>.addAll(<ore:dyePurple>);
<ore:dye>.addAll(<ore:dyeBlue>);
<ore:dye>.addAll(<ore:dyeBrown>);
<ore:dye>.addAll(<ore:dyeGreen>);
<ore:dye>.addAll(<ore:dyeRed>);
<ore:dye>.addAll(<ore:dyeBlack>);