diff --git a/common/build.gradle b/common/build.gradle index 231c8d4..e366599 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -12,7 +12,17 @@ repositories { name = 'tterrag maven' url = 'https://maven.tterrag.com/' } - + exclusiveContent { + forRepository { + maven { + name = "Modrinth" + url = "https://api.modrinth.com/maven" + } + } + filter { + includeGroup "maven.modrinth" + } + } maven { url "https://maven.shedaniel.me/" } } @@ -28,9 +38,10 @@ dependencies { modCompileOnly("com.simibubi.create:create-$rootProject.minecraft_version:$rootProject.create_version:slim") { transitive = false } modCompileOnly "com.jozufozu.flywheel:flywheel-forge-$rootProject.minecraft_version:$rootProject.flywheel_version" modCompileOnly "com.tterrag.registrate:Registrate:$rootProject.registrate_version" + modCompileOnly "curse.maven:additional-additions-forge-582387:5155724" modCompileOnly "curse.maven:create-industry-693815:5811638" modCompileOnly "curse.maven:create-deep-dark-1020173:5868515" - modCompileOnly "curse.maven:additional-additions-forge-582387:5155724" + modCompileOnly "maven.modrinth:purecoppertools:UhYKtKPC" } sourceSets { diff --git a/common/src/main/java/cc/toph/simplycompat/compat/AdditionalAdditionsToolMaterials.java b/common/src/main/java/cc/toph/simplycompat/compat/AdditionalAdditionsToolMaterials.java index 32c4a83..ec83920 100644 --- a/common/src/main/java/cc/toph/simplycompat/compat/AdditionalAdditionsToolMaterials.java +++ b/common/src/main/java/cc/toph/simplycompat/compat/AdditionalAdditionsToolMaterials.java @@ -32,7 +32,7 @@ public enum AdditionalAdditionsToolMaterials implements ToolMaterials { + COPPER( + 0, + 184, + 3.0F, + 1.5f, + ConfigRegistry.WEAPON_ATTRIBUTES.COPPER, + 22, + ConfigRegistry.WEAPON_ATTRIBUTES.COPPER_ENABLED, + Items.COPPER_INGOT.arch$registryName() + + ), + EXPOSED_COPPER( + 0, + 218, + 3.0f, + 2.0f, + ConfigRegistry.WEAPON_ATTRIBUTES.EXPOSED_COPPER, + 18, + ConfigRegistry.WEAPON_ATTRIBUTES.EXPOSED_COPPER_ENABLED, + new ResourceLocation(PurecoppertoolsMod.MODID, "exposed_copper_ingot") + + ), + WEATHERED_COPPER( + 0, + 258, + 3.5f, + 2.5f, + ConfigRegistry.WEAPON_ATTRIBUTES.WEATHERED_COPPER, + 14, + ConfigRegistry.WEAPON_ATTRIBUTES.WEATHERED_COPPER_ENABLED, + new ResourceLocation(PurecoppertoolsMod.MODID, "weathered_copper_ingot") + + ), + OXIDIZED_COPPER( + 0, + 304, + 4.0f, + 3.0f, + ConfigRegistry.WEAPON_ATTRIBUTES.OXIDIZED_COPPER, + 10, + ConfigRegistry.WEAPON_ATTRIBUTES.OXIDIZED_COPPER_ENABLED, + new ResourceLocation(PurecoppertoolsMod.MODID, "oxidized_copper_ingot") + ); + + private final int level; + private final int uses; + private final float speed; + private final float attackDamageBonus; + private final float damageModifier; + private final int enchantmentValue; + private final boolean enabled; + private final ResourceLocation repairIngredient; + + PureCopperToolMaterials( + int level, + int uses, + float speed, + float attackDamageBonus, + float damageModifier, + int enchantmentValue, + boolean enabled, + ResourceLocation repairIngredient + ) { + this.level = level; + this.uses = uses; + this.speed = speed; + this.attackDamageBonus = attackDamageBonus; + this.enchantmentValue = enchantmentValue; + this.damageModifier = damageModifier; + this.enabled = enabled; + this.repairIngredient = repairIngredient; + } + + @Override + public String getName() { + return this.name().toLowerCase(); + } + + @Override + public String getIdentifier() { + return repairIngredient.toString(); + } + + @Override + public int getUses() { + return uses; + } + + @Override + public float getSpeed() { + return speed; + } + + @Override + public float getAttackDamageBonus() { + return attackDamageBonus; + } + + @Override + public float getDamageModifier() { + return damageModifier; + } + + @Override + public int getLevel() { + return level; + } + + @Override + public int getEnchantmentValue() { + return enchantmentValue; + } + + @Override + public boolean isEnabled() { + return enabled; + } + + @Override + public @NotNull Ingredient getRepairIngredient() { + return Ingredient.of(BuiltInRegistries.ITEM.get(repairIngredient)); + } + + @Override + public PureCopperToolMaterials[] getValues() { + return values(); + } + + +} \ No newline at end of file diff --git a/common/src/main/java/cc/toph/simplycompat/registry/CompatRegistry.java b/common/src/main/java/cc/toph/simplycompat/registry/CompatRegistry.java index d9cc943..406e38b 100644 --- a/common/src/main/java/cc/toph/simplycompat/registry/CompatRegistry.java +++ b/common/src/main/java/cc/toph/simplycompat/registry/CompatRegistry.java @@ -1,14 +1,12 @@ package cc.toph.simplycompat.registry; -import cc.toph.simplycompat.compat.AdditionalAdditionsToolMaterials; -import cc.toph.simplycompat.compat.CreateDeepDarkToolMaterials; -import cc.toph.simplycompat.compat.CreateToolMaterials; -import cc.toph.simplycompat.compat.TFMGToolMaterials; +import cc.toph.simplycompat.compat.*; import cc.toph.simplycompat.util.CompatRecord; import com.drmangotea.tfmg.CreateTFMG; import com.simibubi.create.Create; import create_deep_dark.CreateDeepDarkMod; import dqu.additionaladditions.AdditionalAdditions; +import net.purejosh.purecoppertools.PurecoppertoolsMod; /** @@ -38,15 +36,6 @@ public final class CompatRegistry { CreateToolMaterials.class ); - /** - * Compatibility setup for the TFMG mod. - */ - public static final CompatRecord TFMG = new CompatRecord<>( - CreateTFMG.MOD_ID, - "0.9.3-1.20.1", - TFMGToolMaterials.class - ); - /** * Compatibility setup for the Create Deep Dark mod. */ @@ -56,14 +45,33 @@ public final class CompatRegistry { CreateDeepDarkToolMaterials.class ); + /** + * Compatibility setup for the Create Deep Dark mod. + */ + public static final CompatRecord PURE_COPPER = new CompatRecord<>( + PurecoppertoolsMod.MODID, + "1.0.1", + PureCopperToolMaterials.class + ); + + /** + * Compatibility setup for the TFMG mod. + */ + public static final CompatRecord TFMG = new CompatRecord<>( + CreateTFMG.MOD_ID, + "0.9.3-1.20.1", + TFMGToolMaterials.class + ); + /** * Initializes all declared compat records. */ public static void registerAll() { CompatRegistry.ADDITIONAL_ADDITIONS.register(); + CompatRegistry.PURE_COPPER.register(); CompatRegistry.CREATE.register(); - CompatRegistry.TFMG.register(); CompatRegistry.CREATE_DEEP_DARK.register(); + CompatRegistry.TFMG.register(); } } diff --git a/common/src/main/java/cc/toph/simplycompat/registry/ConfigRegistry.java b/common/src/main/java/cc/toph/simplycompat/registry/ConfigRegistry.java index ab74594..d8da8af 100644 --- a/common/src/main/java/cc/toph/simplycompat/registry/ConfigRegistry.java +++ b/common/src/main/java/cc/toph/simplycompat/registry/ConfigRegistry.java @@ -6,60 +6,64 @@ import cc.toph.simplycompat.config.ConfigProvider; public final class ConfigRegistry { public static final class WEAPON_ATTRIBUTES { - public static float ALUMINUM; - public static boolean ALUMINUM_ENABLED; - public static float COPPER; - public static boolean COPPER_ENABLED; - public static float ECHO; - public static boolean ECHO_ENABLED; - public static float GILDED_NETHERITE; - public static boolean GILDED_NETHERITE_ENABLED; - public static float LEAD; - public static boolean LEAD_ENABLED; + // Additional Additions // public static float ROSE_GOLD; public static boolean ROSE_GOLD_ENABLED; - public static float STEEL; - public static boolean STEEL_ENABLED; + public static float GILDED_NETHERITE; + public static boolean GILDED_NETHERITE_ENABLED; + + // Create // public static float STURDY; public static boolean STURDY_ENABLED; + // Create: Deep Dark// + public static float ECHO; + public static boolean ECHO_ENABLED; + + // Pure Cooper Tools // + public static float COPPER; + public static boolean COPPER_ENABLED; + public static float EXPOSED_COPPER; + public static boolean EXPOSED_COPPER_ENABLED; + public static float WEATHERED_COPPER; + public static boolean WEATHERED_COPPER_ENABLED; + public static float OXIDIZED_COPPER; + public static boolean OXIDIZED_COPPER_ENABLED; + + // TFMG // + public static float ALUMINUM; + public static boolean ALUMINUM_ENABLED; + public static float LEAD; + public static boolean LEAD_ENABLED; + public static float STEEL; + public static boolean STEEL_ENABLED; + + public static final ConfigProvider PROVIDER = new ConfigProvider("weapon_attributes"); public static void register() { - Config common = new Config(PROVIDER); - - COPPER = common.registerProp( - "copper_damageModifier", - 3.0f, - "Copper Damage Modifier" - ); - - COPPER_ENABLED = common.registerProp( - "copper_enabled", - true, - "Enable Copper Swords" - ); + Config config = new Config(PROVIDER); if (CompatRegistry.ADDITIONAL_ADDITIONS.passCheck()) { - ROSE_GOLD = common.registerProp( + ROSE_GOLD = config.registerProp( "rose_gold_damageModifier", - 4.0f, + 3.0f, "Rose Gold Damage Modifier" ); - ROSE_GOLD_ENABLED = common.registerProp( + ROSE_GOLD_ENABLED = config.registerProp( "rose_gold_enabled", true, "Enable Rose Gold Swords" ); - GILDED_NETHERITE = common.registerProp( + GILDED_NETHERITE = config.registerProp( "gilded_netherite_damageModifier", 4.0f, "Gilded Netherite Damage Modifier" ); - GILDED_NETHERITE_ENABLED = common.registerProp( + GILDED_NETHERITE_ENABLED = config.registerProp( "gilded_netherite_enabled", true, "Enable Gilded Netherite Swords" @@ -67,72 +71,122 @@ public final class ConfigRegistry { } if (CompatRegistry.CREATE.passCheck()) { - STURDY = common.registerProp( + STURDY = config.registerProp( "sturdy_damageModifier", - 4.0f, + 3.5f, "Sturdy Damage Modifier" ); - STURDY_ENABLED = common.registerProp( + STURDY_ENABLED = config.registerProp( "sturdy_enabled", true, "Enable Sturdy Swords" ); } - if (CompatRegistry.TFMG.passCheck()) { - ALUMINUM = common.registerProp( - "aluminum_damageModifier", - 3.0f, - "Aluminum Damage Modifier" - ); - - ALUMINUM_ENABLED = common.registerProp( - "aluminum_enabled", - true, - "Enable Aluminum Swords" - ); - - LEAD = common.registerProp( - "lead_damageModifier", - 2.0f, - "Lead Damage Modifier" - ); - - LEAD_ENABLED = common.registerProp( - "lead_enabled", - true, - "Enable Lead Swords" - ); - STEEL = common.registerProp( - "steel_damageModifier", - 5.0f, - "Steel Damage Modifier" - ); - - STEEL_ENABLED = common.registerProp( - "steel_enabled", - true, - "Enable Steel Swords" - ); - } - if (CompatRegistry.CREATE_DEEP_DARK.passCheck()) { - ECHO = common.registerProp( + ECHO = config.registerProp( "echo_damageModifier", - 6.0f, + 5.0f, "Steel Echo Modifier" ); - ECHO_ENABLED = common.registerProp( + ECHO_ENABLED = config.registerProp( "echo_enabled", true, "Enable Echo Swords" ); } - common.register(); + COPPER = config.registerProp( + "copper_damageModifier", + 3.0f, + "Copper Damage Modifier" + ); + + COPPER_ENABLED = config.registerProp( + "copper_enabled", + true, + "Enable Copper Swords" + ); + + if (CompatRegistry.PURE_COPPER.passCheck()) { + EXPOSED_COPPER = config.registerProp( + "exposed_copper_damageModifier", + 3.0f, + "Copper Damage Modifier" + ); + + EXPOSED_COPPER_ENABLED = config.registerProp( + "exposed_copper_enabled", + true, + "Enable Exposed Copper Swords" + ); + + WEATHERED_COPPER = config.registerProp( + "weathered_copper_damageModifier", + 3.0f, + "Copper Weathered Copper Modifier" + ); + + WEATHERED_COPPER_ENABLED = config.registerProp( + "exposed_copper_enabled", + true, + "Enable Exposed Copper Swords" + ); + + OXIDIZED_COPPER = config.registerProp( + "oxidized_copper_damageModifier", + 3.5f, + "Copper Weathered Copper Modifier" + ); + + OXIDIZED_COPPER_ENABLED = config.registerProp( + "oxidized_copper_enabled", + true, + "Enable Oxidized Copper Swords" + ); + } + + if (CompatRegistry.TFMG.passCheck()) { + ALUMINUM = config.registerProp( + "aluminum_damageModifier", + 2.5f, + "Aluminum Damage Modifier" + ); + + ALUMINUM_ENABLED = config.registerProp( + "aluminum_enabled", + true, + "Enable Aluminum Swords" + ); + + LEAD = config.registerProp( + "lead_damageModifier", + -0.5f, + "Lead Damage Modifier" + ); + + LEAD_ENABLED = config.registerProp( + "lead_enabled", + true, + "Enable Lead Swords" + ); + STEEL = config.registerProp( + "steel_damageModifier", + 3.5f, + "Steel Damage Modifier" + ); + + STEEL_ENABLED = config.registerProp( + "steel_enabled", + true, + "Enable Steel Swords" + ); + } + + config.register(); } } diff --git a/forge/build.gradle b/forge/build.gradle index d3d0815..333df17 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -68,6 +68,17 @@ repositories { name = 'tterrag maven' url = 'https://maven.tterrag.com/' } + exclusiveContent { + forRepository { + maven { + name = "Modrinth" + url = "https://api.modrinth.com/maven" + } + } + filter { + includeGroup "maven.modrinth" + } + } maven { url "https://maven.shedaniel.me/" } } @@ -84,9 +95,11 @@ dependencies { modLocalRuntime("com.simibubi.create:create-$rootProject.minecraft_version:$rootProject.create_version:slim") { transitive = false } modLocalRuntime "com.jozufozu.flywheel:flywheel-forge-$rootProject.minecraft_version:$rootProject.flywheel_version" modLocalRuntime "com.tterrag.registrate:Registrate:$rootProject.registrate_version" + modLocalRuntime "curse.maven:additional-additions-forge-582387:5155724" modLocalRuntime "curse.maven:create-industry-693815:5811638" modLocalRuntime "curse.maven:create-deep-dark-1020173:5868515" - modLocalRuntime "curse.maven:additional-additions-forge-582387:5155724" + modLocalRuntime "maven.modrinth:purecoppertools:UhYKtKPC" + modLocalRuntime "curse.maven:emi-580555:6205514" diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index db3182b..3b525ae 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -50,16 +50,16 @@ ordering = "AFTER" side = "BOTH" [[dependencies.simplycompat]] -modId = "create" +modId = "purecoppertools" mandatory = false -versionRange = "[0.5.1.j-55,)" +versionRange = "[1.0.1,)" ordering = "AFTER" side = "BOTH" [[dependencies.simplycompat]] -modId = "tfmg" +modId = "create" mandatory = false -versionRange = "[0.9.3-1.20.1,)" +versionRange = "[0.5.1.j-55,)" ordering = "AFTER" side = "BOTH" @@ -69,3 +69,10 @@ mandatory = false versionRange = "[1.7.0,)" ordering = "AFTER" side = "BOTH" + +[[dependencies.simplycompat]] +modId = "tfmg" +mandatory = false +versionRange = "[0.9.3-1.20.1,)" +ordering = "AFTER" +side = "BOTH"