diff --git a/src/main/java/ru/dbotthepony/mc/otm/Registry.java b/src/main/java/ru/dbotthepony/mc/otm/Registry.java index 9f2c53603..d194acab6 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/Registry.java +++ b/src/main/java/ru/dbotthepony/mc/otm/Registry.java @@ -6,12 +6,13 @@ import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.stats.StatFormatter; +import net.minecraft.tags.BlockTags; import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.food.FoodProperties; import net.minecraft.world.inventory.MenuType; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.Item; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.OreBlock; import net.minecraft.world.level.block.SoundType; @@ -19,6 +20,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; +import net.minecraftforge.common.ForgeTier; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; @@ -99,144 +101,155 @@ public class Registry { }; public static class Names { + private static ResourceLocation loc(String path) { + return new ResourceLocation(OverdriveThatMatters.MOD_ID, path); + } + // blocks - public static final ResourceLocation ANDROID_STATION = new ResourceLocation(OverdriveThatMatters.MOD_ID, "android_station"); // без рецепта - public static final ResourceLocation BATTERY_BANK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "battery_bank"); // нужен рецепт - public static final ResourceLocation MATTER_DECOMPOSER = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_decomposer"); // есть рецепт - public static final ResourceLocation MATTER_CAPACITOR_BANK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_capacitor_bank"); // есть рецепт - public static final ResourceLocation MATTER_CABLE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_cable"); // есть рецепт - public static final ResourceLocation PATTERN_STORAGE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "pattern_storage"); // есть рецепт - public static final ResourceLocation MATTER_SCANNER = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_scanner"); // есть рецепт - public static final ResourceLocation MATTER_PANEL = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_panel"); // есть рецепт - public static final ResourceLocation MATTER_REPLICATOR = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_replicator"); // есть рецепт - public static final ResourceLocation MATTER_BOTTLER = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_bottler"); // есть рецепт - public static final ResourceLocation DRIVE_VIEWER = new ResourceLocation(OverdriveThatMatters.MOD_ID, "drive_viewer"); // есть рецепт - public static final ResourceLocation DRIVE_RACK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "drive_rack"); // нужен рецепт (после улучшений) - public static final ResourceLocation ITEM_MONITOR = new ResourceLocation(OverdriveThatMatters.MOD_ID, "item_monitor"); // нужен рецепт (после улучшений) - public static final ResourceLocation ENERGY_COUNTER = new ResourceLocation(OverdriveThatMatters.MOD_ID, "energy_counter"); // нужен рецепт - public static final ResourceLocation CHEMICAL_GENERATOR = new ResourceLocation(OverdriveThatMatters.MOD_ID, "chemical_generator"); // нужен рецепт + public static final ResourceLocation ANDROID_STATION = loc("android_station"); // без рецепта + public static final ResourceLocation BATTERY_BANK = loc("battery_bank"); // нужен рецепт + public static final ResourceLocation MATTER_DECOMPOSER = loc("matter_decomposer"); // есть рецепт + public static final ResourceLocation MATTER_CAPACITOR_BANK = loc("matter_capacitor_bank"); // есть рецепт + public static final ResourceLocation MATTER_CABLE = loc("matter_cable"); // есть рецепт + public static final ResourceLocation PATTERN_STORAGE = loc("pattern_storage"); // есть рецепт + public static final ResourceLocation MATTER_SCANNER = loc("matter_scanner"); // есть рецепт + public static final ResourceLocation MATTER_PANEL = loc("matter_panel"); // есть рецепт + public static final ResourceLocation MATTER_REPLICATOR = loc("matter_replicator"); // есть рецепт + public static final ResourceLocation MATTER_BOTTLER = loc("matter_bottler"); // есть рецепт + public static final ResourceLocation DRIVE_VIEWER = loc("drive_viewer"); // есть рецепт + public static final ResourceLocation DRIVE_RACK = loc("drive_rack"); // нужен рецепт (после улучшений) + public static final ResourceLocation ITEM_MONITOR = loc("item_monitor"); // нужен рецепт (после улучшений) + public static final ResourceLocation ENERGY_COUNTER = loc("energy_counter"); // нужен рецепт + public static final ResourceLocation CHEMICAL_GENERATOR = loc("chemical_generator"); // нужен рецепт - public static final ResourceLocation DEBUG_EXPLOSION_SMALL = new ResourceLocation(OverdriveThatMatters.MOD_ID, "debug_explosion_small"); - public static final ResourceLocation DEBUG_SPHERE_POINTS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "debug_sphere_points"); + public static final ResourceLocation DEBUG_EXPLOSION_SMALL = loc("debug_explosion_small"); + public static final ResourceLocation DEBUG_SPHERE_POINTS = loc("debug_sphere_points"); - public static final ResourceLocation BLACK_HOLE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "black_hole"); - public static final ResourceLocation CARGO_CRATE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "cargo_crate"); + public static final ResourceLocation BLACK_HOLE = loc("black_hole"); + public static final ResourceLocation CARGO_CRATE = loc("cargo_crate"); // building blocks - public static final ResourceLocation TRITANIUM_BLOCK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_block"); - public static final ResourceLocation TRITANIUM_STRIPED_BLOCK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_striped_block"); + public static final ResourceLocation TRITANIUM_BLOCK = loc("tritanium_block"); + public static final ResourceLocation TRITANIUM_STRIPED_BLOCK = loc("tritanium_striped_block"); - public static final ResourceLocation CARBON_FIBRE_BLOCK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "carbon_fibre_block"); + public static final ResourceLocation CARBON_FIBRE_BLOCK = loc("carbon_fibre_block"); // capabilities - public static final ResourceLocation ANDROID_CAPABILITY = new ResourceLocation(OverdriveThatMatters.MOD_ID, "android_capability"); + public static final ResourceLocation ANDROID_CAPABILITY = loc("android_capability"); // items - public static final ResourceLocation GRAVITATIONAL_DISRUPTOR = new ResourceLocation(OverdriveThatMatters.MOD_ID, "gravitational_disruptor"); + public static final ResourceLocation GRAVITATIONAL_DISRUPTOR = loc("gravitational_disruptor"); - public static final ResourceLocation PILL_ANDROID = new ResourceLocation(OverdriveThatMatters.MOD_ID, "pill_android"); - public static final ResourceLocation PILL_HUMANE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "pill_humane"); + public static final ResourceLocation PILL_ANDROID = loc("pill_android"); + public static final ResourceLocation PILL_HUMANE = loc("pill_humane"); - public static final ResourceLocation BATTERY_CRUDE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "battery_crude"); - public static final ResourceLocation BATTERY_BASIC = new ResourceLocation(OverdriveThatMatters.MOD_ID, "battery_basic"); - public static final ResourceLocation BATTERY_NORMAL = new ResourceLocation(OverdriveThatMatters.MOD_ID, "battery_normal"); - public static final ResourceLocation BATTERY_DENSE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "battery_dense"); - public static final ResourceLocation BATTERY_CAPACITOR = new ResourceLocation(OverdriveThatMatters.MOD_ID, "battery_capacitor"); - public static final ResourceLocation BATTERY_CREATIVE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "battery_creative"); + public static final ResourceLocation BATTERY_CRUDE = loc("battery_crude"); + public static final ResourceLocation BATTERY_BASIC = loc("battery_basic"); + public static final ResourceLocation BATTERY_NORMAL = loc("battery_normal"); + public static final ResourceLocation BATTERY_DENSE = loc("battery_dense"); + public static final ResourceLocation BATTERY_CAPACITOR = loc("battery_capacitor"); + public static final ResourceLocation BATTERY_CREATIVE = loc("battery_creative"); - public static final ResourceLocation MATTER_CAPACITOR_PARTS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_capacitor_parts"); - public static final ResourceLocation MATTER_CAPACITOR_BASIC = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_capacitor_basic"); - public static final ResourceLocation MATTER_CAPACITOR_NORMAL = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_capacitor_normal"); - public static final ResourceLocation MATTER_CAPACITOR_DENSE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_capacitor_dense"); - public static final ResourceLocation MATTER_CAPACITOR_CREATIVE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_capacitor_creative"); + public static final ResourceLocation MATTER_CAPACITOR_PARTS = loc("matter_capacitor_parts"); + public static final ResourceLocation MATTER_CAPACITOR_BASIC = loc("matter_capacitor_basic"); + public static final ResourceLocation MATTER_CAPACITOR_NORMAL = loc("matter_capacitor_normal"); + public static final ResourceLocation MATTER_CAPACITOR_DENSE = loc("matter_capacitor_dense"); + public static final ResourceLocation MATTER_CAPACITOR_CREATIVE = loc("matter_capacitor_creative"); - public static final ResourceLocation PATTERN_DRIVE_NORMAL = new ResourceLocation(OverdriveThatMatters.MOD_ID, "pattern_drive_normal"); - public static final ResourceLocation PATTERN_DRIVE_CREATIVE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "pattern_drive_creative"); + public static final ResourceLocation PATTERN_DRIVE_NORMAL = loc("pattern_drive_normal"); + public static final ResourceLocation PATTERN_DRIVE_CREATIVE = loc("pattern_drive_creative"); - public static final ResourceLocation NUTRIENT_PASTE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nutrient_paste"); + public static final ResourceLocation NUTRIENT_PASTE = loc("nutrient_paste"); - public static final ResourceLocation PORTABLE_CONDENSATION_DRIVE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_condensation_drive"); - public static final ResourceLocation PORTABLE_DENSE_CONDENSATION_DRIVE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_dense_condensation_drive"); + public static final ResourceLocation PORTABLE_CONDENSATION_DRIVE = loc("portable_condensation_drive"); + public static final ResourceLocation PORTABLE_DENSE_CONDENSATION_DRIVE = loc("portable_dense_condensation_drive"); + + // tools + public static final ResourceLocation TRITANIUM_SWORD = loc("tritanium_sword"); + public static final ResourceLocation TRITANIUM_AXE = loc("tritanium_axe"); + public static final ResourceLocation TRITANIUM_PICKAXE = loc("tritanium_pickaxe"); + public static final ResourceLocation TRITANIUM_SHOVEL = loc("tritanium_shovel"); + public static final ResourceLocation TRITANIUM_HOE = loc("tritanium_hoe"); // items: crafting components - public static final ResourceLocation TRITANIUM_INGOT = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_ingot"); + public static final ResourceLocation TRITANIUM_INGOT = loc("tritanium_ingot"); - public static final ResourceLocation MATTER_IO_PORT = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_io_port"); - public static final ResourceLocation MATTER_TRANSFORM_MATRIX = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_transform_matrix"); + public static final ResourceLocation MATTER_IO_PORT = loc("matter_io_port"); + public static final ResourceLocation MATTER_TRANSFORM_MATRIX = loc("matter_transform_matrix"); - public static final ResourceLocation ENERGY_BUS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "energy_bus"); - public static final ResourceLocation ELECTRIC_PARTS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "electric_parts"); + public static final ResourceLocation ENERGY_BUS = loc("energy_bus"); + public static final ResourceLocation ELECTRIC_PARTS = loc("electric_parts"); - public static final ResourceLocation MACHINE_FRAME = new ResourceLocation(OverdriveThatMatters.MOD_ID, "machine_frame"); - public static final ResourceLocation TRITANIUM_PLATE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_plate"); - public static final ResourceLocation IRON_PLATE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "iron_plate"); - public static final ResourceLocation COPPER_WIRING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "copper_wiring"); - public static final ResourceLocation GOLD_WIRING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "gold_wiring"); + public static final ResourceLocation MACHINE_FRAME = loc("machine_frame"); + public static final ResourceLocation TRITANIUM_PLATE = loc("tritanium_plate"); + public static final ResourceLocation IRON_PLATE = loc("iron_plate"); + public static final ResourceLocation COPPER_WIRING = loc("copper_wiring"); + public static final ResourceLocation GOLD_WIRING = loc("gold_wiring"); - public static final ResourceLocation PORTABLE_CONDENSATION_DRIVE_CASING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_condensation_drive_casing"); - public static final ResourceLocation PORTABLE_DENSE_CONDENSATION_DRIVE_CASING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_dense_condensation_drive_casing"); + public static final ResourceLocation PORTABLE_CONDENSATION_DRIVE_CASING = loc("portable_condensation_drive_casing"); + public static final ResourceLocation PORTABLE_DENSE_CONDENSATION_DRIVE_CASING = loc("portable_dense_condensation_drive_casing"); - public static final ResourceLocation CIRCUIT_PLATING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "circuit_plating"); - public static final ResourceLocation BASIC_CONTROL_CIRCUIT = new ResourceLocation(OverdriveThatMatters.MOD_ID, "basic_control_circuit"); - public static final ResourceLocation ADVANCED_CONTROL_CIRCUIT = new ResourceLocation(OverdriveThatMatters.MOD_ID, "advanced_control_circuit"); + public static final ResourceLocation CIRCUIT_PLATING = loc("circuit_plating"); + public static final ResourceLocation BASIC_CONTROL_CIRCUIT = loc("basic_control_circuit"); + public static final ResourceLocation ADVANCED_CONTROL_CIRCUIT = loc("advanced_control_circuit"); - public static final ResourceLocation TRITANIUM_ORE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_ore"); - public static final ResourceLocation DEEPSLATE_TRITANIUM_ORE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "deepslate_tritanium_ore"); - public static final ResourceLocation TRITANIUM_RAW_BLOCK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_raw_block"); - public static final ResourceLocation TRITANIUM_ORE_CLUMP = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_ore_clump"); + public static final ResourceLocation TRITANIUM_ORE = loc("tritanium_ore"); + public static final ResourceLocation DEEPSLATE_TRITANIUM_ORE = loc("deepslate_tritanium_ore"); + public static final ResourceLocation TRITANIUM_RAW_BLOCK = loc("tritanium_raw_block"); + public static final ResourceLocation TRITANIUM_ORE_CLUMP = loc("tritanium_ore_clump"); // android features and research - public static final ResourceLocation AIR_BAGS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "air_bags"); + public static final ResourceLocation AIR_BAGS = loc("air_bags"); - public static final ResourceLocation LIMB_OVERCLOCKING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "limb_overclocking"); - public static final ResourceLocation LIMB_OVERCLOCKING_1 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "limb_overclocking_1"); - public static final ResourceLocation LIMB_OVERCLOCKING_2 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "limb_overclocking_2"); - public static final ResourceLocation LIMB_OVERCLOCKING_3 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "limb_overclocking_3"); - public static final ResourceLocation LIMB_OVERCLOCKING_4 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "limb_overclocking_4"); + public static final ResourceLocation LIMB_OVERCLOCKING = loc("limb_overclocking"); + public static final ResourceLocation LIMB_OVERCLOCKING_1 = loc("limb_overclocking_1"); + public static final ResourceLocation LIMB_OVERCLOCKING_2 = loc("limb_overclocking_2"); + public static final ResourceLocation LIMB_OVERCLOCKING_3 = loc("limb_overclocking_3"); + public static final ResourceLocation LIMB_OVERCLOCKING_4 = loc("limb_overclocking_4"); public static final ResourceLocation[] LIMB_OVERCLOCKING_LIST = new ResourceLocation[] { LIMB_OVERCLOCKING_1, LIMB_OVERCLOCKING_2, LIMB_OVERCLOCKING_3, LIMB_OVERCLOCKING_4 }; - public static final ResourceLocation NANOBOTS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots"); - public static final ResourceLocation NANOBOTS_REGENERATION = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_regeneration"); - public static final ResourceLocation NANOBOTS_REGENERATION_1 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_regeneration_1"); - public static final ResourceLocation NANOBOTS_REGENERATION_2 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_regeneration_2"); - public static final ResourceLocation NANOBOTS_REGENERATION_3 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_regeneration_3"); - public static final ResourceLocation NANOBOTS_REGENERATION_4 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_regeneration_4"); + public static final ResourceLocation NANOBOTS = loc("nanobots"); + public static final ResourceLocation NANOBOTS_REGENERATION = loc("nanobots_regeneration"); + public static final ResourceLocation NANOBOTS_REGENERATION_1 = loc("nanobots_regeneration_1"); + public static final ResourceLocation NANOBOTS_REGENERATION_2 = loc("nanobots_regeneration_2"); + public static final ResourceLocation NANOBOTS_REGENERATION_3 = loc("nanobots_regeneration_3"); + public static final ResourceLocation NANOBOTS_REGENERATION_4 = loc("nanobots_regeneration_4"); public static final ResourceLocation[] NANOBOTS_REGENERATION_LIST = new ResourceLocation[] { NANOBOTS_REGENERATION_1, NANOBOTS_REGENERATION_2, NANOBOTS_REGENERATION_3, NANOBOTS_REGENERATION_4 }; - public static final ResourceLocation NANOBOTS_ARMOR = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_armor"); + public static final ResourceLocation NANOBOTS_ARMOR = loc("nanobots_armor"); - public static final ResourceLocation NANOBOTS_ARMOR_STRENGTH_1 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_armor_strength_1"); - public static final ResourceLocation NANOBOTS_ARMOR_STRENGTH_2 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_armor_strength_2"); - public static final ResourceLocation NANOBOTS_ARMOR_STRENGTH_3 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_armor_strength_3"); + public static final ResourceLocation NANOBOTS_ARMOR_STRENGTH_1 = loc("nanobots_armor_strength_1"); + public static final ResourceLocation NANOBOTS_ARMOR_STRENGTH_2 = loc("nanobots_armor_strength_2"); + public static final ResourceLocation NANOBOTS_ARMOR_STRENGTH_3 = loc("nanobots_armor_strength_3"); public static final ResourceLocation[] NANOBOTS_ARMOR_STRENGTH_LIST = new ResourceLocation[] { NANOBOTS_ARMOR_STRENGTH_1, NANOBOTS_ARMOR_STRENGTH_2, NANOBOTS_ARMOR_STRENGTH_3, }; - public static final ResourceLocation NANOBOTS_ARMOR_SPEED_1 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_armor_speed_1"); - public static final ResourceLocation NANOBOTS_ARMOR_SPEED_2 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_armor_speed_2"); - public static final ResourceLocation NANOBOTS_ARMOR_SPEED_3 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nanobots_armor_speed_3"); + public static final ResourceLocation NANOBOTS_ARMOR_SPEED_1 = loc("nanobots_armor_speed_1"); + public static final ResourceLocation NANOBOTS_ARMOR_SPEED_2 = loc("nanobots_armor_speed_2"); + public static final ResourceLocation NANOBOTS_ARMOR_SPEED_3 = loc("nanobots_armor_speed_3"); public static final ResourceLocation[] NANOBOTS_ARMOR_SPEED_LIST = new ResourceLocation[] { NANOBOTS_ARMOR_SPEED_1, NANOBOTS_ARMOR_SPEED_2, NANOBOTS_ARMOR_SPEED_3, }; - public static final ResourceLocation HYDRAULICS_OVERLOAD = new ResourceLocation(OverdriveThatMatters.MOD_ID, "hydraulics_overload"); - public static final ResourceLocation HYDRAULICS_OVERLOAD_1 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "hydraulics_overload_1"); - public static final ResourceLocation HYDRAULICS_OVERLOAD_2 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "hydraulics_overload_2"); - public static final ResourceLocation HYDRAULICS_OVERLOAD_3 = new ResourceLocation(OverdriveThatMatters.MOD_ID, "hydraulics_overload_3"); + public static final ResourceLocation HYDRAULICS_OVERLOAD = loc("hydraulics_overload"); + public static final ResourceLocation HYDRAULICS_OVERLOAD_1 = loc("hydraulics_overload_1"); + public static final ResourceLocation HYDRAULICS_OVERLOAD_2 = loc("hydraulics_overload_2"); + public static final ResourceLocation HYDRAULICS_OVERLOAD_3 = loc("hydraulics_overload_3"); - public static final ResourceLocation EXTENDED_REACH = new ResourceLocation(OverdriveThatMatters.MOD_ID, "extended_reach"); + public static final ResourceLocation EXTENDED_REACH = loc("extended_reach"); // stats - public static final ResourceLocation DAMAGE_ABSORBED = new ResourceLocation(OverdriveThatMatters.MOD_ID, "damage_absorbed"); - public static final ResourceLocation HEALTH_REGENERATED = new ResourceLocation(OverdriveThatMatters.MOD_ID, "health_regenerated"); - public static final ResourceLocation POWER_CONSUMED = new ResourceLocation(OverdriveThatMatters.MOD_ID, "power_consumed"); + public static final ResourceLocation DAMAGE_ABSORBED = loc("damage_absorbed"); + public static final ResourceLocation HEALTH_REGENERATED = loc("health_regenerated"); + public static final ResourceLocation POWER_CONSUMED = loc("power_consumed"); } public static class Blocks { @@ -386,32 +399,54 @@ public class Registry { } public static class Items { - public static final Item ANDROID_STATION = new BlockItem(Blocks.ANDROID_STATION, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item BATTERY_BANK = new BlockItem(Blocks.BATTERY_BANK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item MATTER_DECOMPOSER = new BlockItem(Blocks.MATTER_DECOMPOSER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item MATTER_CAPACITOR_BANK = new BlockItem(Blocks.MATTER_CAPACITOR_BANK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item MATTER_CABLE = new BlockItem(Blocks.MATTER_CABLE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item PATTERN_STORAGE = new BlockItem(Blocks.PATTERN_STORAGE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item MATTER_SCANNER = new BlockItem(Blocks.MATTER_SCANNER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item MATTER_PANEL = new BlockItem(Blocks.MATTER_PANEL, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item MATTER_REPLICATOR = new BlockItem(Blocks.MATTER_REPLICATOR, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item MATTER_BOTTLER = new BlockItem(Blocks.MATTER_BOTTLER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item DRIVE_VIEWER = new BlockItem(Blocks.DRIVE_VIEWER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item CARGO_CRATE = new BlockItem(Blocks.CARGO_CRATE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item TRITANIUM_ORE = new BlockItem(Blocks.TRITANIUM_ORE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item DEEPSLATE_TRITANIUM_ORE = new BlockItem(Blocks.DEEPSLATE_TRITANIUM_ORE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item TRITANIUM_RAW_BLOCK = new BlockItem(Blocks.TRITANIUM_RAW_BLOCK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item DRIVE_RACK = new BlockItem(Blocks.DRIVE_RACK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item ITEM_MONITOR = new BlockItem(Blocks.ITEM_MONITOR, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item ENERGY_COUNTER = new BlockItem(Blocks.ENERGY_COUNTER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item CHEMICAL_GENERATOR = new BlockItem(Blocks.CHEMICAL_GENERATOR, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem ANDROID_STATION = new BlockItem(Blocks.ANDROID_STATION, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem BATTERY_BANK = new BlockItem(Blocks.BATTERY_BANK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem MATTER_DECOMPOSER = new BlockItem(Blocks.MATTER_DECOMPOSER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem MATTER_CAPACITOR_BANK = new BlockItem(Blocks.MATTER_CAPACITOR_BANK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem MATTER_CABLE = new BlockItem(Blocks.MATTER_CABLE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem PATTERN_STORAGE = new BlockItem(Blocks.PATTERN_STORAGE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem MATTER_SCANNER = new BlockItem(Blocks.MATTER_SCANNER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem MATTER_PANEL = new BlockItem(Blocks.MATTER_PANEL, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem MATTER_REPLICATOR = new BlockItem(Blocks.MATTER_REPLICATOR, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem MATTER_BOTTLER = new BlockItem(Blocks.MATTER_BOTTLER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem DRIVE_VIEWER = new BlockItem(Blocks.DRIVE_VIEWER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem CARGO_CRATE = new BlockItem(Blocks.CARGO_CRATE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem TRITANIUM_ORE = new BlockItem(Blocks.TRITANIUM_ORE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem DEEPSLATE_TRITANIUM_ORE = new BlockItem(Blocks.DEEPSLATE_TRITANIUM_ORE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem TRITANIUM_RAW_BLOCK = new BlockItem(Blocks.TRITANIUM_RAW_BLOCK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem DRIVE_RACK = new BlockItem(Blocks.DRIVE_RACK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem ITEM_MONITOR = new BlockItem(Blocks.ITEM_MONITOR, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem ENERGY_COUNTER = new BlockItem(Blocks.ENERGY_COUNTER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem CHEMICAL_GENERATOR = new BlockItem(Blocks.CHEMICAL_GENERATOR, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item DEBUG_EXPLOSION_SMALL = new BlockItem(Blocks.DEBUG_EXPLOSION_SMALL, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item DEBUG_SPHERE_POINTS = new BlockItem(Blocks.DEBUG_SPHERE_POINTS, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem DEBUG_EXPLOSION_SMALL = new BlockItem(Blocks.DEBUG_EXPLOSION_SMALL, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem DEBUG_SPHERE_POINTS = new BlockItem(Blocks.DEBUG_SPHERE_POINTS, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); public static final Item TRITANIUM_ORE_CLUMP = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); public static final Item TRITANIUM_INGOT = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final ForgeTier TRITANIUM_COMPONENT; + + static { + final var component = Ingredient.of(TRITANIUM_INGOT); + + TRITANIUM_COMPONENT = new ForgeTier( + Tiers.IRON.getLevel(), + 3072, + Tiers.IRON.getSpeed() * 1.1f, + 3.5f, + 16, + BlockTags.NEEDS_IRON_TOOL, + () -> component + ); + } + + public static final SwordItem TRITANIUM_SWORD = new SwordItem(TRITANIUM_COMPONENT, 4, -2.7f, new Item.Properties().tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final ShovelItem TRITANIUM_SHOVEL = new ShovelItem(TRITANIUM_COMPONENT, 1.5f, -2.4f, new Item.Properties().tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final AxeItem TRITANIUM_AXE = new AxeItem(TRITANIUM_COMPONENT, 8.5f, -3.4f, new Item.Properties().tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final PickaxeItem TRITANIUM_PICKAXE = new PickaxeItem(TRITANIUM_COMPONENT, 2, -2.8f, new Item.Properties().tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final HoeItem TRITANIUM_HOE = new HoeItem(TRITANIUM_COMPONENT, 0, -3.4f, new Item.Properties().tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final Item MATTER_IO_PORT = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); public static final Item MATTER_TRANSFORM_MATRIX = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); public static final Item ENERGY_BUS = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); @@ -427,7 +462,7 @@ public class Registry { public static final Item BASIC_CONTROL_CIRCUIT = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); public static final Item ADVANCED_CONTROL_CIRCUIT = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); - public static final Item BLACK_HOLE = new BlockItem(Blocks.BLACK_HOLE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); + public static final BlockItem BLACK_HOLE = new BlockItem(Blocks.BLACK_HOLE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB)); public static final ItemGravitationalDisruptor GRAVITATIONAL_DISRUPTOR = new ItemGravitationalDisruptor(); @@ -556,6 +591,12 @@ public class Registry { TRITANIUM_BLOCK.setRegistryName(Names.TRITANIUM_BLOCK); TRITANIUM_STRIPED_BLOCK.setRegistryName(Names.TRITANIUM_STRIPED_BLOCK); CARBON_FIBRE_BLOCK.setRegistryName(Names.CARBON_FIBRE_BLOCK); + + TRITANIUM_SWORD.setRegistryName(Names.TRITANIUM_SWORD); + TRITANIUM_PICKAXE.setRegistryName(Names.TRITANIUM_PICKAXE); + TRITANIUM_SHOVEL.setRegistryName(Names.TRITANIUM_SHOVEL); + TRITANIUM_AXE.setRegistryName(Names.TRITANIUM_AXE); + TRITANIUM_HOE.setRegistryName(Names.TRITANIUM_HOE); } @SubscribeEvent @@ -634,6 +675,12 @@ public class Registry { event.getRegistry().register(crate); } + event.getRegistry().register(TRITANIUM_SWORD); + event.getRegistry().register(TRITANIUM_SHOVEL); + event.getRegistry().register(TRITANIUM_AXE); + event.getRegistry().register(TRITANIUM_PICKAXE); + event.getRegistry().register(TRITANIUM_HOE); + // OverdriveThatMatters.LOGGER.info("Registered items"); } }