Compare commits

..

No commits in common. "e6a6314f6b8260b36f41752deb462882525f8af3" and "0d8a4e4196507bf3e148ae6976d40a60edb549ec" have entirely different histories.

13 changed files with 76 additions and 397 deletions

View file

@ -29,8 +29,11 @@ dependencies {
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:create-industry-693815:5811638" modCompileOnly "curse.maven:create-industry-693815:5811638"
modCompileOnly "curse.maven:create-deep-dark-1020173:5868515"
modCompileOnly "curse.maven:additional-additions-forge-582387:5155724" // runtimeOnly "curse.maven:better-combat-by-daedelus-639842:5625757"
// runtimeOnly "curse.maven:playeranimator-658587:4587214"
// implementation "curse.maven:additional-additions-forge-582387:5155724"
// implementation "curse.maven:create-328085:5838779"
} }
sourceSets { sourceSets {

View file

@ -1,127 +0,0 @@
package cc.toph.simplycompat.compat;
import cc.toph.simplycompat.registry.ConfigRegistry;
import cc.toph.simplycompat.util.ToolMaterials;
import dqu.additionaladditions.AdditionalAdditions;
import dqu.additionaladditions.material.GildedNetheriteToolMaterial;
import dqu.additionaladditions.material.RoseGoldToolMaterial;
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 org.jetbrains.annotations.NotNull;
public enum AdditionalAdditionsToolMaterials implements ToolMaterials<AdditionalAdditionsToolMaterials> {
/**
* See {@link RoseGoldToolMaterial}
*/
ROSE_GOLD(
2,
900,
9.0f,
2.0F,
ConfigRegistry.WEAPON_ATTRIBUTES.ROSE_GOLD,
17,
ConfigRegistry.WEAPON_ATTRIBUTES.ROSE_GOLD_ENABLED,
new ResourceLocation(AdditionalAdditions.namespace, "rose_gold_alloy")
),
/**
* See {@link GildedNetheriteToolMaterial}
*/
GILDED_NETHERITE(
4,
2031,
10.0F,
2.0F,
ConfigRegistry.WEAPON_ATTRIBUTES.ROSE_GOLD,
20,
ConfigRegistry.WEAPON_ATTRIBUTES.ROSE_GOLD_ENABLED,
Items.NETHERITE_INGOT.arch$registryName()
);
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;
AdditionalAdditionsToolMaterials(
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 AdditionalAdditionsToolMaterials[] getValues() {
return values();
}
}

View file

@ -1,6 +1,8 @@
package cc.toph.simplycompat.util; package cc.toph.simplycompat.compat;
import cc.toph.simplycompat.registry.ItemsRegistry; import cc.toph.simplycompat.registry.ItemsRegistry;
import cc.toph.simplycompat.util.ToolMaterials;
import cc.toph.simplycompat.util.WeaponType;
import dev.architectury.platform.Platform; import dev.architectury.platform.Platform;
/** /**

View file

@ -1,111 +0,0 @@
package cc.toph.simplycompat.compat;
import cc.toph.simplycompat.registry.ConfigRegistry;
import cc.toph.simplycompat.util.ToolMaterials;
import create_deep_dark.CreateDeepDarkMod;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.crafting.Ingredient;
import org.jetbrains.annotations.NotNull;
public enum CreateDeepDarkToolMaterials implements ToolMaterials<CreateDeepDarkToolMaterials> {
/**
* See {@link create_deep_dark.item.EchoSwordItem}
*/
ECHO(
4,
2124,
9.0f,
6.0f,
ConfigRegistry.WEAPON_ATTRIBUTES.ECHO,
16,
ConfigRegistry.WEAPON_ATTRIBUTES.ECHO_ENABLED,
new ResourceLocation(CreateDeepDarkMod.MODID, "echo_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;
CreateDeepDarkToolMaterials(
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 CreateDeepDarkToolMaterials[] getValues() {
return values();
}
}

View file

@ -2,12 +2,14 @@ package cc.toph.simplycompat.compat;
import cc.toph.simplycompat.registry.ConfigRegistry; import cc.toph.simplycompat.registry.ConfigRegistry;
import cc.toph.simplycompat.util.ToolMaterials; import cc.toph.simplycompat.util.ToolMaterials;
import com.simibubi.create.AllItems; import net.minecraft.util.LazyLoadedValue;
import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.item.Items;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.ItemLike;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.function.Supplier;
public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> { public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
STURDY( STURDY(
3, 3,
@ -17,8 +19,8 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
ConfigRegistry.WEAPON_ATTRIBUTES.STURDY, ConfigRegistry.WEAPON_ATTRIBUTES.STURDY,
14, 14,
ConfigRegistry.WEAPON_ATTRIBUTES.STURDY_ENABLED, ConfigRegistry.WEAPON_ATTRIBUTES.STURDY_ENABLED,
AllItems.STURDY_SHEET.getId() // () -> Ingredient.of(new ItemLike[]{(ItemLike) AllItems.STURDY_SHEET.get()})
() -> Ingredient.of(new ItemLike[]{(ItemLike) Items.STICK})
); );
private final int level; private final int level;
@ -28,7 +30,7 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
private final float damageModifier; private final float damageModifier;
private final int enchantmentValue; private final int enchantmentValue;
private final boolean enabled; private final boolean enabled;
private final ResourceLocation repairIngredient; private final LazyLoadedValue<Ingredient> repairIngredient;
CreateToolMaterials( CreateToolMaterials(
int level, int level,
@ -38,7 +40,7 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
float damageModifier, float damageModifier,
int enchantmentValue, int enchantmentValue,
boolean enabled, boolean enabled,
ResourceLocation repairIngredient Supplier<Ingredient> repairIngredient
) { ) {
this.level = level; this.level = level;
this.uses = uses; this.uses = uses;
@ -47,7 +49,7 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
this.enchantmentValue = enchantmentValue; this.enchantmentValue = enchantmentValue;
this.damageModifier = damageModifier; this.damageModifier = damageModifier;
this.enabled = enabled; this.enabled = enabled;
this.repairIngredient = repairIngredient; this.repairIngredient = new LazyLoadedValue(repairIngredient);
} }
@Override @Override
@ -55,11 +57,6 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
return this.name().toLowerCase(); return this.name().toLowerCase();
} }
@Override
public String getIdentifier() {
return repairIngredient.toString();
}
@Override @Override
public int getUses() { public int getUses() {
return uses; return uses;
@ -95,9 +92,10 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
return enabled; return enabled;
} }
@Override @Override
public @NotNull Ingredient getRepairIngredient() { public @NotNull Ingredient getRepairIngredient() {
return Ingredient.of(BuiltInRegistries.ITEM.get(repairIngredient)); return this.repairIngredient.get();
} }
@Override @Override

View file

@ -2,13 +2,15 @@ package cc.toph.simplycompat.compat;
import cc.toph.simplycompat.registry.ConfigRegistry; import cc.toph.simplycompat.registry.ConfigRegistry;
import cc.toph.simplycompat.util.ToolMaterials; import cc.toph.simplycompat.util.ToolMaterials;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.drmangotea.tfmg.registry.TFMGTiers; import com.drmangotea.tfmg.registry.TFMGTiers;
import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.util.LazyLoadedValue;
import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.ItemLike;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.function.Supplier;
public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> { public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
ALUMINUM( ALUMINUM(
TFMGTiers.ALUMINUM.getLevel(), TFMGTiers.ALUMINUM.getLevel(),
@ -18,7 +20,8 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
ConfigRegistry.WEAPON_ATTRIBUTES.ALUMINUM, ConfigRegistry.WEAPON_ATTRIBUTES.ALUMINUM,
TFMGTiers.ALUMINUM.getEnchantmentValue(), TFMGTiers.ALUMINUM.getEnchantmentValue(),
ConfigRegistry.WEAPON_ATTRIBUTES.ALUMINUM_ENABLED, ConfigRegistry.WEAPON_ATTRIBUTES.ALUMINUM_ENABLED,
TFMGItems.ALUMINUM_INGOT.getId() // () -> Ingredient.of(new ItemLike[]{(ItemLike) TFMGItems.ALUMINUM_INGOT.get()})
() -> Ingredient.of(new ItemLike[]{(ItemLike) Items.STICK})
), ),
LEAD( LEAD(
TFMGTiers.LEAD.getLevel(), TFMGTiers.LEAD.getLevel(),
@ -28,7 +31,8 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
ConfigRegistry.WEAPON_ATTRIBUTES.LEAD, ConfigRegistry.WEAPON_ATTRIBUTES.LEAD,
TFMGTiers.LEAD.getEnchantmentValue(), TFMGTiers.LEAD.getEnchantmentValue(),
ConfigRegistry.WEAPON_ATTRIBUTES.LEAD_ENABLED, ConfigRegistry.WEAPON_ATTRIBUTES.LEAD_ENABLED,
TFMGItems.LEAD_INGOT.getId() // () -> Ingredient.of(new ItemLike[]{(ItemLike) TFMGItems.LEAD_INGOT.get()})
() -> Ingredient.of(new ItemLike[]{(ItemLike) Items.STICK})
), ),
STEEL( STEEL(
TFMGTiers.STEEL.getLevel(), TFMGTiers.STEEL.getLevel(),
@ -38,7 +42,8 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
ConfigRegistry.WEAPON_ATTRIBUTES.STEEL, ConfigRegistry.WEAPON_ATTRIBUTES.STEEL,
TFMGTiers.STEEL.getEnchantmentValue(), TFMGTiers.STEEL.getEnchantmentValue(),
ConfigRegistry.WEAPON_ATTRIBUTES.STEEL_ENABLED, ConfigRegistry.WEAPON_ATTRIBUTES.STEEL_ENABLED,
TFMGItems.STEEL_INGOT.getId() // () -> Ingredient.of(new ItemLike[]{(ItemLike) TFMGItems.STEEL_INGOT.get()})
() -> Ingredient.of(new ItemLike[]{(ItemLike) Items.STICK})
); );
private final int level; private final int level;
@ -48,7 +53,7 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
private final float damageModifier; private final float damageModifier;
private final int enchantmentValue; private final int enchantmentValue;
private final boolean enabled; private final boolean enabled;
private final ResourceLocation repairIngredient; private final LazyLoadedValue<Ingredient> repairIngredient;
TFMGToolMaterials( TFMGToolMaterials(
int level, int level,
@ -58,7 +63,7 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
float damageModifier, float damageModifier,
int enchantmentValue, int enchantmentValue,
boolean enabled, boolean enabled,
ResourceLocation repairIngredient Supplier<Ingredient> repairIngredient
) { ) {
this.level = level; this.level = level;
this.uses = uses; this.uses = uses;
@ -67,7 +72,7 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
this.enchantmentValue = enchantmentValue; this.enchantmentValue = enchantmentValue;
this.damageModifier = damageModifier; this.damageModifier = damageModifier;
this.enabled = enabled; this.enabled = enabled;
this.repairIngredient = repairIngredient; this.repairIngredient = new LazyLoadedValue(repairIngredient);
} }
@ -77,11 +82,6 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
return this.name().toLowerCase(); return this.name().toLowerCase();
} }
@Override
public String getIdentifier() {
return repairIngredient.toString();
}
@Override @Override
public int getUses() { public int getUses() {
return uses; return uses;
@ -119,9 +119,10 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
@Override @Override
public @NotNull Ingredient getRepairIngredient() { public @NotNull Ingredient getRepairIngredient() {
return Ingredient.of(BuiltInRegistries.ITEM.get(repairIngredient)); return this.repairIngredient.get();
} }
@Override @Override
public TFMGToolMaterials[] getValues() { public TFMGToolMaterials[] getValues() {
return values(); return values();

View file

@ -24,7 +24,6 @@ public class ConfigProvider implements SimpleConfig.DefaultConfig {
contents += String.format(""" contents += String.format("""
# %s # %s
%s = %s %s = %s
""", comment, key, value); """, comment, key, value);
} }

View file

@ -2,12 +2,14 @@ package cc.toph.simplycompat.item;
import cc.toph.simplycompat.registry.ConfigRegistry.WEAPON_ATTRIBUTES; import cc.toph.simplycompat.registry.ConfigRegistry.WEAPON_ATTRIBUTES;
import cc.toph.simplycompat.util.ToolMaterials; import cc.toph.simplycompat.util.ToolMaterials;
import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.util.LazyLoadedValue;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Items; import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.ItemLike;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.function.Supplier;
public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolMaterials> { public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolMaterials> {
COPPER( COPPER(
1, 1,
@ -17,7 +19,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
WEAPON_ATTRIBUTES.COPPER, WEAPON_ATTRIBUTES.COPPER,
8, 8,
WEAPON_ATTRIBUTES.COPPER_ENABLED, WEAPON_ATTRIBUTES.COPPER_ENABLED,
Items.COPPER_INGOT.arch$registryName() () -> Ingredient.of(new ItemLike[]{(ItemLike) Items.COPPER_INGOT})
); );
private final int level; private final int level;
@ -27,7 +29,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
private final float damageModifier; private final float damageModifier;
private final int enchantmentValue; private final int enchantmentValue;
private final boolean enabled; private final boolean enabled;
private final ResourceLocation repairIngredient; private final LazyLoadedValue<Ingredient> repairIngredient;
SimplyCompatToolMaterials( SimplyCompatToolMaterials(
int level, int level,
@ -37,7 +39,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
float damageModifier, float damageModifier,
int enchantmentValue, int enchantmentValue,
boolean enabled, boolean enabled,
ResourceLocation repairIngredient Supplier<Ingredient> repairIngredient
) { ) {
this.level = level; this.level = level;
this.uses = uses; this.uses = uses;
@ -46,7 +48,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
this.enchantmentValue = enchantmentValue; this.enchantmentValue = enchantmentValue;
this.damageModifier = damageModifier; this.damageModifier = damageModifier;
this.enabled = enabled; this.enabled = enabled;
this.repairIngredient = repairIngredient; this.repairIngredient = new LazyLoadedValue(repairIngredient);
} }
@ -55,11 +57,6 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
return this.name().toLowerCase(); return this.name().toLowerCase();
} }
@Override
public String getIdentifier() {
return repairIngredient.toString();
}
@Override @Override
public int getUses() { public int getUses() {
return uses; return uses;
@ -97,7 +94,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
@Override @Override
public @NotNull Ingredient getRepairIngredient() { public @NotNull Ingredient getRepairIngredient() {
return Ingredient.of(BuiltInRegistries.ITEM.get(repairIngredient)); return this.repairIngredient.get();
} }
@Override @Override

View file

@ -1,14 +1,10 @@
package cc.toph.simplycompat.registry; package cc.toph.simplycompat.registry;
import cc.toph.simplycompat.compat.AdditionalAdditionsToolMaterials; import cc.toph.simplycompat.compat.CompatRecord;
import cc.toph.simplycompat.compat.CreateDeepDarkToolMaterials;
import cc.toph.simplycompat.compat.CreateToolMaterials; import cc.toph.simplycompat.compat.CreateToolMaterials;
import cc.toph.simplycompat.compat.TFMGToolMaterials; import cc.toph.simplycompat.compat.TFMGToolMaterials;
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 dqu.additionaladditions.AdditionalAdditions;
/** /**
@ -20,15 +16,6 @@ import dqu.additionaladditions.AdditionalAdditions;
public final class CompatRegistry { public final class CompatRegistry {
/**
* Compatibility setup for the Create mod.
*/
public static final CompatRecord<AdditionalAdditionsToolMaterials> ADDITIONAL_ADDITIONS = new CompatRecord<>(
AdditionalAdditions.namespace,
"6.0.1",
AdditionalAdditionsToolMaterials.class
);
/** /**
* Compatibility setup for the Create mod. * Compatibility setup for the Create mod.
*/ */
@ -47,23 +34,12 @@ 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.CREATE.register(); CompatRegistry.CREATE.register();
CompatRegistry.TFMG.register(); CompatRegistry.TFMG.register();
CompatRegistry.CREATE_DEEP_DARK.register();
} }
} }

View file

@ -6,18 +6,12 @@ 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 {
public static float ALUMINUM;
public static boolean ALUMINUM_ENABLED;
public static float COPPER; public static float COPPER;
public static boolean COPPER_ENABLED; public static boolean COPPER_ENABLED;
public static float ECHO; public static float ALUMINUM;
public static boolean ECHO_ENABLED; public static boolean ALUMINUM_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 float STURDY;
@ -40,32 +34,6 @@ public final class ConfigRegistry {
"Enable Copper Swords" "Enable Copper Swords"
); );
if (CompatRegistry.ADDITIONAL_ADDITIONS.passCheck()) {
ROSE_GOLD = common.registerProp(
"rose_gold_damageModifier",
4.0f,
"Rose Gold Damage Modifier"
);
ROSE_GOLD_ENABLED = common.registerProp(
"rose_gold_enabled",
true,
"Enable Rose Gold Swords"
);
GILDED_NETHERITE = common.registerProp(
"gilded_netherite_damageModifier",
4.0f,
"Gilded Netherite Damage Modifier"
);
GILDED_NETHERITE_ENABLED = common.registerProp(
"gilded_netherite_enabled",
true,
"Enable Gilded Netherite Swords"
);
}
if (CompatRegistry.CREATE.passCheck()) { if (CompatRegistry.CREATE.passCheck()) {
STURDY = common.registerProp( STURDY = common.registerProp(
"sturdy_damageModifier", "sturdy_damageModifier",
@ -117,20 +85,6 @@ public final class ConfigRegistry {
); );
} }
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(); common.register();
} }

View file

@ -1,5 +1,7 @@
package cc.toph.simplycompat.util; package cc.toph.simplycompat.util;
import cc.toph.simplycompat.SimplyCompat;
import com.google.gson.JsonElement;
import net.minecraft.world.item.Tier; import net.minecraft.world.item.Tier;
@ -26,7 +28,22 @@ public interface ToolMaterials<E extends Enum<E> & ToolMaterials<E>>
* *
* @return String ResourceLocation Path (mod:item) * @return String ResourceLocation Path (mod:item)
*/ */
String getIdentifier(); default String getIdentifier() {
JsonElement json = this.getRepairIngredient().toJson();
if (json.isJsonObject()) {
if (json.getAsJsonObject().has("item")) {
return json.getAsJsonObject().get("item").getAsString();
}
if (json.getAsJsonObject().has("tag")) {
return json.getAsJsonObject().get("tag").getAsString();
}
} else {
SimplyCompat.LOGGER.error("Invalid Ingredient: could not parse from json.");
}
return "minecraft:air";
}
/** /**
* Retrieves the base damage modifier associated with the tool material. * Retrieves the base damage modifier associated with the tool material.

View file

@ -78,17 +78,22 @@ dependencies {
modImplementation "curse.maven:simplyswords-659887:5639538" modImplementation "curse.maven:simplyswords-659887:5639538"
modLocalRuntime "me.shedaniel.cloth:cloth-config-forge:$rootProject.cloth_config_version" modLocalRuntime "me.shedaniel.cloth:cloth-config-forge:$rootProject.cloth_config_version"
localRuntime(include("io.github.llamalad7:mixinextras-forge:0.4.1"))
modLocalRuntime "curse.maven:better-combat-by-daedelus-639842:5625757" modLocalRuntime "curse.maven:better-combat-by-daedelus-639842:5625757"
modLocalRuntime "curse.maven:playeranimator-658587:4587214" modLocalRuntime "curse.maven:playeranimator-658587:4587214"
modLocalRuntime "curse.maven:create-industry-693815:5811638"
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:create-industry-693815:5811638" localRuntime(include("io.github.llamalad7:mixinextras-forge:0.4.1"))
modLocalRuntime "curse.maven:create-deep-dark-1020173:5868515"
modLocalRuntime "curse.maven:additional-additions-forge-582387:5155724"
modLocalRuntime "curse.maven:emi-580555:6205514"
// modLocalRuntime "dev.engine-room.flywheel:flywheel-forge-$rootProject.minecraft_version}:$rootProject.flywheel_version}"
//// modLocalRuntime "com.jozufozu.flywheel:flywheel-forge-$rootProject.minecraft_version:$rootProject.flywheel_version"
// modLocalRuntime "com.simibubi.create:create-$rootProject.minecraft_version-$rootProject.create_version:all"
// modImplementation "com.teamresourceful.resourcefulconfig:resourcefulconfig-forge-$minecraft_version:$rconfig_version"
// implementation "curse.maven:additional-additions-forge-582387:ID"
common(project(path: ':common', configuration: 'namedElements')) { transitive false } common(project(path: ':common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':common', configuration: 'transformProductionForge') shadowBundle project(path: ':common', configuration: 'transformProductionForge')

View file

@ -34,38 +34,3 @@ mandatory = true
versionRange = "[9.2.14,)" versionRange = "[9.2.14,)"
ordering = "AFTER" ordering = "AFTER"
side = "BOTH" side = "BOTH"
[[dependencies.simplycompat]]
modId = "simplyswords"
mandatory = true
versionRange = "[1.56.0-1.20.1,)"
ordering = "AFTER"
side = "BOTH"
[[dependencies.simplycompat]]
modId = "additionaladditions"
mandatory = false
versionRange = "[6.0.1,)"
ordering = "AFTER"
side = "BOTH"
[[dependencies.simplycompat]]
modId = "create"
mandatory = false
versionRange = "[0.5.1.j-55,)"
ordering = "AFTER"
side = "BOTH"
[[dependencies.simplycompat]]
modId = "tfmg"
mandatory = false
versionRange = "[0.9.3-1.20.1,)"
ordering = "AFTER"
side = "BOTH"
[[dependencies.simplycompat]]
modId = "create-deep-dark"
mandatory = false
versionRange = "[1.7.0,)"
ordering = "AFTER"
side = "BOTH"