Compare commits
3 commits
0d8a4e4196
...
e6a6314f6b
Author | SHA1 | Date | |
---|---|---|---|
e6a6314f6b | |||
0e0d70a2e6 | |||
3978aa15a3 |
13 changed files with 397 additions and 76 deletions
|
@ -29,11 +29,8 @@ dependencies {
|
|||
modCompileOnly "com.jozufozu.flywheel:flywheel-forge-$rootProject.minecraft_version:$rootProject.flywheel_version"
|
||||
modCompileOnly "com.tterrag.registrate:Registrate:$rootProject.registrate_version"
|
||||
modCompileOnly "curse.maven:create-industry-693815:5811638"
|
||||
|
||||
// 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"
|
||||
modCompileOnly "curse.maven:create-deep-dark-1020173:5868515"
|
||||
modCompileOnly "curse.maven:additional-additions-forge-582387:5155724"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
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();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
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();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -2,14 +2,12 @@ package cc.toph.simplycompat.compat;
|
|||
|
||||
import cc.toph.simplycompat.registry.ConfigRegistry;
|
||||
import cc.toph.simplycompat.util.ToolMaterials;
|
||||
import net.minecraft.util.LazyLoadedValue;
|
||||
import net.minecraft.world.item.Items;
|
||||
import com.simibubi.create.AllItems;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
|
||||
STURDY(
|
||||
3,
|
||||
|
@ -19,8 +17,8 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
|
|||
ConfigRegistry.WEAPON_ATTRIBUTES.STURDY,
|
||||
14,
|
||||
ConfigRegistry.WEAPON_ATTRIBUTES.STURDY_ENABLED,
|
||||
// () -> Ingredient.of(new ItemLike[]{(ItemLike) AllItems.STURDY_SHEET.get()})
|
||||
() -> Ingredient.of(new ItemLike[]{(ItemLike) Items.STICK})
|
||||
AllItems.STURDY_SHEET.getId()
|
||||
|
||||
);
|
||||
|
||||
private final int level;
|
||||
|
@ -30,7 +28,7 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
|
|||
private final float damageModifier;
|
||||
private final int enchantmentValue;
|
||||
private final boolean enabled;
|
||||
private final LazyLoadedValue<Ingredient> repairIngredient;
|
||||
private final ResourceLocation repairIngredient;
|
||||
|
||||
CreateToolMaterials(
|
||||
int level,
|
||||
|
@ -40,7 +38,7 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
|
|||
float damageModifier,
|
||||
int enchantmentValue,
|
||||
boolean enabled,
|
||||
Supplier<Ingredient> repairIngredient
|
||||
ResourceLocation repairIngredient
|
||||
) {
|
||||
this.level = level;
|
||||
this.uses = uses;
|
||||
|
@ -49,7 +47,7 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
|
|||
this.enchantmentValue = enchantmentValue;
|
||||
this.damageModifier = damageModifier;
|
||||
this.enabled = enabled;
|
||||
this.repairIngredient = new LazyLoadedValue(repairIngredient);
|
||||
this.repairIngredient = repairIngredient;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,6 +55,11 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
|
|||
return this.name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return repairIngredient.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getUses() {
|
||||
return uses;
|
||||
|
@ -92,10 +95,9 @@ public enum CreateToolMaterials implements ToolMaterials<CreateToolMaterials> {
|
|||
return enabled;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull Ingredient getRepairIngredient() {
|
||||
return this.repairIngredient.get();
|
||||
return Ingredient.of(BuiltInRegistries.ITEM.get(repairIngredient));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,15 +2,13 @@ package cc.toph.simplycompat.compat;
|
|||
|
||||
import cc.toph.simplycompat.registry.ConfigRegistry;
|
||||
import cc.toph.simplycompat.util.ToolMaterials;
|
||||
import com.drmangotea.tfmg.registry.TFMGItems;
|
||||
import com.drmangotea.tfmg.registry.TFMGTiers;
|
||||
import net.minecraft.util.LazyLoadedValue;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
|
||||
ALUMINUM(
|
||||
TFMGTiers.ALUMINUM.getLevel(),
|
||||
|
@ -20,8 +18,7 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
|
|||
ConfigRegistry.WEAPON_ATTRIBUTES.ALUMINUM,
|
||||
TFMGTiers.ALUMINUM.getEnchantmentValue(),
|
||||
ConfigRegistry.WEAPON_ATTRIBUTES.ALUMINUM_ENABLED,
|
||||
// () -> Ingredient.of(new ItemLike[]{(ItemLike) TFMGItems.ALUMINUM_INGOT.get()})
|
||||
() -> Ingredient.of(new ItemLike[]{(ItemLike) Items.STICK})
|
||||
TFMGItems.ALUMINUM_INGOT.getId()
|
||||
),
|
||||
LEAD(
|
||||
TFMGTiers.LEAD.getLevel(),
|
||||
|
@ -31,8 +28,7 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
|
|||
ConfigRegistry.WEAPON_ATTRIBUTES.LEAD,
|
||||
TFMGTiers.LEAD.getEnchantmentValue(),
|
||||
ConfigRegistry.WEAPON_ATTRIBUTES.LEAD_ENABLED,
|
||||
// () -> Ingredient.of(new ItemLike[]{(ItemLike) TFMGItems.LEAD_INGOT.get()})
|
||||
() -> Ingredient.of(new ItemLike[]{(ItemLike) Items.STICK})
|
||||
TFMGItems.LEAD_INGOT.getId()
|
||||
),
|
||||
STEEL(
|
||||
TFMGTiers.STEEL.getLevel(),
|
||||
|
@ -42,8 +38,7 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
|
|||
ConfigRegistry.WEAPON_ATTRIBUTES.STEEL,
|
||||
TFMGTiers.STEEL.getEnchantmentValue(),
|
||||
ConfigRegistry.WEAPON_ATTRIBUTES.STEEL_ENABLED,
|
||||
// () -> Ingredient.of(new ItemLike[]{(ItemLike) TFMGItems.STEEL_INGOT.get()})
|
||||
() -> Ingredient.of(new ItemLike[]{(ItemLike) Items.STICK})
|
||||
TFMGItems.STEEL_INGOT.getId()
|
||||
);
|
||||
|
||||
private final int level;
|
||||
|
@ -53,7 +48,7 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
|
|||
private final float damageModifier;
|
||||
private final int enchantmentValue;
|
||||
private final boolean enabled;
|
||||
private final LazyLoadedValue<Ingredient> repairIngredient;
|
||||
private final ResourceLocation repairIngredient;
|
||||
|
||||
TFMGToolMaterials(
|
||||
int level,
|
||||
|
@ -63,7 +58,7 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
|
|||
float damageModifier,
|
||||
int enchantmentValue,
|
||||
boolean enabled,
|
||||
Supplier<Ingredient> repairIngredient
|
||||
ResourceLocation repairIngredient
|
||||
) {
|
||||
this.level = level;
|
||||
this.uses = uses;
|
||||
|
@ -72,7 +67,7 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
|
|||
this.enchantmentValue = enchantmentValue;
|
||||
this.damageModifier = damageModifier;
|
||||
this.enabled = enabled;
|
||||
this.repairIngredient = new LazyLoadedValue(repairIngredient);
|
||||
this.repairIngredient = repairIngredient;
|
||||
|
||||
|
||||
}
|
||||
|
@ -82,6 +77,11 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
|
|||
return this.name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return repairIngredient.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getUses() {
|
||||
return uses;
|
||||
|
@ -119,10 +119,9 @@ public enum TFMGToolMaterials implements ToolMaterials<TFMGToolMaterials> {
|
|||
|
||||
@Override
|
||||
public @NotNull Ingredient getRepairIngredient() {
|
||||
return this.repairIngredient.get();
|
||||
return Ingredient.of(BuiltInRegistries.ITEM.get(repairIngredient));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TFMGToolMaterials[] getValues() {
|
||||
return values();
|
||||
|
|
|
@ -24,6 +24,7 @@ public class ConfigProvider implements SimpleConfig.DefaultConfig {
|
|||
contents += String.format("""
|
||||
# %s
|
||||
%s = %s
|
||||
|
||||
""", comment, key, value);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,14 +2,12 @@ package cc.toph.simplycompat.item;
|
|||
|
||||
import cc.toph.simplycompat.registry.ConfigRegistry.WEAPON_ATTRIBUTES;
|
||||
import cc.toph.simplycompat.util.ToolMaterials;
|
||||
import net.minecraft.util.LazyLoadedValue;
|
||||
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.minecraft.world.level.ItemLike;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolMaterials> {
|
||||
COPPER(
|
||||
1,
|
||||
|
@ -19,7 +17,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
|
|||
WEAPON_ATTRIBUTES.COPPER,
|
||||
8,
|
||||
WEAPON_ATTRIBUTES.COPPER_ENABLED,
|
||||
() -> Ingredient.of(new ItemLike[]{(ItemLike) Items.COPPER_INGOT})
|
||||
Items.COPPER_INGOT.arch$registryName()
|
||||
);
|
||||
|
||||
private final int level;
|
||||
|
@ -29,7 +27,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
|
|||
private final float damageModifier;
|
||||
private final int enchantmentValue;
|
||||
private final boolean enabled;
|
||||
private final LazyLoadedValue<Ingredient> repairIngredient;
|
||||
private final ResourceLocation repairIngredient;
|
||||
|
||||
SimplyCompatToolMaterials(
|
||||
int level,
|
||||
|
@ -39,7 +37,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
|
|||
float damageModifier,
|
||||
int enchantmentValue,
|
||||
boolean enabled,
|
||||
Supplier<Ingredient> repairIngredient
|
||||
ResourceLocation repairIngredient
|
||||
) {
|
||||
this.level = level;
|
||||
this.uses = uses;
|
||||
|
@ -48,7 +46,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
|
|||
this.enchantmentValue = enchantmentValue;
|
||||
this.damageModifier = damageModifier;
|
||||
this.enabled = enabled;
|
||||
this.repairIngredient = new LazyLoadedValue(repairIngredient);
|
||||
this.repairIngredient = repairIngredient;
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,6 +55,11 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
|
|||
return this.name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return repairIngredient.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getUses() {
|
||||
return uses;
|
||||
|
@ -94,7 +97,7 @@ public enum SimplyCompatToolMaterials implements ToolMaterials<SimplyCompatToolM
|
|||
|
||||
@Override
|
||||
public @NotNull Ingredient getRepairIngredient() {
|
||||
return this.repairIngredient.get();
|
||||
return Ingredient.of(BuiltInRegistries.ITEM.get(repairIngredient));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
package cc.toph.simplycompat.registry;
|
||||
|
||||
import cc.toph.simplycompat.compat.CompatRecord;
|
||||
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 com.drmangotea.tfmg.CreateTFMG;
|
||||
import com.simibubi.create.Create;
|
||||
import create_deep_dark.CreateDeepDarkMod;
|
||||
import dqu.additionaladditions.AdditionalAdditions;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -16,6 +20,15 @@ import com.simibubi.create.Create;
|
|||
|
||||
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.
|
||||
*/
|
||||
|
@ -34,12 +47,23 @@ public final class CompatRegistry {
|
|||
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.
|
||||
*/
|
||||
public static void registerAll() {
|
||||
CompatRegistry.ADDITIONAL_ADDITIONS.register();
|
||||
CompatRegistry.CREATE.register();
|
||||
CompatRegistry.TFMG.register();
|
||||
CompatRegistry.CREATE_DEEP_DARK.register();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,12 +6,18 @@ import cc.toph.simplycompat.config.ConfigProvider;
|
|||
public final class ConfigRegistry {
|
||||
public static final class WEAPON_ATTRIBUTES {
|
||||
|
||||
public static float COPPER;
|
||||
public static boolean COPPER_ENABLED;
|
||||
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;
|
||||
public static float ROSE_GOLD;
|
||||
public static boolean ROSE_GOLD_ENABLED;
|
||||
public static float STEEL;
|
||||
public static boolean STEEL_ENABLED;
|
||||
public static float STURDY;
|
||||
|
@ -34,6 +40,32 @@ public final class ConfigRegistry {
|
|||
"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()) {
|
||||
STURDY = common.registerProp(
|
||||
"sturdy_damageModifier",
|
||||
|
@ -85,6 +117,20 @@ 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();
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package cc.toph.simplycompat.compat;
|
||||
package cc.toph.simplycompat.util;
|
||||
|
||||
import cc.toph.simplycompat.registry.ItemsRegistry;
|
||||
import cc.toph.simplycompat.util.ToolMaterials;
|
||||
import cc.toph.simplycompat.util.WeaponType;
|
||||
import dev.architectury.platform.Platform;
|
||||
|
||||
/**
|
|
@ -1,7 +1,5 @@
|
|||
package cc.toph.simplycompat.util;
|
||||
|
||||
import cc.toph.simplycompat.SimplyCompat;
|
||||
import com.google.gson.JsonElement;
|
||||
import net.minecraft.world.item.Tier;
|
||||
|
||||
|
||||
|
@ -28,22 +26,7 @@ public interface ToolMaterials<E extends Enum<E> & ToolMaterials<E>>
|
|||
*
|
||||
* @return String ResourceLocation Path (mod:item)
|
||||
*/
|
||||
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";
|
||||
}
|
||||
String getIdentifier();
|
||||
|
||||
/**
|
||||
* Retrieves the base damage modifier associated with the tool material.
|
||||
|
|
|
@ -78,22 +78,17 @@ dependencies {
|
|||
modImplementation "curse.maven:simplyswords-659887:5639538"
|
||||
|
||||
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: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.jozufozu.flywheel:flywheel-forge-$rootProject.minecraft_version:$rootProject.flywheel_version"
|
||||
modLocalRuntime "com.tterrag.registrate:Registrate:$rootProject.registrate_version"
|
||||
localRuntime(include("io.github.llamalad7:mixinextras-forge:0.4.1"))
|
||||
modLocalRuntime "curse.maven:create-industry-693815:5811638"
|
||||
modLocalRuntime "curse.maven:create-deep-dark-1020173:5868515"
|
||||
modLocalRuntime "curse.maven:additional-additions-forge-582387:5155724"
|
||||
|
||||
|
||||
// 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"
|
||||
modLocalRuntime "curse.maven:emi-580555:6205514"
|
||||
|
||||
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
|
||||
shadowBundle project(path: ':common', configuration: 'transformProductionForge')
|
||||
|
|
|
@ -34,3 +34,38 @@ mandatory = true
|
|||
versionRange = "[9.2.14,)"
|
||||
ordering = "AFTER"
|
||||
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"
|
||||
|
|
Loading…
Add table
Reference in a new issue