From 089c1c642e3d0e87a69b207ab40bc0f728eb63a2 Mon Sep 17 00:00:00 2001 From: Me <135455255+IcarussOne@users.noreply.github.com> Date: Wed, 18 Dec 2024 04:44:03 -0600 Subject: [PATCH] Remove Future MC integration Also remove Pam's HarvestCraft from build.gradle as it's not needed for our ore dictionary support. --- build.gradle | 27 ++++++---- .../drzhark/mocreatures/MoCConstants.java | 4 +- .../mocreatures/compat/CompatHandler.java | 11 ---- .../compat/crossbow/CrossbowIntegration.java | 10 ---- .../compat/crossbow/item/MoCItemCrossbow.java | 52 ------------------- .../compat/futuremc/FutureMCIntegration.java | 21 -------- 6 files changed, 18 insertions(+), 107 deletions(-) delete mode 100644 src/main/java/drzhark/mocreatures/compat/crossbow/CrossbowIntegration.java delete mode 100644 src/main/java/drzhark/mocreatures/compat/crossbow/item/MoCItemCrossbow.java delete mode 100644 src/main/java/drzhark/mocreatures/compat/futuremc/FutureMCIntegration.java diff --git a/build.gradle b/build.gradle index 351ae6a70..2630d49e7 100644 --- a/build.gradle +++ b/build.gradle @@ -102,25 +102,27 @@ dependencies { implementation 'zone.rong:mixinbooter:7.1' } - // Example of deobfuscating a dependency + // Thermal Expansion implementation rfg.deobf("curse.maven:cofh-core-69162:2920433") - implementation rfg.deobf("curse.maven:future-mc-310059:3924863") - implementation rfg.deobf("curse.maven:thaumcraft-223628:2629023") implementation rfg.deobf("curse.maven:thermal-expansion-69163:2926431") - implementation rfg.deobf("curse.maven:thermal-foundation-222880:2926428") - //implementation rfg.deobf("maven.modrinth:crossbow:1.1.0") - implementation "curse.maven:industrial-foregoing-266515:2745324" - implementation "curse.maven:morph-229080:2995522" - implementation "curse.maven:pams-harvestcraft-221857:2904825" - //runtimeOnly "com.cleanroommc:assetmover:2.5" - runtimeOnly "curse.maven:baubles-227083:2518667" runtimeOnly "curse.maven:codechicken-lib-1-8-242818:2779848" + implementation rfg.deobf("curse.maven:thermal-foundation-222880:2926428") runtimeOnly "curse.maven:cofh-world-271384:2920434" - runtimeOnly "curse.maven:ichunutil-229060:2801262" runtimeOnly "curse.maven:redstone-flux-270789:2920436" + + // Thaumcraft + Baubles + implementation rfg.deobf("curse.maven:thaumcraft-223628:2629023") + runtimeOnly "curse.maven:baubles-227083:2518667" + + // Industrial Foregoing + implementation "curse.maven:industrial-foregoing-266515:2745324" runtimeOnly "curse.maven:forgelin-continuous-456403:5946402" runtimeOnly "curse.maven:tesla-core-lib-254602:3438487" + // Morph + implementation "curse.maven:morph-229080:2995522" + runtimeOnly "curse.maven:ichunutil-229060:2801262" + // Had Enough Items + Addons runtimeOnly "curse.maven:had-enough-items-557549:5906628" implementation "curse.maven:just-enough-resources-jer-240630:4440936" @@ -130,6 +132,9 @@ dependencies { implementation "curse.maven:tinkers-construct-74072:2902483" implementation "curse.maven:constructs-armory-287683:3174535" + // Unused + //implementation rfg.deobf("maven.modrinth:crossbow:1.1.0") + //runtimeOnly "com.cleanroommc:assetmover:2.5" if (project.use_mixins.toBoolean()) { // Change your mixin refmap name here: diff --git a/src/main/java/drzhark/mocreatures/MoCConstants.java b/src/main/java/drzhark/mocreatures/MoCConstants.java index 99b9ff975..0060d2867 100644 --- a/src/main/java/drzhark/mocreatures/MoCConstants.java +++ b/src/main/java/drzhark/mocreatures/MoCConstants.java @@ -8,8 +8,8 @@ public class MoCConstants { public static final String MOD_ID = "mocreatures"; public static final String MOD_PREFIX = MOD_ID + ":"; public static final String MOD_NAME = "DrZhark's Mo'Creatures Extended"; - public static final String MOD_VERSION = "12.4.5"; + public static final String MOD_VERSION = "12.4.6"; public static final String MOD_ACCEPTED_VERSIONS = "[" + MOD_VERSION + "]"; - public static final String MOD_DEPENDENCIES = "after:crossbow;after:futuremc;after:thaumcraft;after:thermalexpansion;after:traverse"; + public static final String MOD_DEPENDENCIES = "after:thaumcraft;after:thermalexpansion;after:traverse"; public static final Integer DATAFIXER_VERSION = 1; } diff --git a/src/main/java/drzhark/mocreatures/compat/CompatHandler.java b/src/main/java/drzhark/mocreatures/compat/CompatHandler.java index 41f31863f..26d22b007 100644 --- a/src/main/java/drzhark/mocreatures/compat/CompatHandler.java +++ b/src/main/java/drzhark/mocreatures/compat/CompatHandler.java @@ -7,19 +7,14 @@ import com.buuz135.industrial.api.extractor.ExtractorEntry; import com.buuz135.industrial.api.recipe.ProteinReactorEntry; import drzhark.mocreatures.MoCConstants; -import drzhark.mocreatures.compat.crossbow.CrossbowIntegration; -import drzhark.mocreatures.compat.crossbow.item.MoCItemCrossbow; -import drzhark.mocreatures.compat.futuremc.FutureMCIntegration; import drzhark.mocreatures.compat.industrialforegoing.IndustrialForegoingIntegration; import drzhark.mocreatures.compat.jer.JERIntegration; import drzhark.mocreatures.compat.morph.MorphIntegration; import drzhark.mocreatures.compat.thaumcraft.ThaumcraftIntegration; import drzhark.mocreatures.compat.thermalexpansion.ThermalExpansionIntegration; -import drzhark.mocreatures.init.MoCItems; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.Ingredient; import net.minecraft.launchwrapper.Launch; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; @@ -86,16 +81,10 @@ public class CompatHandler { @SubscribeEvent public static void registerItems(RegistryEvent.Register event) { - // TODO: Clean-up once item registration is reworked - // jbredwards' Crossbow Backport - /*if (Loader.isModLoaded("crossbow")) event.getRegistry().registerAll( - MoCItems.setup(new MoCItemCrossbow(788, Ingredient.fromStacks(new ItemStack(MoCItems.ancientSilverIngot))), "ancient_silver_crossbow") - );*/ } @SubscribeEvent public static void registerRecipes(RegistryEvent.Register event) { - if (Loader.isModLoaded("futuremc")) FutureMCIntegration.addRecipes(); if (Loader.isModLoaded("thermalexpansion")) ThermalExpansionIntegration.addRecipes(); } diff --git a/src/main/java/drzhark/mocreatures/compat/crossbow/CrossbowIntegration.java b/src/main/java/drzhark/mocreatures/compat/crossbow/CrossbowIntegration.java deleted file mode 100644 index 5ac30fd6e..000000000 --- a/src/main/java/drzhark/mocreatures/compat/crossbow/CrossbowIntegration.java +++ /dev/null @@ -1,10 +0,0 @@ -/* - * GNU GENERAL PUBLIC LICENSE Version 3 - */ -package drzhark.mocreatures.compat.crossbow; - -// TODO -public class CrossbowIntegration { - public static void init() { - } -} diff --git a/src/main/java/drzhark/mocreatures/compat/crossbow/item/MoCItemCrossbow.java b/src/main/java/drzhark/mocreatures/compat/crossbow/item/MoCItemCrossbow.java deleted file mode 100644 index 88c66ccfe..000000000 --- a/src/main/java/drzhark/mocreatures/compat/crossbow/item/MoCItemCrossbow.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * GNU GENERAL PUBLIC LICENSE Version 3 - */ -package drzhark.mocreatures.compat.crossbow.item; - -import drzhark.mocreatures.MoCConstants; -import drzhark.mocreatures.MoCreatures; -import git.jbredwards.crossbow.api.ICrossbow; -import git.jbredwards.crossbow.mod.common.Crossbow; -import git.jbredwards.crossbow.mod.common.capability.ICrossbowProjectiles; -import git.jbredwards.crossbow.mod.common.item.ItemCrossbow; -import net.minecraft.item.ItemFirework; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.util.ResourceLocation; - -// TODO -public class MoCItemCrossbow extends ItemCrossbow implements ICrossbow { - public Ingredient repairMaterial; - - public MoCItemCrossbow(String name, int durability, Ingredient repairMaterial) { - this.setCreativeTab(MoCreatures.tabMoC); - this.setRegistryName(MoCConstants.MOD_ID, name); - this.setTranslationKey(name); - this.maxStackSize = 1; - this.setMaxDamage(durability); - this.repairMaterial = repairMaterial; - addPropertyOverride(new ResourceLocation(Crossbow.MODID, "pull"), (stack, world, entity) -> { - if (entity == null) return 0; - final ICrossbowProjectiles cap = ICrossbowProjectiles.get(stack); - return cap == null || !cap.isEmpty() ? 0 : (float) (stack.getMaxItemUseDuration() - entity.getItemInUseCount()) / getPullTime(stack); - }); - - addPropertyOverride(new ResourceLocation(Crossbow.MODID, "pulling"), (stack, world, entity) -> - entity != null && entity.isHandActive() && entity.getActiveItemStack() == stack ? 1 : 0); - - addPropertyOverride(new ResourceLocation(Crossbow.MODID, "charged"), (stack, world, entity) -> { - final ICrossbowProjectiles cap = ICrossbowProjectiles.get(stack); - return cap != null && !cap.isEmpty() ? 1 : 0; - }); - - addPropertyOverride(new ResourceLocation(Crossbow.MODID, "firework"), (stack, world, entity) -> { - final ICrossbowProjectiles cap = ICrossbowProjectiles.get(stack); - return cap != null && cap.stream().anyMatch(projectile -> projectile.getItem() instanceof ItemFirework) ? 1 : 0; - }); - } - - @Override - public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) { - return repairMaterial.test(repair) || super.getIsRepairable(toRepair, repair); - } -} diff --git a/src/main/java/drzhark/mocreatures/compat/futuremc/FutureMCIntegration.java b/src/main/java/drzhark/mocreatures/compat/futuremc/FutureMCIntegration.java deleted file mode 100644 index 2375253a4..000000000 --- a/src/main/java/drzhark/mocreatures/compat/futuremc/FutureMCIntegration.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * GNU GENERAL PUBLIC LICENSE Version 3 - */ -package drzhark.mocreatures.compat.futuremc; - -import drzhark.mocreatures.init.MoCItems; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.Ingredient; -import thedarkcolour.futuremc.recipe.campfire.CampfireRecipes; - -public class FutureMCIntegration { - - public static void addRecipes() { - // Campfire - CampfireRecipes.INSTANCE.addRecipe(Ingredient.fromStacks(new ItemStack(MoCItems.crabraw)), new ItemStack(MoCItems.crabcooked), 600); - CampfireRecipes.INSTANCE.addRecipe(Ingredient.fromStacks(new ItemStack(MoCItems.ostrichraw)), new ItemStack(MoCItems.ostrichcooked), 600); - CampfireRecipes.INSTANCE.addRecipe(Ingredient.fromStacks(new ItemStack(MoCItems.ratRaw)), new ItemStack(MoCItems.ratCooked), 600); - CampfireRecipes.INSTANCE.addRecipe(Ingredient.fromStacks(new ItemStack(MoCItems.rawTurkey)), new ItemStack(MoCItems.cookedTurkey), 600); - CampfireRecipes.INSTANCE.addRecipe(Ingredient.fromStacks(new ItemStack(MoCItems.turtleraw)), new ItemStack(MoCItems.turtlecooked), 600); - } -}