diff --git a/build.gradle.kts b/build.gradle.kts index d55358c0..a08b613f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -85,6 +85,7 @@ dependencies { modImplementation(libs.quilted.fabric.api) // Create + /* modImplementation( "com.simibubi.create:create-fabric-" + "${property("minecraftVersion")}" + ":" + @@ -92,6 +93,8 @@ dependencies { "+mc" + "${property("minecraftVersion")}" ) { exclude(group = "com.github.AlphaMode") } + */ + // Implemented Mods // - Miscellaneous modImplementation( diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d62543e4..903e4d01 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ # The latest versions are available at https://lambdaurora.dev/tools/import_quilt.html minecraft = "1.20.1" quilt_mappings = "1.20.1+build.23" -quilt_loader = "0.21.0-beta.4" +quilt_loader = "0.21.0" quilted_fabric_api = "7.3.1+0.89.3-1.20.1" diff --git a/src/main/java/dm/earth/cabricality/ModEntry.java b/src/main/java/dm/earth/cabricality/ModEntry.java index 72d8fdeb..58a709e3 100644 --- a/src/main/java/dm/earth/cabricality/ModEntry.java +++ b/src/main/java/dm/earth/cabricality/ModEntry.java @@ -1,6 +1,5 @@ package dm.earth.cabricality; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; import net.minecraft.block.Block; import net.minecraft.fluid.Fluid; import net.minecraft.item.Item; @@ -107,6 +106,7 @@ public Ingredient asIngredient(String... paths) { return Ingredient.ofItems(asItem(paths)); } + /* public ProcessingOutput asProcessingOutput(String... paths) { return asProcessingOutput(1, paths); } @@ -119,6 +119,8 @@ public ProcessingOutput asProcessingOutput(float chance, int count, String... pa return new ProcessingOutput(asStack(count, paths), chance); } + */ + public Fluid asFluid(String... paths) { return Registries.FLUID.get(id(paths)); } diff --git a/src/main/java/dm/earth/cabricality/client/CabricalityClient.java b/src/main/java/dm/earth/cabricality/client/CabricalityClient.java index 6046f812..b176e31f 100644 --- a/src/main/java/dm/earth/cabricality/client/CabricalityClient.java +++ b/src/main/java/dm/earth/cabricality/client/CabricalityClient.java @@ -58,11 +58,14 @@ public void onInitializeClient(ModContainer mod) { BlockRenderLayerMap.put(RenderLayer.getCutout(), Substrate.getJarBlocks(true).toArray(new Block[0])); + /* Arrays.stream(MachineBlockEntry.values()) .forEach(entry -> BlockRenderLayerMap.put(entry.getLayer(), entry.getBlock())); Arrays.stream(CasingBlockEntry.values()) .forEach(entry -> BlockRenderLayerMap.put(entry.getLayer(), entry.getBlock())); + */ + ResourceLoader.registerBuiltinResourcePack(Cabricality.id("asset_edits"), ResourcePackActivationType.DEFAULT_ENABLED, Cabricality.genTranslatableText("pack", "asset_edits")); diff --git a/src/main/java/dm/earth/cabricality/content/core/blocks/CasingBlockEntry.java b/src/main/java/dm/earth/cabricality/content/core/blocks/CasingBlockEntry.java index fecbec9d..39b47c73 100644 --- a/src/main/java/dm/earth/cabricality/content/core/blocks/CasingBlockEntry.java +++ b/src/main/java/dm/earth/cabricality/content/core/blocks/CasingBlockEntry.java @@ -2,7 +2,6 @@ import dm.earth.cabricality.Cabricality; import dm.earth.cabricality.content.core.blocks.casing.SimpleCasingBlock; -import com.simibubi.create.content.decoration.encasing.CasingBlock; import net.minecraft.block.MapColor; import net.minecraft.client.render.RenderLayer; import net.minecraft.util.Identifier; @@ -11,6 +10,7 @@ import java.util.function.Supplier; public enum CasingBlockEntry { + /* ZINC( "zinc", () -> RenderLayer.getSolid(), new SimpleCasingBlock(QuiltBlockSettings.create() @@ -68,4 +68,6 @@ public CasingBlock getBlock() { public Identifier getId() { return Cabricality.id(name + "_casing"); } + + */ } diff --git a/src/main/java/dm/earth/cabricality/content/core/blocks/casing/SimpleCasingBlock.java b/src/main/java/dm/earth/cabricality/content/core/blocks/casing/SimpleCasingBlock.java index aa7130ea..4b319d70 100644 --- a/src/main/java/dm/earth/cabricality/content/core/blocks/casing/SimpleCasingBlock.java +++ b/src/main/java/dm/earth/cabricality/content/core/blocks/casing/SimpleCasingBlock.java @@ -3,12 +3,12 @@ import dm.earth.cabricality.Cabricality; import dm.earth.cabricality.lib.resource.ResourcedBlock; import dm.earth.cabricality.lib.resource.assets.gen.block.BlockStatesGenerator; -import com.simibubi.create.content.decoration.encasing.CasingBlock; +import net.minecraft.block.Block; import net.minecraft.data.client.model.BlockStateSupplier; import net.minecraft.util.Identifier; import org.jetbrains.annotations.Nullable; -public class SimpleCasingBlock extends CasingBlock implements ResourcedBlock { +public class SimpleCasingBlock extends Block implements ResourcedBlock { public final String name; public SimpleCasingBlock(Settings settings, String name) { diff --git a/src/main/java/dm/earth/cabricality/content/core/items/MechanismItem.java b/src/main/java/dm/earth/cabricality/content/core/items/MechanismItem.java index 216719f0..d0b70907 100644 --- a/src/main/java/dm/earth/cabricality/content/core/items/MechanismItem.java +++ b/src/main/java/dm/earth/cabricality/content/core/items/MechanismItem.java @@ -4,7 +4,6 @@ import dm.earth.cabricality.content.entries.CabfItems; import dm.earth.cabricality.lib.core.IncompleteVariant; -import com.simibubi.create.content.processing.sequenced.SequencedAssemblyItem; import net.minecraft.item.Item; import net.minecraft.util.Identifier; import net.minecraft.util.Rarity; @@ -38,13 +37,13 @@ public static enum Type { private final String name; private final MechanismItem item; - private final SequencedAssemblyItem incompleteItem; + // private final SequencedAssemblyItem incompleteItem; Type(String name, Rarity rarity) { this.name = name; MechanismItem newItem = new MechanismItem(name, CabfItems.Suppliers.DEFAULT.get().rarity(rarity)); this.item = newItem; - this.incompleteItem = newItem.newIncomplete(rarity); + // this.incompleteItem = newItem.newIncomplete(rarity); } Type(String name) { @@ -67,8 +66,11 @@ public MechanismItem getItem() { return item; } + /* public SequencedAssemblyItem getIncompleteItem() { return incompleteItem; } + + */ } } diff --git a/src/main/java/dm/earth/cabricality/content/core/threads/AndesiteThread.java b/src/main/java/dm/earth/cabricality/content/core/threads/AndesiteThread.java index a438c5df..84c8be23 100644 --- a/src/main/java/dm/earth/cabricality/content/core/threads/AndesiteThread.java +++ b/src/main/java/dm/earth/cabricality/content/core/threads/AndesiteThread.java @@ -5,13 +5,6 @@ import dm.earth.cabricality.lib.math.RecipeBuilderUtil; import dm.earth.cabricality.lib.resource.data.core.FreePRP; import dm.earth.cabricality.tweak.base.MechAndSmithCraft; -import com.simibubi.create.content.kinetics.deployer.DeployerApplicationRecipe; -import com.simibubi.create.content.kinetics.mixer.CompactingRecipe; -import com.simibubi.create.content.kinetics.mixer.MixingRecipe; -import com.simibubi.create.content.kinetics.saw.CuttingRecipe; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; -import com.simibubi.create.content.processing.sequenced.SequencedAssemblyRecipeBuilder; -import com.simibubi.create.foundation.fluid.FluidIngredient; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.fluid.Fluids; import net.minecraft.item.ItemStack; @@ -100,6 +93,7 @@ public void addRecipes(AddRecipesCallback.@NotNull RecipeHandler handler) { .build(id, "") ); + /* handler.register( recipeId("mixing", "algal_blend"), id -> new MixingRecipe(new FreePRP(id) @@ -116,6 +110,8 @@ public void addRecipes(AddRecipesCallback.@NotNull RecipeHandler handler) { ) ); + */ + handler.register( recipeId("crafting", "kinetic_mechanism"), id -> VanillaRecipeBuilders @@ -137,6 +133,7 @@ public void addRecipes(AddRecipesCallback.@NotNull RecipeHandler handler) { ) ); + /* handler.register( recipeId("compacting", "dripstone_block"), id -> new CompactingRecipe(new FreePRP(id) @@ -157,6 +154,8 @@ public void addRecipes(AddRecipesCallback.@NotNull RecipeHandler handler) { .build() ); + */ + handler.register( recipeId("crafting", "saw_blade"), id -> VanillaRecipeBuilders diff --git a/src/main/java/dm/earth/cabricality/content/core/threads/BrassThread.java b/src/main/java/dm/earth/cabricality/content/core/threads/BrassThread.java index bb0e042b..fa306559 100644 --- a/src/main/java/dm/earth/cabricality/content/core/threads/BrassThread.java +++ b/src/main/java/dm/earth/cabricality/content/core/threads/BrassThread.java @@ -2,19 +2,10 @@ import dm.earth.cabricality.content.core.TechThread; import dm.earth.cabricality.content.entries.CabfFluids; -import dm.earth.cabricality.lib.math.ListUtil; import dm.earth.cabricality.lib.math.RecipeBuilderUtil; import dm.earth.cabricality.lib.resource.data.core.FreePRP; import dm.earth.cabricality.tweak.base.MechAndSmithCraft; -import com.simibubi.create.content.fluids.transfer.FillingRecipe; -import com.simibubi.create.content.kinetics.millstone.MillingRecipe; -import com.simibubi.create.content.kinetics.mixer.MixingRecipe; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; -import com.simibubi.create.foundation.fluid.FluidIngredient; -import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; -import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; -import net.minecraft.fluid.Fluids; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; @@ -39,6 +30,7 @@ public class BrassThread implements TechThread { @Override public void addRecipes(AddRecipesCallback.RecipeHandler handler) { + /* handler.register( recipeId("milling", "sky_stone_block"), id -> new MillingRecipe(new FreePRP(id) @@ -49,6 +41,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { ).setProcessingTime(350)) ); + */ + Item redstone = Items.REDSTONE; handler.register( recipeId("crafting", "rose_quartz"), @@ -102,6 +96,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { */ + /* handler.register( recipeId("mixing", "polished_rose_quartz"), id -> new MixingRecipe(new FreePRP(id) @@ -118,6 +113,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setResult(new ProcessingOutput(CR.asItem("electron_tube").getDefaultStack(), 1))) ); + */ + handler.register( recipeId("crafting", "brass_machine"), id -> RecipeBuilderUtil.donutRecipe( @@ -131,6 +128,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { } private void registerCrystalProcess(AddRecipesCallback.RecipeHandler handler, Item crystal, Item seed, Item dust) { + /* handler.register(recipeId("milling", Registries.ITEM.getId(crystal).getPath()), id -> new MillingRecipe( new FreePRP(id) @@ -151,6 +149,8 @@ private void registerCrystalProcess(AddRecipesCallback.RecipeHandler handler, It false ) ); + + */ } @Override diff --git a/src/main/java/dm/earth/cabricality/content/core/threads/CopperThread.java b/src/main/java/dm/earth/cabricality/content/core/threads/CopperThread.java index d777c0d7..d8702999 100644 --- a/src/main/java/dm/earth/cabricality/content/core/threads/CopperThread.java +++ b/src/main/java/dm/earth/cabricality/content/core/threads/CopperThread.java @@ -6,9 +6,6 @@ import dm.earth.cabricality.lib.math.RecipeBuilderUtil; import dm.earth.cabricality.lib.resource.data.core.FreePRP; import dm.earth.cabricality.tweak.base.MechAndSmithCraft; -import com.simibubi.create.content.kinetics.mixer.CompactingRecipe; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; -import com.simibubi.create.foundation.fluid.FluidIngredient; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.fluid.Fluids; import net.minecraft.item.ItemStack; @@ -76,6 +73,7 @@ public void addRecipes(AddRecipesCallback.@NotNull RecipeHandler handler) { ) ); + /* handler.register( recipeId("compacting", "rubber"), id -> new CompactingRecipe(new FreePRP(id) @@ -104,6 +102,8 @@ public void addRecipes(AddRecipesCallback.@NotNull RecipeHandler handler) { ) .setResult(new ProcessingOutput(CabfItems.RUBBER.getDefaultStack(), 1))) ); + + */ } @Override diff --git a/src/main/java/dm/earth/cabricality/content/core/threads/EnderiumThread.java b/src/main/java/dm/earth/cabricality/content/core/threads/EnderiumThread.java index c9293c26..1c9aa9ca 100644 --- a/src/main/java/dm/earth/cabricality/content/core/threads/EnderiumThread.java +++ b/src/main/java/dm/earth/cabricality/content/core/threads/EnderiumThread.java @@ -4,7 +4,6 @@ import dm.earth.cabricality.lib.math.RecipeBuilderUtil; import dm.earth.cabricality.lib.resource.data.core.FreePRP; import dm.earth.cabricality.tweak.base.MechAndSmithCraft; -import com.simibubi.create.content.kinetics.deployer.ManualApplicationRecipe; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.recipe.RecipeManager; import net.minecraft.util.Identifier; @@ -55,12 +54,15 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { )) ); + /* handler.register( recipeId("item_application", "enderium_casing"), id -> new ManualApplicationRecipe(new FreePRP(id) .setIngredient(MC.asIngredient("obsidian"), CABF.asIngredient("enderium_ingot")) .setResult(CABF.asProcessingOutput("enderium_casing"))) ); + + */ } @Override diff --git a/src/main/java/dm/earth/cabricality/content/core/threads/FluixThread.java b/src/main/java/dm/earth/cabricality/content/core/threads/FluixThread.java index f9b8e99d..cf08529c 100644 --- a/src/main/java/dm/earth/cabricality/content/core/threads/FluixThread.java +++ b/src/main/java/dm/earth/cabricality/content/core/threads/FluixThread.java @@ -7,17 +7,6 @@ import dm.earth.cabricality.lib.resource.data.core.FreePRP; import dm.earth.cabricality.lib.util.ArrayUtil; import dm.earth.cabricality.tweak.base.MechAndSmithCraft; -import com.simibubi.create.content.fluids.transfer.EmptyingRecipe; -import com.simibubi.create.content.fluids.transfer.FillingRecipe; -import com.simibubi.create.content.kinetics.crusher.CrushingRecipe; -import com.simibubi.create.content.kinetics.deployer.DeployerApplicationRecipe; -import com.simibubi.create.content.kinetics.deployer.ManualApplicationRecipe; -import com.simibubi.create.content.kinetics.fan.SplashingRecipe; -import com.simibubi.create.content.kinetics.mixer.CompactingRecipe; -import com.simibubi.create.content.kinetics.mixer.MixingRecipe; -import com.simibubi.create.content.processing.recipe.HeatCondition; -import com.simibubi.create.foundation.fluid.FluidIngredient; -import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import me.steven.indrev.recipes.machines.FluidInfuserRecipe; import me.steven.indrev.recipes.machines.entries.InputEntry; import me.steven.indrev.recipes.machines.entries.OutputEntry; @@ -123,6 +112,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .build(id, "") ); + /* handler.register( recipeId("deploying", "printed_silicon"), id -> new DeployerApplicationRecipe(new FreePRP(id) @@ -157,9 +147,12 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setProcessingTime(350)) ); + */ + var blizz = CABF.asIngredient("blizz_powder"); var basalz = CABF.asIngredient("basalz_powder"); + /* handler.register( recipeId("splashing", "sandstone"), id -> new SplashingRecipe(new FreePRP(id) @@ -181,6 +174,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setResult(CABF.asProcessingOutput("earth_charge"))) ); + */ + // Coke Processing /* handler.register( @@ -193,6 +188,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { */ + /* handler.register( recipeId("filling", "coal"), id -> new FillingRecipe(new FreePRP(id) @@ -209,6 +205,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setResult(MC.asProcessingOutput("coal"))) ); + */ + /* handler.register( recipeId("emptying", "sand_ball"), @@ -220,6 +218,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { */ + /* handler.register( recipeId("compacting", "silicon_compound"), id -> new CompactingRecipe(new FreePRP(id) @@ -265,6 +264,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setResult(CABF.asProcessingOutput("fluix_casing"))) ); + */ + handler.register( recipeId("fluid_infuse", "snow"), id -> new FluidInfuserRecipe(id, diff --git a/src/main/java/dm/earth/cabricality/content/core/threads/InvarThread.java b/src/main/java/dm/earth/cabricality/content/core/threads/InvarThread.java index 259efde6..ced835f7 100644 --- a/src/main/java/dm/earth/cabricality/content/core/threads/InvarThread.java +++ b/src/main/java/dm/earth/cabricality/content/core/threads/InvarThread.java @@ -9,16 +9,6 @@ import dm.earth.cabricality.tweak.base.MechAndSmithCraft; import com.nhoryzon.mc.farmersdelight.recipe.CuttingBoardRecipe; import com.nhoryzon.mc.farmersdelight.recipe.ingredient.ChanceResult; -import com.simibubi.create.content.fluids.transfer.EmptyingRecipe; -import com.simibubi.create.content.kinetics.crusher.CrushingRecipe; -import com.simibubi.create.content.kinetics.deployer.DeployerApplicationRecipe; -import com.simibubi.create.content.kinetics.deployer.ManualApplicationRecipe; -import com.simibubi.create.content.kinetics.fan.HauntingRecipe; -import com.simibubi.create.content.kinetics.millstone.MillingRecipe; -import com.simibubi.create.content.kinetics.mixer.CompactingRecipe; -import com.simibubi.create.content.kinetics.press.PressingRecipe; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; -import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.tags.Tags; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.item.Item; @@ -82,6 +72,7 @@ public void load() { @Override public void addRecipes(AddRecipesCallback.RecipeHandler handler) { + /* handler.register( recipeId("mechanical_crafting", "crushing_wheel"), id -> RecipeBuilderUtil.mechanicalFromShaped( @@ -96,6 +87,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { ) ); + */ + for (ColoredFernItem.Entry entry : ColoredFernItem.Entry.values()) { String fern = entry.name + "_slime_fern"; String leaf = entry.name + "_slime_fern_leaf"; @@ -116,6 +109,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { ) ); + /* handler.register( recipeId("deploying", fern), id -> new DeployerApplicationRecipe(new FreePRP(id) @@ -139,6 +133,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setProcessingTime(70)) ); + */ + handler.register( recipeId("campfire_cooking", paste), id -> new CampfireCookingRecipe( @@ -172,6 +168,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { ) ); + /* handler.register( recipeId("crushing", "crushing_wheel"), id -> new CrushingRecipe(new FreePRP(id) @@ -190,6 +187,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setResult(CABF.asProcessingOutput("dye_entangled_singularity"))) ); + */ + List balls = List.of( AE2.asItem("red_paint_ball"), AE2.asItem("yellow_paint_ball"), @@ -198,6 +197,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { AE2.asItem("magenta_paint_ball") ); + /* handler.register( recipeId("crushing", "dye_entangled_singularity"), id -> new CrushingRecipe(new FreePRP(id) @@ -211,6 +211,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setProcessingTime(50)) ); + */ + for (Item item : balls) { int index = balls.indexOf(item); Item output = index < balls.size() - 1 @@ -229,6 +231,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { */ } + /* handler.register( recipeId("pressing", "refined_radiance"), id -> new PressingRecipe(new FreePRP(id) @@ -248,6 +251,9 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { true) ); + */ + + /* handler.register( recipeId("mechanical_crafting", "chromatic_compound"), id -> RecipeBuilderUtil.mechanicalFromShaped( @@ -260,6 +266,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { false) ); + */ + handler.register( recipeId("crafting", "chromatic_resonator"), id -> VanillaRecipeBuilders @@ -281,6 +289,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .build(id, "") ); + /* handler.register( recipeId("item_application", "invar_casing"), id -> new ManualApplicationRecipe(new FreePRP(id) @@ -288,6 +297,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setResult(CABF.asProcessingOutput("invar_casing"))) ); + */ + handler.register( recipeId("melting", "ender_dust"), id -> RecipeManager.deserialize(id, RecipeBuilderUtil.generateMelting( diff --git a/src/main/java/dm/earth/cabricality/content/core/threads/ZincThread.java b/src/main/java/dm/earth/cabricality/content/core/threads/ZincThread.java index 7a4de476..a086d1c7 100644 --- a/src/main/java/dm/earth/cabricality/content/core/threads/ZincThread.java +++ b/src/main/java/dm/earth/cabricality/content/core/threads/ZincThread.java @@ -4,12 +4,6 @@ import dm.earth.cabricality.lib.math.RecipeBuilderUtil; import dm.earth.cabricality.lib.resource.data.core.FreePRP; import dm.earth.cabricality.tweak.base.MechAndSmithCraft; -import com.simibubi.create.content.kinetics.deployer.ManualApplicationRecipe; -import com.simibubi.create.content.kinetics.mixer.MixingRecipe; -import com.simibubi.create.content.processing.recipe.HeatCondition; -import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; -import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; -import net.minecraft.item.Items; import net.minecraft.recipe.Ingredient; import net.minecraft.registry.tag.ItemTags; import net.minecraft.util.Identifier; @@ -56,6 +50,7 @@ public void addRecipes(AddRecipesCallback.@NotNull RecipeHandler handler) { ) ); + /* handler.register( recipeId("item_application", "zinc_casing"), id -> new ManualApplicationRecipe(new FreePRP(id) @@ -65,6 +60,8 @@ public void addRecipes(AddRecipesCallback.@NotNull RecipeHandler handler) { ) .setResult(CABF.asProcessingOutput("zinc_casing"))) ); + + */ } @Override diff --git a/src/main/java/dm/earth/cabricality/content/entries/CabfBlocks.java b/src/main/java/dm/earth/cabricality/content/entries/CabfBlocks.java index 17a7f435..43515ff9 100644 --- a/src/main/java/dm/earth/cabricality/content/entries/CabfBlocks.java +++ b/src/main/java/dm/earth/cabricality/content/entries/CabfBlocks.java @@ -12,7 +12,6 @@ import dm.earth.cabricality.lib.core.BlockItemSettable; import dm.earth.cabricality.lib.resource.ResourcedBlock; import com.dm.earth.tags_binder.api.LoadTagsCallback; -import com.simibubi.create.AllTags.AllBlockTags; import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; import net.minecraft.block.AbstractBlock; import net.minecraft.block.Block; @@ -77,9 +76,12 @@ public static void register() { Arrays.stream(MachineBlockEntry.values()) .forEach(entry -> registerBlock(entry.getId().getPath(), entry.getBlock())); + /* Arrays.stream(CasingBlockEntry.values()) .forEach(entry -> registerBlock(entry.getId().getPath(), entry.getBlock())); + */ + LoadTagsCallback.BLOCK.register(new CabfBlocks()); } @@ -129,6 +131,7 @@ private static Block registerBlock(String name, Block block) { @Override public void onTagsLoad(TagHandler handler) { + /* Arrays.stream(MachineBlockEntry.values()).forEach(entry -> handler .register(AllBlockTags.WRENCH_PICKUP.tag, Registries.BLOCK.get(entry.getId()))); @@ -137,5 +140,7 @@ public void onTagsLoad(TagHandler handler) { handler.register(AllBlockTags.WRENCH_PICKUP.tag, block); handler.register(BlockTags.PICKAXE_MINEABLE, block); }); + + */ } } diff --git a/src/main/java/dm/earth/cabricality/content/entries/CabfItems.java b/src/main/java/dm/earth/cabricality/content/entries/CabfItems.java index f7b8e06a..ab2f8ad4 100644 --- a/src/main/java/dm/earth/cabricality/content/entries/CabfItems.java +++ b/src/main/java/dm/earth/cabricality/content/entries/CabfItems.java @@ -17,8 +17,6 @@ import dm.earth.cabricality.lib.resource.assets.gen.item.ItemModelGenerator; import com.dm.earth.tags_binder.api.LoadTagsCallback; import com.dm.earth.tags_binder.api.ResourceConditionCheckTagCallback; -import com.simibubi.create.AllTags.AllItemTags; -import com.simibubi.create.content.processing.sequenced.SequencedAssemblyItem; import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; @@ -233,12 +231,15 @@ public static final class Suppliers { ItemModelGenerator.generated("item", "coke_chunk"), Cabricality.ItemGroups.GENERAL ); + /* public static final Item INCOMPLETE_COKE_CHUNK = registerItemModeled( "incomplete_coke_chunk", new SequencedAssemblyItem(Suppliers.DEFAULT.get()), ItemModelGenerator.generated("item", "incomplete_coke_chunk"), Cabricality.ItemGroups.GENERAL ); + + */ public static final Item EARTH_CHARGE = registerItemModeled( "earth_charge", new Item(Suppliers.DEFAULT_QUARTER.get()), @@ -350,12 +351,15 @@ public static void register() { ItemModelGenerator.generated(type.getItem().getTextureId().getPath()), Cabricality.ItemGroups.GENERAL ); + /* registerItemModeled( type.getIncompleteItemId().getPath(), type.getIncompleteItem(), ItemModelGenerator.generated(type.getItem().getIncompleteTextureId().getPath()), Cabricality.ItemGroups.GENERAL ); + + */ }); // Saws @@ -406,12 +410,15 @@ public static void register() { }); // Incomplete Processors + /* PROCESSORS.forEach(type -> registerItemModeled( "incomplete_" + type + "_processor", new SequencedAssemblyItem(new QuiltItemSettings()), ItemModelGenerator.generated("item/processor", "incomplete_" + type + "_processor") )); + */ + // Math NUMBERS.forEach(number -> registerItemModeled( NumberItem.getNumberItemName(number), @@ -504,11 +511,14 @@ public void onTagsLoad(TagHandler handler) { C.id(variant, "_dusts"), Registries.ITEM.get(Cabricality.id(variant + "_dust")) )); + /* CRUSHED_RAW_MATERIALS.forEach(variant -> handler.register( AllItemTags.CRUSHED_RAW_MATERIALS.tag, Registries.ITEM.get(Cabricality.id("crushed_raw_" + variant)) )); + */ + handler.register(C.id("enderium_ingots"), ENDERIUM_INGOT); handler.register(C.id("invar_ingots"), INVAR_INGOT); handler.register(C.id("nickel_ingots"), NICKEL_INGOT); diff --git a/src/main/java/dm/earth/cabricality/content/extractor/ExtractorMachineBlockEntity.java b/src/main/java/dm/earth/cabricality/content/extractor/ExtractorMachineBlockEntity.java index 74690041..56b47f7c 100644 --- a/src/main/java/dm/earth/cabricality/content/extractor/ExtractorMachineBlockEntity.java +++ b/src/main/java/dm/earth/cabricality/content/extractor/ExtractorMachineBlockEntity.java @@ -2,7 +2,6 @@ import dm.earth.cabricality.content.entries.CabfBlocks; import dm.earth.cabricality.content.entries.CabfFluids; -import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; @@ -27,7 +26,7 @@ import static dm.earth.cabricality.lib.util.debug.CabfDebugger.debug; @SuppressWarnings("UnstableApiUsage") -public class ExtractorMachineBlockEntity extends BlockEntity implements IHaveGoggleInformation { +public class ExtractorMachineBlockEntity extends BlockEntity { public final SingleVariantStorage storage = new SingleVariantStorage<>() { @Override protected FluidVariant getBlankVariant() { @@ -161,9 +160,11 @@ protected void writeNbt(NbtCompound nbt) { nbt.putInt("ticks", ticks); } + /* @Override public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) { return true; } + */ } diff --git a/src/main/java/dm/earth/cabricality/content/math/CalculationRecipe.java b/src/main/java/dm/earth/cabricality/content/math/CalculationRecipe.java index b79ff293..181f56cd 100644 --- a/src/main/java/dm/earth/cabricality/content/math/CalculationRecipe.java +++ b/src/main/java/dm/earth/cabricality/content/math/CalculationRecipe.java @@ -7,7 +7,6 @@ import dm.earth.cabricality.content.entries.CabfRecipeSerializers; import dm.earth.cabricality.content.math.core.Calculable; import dm.earth.cabricality.content.math.item.NumberItem; -import com.simibubi.create.content.kinetics.crafter.MechanicalCraftingInventory; import net.minecraft.inventory.RecipeInputInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -55,11 +54,15 @@ public RecipeSerializer getSerializer() { @Override public boolean matches(RecipeInputInventory inventory, World world) { + /* if (!(inventory instanceof MechanicalCraftingInventory inv)) return false; ArrayList stacks = new ArrayList<>(); for (int i = 0; i < inv.getWidth(); i++) stacks.add(inv.getStack(i)); return stacks.stream().allMatch(stack -> stack.getItem() instanceof Calculable); + + */ + return false; } } diff --git a/src/main/java/dm/earth/cabricality/lib/core/IncompleteVariant.java b/src/main/java/dm/earth/cabricality/lib/core/IncompleteVariant.java index 1c560322..46f523cb 100644 --- a/src/main/java/dm/earth/cabricality/lib/core/IncompleteVariant.java +++ b/src/main/java/dm/earth/cabricality/lib/core/IncompleteVariant.java @@ -1,6 +1,5 @@ package dm.earth.cabricality.lib.core; -import com.simibubi.create.content.processing.sequenced.SequencedAssemblyItem; import org.quiltmc.qsl.item.setting.api.QuiltItemSettings; @@ -9,10 +8,13 @@ import net.minecraft.util.Rarity; public interface IncompleteVariant { + /* default SequencedAssemblyItem newIncomplete(Rarity rarity) { return new SequencedAssemblyItem(this.incompleteSettings(rarity)); } + */ + default Identifier getIncompleteId(Identifier id) { return new Identifier(id.getNamespace(), "incomplete_" + id.getPath()); } diff --git a/src/main/java/dm/earth/cabricality/lib/math/RecipeBuilderUtil.java b/src/main/java/dm/earth/cabricality/lib/math/RecipeBuilderUtil.java index a2832e86..b22f1c15 100644 --- a/src/main/java/dm/earth/cabricality/lib/math/RecipeBuilderUtil.java +++ b/src/main/java/dm/earth/cabricality/lib/math/RecipeBuilderUtil.java @@ -3,7 +3,6 @@ import static dm.earth.cabricality.lib.util.JRecipeUtil.fluidEntry; import static dm.earth.cabricality.lib.util.JRecipeUtil.itemEntry; -import com.simibubi.create.content.kinetics.crafter.MechanicalCraftingRecipe; import net.minecraft.registry.DynamicRegistryManager; import org.jetbrains.annotations.Nullable; import org.quiltmc.qsl.recipe.api.builder.VanillaRecipeBuilders; @@ -26,6 +25,7 @@ public static ShapedRecipe donutRecipe(Identifier id, Item center, Item other, I .ingredient('O', Ingredient.ofItems(other)).output(new ItemStack(output, count)).build(id, ""); } + /* public static MechanicalCraftingRecipe mechanicalFromShaped( DynamicRegistryManager registryManager, ShapedRecipe recipe, boolean acceptMirrored @@ -34,6 +34,8 @@ public static MechanicalCraftingRecipe mechanicalFromShaped( recipe.getIngredients(), recipe.getResult(registryManager), acceptMirrored); } + */ + public static JsonObject generateMelting(Identifier input, Identifier fluid, long amount, @Nullable Identifier byProduct, long byAmount, int temperature, int time) { diff --git a/src/main/java/dm/earth/cabricality/lib/resource/data/core/FreePRP.java b/src/main/java/dm/earth/cabricality/lib/resource/data/core/FreePRP.java index 54cafe23..ed591dcc 100644 --- a/src/main/java/dm/earth/cabricality/lib/resource/data/core/FreePRP.java +++ b/src/main/java/dm/earth/cabricality/lib/resource/data/core/FreePRP.java @@ -1,16 +1,13 @@ package dm.earth.cabricality.lib.resource.data.core; -import com.simibubi.create.content.processing.recipe.HeatCondition; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; -import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder; -import com.simibubi.create.foundation.fluid.FluidIngredient; import dev.architectury.fluid.FluidStack; import net.minecraft.recipe.Ingredient; import net.minecraft.util.Identifier; import java.util.List; -public class FreePRP extends ProcessingRecipeBuilder.ProcessingRecipeParams { +public class FreePRP { + /* public FreePRP(Identifier id) { super(id); } @@ -69,4 +66,6 @@ public FreePRP keepHeldItem(Boolean bool) { public FreePRP keepHeldItem() { return this.keepHeldItem(true); } + + */ } diff --git a/src/main/java/dm/earth/cabricality/listener/DeployerCuttingRecipeHandler.java b/src/main/java/dm/earth/cabricality/listener/DeployerCuttingRecipeHandler.java index 18caec13..e4f20d91 100644 --- a/src/main/java/dm/earth/cabricality/listener/DeployerCuttingRecipeHandler.java +++ b/src/main/java/dm/earth/cabricality/listener/DeployerCuttingRecipeHandler.java @@ -4,8 +4,6 @@ import dm.earth.cabricality.lib.resource.data.core.FreePRP; import com.nhoryzon.mc.farmersdelight.recipe.CuttingBoardRecipe; import com.nhoryzon.mc.farmersdelight.recipe.ingredient.ChanceResult; -import com.simibubi.create.content.kinetics.deployer.DeployerApplicationRecipe; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; import net.minecraft.registry.Registries; import net.minecraft.util.Identifier; import org.quiltmc.qsl.recipe.api.RecipeLoadingEvents; @@ -18,6 +16,7 @@ public class DeployerCuttingRecipeHandler { public static ArrayList cuttingBoardRecipes = new ArrayList<>(); private static void addRecipes(RecipeLoadingEvents.AddRecipesCallback.RecipeHandler handler) { + /* for (CuttingBoardRecipe boardRecipe : cuttingBoardRecipes) { Identifier id = Cabricality.id("cutting/auto/" + String.valueOf(boardRecipe.hashCode()).replaceAll("-", "x")); ArrayList outputs = new ArrayList<>(); @@ -37,6 +36,8 @@ private static void addRecipes(RecipeLoadingEvents.AddRecipesCallback.RecipeHand DeployerApplicationRecipe recipe = new DeployerApplicationRecipe(params); handler.register(id, identifier -> recipe); } + + */ } public static void load() { diff --git a/src/main/java/dm/earth/cabricality/mixin/WrenchItemMixin.java b/src/main/java/dm/earth/cabricality/mixin/WrenchItemMixin.java deleted file mode 100644 index fa524472..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/WrenchItemMixin.java +++ /dev/null @@ -1,127 +0,0 @@ -package dm.earth.cabricality.mixin; - -import com.simibubi.create.content.equipment.wrench.WrenchItem; -import earth.terrarium.ad_astra.common.block.Wrenchable; -import io.github.coolmineman.bitsandchisels.BitsAndChisels; -import io.github.coolmineman.bitsandchisels.BitsBlockEntity; -import net.minecraft.block.BlockState; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.item.ItemUsageContext; -import net.minecraft.util.ActionResult; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Direction.Axis; -import net.minecraft.world.World; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.util.Objects; - -@Mixin(WrenchItem.class) -public class WrenchItemMixin { - @Inject(method = "useOnBlock", at = @At("HEAD"), cancellable = true) - private void useOnBlock(ItemUsageContext context, CallbackInfoReturnable cir) { - World world = context.getWorld(); - BlockPos pos = context.getBlockPos(); - BlockState state = world.getBlockState(pos); - - // Ad Astra! - if (state.getBlock() instanceof Wrenchable wrenchable) { - wrenchable.handleWrench(world, context.getBlockPos(), world.getBlockState(context.getBlockPos()), - context.getSide(), context.getPlayer(), context.getHitPos()); - cir.setReturnValue(ActionResult.SUCCESS); - } - - // Bits and Chisels - if (!context.getWorld().isClient() && state.isOf(BitsAndChisels.BITS_BLOCK)) { - BlockEntity blockEntity = context.getWorld().getBlockEntity(context.getBlockPos()); - if (blockEntity instanceof BitsBlockEntity bitsBlockEntity) { - if (Objects.requireNonNull(context.getPlayer()).isSneaking()) { - invert(context.getSide().getAxis(), bitsBlockEntity); - } else { - rotate(context.getSide().getAxis(), bitsBlockEntity); - } - cir.setReturnValue(ActionResult.SUCCESS); - } - } - } - - @Unique - void invert(Axis axis, BitsBlockEntity bitsBlockEntity) { - BlockState[][][] rotated = new BlockState[16][16][16]; - switch (axis) { - case X -> { - for (int i = 0; i < 16; i++) { - for (int j = 0; j < 16; j++) { - for (int k = 0; k < 16; k++) { - rotated[i][j][k] = bitsBlockEntity.getState(i, j, -k + 15); - } - } - } - } - case Y -> { - for (int i = 0; i < 16; i++) { - for (int j = 0; j < 16; j++) { - for (int k = 0; k < 16; k++) { - rotated[i][j][k] = bitsBlockEntity.getState(i, -j + 15, k); - } - } - } - } - case Z -> { - for (int i = 0; i < 16; i++) { - for (int j = 0; j < 16; j++) { - for (int k = 0; k < 16; k++) { - rotated[i][j][k] = bitsBlockEntity.getState(-i + 15, j, k); - } - } - } - } - } - bitsBlockEntity.setStates(rotated); - bitsBlockEntity.rebuildServer(); - bitsBlockEntity.sync(); - } - - // Rotation Algorithm from - // https://stackoverflow.com/questions/53110374/how-to-rotate-2-d-array-in-java, - // extended to 3D - @Unique - void rotate(Axis axis, BitsBlockEntity e) { - BlockState[][][] rotated = new BlockState[16][16][16]; - switch (axis) { - case X -> { - for (int i = 0; i < 16; i++) { - for (int j = 0; j < 16; j++) { - for (int k = 0; k < 16; k++) { - rotated[i][j][k] = e.getState(i, 16 - k - 1, j); - } - } - } - } - case Y -> { - for (int i = 0; i < 16; i++) { - for (int j = 0; j < 16; j++) { - for (int k = 0; k < 16; k++) { - rotated[i][j][k] = e.getState(16 - k - 1, j, i); - } - } - } - } - case Z -> { - for (int i = 0; i < 16; i++) { - for (int j = 0; j < 16; j++) { - for (int k = 0; k < 16; k++) { - rotated[i][j][k] = e.getState(16 - j - 1, i, k); - } - } - } - } - } - e.setStates(rotated); - e.rebuildServer(); - e.sync(); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/create/TagDependentIngredientItemMixin.java b/src/main/java/dm/earth/cabricality/mixin/client/create/TagDependentIngredientItemMixin.java deleted file mode 100644 index 1bf739c6..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/create/TagDependentIngredientItemMixin.java +++ /dev/null @@ -1,32 +0,0 @@ -package dm.earth.cabricality.mixin.client.create; - -import com.dm.earth.tags_binder.api.ResourceConditionCheckTagCallback; -import com.simibubi.create.foundation.item.TagDependentIngredientItem; -import net.minecraft.item.Item; -import net.minecraft.registry.tag.TagKey; -import net.minecraft.util.ActionResult; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(TagDependentIngredientItem.class) -public class TagDependentIngredientItemMixin { - @Shadow(remap = false) - private TagKey tag; - - @Inject( - method = "shouldHide", - at = @At("HEAD"), - cancellable = true, - remap = false - ) - private void inserted(CallbackInfoReturnable cir) { - ActionResult result = ResourceConditionCheckTagCallback.ITEM.invoker().resourceConditionCheckTag(this.tag); - if (result.isAccepted()) - cir.setReturnValue(false); - else if (result == ActionResult.FAIL) - cir.setReturnValue(true); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/BooleanConfigTranslator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/BooleanConfigTranslator.java deleted file mode 100644 index 09a3adfd..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/BooleanConfigTranslator.java +++ /dev/null @@ -1,35 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftblibrary; - -import dev.ftb.mods.ftblibrary.config.BooleanConfig; -import net.minecraft.text.Text; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -// Toxic FTB Library localizations -@ClientOnly -@Mixin(BooleanConfig.class) -public class BooleanConfigTranslator { - @Redirect( - method = "getStringForGUI(Ljava/lang/Boolean;)Lnet/minecraft/text/Text;", - at = @At( - value = "FIELD", - target = "Ldev/ftb/mods/ftblibrary/config/BooleanConfig;TRUE_TEXT:Lnet/minecraft/text/Text;" - ) - ) - private Text translateTrue() { - return Text.literal(Text.translatable("gui.true").getString()); - } - - @Redirect( - method = "getStringForGUI(Ljava/lang/Boolean;)Lnet/minecraft/text/Text;", - at = @At( - value = "FIELD", - target = "Ldev/ftb/mods/ftblibrary/config/BooleanConfig;FALSE_TEXT:Lnet/minecraft/text/Text;" - ) - ) - private Text tsanslateFalse() { - return Text.literal(Text.translatable("gui.false").getString()); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/ConfigValueTranslator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/ConfigValueTranslator.java deleted file mode 100644 index 3b4f9903..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/ConfigValueTranslator.java +++ /dev/null @@ -1,44 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftblibrary; - -import dev.ftb.mods.ftblibrary.config.ConfigValue; -import net.minecraft.text.MutableText; -import net.minecraft.text.Text; -import net.minecraft.util.Formatting; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@ClientOnly -@Mixin(ConfigValue.class) -public abstract class ConfigValueTranslator { - @Inject( - method = "info(Ljava/lang/String;)Lnet/minecraft/text/Text;", - at = @At("RETURN"), - cancellable = true - ) - private static void redirect(String key, CallbackInfoReturnable cir) { - translate(key, "", cir); - } - - @Inject( - method = "info(Ljava/lang/String;Ljava/lang/Object;)Lnet/minecraft/text/Text;", - at = @At("RETURN"), - cancellable = true - ) - private static void translate(String key, Object value, CallbackInfoReturnable cir) { - if (value instanceof String) value = Text.literal((String) value); - MutableText translated = Text.literal(key); - switch (key) { - case "Default" -> translated = Text.translatable("gui.default"); - case "Min" -> translated = Text.translatable("gui.min"); - case "Max" -> translated = Text.translatable("gui.max"); - case "Regex" -> translated = Text.translatable("gui.regex"); - case "List" -> translated = Text.translatable("gui.list"); - } - cir.setReturnValue((translated.append(Text.translatable("gui.colon")) - .formatted(Formatting.AQUA)) - .append((Text) value)); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/ListConfigTranslator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/ListConfigTranslator.java deleted file mode 100644 index 4bcf290c..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/ListConfigTranslator.java +++ /dev/null @@ -1,18 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftblibrary; - -import dev.ftb.mods.ftblibrary.config.ListConfig; -import net.minecraft.text.Text; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Mutable; -import org.spongepowered.asm.mixin.Shadow; - -@ClientOnly -@Mixin(ListConfig.class) -public class ListConfigTranslator { - @Mutable - @Shadow(remap = false) - @Final - public static final Text EMPTY_LIST = Text.literal("[ ]"); -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/TristateTranslator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/TristateTranslator.java deleted file mode 100644 index cdfa6fe9..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftblibrary/TristateTranslator.java +++ /dev/null @@ -1,22 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftblibrary; - -import dev.ftb.mods.ftblibrary.config.Tristate; -import net.minecraft.text.Text; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@ClientOnly -@Mixin(Tristate.class) -public class TristateTranslator { - @Inject(method = "lambda$static$1", at = @At("HEAD"), cancellable = true, remap = false) - private static void translateTristate(Tristate tristate, CallbackInfoReturnable cir) { - switch (tristate.name) { - case "true" -> cir.setReturnValue(Text.translatable("gui.true")); - case "false" -> cir.setReturnValue(Text.translatable("gui.false")); - case "default" -> cir.setReturnValue(Text.translatable("gui.default")); - } - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/BaseScreenAnimator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/BaseScreenAnimator.java deleted file mode 100644 index acaaf77a..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/BaseScreenAnimator.java +++ /dev/null @@ -1,38 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftbquests; - -import dm.earth.cabricality.Cabricality; -import dm.earth.cabricality.lib.util.PushUtil; -import dev.ftb.mods.ftblibrary.ui.BaseScreen; -import dev.ftb.mods.ftblibrary.ui.Theme; -import dev.ftb.mods.ftblibrary.ui.WidgetType; -import net.krlite.equator.math.algebra.Curves; -import net.krlite.equator.math.geometry.flat.Box; -import net.krlite.equator.visual.animation.animated.AnimatedDouble; -import net.minecraft.client.gui.GuiGraphics; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -@ClientOnly -@Mixin(BaseScreen.class) -public class BaseScreenAnimator { - @Unique - private static final AnimatedDouble animation = new AnimatedDouble(0, 1, 175, Curves.LINEAR); - - @Redirect( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/ui/Theme;drawGui(Lnet/minecraft/client/gui/GuiGraphics;IIIILdev/ftb/mods/ftblibrary/ui/WidgetType;)V" - ) - ) - private void drawBackground(Theme theme, GuiGraphics graphics, int x, int y, int w, int h, WidgetType type) { - PushUtil.ANIMATE_BASE_SCREEN.pull(() -> PushUtil.ANIMATE_CHAPTER_PANEL.push(animation::replay)); - - Box.fromCartesian(x, y, w, h).render(graphics, - flat -> flat.new Rectangle(Cabricality.Colors.OLD_CABF_GRAY_PURPLE.opacity(0.85 * Math.pow(animation.value(), 1 / 3.0))) - ); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ChapterPanelAnimator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ChapterPanelAnimator.java deleted file mode 100644 index ad5d4e38..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ChapterPanelAnimator.java +++ /dev/null @@ -1,149 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftbquests; - -import dm.earth.cabricality.Cabricality; -import dm.earth.cabricality.lib.util.PushUtil; -import dev.ftb.mods.ftblibrary.icon.Color4I; -import dev.ftb.mods.ftblibrary.ui.Panel; -import dev.ftb.mods.ftblibrary.ui.Theme; -import dev.ftb.mods.ftblibrary.ui.Widget; -import dev.ftb.mods.ftblibrary.util.TooltipList; -import dev.ftb.mods.ftbquests.client.ClientQuestFile; -import dev.ftb.mods.ftbquests.client.gui.quests.ChapterPanel; -import dev.ftb.mods.ftbquests.client.gui.quests.QuestScreen; -import net.krlite.equator.math.algebra.Curves; -import net.krlite.equator.math.geometry.flat.Box; -import net.krlite.equator.visual.animation.animated.AnimatedDouble; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.text.MutableText; -import net.minecraft.text.Style; -import net.minecraft.text.Text; -import net.minecraft.util.Formatting; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@ClientOnly -@Mixin(ChapterPanel.class) -public abstract class ChapterPanelAnimator { - @Shadow(remap = false) - boolean expanded; - - @Shadow(remap = false) - abstract boolean isPinned(); - - @Unique - private static final AnimatedDouble animation = new AnimatedDouble(0, 1, 400, Curves.Bounce.OUT); - - @Redirect( - method = "drawBackground", - at = @At( - value = "INVOKE", target = "Ldev/ftb/mods/ftblibrary/ui/Theme;drawContextMenuBackground(Lnet/minecraft/client/gui/GuiGraphics;IIII)V" - ) - ) - private void drawBackground(Theme theme, GuiGraphics graphics, int x, int y, int w, int h) { - PushUtil.ANIMATE_CHAPTER_PANEL.or((!this.expanded && !this.isPinned()), animation::replay); - - Box chapterBox = Box.fromCartesian(x, y, w * animation.value(), h); - - chapterBox.render(graphics, - flat -> flat.new Rectangle() - .colors(Cabricality.Colors.OLD_CABF_BLACK) - .opacityMultiplier(0.73) - ); - - chapterBox.render(graphics, - flat -> flat.new Rectangle() - .colorLeft(Cabricality.Colors.OLD_CABF_PURPLE.opacity(0.2)) - .colorRight(Cabricality.Colors.OLD_CABF_MID_PURPLE.opacity(1 - animation.value())) - ); - } -} - -@Mixin(ChapterPanel.ChapterButton.class) -class ChapterButtonAnimator extends Widget { - public ChapterButtonAnimator(Panel p) { - super(p); - } - - @Redirect( - method = "draw", - at = @At( - value = "INVOKE", - target = "Lnet/minecraft/text/MutableText;formatted(Lnet/minecraft/util/Formatting;)Lnet/minecraft/text/MutableText;" - ) - ) - private MutableText modifyChapterIndicator(MutableText text, Formatting formatting) { - return Text.literal(" ●"); - } - - @Redirect( - method = "draw", - at = @At( - value = "INVOKE", - target = "Lnet/minecraft/text/MutableText;fillStyle(Lnet/minecraft/text/Style;)Lnet/minecraft/text/MutableText;" - ) - ) - private MutableText tintChapterName(MutableText text, Style style) { - if (this.isMouseOver) return text; // Highlight chapter name when hovered - else return text.setStyle(style); - } - - @ModifyArg( - method = "draw", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;withAlpha(I)Ldev/ftb/mods/ftblibrary/icon/Color4I;" - ), index = 0, remap = false - ) - private int tintHoverBackground(int alpha) { - return 18; - } -} - -@ClientOnly -@Mixin(ChapterPanel.ModpackButton.class) -class ModPackButtonAnimator { - @Redirect(method = "addMouseOverText", at = @At(value = "INVOKE", target = "Ldev/ftb/mods/ftblibrary/util/TooltipList;string(Ljava/lang/String;)V"), remap = false) - private void translatePin(TooltipList list, String text) { - list.translate(ClientQuestFile.INSTANCE.selfTeamData.isChapterPinned(MinecraftClient.getInstance().player) - ? "ftbquests.gui.unpin" : "ftbquests.gui.pin"); - } - - @ModifyArg( - method = "draw", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;withAlpha(I)Ldev/ftb/mods/ftblibrary/icon/Color4I;" - ), index = 0, remap = false - ) - private int tintHoverBackground(int alpha) { - return 18; - } - - @Redirect( - method = "draw", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V", - ordinal = 1 - ) - ) - private void drawLine(Color4I color4I, GuiGraphics graphics, int x, int y, int w, int h) {} - - @Inject( - method = "getActualWidth", - at = @At("RETURN"), - cancellable = true, - remap = false - ) - private void getActualWidth(QuestScreen screen, CallbackInfoReturnable cir) { - cir.setReturnValue(cir.getReturnValue() + 20); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ClientQuestFileAnimator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ClientQuestFileAnimator.java deleted file mode 100644 index e3af7a0e..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ClientQuestFileAnimator.java +++ /dev/null @@ -1,21 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftbquests; - -import dev.ftb.mods.ftbquests.client.ClientQuestFile; - -import dev.ftb.mods.ftbquests.client.gui.quests.QuestScreen; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; - -import dm.earth.cabricality.lib.util.PushUtil; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@ClientOnly -@Mixin(ClientQuestFile.class) -public class ClientQuestFileAnimator { - @Inject(method = "openQuestGui", at = @At("TAIL"), remap = false) - private void animateBaseScreen(CallbackInfoReturnable cir) { - PushUtil.ANIMATE_BASE_SCREEN.push(); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ContextMenuAnimator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ContextMenuAnimator.java deleted file mode 100644 index 580bee6a..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ContextMenuAnimator.java +++ /dev/null @@ -1,60 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftbquests; - -import dm.earth.cabricality.Cabricality; -import dev.ftb.mods.ftblibrary.icon.Color4I; -import dev.ftb.mods.ftblibrary.ui.ContextMenu; -import dev.ftb.mods.ftblibrary.ui.ContextMenuItem; -import dev.ftb.mods.ftblibrary.ui.Panel; -import dev.ftb.mods.ftblibrary.ui.Theme; -import net.krlite.equator.math.algebra.Curves; -import net.krlite.equator.math.geometry.flat.Box; -import net.krlite.equator.visual.animation.animated.AnimatedDouble; -import net.minecraft.client.gui.GuiGraphics; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.util.List; - -@ClientOnly -@Mixin(ContextMenu.class) -public class ContextMenuAnimator { - @Unique - private static final AnimatedDouble animation = new AnimatedDouble(0, 1, 250, Curves.Back.OUT); - - @Inject( - method = "", - at = @At("TAIL"), - remap = false - ) - private void init(Panel panel, List contextMenuItems, CallbackInfo ci) { - animation.replay(); - } - - @Redirect( - method = "draw", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V" - ) - ) - private void draw(Color4I color4I, GuiGraphics graphics, int x, int y, int w, int h) {} - - @Redirect( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/ui/Theme;drawContextMenuBackground(Lnet/minecraft/client/gui/GuiGraphics;IIII)V" - ) - ) - private void drawBackground(Theme theme, GuiGraphics graphics, int x, int y, int w, int h) { - Box.fromCartesian(x, y, w, h).scaleCenter(1 + 1.2 * (1 - animation.value())) - .render(graphics, - flat -> flat.new Rectangle(Cabricality.Colors.OLD_CABF_DIM_PURPLE.opacity(Math.min(1, 0.75 * Math.pow(animation.value(), 2)))) - ); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/CreditsTrigger.java b/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/CreditsTrigger.java deleted file mode 100644 index 173c3c5a..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/CreditsTrigger.java +++ /dev/null @@ -1,28 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftbquests; - -import dm.earth.cabricality.Cabricality; -import dm.earth.cabricality.client.screen.CabfCreditsScreen; -import dm.earth.cabricality.lib.util.ScreenUtil; - -import net.minecraft.client.MinecraftClient; - -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import dev.ftb.mods.ftbquests.events.QuestProgressEventData; -import dev.ftb.mods.ftbquests.quest.Quest; - -@ClientOnly -@Mixin(Quest.class) -public abstract class CreditsTrigger { - @Inject(method = "onCompleted", at = @At("HEAD"), remap = false) - private void onCompleted(QuestProgressEventData data, CallbackInfo ci) { - if (((Quest) (Object) this).getMovableID() == 5590341946361687492L) { // 幔缝重生 - Cabricality.LOGGER.info("Congrats adventurer! You have completed Cabricality!"); - ScreenUtil.openScreenInWorld(new CabfCreditsScreen(() -> MinecraftClient.getInstance().setScreen(null)), false); - } - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/QuestObjectAnimator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/QuestObjectAnimator.java deleted file mode 100644 index 5970a21a..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/QuestObjectAnimator.java +++ /dev/null @@ -1,22 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftbquests; - -import dev.ftb.mods.ftblibrary.icon.Color4I; -import dev.ftb.mods.ftbquests.quest.QuestObject; - -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -@ClientOnly -@Mixin(QuestObject.class) -public class QuestObjectAnimator { - @Redirect( - method = "getProgressColor(Ldev/ftb/mods/ftbquests/quest/TeamData;)Ldev/ftb/mods/ftblibrary/icon/Color4I;", - at = @At(value = "FIELD", target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;WHITE:Ldev/ftb/mods/ftblibrary/icon/Color4I;"), - remap = false - ) - private Color4I modifyProgressColor() { - return Color4I.GRAY; - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/QuestPanelAnimator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/QuestPanelAnimator.java deleted file mode 100644 index 65820e51..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/QuestPanelAnimator.java +++ /dev/null @@ -1,51 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftbquests; - -import dm.earth.cabricality.Cabricality; -import dev.ftb.mods.ftblibrary.icon.Color4I; -import dev.ftb.mods.ftbquests.client.gui.quests.QuestPanel; -import dev.ftb.mods.ftbquests.quest.QuestObjectBase; -import dev.ftb.mods.ftbquests.quest.theme.property.ColorProperty; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -@ClientOnly -@Mixin(QuestPanel.class) -public class QuestPanelAnimator { - @Redirect( - method = "drawOffsetBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftbquests/quest/theme/property/ColorProperty;get(Ldev/ftb/mods/ftbquests/quest/QuestObjectBase;)Ljava/lang/Object;", - ordinal = 0 - ), remap = false - ) - private Object questDependencyColor(ColorProperty colorProperty, QuestObjectBase questObjectBase) { - return Color4I.rgb(Cabricality.Colors.QUEST_DEPENDENCY.toColor().getRGB()); // This doesn't work. Maybe a bug in FTB Quests. - } - - @Redirect( - method = "drawOffsetBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftbquests/quest/theme/property/ColorProperty;get(Ldev/ftb/mods/ftbquests/quest/QuestObjectBase;)Ljava/lang/Object;", - ordinal = 1 - ), remap = false - ) - private Object questDependentColor(ColorProperty colorProperty, QuestObjectBase questObjectBase) { - return Color4I.rgb(Cabricality.Colors.QUEST_DEPENDENT.toColor().getRGB()); - } - - @Redirect( - method = "drawOffsetBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftbquests/quest/theme/property/ColorProperty;get(Ldev/ftb/mods/ftbquests/quest/QuestObjectBase;)Ljava/lang/Object;", - ordinal = 2 - ), remap = false - ) - private Object questCompletedColor(ColorProperty colorProperty, QuestObjectBase questObjectBase) { - return Color4I.rgb(Cabricality.Colors.QUEST_DEPENDENCY.toColor().getRGB()); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/QuestScreenAnimator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/QuestScreenAnimator.java deleted file mode 100644 index 23ed67f7..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/QuestScreenAnimator.java +++ /dev/null @@ -1,75 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftbquests; - -import dm.earth.cabricality.Cabricality; -import dm.earth.cabricality.lib.util.PushUtil; -import dev.ftb.mods.ftblibrary.icon.Color4I; -import dev.ftb.mods.ftbquests.client.gui.quests.QuestScreen; -import net.krlite.equator.math.geometry.flat.Box; -import net.minecraft.client.gui.GuiGraphics; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@ClientOnly -@Mixin(QuestScreen.class) -public class QuestScreenAnimator { - @Inject( - method = "addWidgets", - at = @At("TAIL"), - remap = false - ) - private void init(CallbackInfo ci) { - PushUtil.ANIMATE_VIEW_QUEST_PANEL.push(); - } - - @Redirect( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V", - ordinal = 0 - ) - ) - private void drawLeftBorder(Color4I color4I, GuiGraphics graphics, int x, int y, int w, int h) {} - - @Redirect( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V", - ordinal = 2 - ) - ) - private void drawRightBorder(Color4I color4I, GuiGraphics graphics, int x, int y, int w, int h) {} - - @Redirect( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V", - ordinal = 1 - ) - ) - private void drawLeftSide(Color4I color4I, GuiGraphics graphics, int x, int y, int w, int h) { - Box.fromCartesian(x - 1, y - 1, w + 2, h + 2).render(graphics, - flat -> flat.new Rectangle(Cabricality.Colors.OLD_CABF_BLACK.opacity(0.127)) - ); - } - - @Redirect( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V", - ordinal = 3 - ) - ) - private void drawRightSide(Color4I color4I, GuiGraphics graphics, int x, int y, int w, int h) { - Box.fromCartesian(x - 1, y - 1, w + 2, h + 2).render(graphics, - flat -> flat.new Rectangle(Cabricality.Colors.OLD_CABF_BLACK.opacity(0.127)) - ); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ViewQuestPanelAnimator.java b/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ViewQuestPanelAnimator.java deleted file mode 100644 index f827fde2..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ftbquests/ViewQuestPanelAnimator.java +++ /dev/null @@ -1,207 +0,0 @@ -package dm.earth.cabricality.mixin.client.ftbquests; - -import dm.earth.cabricality.Cabricality; -import dm.earth.cabricality.lib.util.PushUtil; -import dev.ftb.mods.ftblibrary.icon.Color4I; -import dev.ftb.mods.ftblibrary.icon.Icon; -import dev.ftb.mods.ftblibrary.ui.BlankPanel; -import dev.ftb.mods.ftblibrary.ui.Panel; -import dev.ftb.mods.ftblibrary.ui.Theme; -import dev.ftb.mods.ftblibrary.ui.Widget; -import dev.ftb.mods.ftbquests.client.gui.quests.ViewQuestPanel; -import dev.ftb.mods.ftbquests.quest.theme.property.ThemeProperties; -import net.krlite.equator.math.algebra.Curves; -import net.krlite.equator.math.geometry.flat.Box; -import net.krlite.equator.math.geometry.flat.Vector; -import net.krlite.equator.render.renderer.Flat; -import net.krlite.equator.visual.animation.animated.AnimatedDouble; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.util.math.MathHelper; -import org.quiltmc.loader.api.minecraft.ClientOnly; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.ModifyArgs; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.Slice; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.invoke.arg.Args; - -@ClientOnly -@Mixin(ViewQuestPanel.class) -public abstract class ViewQuestPanelAnimator extends Widget { - @Shadow(remap = false) - private BlankPanel panelText; - - public ViewQuestPanelAnimator(Panel panel) { - super(panel); - } - - @Unique - private static final AnimatedDouble animation = new AnimatedDouble(0, 1, 720, Curves.Sinusoidal.EASE); - - @ModifyArg( - method = "addWidgets", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftbquests/client/gui/quests/ViewQuestPanel;setWidth(I)V" - ), - remap = false - ) - private int modifyWidth(int width) { - return width + 16; - } - - @ModifyArg( - method = "addWidgets", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftbquests/client/gui/quests/ViewQuestPanel;setHeight(I)V" - ), - remap = false - ) - private int modifyHeight(int height) { - return height + (this.panelText.getWidgets().isEmpty() ? 18 : 12); - } - - @Unique - private void modifyPos(Args args, int xIndex, int yIndex) { - args.set(xIndex, (int) args.get(xIndex) + 8); - args.set(yIndex, (int) args.get(yIndex) + 6); - } - - @ModifyArgs( - method = "addWidgets", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/ui/TextField;setPosAndSize(IIII)Ldev/ftb/mods/ftblibrary/ui/Widget;", - ordinal = 0 - ), - remap = false - ) - private void modifyTitlePos(Args args) { - modifyPos(args, 0, 1); - } - - @ModifyArgs( - method = "addWidgets", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/ui/Button;setPosAndSize(IIII)Ldev/ftb/mods/ftblibrary/ui/Widget;" - ), - remap = false - ) - private void modifyButtonPos(Args args) { - modifyPos(args, 0, 1); - } - - @ModifyArgs( - method = "addWidgets", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/ui/BlankPanel;setPosAndSize(IIII)Ldev/ftb/mods/ftblibrary/ui/Widget;", - ordinal = 0 - ), - remap = false - ) - private void modifyContentPanelPos(Args args) { - modifyPos(args, 0, 1); - } - - @ModifyArgs( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Icon;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V", - ordinal = 1 - ) - ) - private void modifyQuestPanelIconPos(Args args) { - modifyPos(args, 1, 2); - args.set(1, (int) args.get(1) - 3); // Fix x position - } - - @Inject( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V", - ordinal = 0 - ) - ) - private void drawQuestPanelBackground(GuiGraphics graphics, Theme theme, int x, int y, int w, int h, CallbackInfo ci) { - PushUtil.ANIMATE_VIEW_QUEST_PANEL.pull(animation::replay); - double lerp = Math.pow(animation.value(), 1 / 3.0); - - Box.fromCartesian(x, y, w, h).render(graphics, - flat -> flat.new Rectangle() - .colorTop(Cabricality.Colors.OLD_CABF_PURPLE) - .colorBottom(Cabricality.Colors.OLD_CABF_MID_PURPLE) - .new Outlined(Vector.fromCartesian(240 * lerp, 240 * lerp), - Flat.Rectangle.Outlined.OutliningMode.NORMAL, - Flat.Rectangle.Outlined.OutliningStyle.EDGE_FADED) - ); - } - - @Redirect( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Icon;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V", - ordinal = 0 - ) - ) - private void drawQuestPanelBackgroundTexture(Icon icon, GuiGraphics guiGraphics, int xy,int y, int w, int h) {} - - @Redirect( - method = "drawBackground", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Color4I;draw(Lnet/minecraft/client/gui/GuiGraphics;IIII)V", - ordinal = 1 - ) - ) - private void drawQuestPanelBorder(Color4I color4I, GuiGraphics graphics, int x, int y, int w, int h) {} - - @Redirect( - method = "addWidgets", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/ui/BlankPanel;add(Ldev/ftb/mods/ftblibrary/ui/Widget;)V" - ), - slice = @Slice( - from = @At(value = "INVOKE", target = "Ldev/ftb/mods/ftbquests/client/gui/quests/ViewQuestPanel;addButtonBar(Z)V"), - to = @At(value = "INVOKE", target = "Ldev/ftb/mods/ftbquests/client/gui/quests/ViewQuestPanel;setPos(II)V") - ), remap = false - ) - private void drawBorder(BlankPanel panel, Widget widget) {} - - @Redirect( - method = "tick", - at = @At( - value = "INVOKE", - target = "Ldev/ftb/mods/ftblibrary/icon/Icon;withTint(Ldev/ftb/mods/ftblibrary/icon/Color4I;)Ldev/ftb/mods/ftblibrary/icon/Icon;" - ), - remap = false - ) - private Icon tintLeftArrow(Icon icon, Color4I color4I) { - long time = System.currentTimeMillis(); - if (MinecraftClient.getInstance().world != null) time = MinecraftClient.getInstance().world.getTime(); - - Color4I color = ThemeProperties.QUEST_VIEW_TITLE.get() - .withAlphaf((float) sinusoidal( - (Math.abs(time % 40 - 20) - 6) / 8.0, - 0.03, 0.97) - ); - return icon.withColor(color); - } - - @Unique - private double sinusoidal(double percentage, double origin, double shift) { - return origin + -shift / 2 * (Math.cos(Math.PI * MathHelper.clamp(percentage, 0, 1)) - 1); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/porting_lib/FluidTankMixin.java b/src/main/java/dm/earth/cabricality/mixin/porting_lib/FluidTankMixin.java deleted file mode 100644 index 1a500faa..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/porting_lib/FluidTankMixin.java +++ /dev/null @@ -1,31 +0,0 @@ -package dm.earth.cabricality.mixin.porting_lib; - -import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; -import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; -import net.fabricmc.fabric.api.transfer.v1.storage.StoragePreconditions; -import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(value = FluidTank.class, remap = false) -public class FluidTankMixin { - @Inject(method = "insert(Lnet/fabricmc/fabric/api/transfer/v1/fluid/FluidVariant;JLnet/fabricmc/fabric/api/transfer/v1/transaction/TransactionContext;)J", at = @At("HEAD"), cancellable = true, remap = false) - private void patch1(FluidVariant insertedVariant, long maxAmount, TransactionContext transaction, CallbackInfoReturnable cir) { - try { - StoragePreconditions.notBlankNotNegative(insertedVariant, maxAmount); - } catch (Throwable e) { - cir.setReturnValue(0L); - } - } - - @Inject(method = "extract(Lnet/fabricmc/fabric/api/transfer/v1/fluid/FluidVariant;JLnet/fabricmc/fabric/api/transfer/v1/transaction/TransactionContext;)J", at = @At("HEAD"), cancellable = true, remap = false) - private void patch2(FluidVariant extractedVariant, long maxAmount, TransactionContext transaction, CallbackInfoReturnable cir) { - try { - StoragePreconditions.notBlankNotNegative(extractedVariant, maxAmount); - } catch (Throwable e) { - cir.setReturnValue(0L); - } - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/porting_lib/ItemStackHandlerMixin.java b/src/main/java/dm/earth/cabricality/mixin/porting_lib/ItemStackHandlerMixin.java deleted file mode 100644 index 3a364843..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/porting_lib/ItemStackHandlerMixin.java +++ /dev/null @@ -1,31 +0,0 @@ -package dm.earth.cabricality.mixin.porting_lib; - -import io.github.fabricators_of_create.porting_lib.transfer.item.ItemStackHandler; -import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; -import net.fabricmc.fabric.api.transfer.v1.storage.StoragePreconditions; -import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(value = ItemStackHandler.class, remap = false) -public class ItemStackHandlerMixin { - @Inject(method = "insert(Lnet/fabricmc/fabric/api/transfer/v1/item/ItemVariant;JLnet/fabricmc/fabric/api/transfer/v1/transaction/TransactionContext;)J", at = @At("HEAD"), cancellable = true, remap = false) - private void patch1(ItemVariant resource, long maxAmount, TransactionContext transaction, CallbackInfoReturnable cir) { - try { - StoragePreconditions.notBlankNotNegative(resource, maxAmount); - } catch (Throwable e) { - cir.setReturnValue(0L); - } - } - - @Inject(method = "extract(Lnet/fabricmc/fabric/api/transfer/v1/item/ItemVariant;JLnet/fabricmc/fabric/api/transfer/v1/transaction/TransactionContext;)J", at = @At("HEAD"), cancellable = true, remap = false) - private void patch2(ItemVariant resource, long maxAmount, TransactionContext transaction, CallbackInfoReturnable cir) { - try { - StoragePreconditions.notBlankNotNegative(resource, maxAmount); - } catch (Throwable e) { - cir.setReturnValue(0L); - } - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/recipe/create/ProcessingOutputMixin.java b/src/main/java/dm/earth/cabricality/mixin/recipe/create/ProcessingOutputMixin.java deleted file mode 100644 index bb1489d8..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/recipe/create/ProcessingOutputMixin.java +++ /dev/null @@ -1,16 +0,0 @@ -package dm.earth.cabricality.mixin.recipe.create; - -import dm.earth.cabricality.lib.resource.data.recipe.ProcessItemOutputCallback; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; -import net.minecraft.item.ItemStack; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -@Mixin(ProcessingOutput.class) -public class ProcessingOutputMixin { - @ModifyVariable(method = "(Lnet/minecraft/item/ItemStack;F)V", at = @At("HEAD"), argsOnly = true) - private static ItemStack modifyOutput(ItemStack itemStack) { - return ProcessItemOutputCallback.EVENT.invoker().processOutput(itemStack); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/recipe/farmersdelight/ChanceResultMixin.java b/src/main/java/dm/earth/cabricality/mixin/recipe/farmersdelight/ChanceResultMixin.java deleted file mode 100644 index a51559c0..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/recipe/farmersdelight/ChanceResultMixin.java +++ /dev/null @@ -1,16 +0,0 @@ -package dm.earth.cabricality.mixin.recipe.farmersdelight; - -import dm.earth.cabricality.lib.resource.data.recipe.ProcessItemOutputCallback; -import com.nhoryzon.mc.farmersdelight.recipe.ingredient.ChanceResult; -import net.minecraft.item.ItemStack; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -@Mixin(ChanceResult.class) -public class ChanceResultMixin { - @ModifyVariable(method = "", at = @At("HEAD"), argsOnly = true) - private static ItemStack modifyOutput(ItemStack itemStack) { - return ProcessItemOutputCallback.EVENT.invoker().processOutput(itemStack); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/recipe/farmersdelight/CuttingBoardRecipeMixin.java b/src/main/java/dm/earth/cabricality/mixin/recipe/farmersdelight/CuttingBoardRecipeMixin.java deleted file mode 100644 index b6f2365e..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/recipe/farmersdelight/CuttingBoardRecipeMixin.java +++ /dev/null @@ -1,27 +0,0 @@ -package dm.earth.cabricality.mixin.recipe.farmersdelight; - -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import com.nhoryzon.mc.farmersdelight.recipe.CuttingBoardRecipe; -import com.nhoryzon.mc.farmersdelight.recipe.ingredient.ChanceResult; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.collection.DefaultedList; - -@Mixin(CuttingBoardRecipe.class) -public class CuttingBoardRecipeMixin { - @Shadow - @Final - private DefaultedList resultList; - - @Inject(method = "getResult", at = @At("HEAD"), cancellable = true) - private void getOutput(CallbackInfoReturnable cir) { - if (this.resultList.isEmpty()) - cir.setReturnValue(ItemStack.EMPTY); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/recipe/indrev/OutputEntryMixin.java b/src/main/java/dm/earth/cabricality/mixin/recipe/indrev/OutputEntryMixin.java deleted file mode 100644 index 167168b4..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/recipe/indrev/OutputEntryMixin.java +++ /dev/null @@ -1,16 +0,0 @@ -package dm.earth.cabricality.mixin.recipe.indrev; - -import dm.earth.cabricality.lib.resource.data.recipe.ProcessItemOutputCallback; -import me.steven.indrev.recipes.machines.entries.OutputEntry; -import net.minecraft.item.ItemStack; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -@Mixin(OutputEntry.class) -public class OutputEntryMixin { - @ModifyVariable(method = "", at = @At("HEAD"), argsOnly = true) - private static ItemStack modifyOutput(ItemStack itemStack) { - return ProcessItemOutputCallback.EVENT.invoker().processOutput(itemStack); - } -} diff --git a/src/main/java/dm/earth/cabricality/mixin/recipe/mantle/ItemOutputMixin.java b/src/main/java/dm/earth/cabricality/mixin/recipe/mantle/ItemOutputMixin.java deleted file mode 100644 index 14b67975..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/recipe/mantle/ItemOutputMixin.java +++ /dev/null @@ -1,18 +0,0 @@ -package dm.earth.cabricality.mixin.recipe.mantle; - -import dm.earth.cabricality.lib.resource.data.core.TaggedItemOutput; -import net.minecraft.item.Item; -import net.minecraft.registry.tag.TagKey; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import slimeknights.mantle.recipe.helper.ItemOutput; - -@Mixin(ItemOutput.class) -public class ItemOutputMixin { - @Inject(method = "fromTag", at = @At("HEAD"), cancellable = true) - private static void fromTag(TagKey tag, int count, CallbackInfoReturnable cir) { - cir.setReturnValue(new TaggedItemOutput(tag, count)); - } -} diff --git a/src/main/java/dm/earth/cabricality/tweak/RecipeTweaks.java b/src/main/java/dm/earth/cabricality/tweak/RecipeTweaks.java index b39e0700..0c8a7515 100644 --- a/src/main/java/dm/earth/cabricality/tweak/RecipeTweaks.java +++ b/src/main/java/dm/earth/cabricality/tweak/RecipeTweaks.java @@ -9,15 +9,6 @@ import dm.earth.cabricality.tweak.cutting.CuttingRecipeTweaks; import dm.earth.cabricality.tweak.ore_processing.OreProcessingTweaks; import com.google.common.collect.ImmutableList; -import com.simibubi.create.AllRecipeTypes; -import com.simibubi.create.content.equipment.sandPaper.SandPaperPolishingRecipe; -import com.simibubi.create.content.fluids.transfer.FillingRecipe; -import com.simibubi.create.content.kinetics.crusher.CrushingRecipe; -import com.simibubi.create.content.kinetics.millstone.MillingRecipe; -import com.simibubi.create.content.kinetics.mixer.CompactingRecipe; -import com.simibubi.create.content.kinetics.press.PressingRecipe; -import com.simibubi.create.content.processing.recipe.HeatCondition; -import com.simibubi.create.foundation.fluid.FluidIngredient; import io.github.fabricators_of_create.porting_lib.tags.Tags; import me.steven.indrev.blocks.machine.pipes.FluidPipeBlock; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; @@ -73,6 +64,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { MechAndSmithCraft.register(handler); // AE2 + /* { Ingredient matterBall = AE2.asIngredient("matter_ball"); handler.register(AE2.id("compacting", "matter_plastics"), @@ -84,6 +76,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setHeatRequirement(HeatCondition.SUPERHEATED))); } + */ + // Ad Astra { Arrays.stream(AD_ASTRA_MATERIALS).forEach(material -> Arrays.stream(AD_ASTRA_DECOR_TYPES).forEach( @@ -100,6 +94,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { ) )); + /* final String[] AD_ASTRA_COMPRESSED_MATERIALS = { "desh", "ostrum", "calorite" }; Arrays.stream(AD_ASTRA_COMPRESSED_MATERIALS).forEach(material -> handler.register( recipeId("pressing", "compressed_" + material), @@ -107,9 +102,12 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setIngredient(AD.asIngredient(material + "_ingot")) .setResult(AD.asProcessingOutput("compressed_" + material))) )); + + */ } // Indrev + /* { final String[] INDREV_PLATES = { "bronze", "electrum", "lead", "silver", "steel", "tin", "tungsten" }; @@ -138,7 +136,10 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { ); } + */ + // Dusts + /* handler.register( recipeId("milling", "emerald"), id -> new MillingRecipe(new FreePRP(id) @@ -176,6 +177,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .build(id, "") ); + */ + handler.register( recipeId("crafting", "stone_saw"), id -> VanillaRecipeBuilders @@ -238,6 +241,7 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { ); // Misc + /* handler.register( recipeId("pressing", "zinc_sheet"), id -> new PressingRecipe(new FreePRP(id) @@ -245,6 +249,8 @@ public void addRecipes(AddRecipesCallback.RecipeHandler handler) { .setResult(CABF.asProcessingOutput("zinc_sheet"))) ); + */ + handler.register( recipeId("crafting", "nickel_ingot_from_nugget"), id -> VanillaRecipeBuilders @@ -316,10 +322,13 @@ public void removeRecipes(RemoveRecipesCallback.RecipeHandler handler) { handler.remove(AD.id("recipes/nasa_workbench")); // AE2 + /* handler.removeIf(AllRecipeTypes.MILLING.getType(), AE2.predicateOutput(handler.getRegistryManager(), "certus_quartz_dust").and( AE2.predicateIngredient("certus_quartz_crystal").negate() )); + */ + // Indrev handler.removeIf(r -> IR.checkContains(r) diff --git a/src/main/java/dm/earth/cabricality/tweak/base/MechAndSmithCraft.java b/src/main/java/dm/earth/cabricality/tweak/base/MechAndSmithCraft.java index 127052b4..dd59b658 100644 --- a/src/main/java/dm/earth/cabricality/tweak/base/MechAndSmithCraft.java +++ b/src/main/java/dm/earth/cabricality/tweak/base/MechAndSmithCraft.java @@ -39,6 +39,7 @@ public static void register(AddRecipesCallback.RecipeHandler handler) { Ingredient.ofItems(entry.getOtherItem()), entry.getOutputStack()) ); + /* handler.register( id(entry, "mechanical_crafting"), id -> RecipeBuilderUtil.mechanicalFromShaped( @@ -51,6 +52,8 @@ public static void register(AddRecipesCallback.RecipeHandler handler) { .build(id, ""), true) ); + + */ } else handler.register( id(entry, "stonecutting"), diff --git a/src/main/java/dm/earth/cabricality/tweak/cutting/CuttingRecipeTweaks.java b/src/main/java/dm/earth/cabricality/tweak/cutting/CuttingRecipeTweaks.java index 8c759b24..6615a4db 100644 --- a/src/main/java/dm/earth/cabricality/tweak/cutting/CuttingRecipeTweaks.java +++ b/src/main/java/dm/earth/cabricality/tweak/cutting/CuttingRecipeTweaks.java @@ -2,8 +2,6 @@ import dm.earth.cabricality.Cabricality; import dm.earth.cabricality.lib.resource.data.core.FreePRP; -import com.simibubi.create.content.kinetics.saw.CuttingRecipe; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; import net.minecraft.item.ItemStack; import net.minecraft.recipe.Ingredient; import net.minecraft.registry.Registries; @@ -18,6 +16,7 @@ public class CuttingRecipeTweaks { public static void register(AddRecipesCallback.RecipeHandler handler) { Arrays.stream(WoodCuttingEntry.values()).forEach(entry -> { + /* if (entry.isLogExist() && entry.isStrippedLogExist() && entry.getLogId() != null) { handler.register(createId(entry.getLogId()), id -> createRecipe(id, entry.getLogId(), entry.getStrippedLogId(), 1, 50)); @@ -42,14 +41,20 @@ public static void register(AddRecipesCallback.RecipeHandler handler) { handler.register(createId(entry.getPlankId()), id -> createRecipe(id, entry.getPlankId(), entry.getPlankSlabId(), 2, 50)); } + + */ }); + /* handler.register(createId(TRE.id("small_oak_log")), id -> createRecipe(id, TRE.id("small_oak_log"), TRE.id("stripped_small_oak_log"), 1, 50)); handler.register(createId(TRE.id("stripped_small_oak_log")), id -> createRecipe(id, TRE.id("stripped_small_oak_log"), MC.id("oak_planks"), 6, 50)); + + */ } + /* private static CuttingRecipe createRecipe( Identifier id, Identifier inputId, Identifier outputId, int outputCount, int processingTime @@ -62,6 +67,8 @@ private static CuttingRecipe createRecipe( ); } + */ + private static Identifier createId(Identifier input) { return Cabricality .id("tweaks/wood_cutting/" + input.getNamespace() + "/" + input.getPath()); diff --git a/src/main/java/dm/earth/cabricality/tweak/ore_processing/OreProcessingTweaks.java b/src/main/java/dm/earth/cabricality/tweak/ore_processing/OreProcessingTweaks.java index 29ac46ec..e3e342b3 100644 --- a/src/main/java/dm/earth/cabricality/tweak/ore_processing/OreProcessingTweaks.java +++ b/src/main/java/dm/earth/cabricality/tweak/ore_processing/OreProcessingTweaks.java @@ -5,11 +5,6 @@ import dm.earth.cabricality.lib.resource.data.core.FreePRP; import dm.earth.cabricality.mixin.StackEntryAccessor; import dm.earth.cabricality.mixin.TagEntryAccessor; -import com.simibubi.create.content.kinetics.crusher.CrushingRecipe; -import com.simibubi.create.content.kinetics.fan.SplashingRecipe; -import com.simibubi.create.content.kinetics.millstone.MillingRecipe; -import com.simibubi.create.content.processing.recipe.ProcessingOutput; -import com.simibubi.create.content.processing.recipe.ProcessingRecipe; import me.steven.indrev.recipes.machines.PulverizerRecipe; import me.steven.indrev.recipes.machines.entries.InputEntry; import me.steven.indrev.recipes.machines.entries.OutputEntry; @@ -64,6 +59,7 @@ public static void register(AddRecipesCallback.RecipeHandler handler) { ); // Crushed -> Dust + /* handler.register( id(entry, entry.getCrushedOre(), "milling"), id -> new MillingRecipe(new FreePRP(id) @@ -84,6 +80,8 @@ public static void register(AddRecipesCallback.RecipeHandler handler) { ) ); + */ + { InputEntry[] inputs = { new InputEntry(Ingredient.ofItems(entry.getCrushedOreItem()), 1) }; OutputEntry[] outputs = { new OutputEntry(new ItemStack(entry.getDustItem(), 6), 1) }; @@ -110,6 +108,7 @@ public static void register(AddRecipesCallback.RecipeHandler handler) { new ItemStack(entry.getNuggetItem()), 0, 20 ) ); + /* handler.register( id(entry, entry.getNugget(), "splashing"), id -> new SplashingRecipe(new FreePRP(id) @@ -117,6 +116,8 @@ public static void register(AddRecipesCallback.RecipeHandler handler) { .setResult(new ProcessingOutput(new ItemStack(entry.getNuggetItem(), 2), 1))) ); + */ + // Dust -> Molten Metal handler.register( id(entry, entry.getMoltenMetal(), "melting"), @@ -128,6 +129,7 @@ public static void register(AddRecipesCallback.RecipeHandler handler) { ); // Ingot -> Dust + /* handler.register( id(entry, entry.getIngot(), "crushing"), id -> new CrushingRecipe(new FreePRP(id) @@ -135,6 +137,8 @@ public static void register(AddRecipesCallback.RecipeHandler handler) { .setResult(new ProcessingOutput(new ItemStack(entry.getDustItem()), 1)) .setProcessingTime(400)) ); + + */ } } @@ -156,12 +160,15 @@ public static void register(RemoveRecipesCallback.RecipeHandler handler) { && !CABF.checkContains(cooking) ); + /* handler.removeIf(p -> p instanceof ProcessingRecipe recipe && recipe.getIngredients().stream() .anyMatch(i -> shouldRemoveIngredient(i, entry)) && !CABF.checkContains(recipe)); + */ + Identifier dustSmelt = TC.id("smeltery", "melting", "metal", entry.getId().getPath(), "dust"); handler.remove(dustSmelt); } diff --git a/src/main/resources/cabricality.mixins.json b/src/main/resources/cabricality.mixins.json index 3539f3c9..41ac0521 100644 --- a/src/main/resources/cabricality.mixins.json +++ b/src/main/resources/cabricality.mixins.json @@ -10,17 +10,9 @@ "LavaFluidMixin", "StackEntryAccessor", "TagEntryAccessor", - "WrenchItemMixin", - "porting_lib.FluidTankMixin", - "porting_lib.ItemStackHandlerMixin", "recipe.AbstractCookingRecipeMixin", "recipe.ShapedRecipeMixin", - "recipe.ShapelessRecipeMixin", - "recipe.create.ProcessingOutputMixin", - "recipe.farmersdelight.ChanceResultMixin", - "recipe.farmersdelight.CuttingBoardRecipeMixin", - "recipe.indrev.OutputEntryMixin", - "recipe.mantle.ItemOutputMixin" + "recipe.ShapelessRecipeMixin" ], "client": [ "client.ChatScreenExpander", @@ -32,23 +24,7 @@ "client.PostScreenTriggerer", "client.ScreenAnimator", "client.SplashModifier", - "client.TitleScreenWidgets", - "client.create.TagDependentIngredientItemMixin", - "client.ftblibrary.BooleanConfigTranslator", - "client.ftblibrary.ConfigValueTranslator", - "client.ftblibrary.ListConfigTranslator", - "client.ftblibrary.TristateTranslator", - "client.ftbquests.BaseScreenAnimator", - "client.ftbquests.ChapterButtonAnimator", - "client.ftbquests.ChapterPanelAnimator", - "client.ftbquests.ClientQuestFileAnimator", - "client.ftbquests.ContextMenuAnimator", - "client.ftbquests.CreditsTrigger", - "client.ftbquests.ModPackButtonAnimator", - "client.ftbquests.QuestObjectAnimator", - "client.ftbquests.QuestPanelAnimator", - "client.ftbquests.QuestScreenAnimator", - "client.ftbquests.ViewQuestPanelAnimator" + "client.TitleScreenWidgets" ], "injectors": { "defaultRequire": 0