Compare commits
No commits in common. "0df318cb6ed35ebe3a1e55ddaeeacc985330694b" and "e6a6314f6b8260b36f41752deb462882525f8af3" have entirely different histories.
0df318cb6e
...
e6a6314f6b
11 changed files with 95 additions and 389 deletions
|
@ -12,17 +12,7 @@ repositories {
|
||||||
name = 'tterrag maven'
|
name = 'tterrag maven'
|
||||||
url = 'https://maven.tterrag.com/'
|
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/" }
|
maven { url "https://maven.shedaniel.me/" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,10 +28,9 @@ dependencies {
|
||||||
modCompileOnly("com.simibubi.create:create-$rootProject.minecraft_version:$rootProject.create_version:slim") { transitive = false }
|
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.jozufozu.flywheel:flywheel-forge-$rootProject.minecraft_version:$rootProject.flywheel_version"
|
||||||
modCompileOnly "com.tterrag.registrate:Registrate:$rootProject.registrate_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-industry-693815:5811638"
|
||||||
modCompileOnly "curse.maven:create-deep-dark-1020173:5868515"
|
modCompileOnly "curse.maven:create-deep-dark-1020173:5868515"
|
||||||
modCompileOnly "maven.modrinth:purecoppertools:UhYKtKPC"
|
modCompileOnly "curse.maven:additional-additions-forge-582387:5155724"
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
|
@ -32,7 +32,7 @@ public enum AdditionalAdditionsToolMaterials implements ToolMaterials<Additional
|
||||||
4,
|
4,
|
||||||
2031,
|
2031,
|
||||||
10.0F,
|
10.0F,
|
||||||
4.5F,
|
2.0F,
|
||||||
ConfigRegistry.WEAPON_ATTRIBUTES.ROSE_GOLD,
|
ConfigRegistry.WEAPON_ATTRIBUTES.ROSE_GOLD,
|
||||||
20,
|
20,
|
||||||
ConfigRegistry.WEAPON_ATTRIBUTES.ROSE_GOLD_ENABLED,
|
ConfigRegistry.WEAPON_ATTRIBUTES.ROSE_GOLD_ENABLED,
|
||||||
|
|
|
@ -15,10 +15,10 @@ public enum CreateDeepDarkToolMaterials implements ToolMaterials<CreateDeepDarkT
|
||||||
ECHO(
|
ECHO(
|
||||||
4,
|
4,
|
||||||
2124,
|
2124,
|
||||||
10.0f,
|
9.0f,
|
||||||
6.0f,
|
6.0f,
|
||||||
ConfigRegistry.WEAPON_ATTRIBUTES.ECHO,
|
ConfigRegistry.WEAPON_ATTRIBUTES.ECHO,
|
||||||
18,
|
16,
|
||||||
ConfigRegistry.WEAPON_ATTRIBUTES.ECHO_ENABLED,
|
ConfigRegistry.WEAPON_ATTRIBUTES.ECHO_ENABLED,
|
||||||
new ResourceLocation(CreateDeepDarkMod.MODID, "echo_ingot")
|
new ResourceLocation(CreateDeepDarkMod.MODID, "echo_ingot")
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,142 +0,0 @@
|
||||||
package cc.toph.simplycompat.compat;
|
|
||||||
|
|
||||||
import cc.toph.simplycompat.registry.ConfigRegistry;
|
|
||||||
import cc.toph.simplycompat.util.ToolMaterials;
|
|
||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
|
||||||
import net.minecraft.world.item.Items;
|
|
||||||
import net.minecraft.world.item.crafting.Ingredient;
|
|
||||||
import net.purejosh.purecoppertools.PurecoppertoolsMod;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
public enum PureCopperToolMaterials implements ToolMaterials<PureCopperToolMaterials> {
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
package cc.toph.simplycompat.item;
|
|
||||||
|
|
||||||
import cc.toph.simplycompat.registry.SimplyCompatRegistries;
|
|
||||||
import cc.toph.simplycompat.util.ToolMaterials;
|
|
||||||
import cc.toph.simplycompat.util.WeaponType;
|
|
||||||
import net.sweenus.simplyswords.item.SimplySwordsSwordItem;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Extended Class from Simply Swords to store sword type.
|
|
||||||
* Storing Sword type will let us avoid all the static mess in registries.
|
|
||||||
* This class stores all the data we need from the sword, so we can just
|
|
||||||
* retrieve the object from the registries thanks to {@link SimplyCompatRegistries#SWORD_ITEM} and do whatever we need.
|
|
||||||
*/
|
|
||||||
public class SimplyCompatSwordItem extends SimplySwordsSwordItem {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the weapon.
|
|
||||||
*/
|
|
||||||
public final WeaponType TYPE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor for SimplyCompatSwordItem.
|
|
||||||
*
|
|
||||||
* @param toolMaterial The material of the tool, which some of its properties/stats.
|
|
||||||
* @param type The type of the weapon, which affects its modifiers.
|
|
||||||
* @param <E> The type of the enum that extends ToolMaterials.
|
|
||||||
*/
|
|
||||||
public <E extends Enum<E> & ToolMaterials<E>> SimplyCompatSwordItem(ToolMaterials<E> toolMaterial, WeaponType type) {
|
|
||||||
super(
|
|
||||||
toolMaterial,
|
|
||||||
(int) (toolMaterial.getDamageModifier() + type.getPositiveModifier() - type.getNegativeModifier()),
|
|
||||||
type.getAttackSpeed(),
|
|
||||||
toolMaterial.getRepairIngredient().toString()
|
|
||||||
);
|
|
||||||
|
|
||||||
this.TYPE = type;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,12 +1,14 @@
|
||||||
package cc.toph.simplycompat.registry;
|
package cc.toph.simplycompat.registry;
|
||||||
|
|
||||||
import cc.toph.simplycompat.compat.*;
|
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.util.CompatRecord;
|
import cc.toph.simplycompat.util.CompatRecord;
|
||||||
import com.drmangotea.tfmg.CreateTFMG;
|
import com.drmangotea.tfmg.CreateTFMG;
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
import create_deep_dark.CreateDeepDarkMod;
|
import create_deep_dark.CreateDeepDarkMod;
|
||||||
import dqu.additionaladditions.AdditionalAdditions;
|
import dqu.additionaladditions.AdditionalAdditions;
|
||||||
import net.purejosh.purecoppertools.PurecoppertoolsMod;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,24 +38,6 @@ public final class CompatRegistry {
|
||||||
CreateToolMaterials.class
|
CreateToolMaterials.class
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* Compatibility setup for the Create Deep Dark mod.
|
|
||||||
*/
|
|
||||||
public static final CompatRecord<CreateDeepDarkToolMaterials> CREATE_DEEP_DARK = new CompatRecord<>(
|
|
||||||
CreateDeepDarkMod.MODID,
|
|
||||||
"1.7.0",
|
|
||||||
CreateDeepDarkToolMaterials.class
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Compatibility setup for the Create Deep Dark mod.
|
|
||||||
*/
|
|
||||||
public static final CompatRecord<PureCopperToolMaterials> PURE_COPPER = new CompatRecord<>(
|
|
||||||
PurecoppertoolsMod.MODID,
|
|
||||||
"1.0.1",
|
|
||||||
PureCopperToolMaterials.class
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compatibility setup for the TFMG mod.
|
* Compatibility setup for the TFMG mod.
|
||||||
*/
|
*/
|
||||||
|
@ -63,15 +47,23 @@ public final class CompatRegistry {
|
||||||
TFMGToolMaterials.class
|
TFMGToolMaterials.class
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compatibility setup for the Create Deep Dark mod.
|
||||||
|
*/
|
||||||
|
public static final CompatRecord<CreateDeepDarkToolMaterials> CREATE_DEEP_DARK = new CompatRecord<>(
|
||||||
|
CreateDeepDarkMod.MODID,
|
||||||
|
"1.7.0",
|
||||||
|
CreateDeepDarkToolMaterials.class
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes all declared compat records.
|
* Initializes all declared compat records.
|
||||||
*/
|
*/
|
||||||
public static void registerAll() {
|
public static void registerAll() {
|
||||||
CompatRegistry.ADDITIONAL_ADDITIONS.register();
|
CompatRegistry.ADDITIONAL_ADDITIONS.register();
|
||||||
CompatRegistry.PURE_COPPER.register();
|
|
||||||
CompatRegistry.CREATE.register();
|
CompatRegistry.CREATE.register();
|
||||||
CompatRegistry.CREATE_DEEP_DARK.register();
|
|
||||||
CompatRegistry.TFMG.register();
|
CompatRegistry.TFMG.register();
|
||||||
|
CompatRegistry.CREATE_DEEP_DARK.register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,64 +6,60 @@ import cc.toph.simplycompat.config.ConfigProvider;
|
||||||
public final class ConfigRegistry {
|
public final class ConfigRegistry {
|
||||||
public static final class WEAPON_ATTRIBUTES {
|
public static final class WEAPON_ATTRIBUTES {
|
||||||
|
|
||||||
// Additional Additions //
|
|
||||||
public static float ROSE_GOLD;
|
|
||||||
public static boolean ROSE_GOLD_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 float ALUMINUM;
|
||||||
public static boolean ALUMINUM_ENABLED;
|
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 float LEAD;
|
||||||
public static boolean LEAD_ENABLED;
|
public static boolean LEAD_ENABLED;
|
||||||
|
public static float ROSE_GOLD;
|
||||||
|
public static boolean ROSE_GOLD_ENABLED;
|
||||||
public static float STEEL;
|
public static float STEEL;
|
||||||
public static boolean STEEL_ENABLED;
|
public static boolean STEEL_ENABLED;
|
||||||
|
public static float STURDY;
|
||||||
|
public static boolean STURDY_ENABLED;
|
||||||
|
|
||||||
public static final ConfigProvider PROVIDER = new ConfigProvider("weapon_attributes");
|
public static final ConfigProvider PROVIDER = new ConfigProvider("weapon_attributes");
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
Config config = new Config(PROVIDER);
|
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"
|
||||||
|
);
|
||||||
|
|
||||||
if (CompatRegistry.ADDITIONAL_ADDITIONS.passCheck()) {
|
if (CompatRegistry.ADDITIONAL_ADDITIONS.passCheck()) {
|
||||||
ROSE_GOLD = config.registerProp(
|
ROSE_GOLD = common.registerProp(
|
||||||
"rose_gold_damageModifier",
|
"rose_gold_damageModifier",
|
||||||
3.0f,
|
4.0f,
|
||||||
"Rose Gold Damage Modifier"
|
"Rose Gold Damage Modifier"
|
||||||
);
|
);
|
||||||
|
|
||||||
ROSE_GOLD_ENABLED = config.registerProp(
|
ROSE_GOLD_ENABLED = common.registerProp(
|
||||||
"rose_gold_enabled",
|
"rose_gold_enabled",
|
||||||
true,
|
true,
|
||||||
"Enable Rose Gold Swords"
|
"Enable Rose Gold Swords"
|
||||||
);
|
);
|
||||||
|
|
||||||
GILDED_NETHERITE = config.registerProp(
|
GILDED_NETHERITE = common.registerProp(
|
||||||
"gilded_netherite_damageModifier",
|
"gilded_netherite_damageModifier",
|
||||||
4.0f,
|
4.0f,
|
||||||
"Gilded Netherite Damage Modifier"
|
"Gilded Netherite Damage Modifier"
|
||||||
);
|
);
|
||||||
|
|
||||||
GILDED_NETHERITE_ENABLED = config.registerProp(
|
GILDED_NETHERITE_ENABLED = common.registerProp(
|
||||||
"gilded_netherite_enabled",
|
"gilded_netherite_enabled",
|
||||||
true,
|
true,
|
||||||
"Enable Gilded Netherite Swords"
|
"Enable Gilded Netherite Swords"
|
||||||
|
@ -71,122 +67,72 @@ public final class ConfigRegistry {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CompatRegistry.CREATE.passCheck()) {
|
if (CompatRegistry.CREATE.passCheck()) {
|
||||||
STURDY = config.registerProp(
|
STURDY = common.registerProp(
|
||||||
"sturdy_damageModifier",
|
"sturdy_damageModifier",
|
||||||
3.5f,
|
4.0f,
|
||||||
"Sturdy Damage Modifier"
|
"Sturdy Damage Modifier"
|
||||||
);
|
);
|
||||||
|
|
||||||
STURDY_ENABLED = config.registerProp(
|
STURDY_ENABLED = common.registerProp(
|
||||||
"sturdy_enabled",
|
"sturdy_enabled",
|
||||||
true,
|
true,
|
||||||
"Enable Sturdy Swords"
|
"Enable Sturdy Swords"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CompatRegistry.CREATE_DEEP_DARK.passCheck()) {
|
|
||||||
|
|
||||||
ECHO = config.registerProp(
|
|
||||||
"echo_damageModifier",
|
|
||||||
5.0f,
|
|
||||||
"Steel Echo Modifier"
|
|
||||||
);
|
|
||||||
|
|
||||||
ECHO_ENABLED = config.registerProp(
|
|
||||||
"echo_enabled",
|
|
||||||
true,
|
|
||||||
"Enable Echo Swords"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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()) {
|
if (CompatRegistry.TFMG.passCheck()) {
|
||||||
ALUMINUM = config.registerProp(
|
ALUMINUM = common.registerProp(
|
||||||
"aluminum_damageModifier",
|
"aluminum_damageModifier",
|
||||||
2.5f,
|
3.0f,
|
||||||
"Aluminum Damage Modifier"
|
"Aluminum Damage Modifier"
|
||||||
);
|
);
|
||||||
|
|
||||||
ALUMINUM_ENABLED = config.registerProp(
|
ALUMINUM_ENABLED = common.registerProp(
|
||||||
"aluminum_enabled",
|
"aluminum_enabled",
|
||||||
true,
|
true,
|
||||||
"Enable Aluminum Swords"
|
"Enable Aluminum Swords"
|
||||||
);
|
);
|
||||||
|
|
||||||
LEAD = config.registerProp(
|
LEAD = common.registerProp(
|
||||||
"lead_damageModifier",
|
"lead_damageModifier",
|
||||||
-0.5f,
|
2.0f,
|
||||||
"Lead Damage Modifier"
|
"Lead Damage Modifier"
|
||||||
);
|
);
|
||||||
|
|
||||||
LEAD_ENABLED = config.registerProp(
|
LEAD_ENABLED = common.registerProp(
|
||||||
"lead_enabled",
|
"lead_enabled",
|
||||||
true,
|
true,
|
||||||
"Enable Lead Swords"
|
"Enable Lead Swords"
|
||||||
);
|
);
|
||||||
STEEL = config.registerProp(
|
STEEL = common.registerProp(
|
||||||
"steel_damageModifier",
|
"steel_damageModifier",
|
||||||
3.5f,
|
5.0f,
|
||||||
"Steel Damage Modifier"
|
"Steel Damage Modifier"
|
||||||
);
|
);
|
||||||
|
|
||||||
STEEL_ENABLED = config.registerProp(
|
STEEL_ENABLED = common.registerProp(
|
||||||
"steel_enabled",
|
"steel_enabled",
|
||||||
true,
|
true,
|
||||||
"Enable Steel Swords"
|
"Enable Steel Swords"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
config.register();
|
if (CompatRegistry.CREATE_DEEP_DARK.passCheck()) {
|
||||||
|
|
||||||
|
ECHO = common.registerProp(
|
||||||
|
"echo_damageModifier",
|
||||||
|
6.0f,
|
||||||
|
"Steel Echo Modifier"
|
||||||
|
);
|
||||||
|
|
||||||
|
ECHO_ENABLED = common.registerProp(
|
||||||
|
"echo_enabled",
|
||||||
|
true,
|
||||||
|
"Enable Echo Swords"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
common.register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,31 @@
|
||||||
package cc.toph.simplycompat.registry;
|
package cc.toph.simplycompat.registry;
|
||||||
|
|
||||||
import cc.toph.simplycompat.SimplyCompat;
|
import cc.toph.simplycompat.SimplyCompat;
|
||||||
import cc.toph.simplycompat.item.SimplyCompatSwordItem;
|
|
||||||
import cc.toph.simplycompat.item.SimplyCompatToolMaterials;
|
import cc.toph.simplycompat.item.SimplyCompatToolMaterials;
|
||||||
import cc.toph.simplycompat.util.ToolMaterials;
|
import cc.toph.simplycompat.util.ToolMaterials;
|
||||||
import cc.toph.simplycompat.util.WeaponType;
|
import cc.toph.simplycompat.util.WeaponType;
|
||||||
import dev.architectury.registry.registries.DeferredRegister;
|
import dev.architectury.registry.registries.DeferredRegister;
|
||||||
|
import net.minecraft.core.registries.Registries;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.sweenus.simplyswords.item.SimplySwordsSwordItem;
|
||||||
|
|
||||||
public final class ItemsRegistry {
|
public final class ItemsRegistry {
|
||||||
|
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(
|
||||||
/**
|
|
||||||
* Special register for swords only.
|
|
||||||
*/
|
|
||||||
public static final DeferredRegister<SimplyCompatSwordItem> SWORDS = DeferredRegister.create(
|
|
||||||
SimplyCompat.MOD_ID,
|
SimplyCompat.MOD_ID,
|
||||||
SimplyCompatRegistries.SWORD_ITEM
|
Registries.ITEM
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a sword item with the given material and weapon type.
|
|
||||||
*
|
|
||||||
* @param material The material of the tool, which some of its properties/stats.
|
|
||||||
* @param type The type of the weapon, which affects its modifiers.
|
|
||||||
* @param <E> The type of the enum that extends ToolMaterials.
|
|
||||||
*/
|
|
||||||
public static <E extends Enum<E> & ToolMaterials<E>> void registerSword(
|
public static <E extends Enum<E> & ToolMaterials<E>> void registerSword(
|
||||||
ToolMaterials<E> material,
|
ToolMaterials<E> material,
|
||||||
WeaponType type
|
WeaponType type
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
float finalDamage = material.getDamageModifier() + type.getPositiveModifier() - type.getNegativeModifier();
|
||||||
String name = material.getName() + "_" + type.getWeaponNameSuffix();
|
String name = material.getName() + "_" + type.getWeaponNameSuffix();
|
||||||
SWORDS.register(name, () ->
|
|
||||||
new SimplyCompatSwordItem(material, type));
|
ITEMS.register(name, () ->
|
||||||
|
new SimplySwordsSwordItem(material, (int) finalDamage, type.getAttackSpeed(), material.getIdentifier())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,6 +46,6 @@ public final class ItemsRegistry {
|
||||||
}
|
}
|
||||||
|
|
||||||
CompatRegistry.registerAll();
|
CompatRegistry.registerAll();
|
||||||
SWORDS.register();
|
ITEMS.register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
package cc.toph.simplycompat.registry;
|
|
||||||
|
|
||||||
import cc.toph.simplycompat.SimplyCompat;
|
|
||||||
import cc.toph.simplycompat.item.SimplyCompatSwordItem;
|
|
||||||
import net.minecraft.core.Registry;
|
|
||||||
import net.minecraft.core.registries.Registries;
|
|
||||||
import net.minecraft.resources.ResourceKey;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
|
||||||
|
|
||||||
public class SimplyCompatRegistries extends Registries {
|
|
||||||
|
|
||||||
// Defines a Key for Sword Items, enabling the usage of Sword Specific Registries
|
|
||||||
// In essence allows the usage of the SimplyCompatSwordItem so we can access modded sword data
|
|
||||||
public static final ResourceKey<Registry<SimplyCompatSwordItem>> SWORD_ITEM = ResourceKey.createRegistryKey(new ResourceLocation(SimplyCompat.MOD_ID, "sword_item"));
|
|
||||||
|
|
||||||
}
|
|
|
@ -68,17 +68,6 @@ repositories {
|
||||||
name = 'tterrag maven'
|
name = 'tterrag maven'
|
||||||
url = 'https://maven.tterrag.com/'
|
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/" }
|
maven { url "https://maven.shedaniel.me/" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,11 +84,9 @@ dependencies {
|
||||||
modLocalRuntime("com.simibubi.create:create-$rootProject.minecraft_version:$rootProject.create_version:slim") { transitive = false }
|
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.jozufozu.flywheel:flywheel-forge-$rootProject.minecraft_version:$rootProject.flywheel_version"
|
||||||
modLocalRuntime "com.tterrag.registrate:Registrate:$rootProject.registrate_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-industry-693815:5811638"
|
||||||
modLocalRuntime "curse.maven:create-deep-dark-1020173:5868515"
|
modLocalRuntime "curse.maven:create-deep-dark-1020173:5868515"
|
||||||
modLocalRuntime "maven.modrinth:purecoppertools:UhYKtKPC"
|
modLocalRuntime "curse.maven:additional-additions-forge-582387:5155724"
|
||||||
|
|
||||||
|
|
||||||
modLocalRuntime "curse.maven:emi-580555:6205514"
|
modLocalRuntime "curse.maven:emi-580555:6205514"
|
||||||
|
|
||||||
|
|
|
@ -49,13 +49,6 @@ versionRange = "[6.0.1,)"
|
||||||
ordering = "AFTER"
|
ordering = "AFTER"
|
||||||
side = "BOTH"
|
side = "BOTH"
|
||||||
|
|
||||||
[[dependencies.simplycompat]]
|
|
||||||
modId = "purecoppertools"
|
|
||||||
mandatory = false
|
|
||||||
versionRange = "[1.0.1,)"
|
|
||||||
ordering = "AFTER"
|
|
||||||
side = "BOTH"
|
|
||||||
|
|
||||||
[[dependencies.simplycompat]]
|
[[dependencies.simplycompat]]
|
||||||
modId = "create"
|
modId = "create"
|
||||||
mandatory = false
|
mandatory = false
|
||||||
|
@ -63,16 +56,16 @@ versionRange = "[0.5.1.j-55,)"
|
||||||
ordering = "AFTER"
|
ordering = "AFTER"
|
||||||
side = "BOTH"
|
side = "BOTH"
|
||||||
|
|
||||||
[[dependencies.simplycompat]]
|
|
||||||
modId = "create-deep-dark"
|
|
||||||
mandatory = false
|
|
||||||
versionRange = "[1.7.0,)"
|
|
||||||
ordering = "AFTER"
|
|
||||||
side = "BOTH"
|
|
||||||
|
|
||||||
[[dependencies.simplycompat]]
|
[[dependencies.simplycompat]]
|
||||||
modId = "tfmg"
|
modId = "tfmg"
|
||||||
mandatory = false
|
mandatory = false
|
||||||
versionRange = "[0.9.3-1.20.1,)"
|
versionRange = "[0.9.3-1.20.1,)"
|
||||||
ordering = "AFTER"
|
ordering = "AFTER"
|
||||||
side = "BOTH"
|
side = "BOTH"
|
||||||
|
|
||||||
|
[[dependencies.simplycompat]]
|
||||||
|
modId = "create-deep-dark"
|
||||||
|
mandatory = false
|
||||||
|
versionRange = "[1.7.0,)"
|
||||||
|
ordering = "AFTER"
|
||||||
|
side = "BOTH"
|
||||||
|
|
Loading…
Add table
Reference in a new issue