From 9c0d40bdbf5a13178e2b2109114ce730a0a8f40f Mon Sep 17 00:00:00 2001 From: Waterpicker Date: Sat, 20 Jan 2024 04:46:25 -0600 Subject: [PATCH] Moved decay related blocks to its own creative tab. --- .../org/dimdev/dimdoors/block/ModBlocks.java | 64 ++++++++------ .../org/dimdev/dimdoors/item/ModItems.java | 86 +++++++++---------- .../resources/assets/dimdoors/lang/en_us.json | 7 +- 3 files changed, 82 insertions(+), 75 deletions(-) diff --git a/common/src/main/java/org/dimdev/dimdoors/block/ModBlocks.java b/common/src/main/java/org/dimdev/dimdoors/block/ModBlocks.java index b9097ac0..b47dc2ad 100644 --- a/common/src/main/java/org/dimdev/dimdoors/block/ModBlocks.java +++ b/common/src/main/java/org/dimdev/dimdoors/block/ModBlocks.java @@ -30,6 +30,7 @@ import static net.minecraft.world.level.block.Blocks.WATER; import static net.minecraft.world.level.block.Blocks.*; import static net.minecraft.world.level.block.state.BlockBehaviour.Properties.copy; import static net.minecraft.world.level.material.MapColor.*; +import static org.dimdev.dimdoors.item.ModItems.DECAY; import static org.dimdev.dimdoors.item.ModItems.DIMENSIONAL_DOORS; public final class ModBlocks { @@ -143,29 +144,29 @@ public final class ModBlocks { public static final RegistrySupplier REALITY_SPONGE = register("reality_sponge", () -> new RealitySpongeBlock(UNRAVELLED_FABRIC_BLOCK_SETTINGS)); //Decay graph filler. - public static final RegistrySupplier DRIFTWOOD_WOOD = register("driftwood_wood", () -> new RotatedPillarBlock(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F).sound(SoundType.WOOD))); - public static final RegistrySupplier DRIFTWOOD_LOG = register("driftwood_log", () -> new RotatedPillarBlock(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F).sound(SoundType.WOOD))); - public static final RegistrySupplier DRIFTWOOD_PLANKS = register("driftwood_planks", () -> new Block(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F, 3.0F).sound(SoundType.WOOD))); - public static final RegistrySupplier DRIFTWOOD_LEAVES = register("driftwood_leaves", () -> new LeavesBlock(of(OAK_LEAVES))); - public static final RegistrySupplier DRIFTWOOD_SAPLING = register("driftwood_sapling", () -> new Block(of(OAK_SAPLING))); + public static final RegistrySupplier DRIFTWOOD_WOOD = registerDecay("driftwood_wood", () -> new RotatedPillarBlock(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F).sound(SoundType.WOOD))); + public static final RegistrySupplier DRIFTWOOD_LOG = registerDecay("driftwood_log", () -> new RotatedPillarBlock(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F).sound(SoundType.WOOD))); + public static final RegistrySupplier DRIFTWOOD_PLANKS = registerDecay("driftwood_planks", () -> new Block(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F, 3.0F).sound(SoundType.WOOD))); + public static final RegistrySupplier DRIFTWOOD_LEAVES = registerDecay("driftwood_leaves", () -> new LeavesBlock(of(OAK_LEAVES))); + public static final RegistrySupplier DRIFTWOOD_SAPLING = registerDecay("driftwood_sapling", () -> new Block(of(OAK_SAPLING))); public static final RegistrySupplier DRIFTWOOD_FENCE = registerFence("driftwood_fence", DRIFTWOOD_PLANKS); public static final RegistrySupplier DRIFTWOOD_GATE = registerFenceGate("driftwood_gate", DRIFTWOOD_PLANKS); // TODO: add driftwood wood type public static final RegistrySupplier DRIFTWOOD_BUTTON = registerButton("driftwood_button", DRIFTWOOD_PLANKS); public static final RegistrySupplier DRIFTWOOD_SLAB = registerSlab("driftwood_slab", DRIFTWOOD_PLANKS); public static final RegistrySupplier DRIFTWOOD_STAIRS = registerStairs("driftwood_stairs", DRIFTWOOD_PLANKS); - public static final RegistrySupplier DRIFTWOOD_DOOR = register("driftwood_door", () -> new DoorBlock(copy(OAK_WOOD).mapColor(COLOR_GRAY).strength(3.0F).sound(SoundType.WOOD).noOcclusion(), BlockSetType.OAK)); - public static final RegistrySupplier DRIFTWOOD_TRAPDOOR = register("driftwood_trapdoor", () -> new TrapDoorBlock(copy(OAK_WOOD).mapColor(COLOR_GRAY).strength(3.0F).sound(SoundType.WOOD).noOcclusion().isValidSpawn((state, world, pos, type) -> false), BlockSetType.OAK)); + public static final RegistrySupplier DRIFTWOOD_DOOR = registerDecay("driftwood_door", () -> new DoorBlock(copy(OAK_WOOD).mapColor(COLOR_GRAY).strength(3.0F).sound(SoundType.WOOD).noOcclusion(), BlockSetType.OAK)); + public static final RegistrySupplier DRIFTWOOD_TRAPDOOR = registerDecay("driftwood_trapdoor", () -> new TrapDoorBlock(copy(OAK_WOOD).mapColor(COLOR_GRAY).strength(3.0F).sound(SoundType.WOOD).noOcclusion().isValidSpawn((state, world, pos, type) -> false), BlockSetType.OAK)); - public static final RegistrySupplier AMALGAM_BLOCK = register("amalgam_block", () -> new Block(copy(IRON_BLOCK).mapColor(COLOR_LIGHT_GRAY).requiresCorrectToolForDrops().strength(5.0F, 6.0F).sound(SoundType.METAL))); - public static final RegistrySupplier AMALGAM_DOOR = register("amalgam_door", () -> new DoorBlock(copy(IRON_BLOCK).mapColor(COLOR_LIGHT_GRAY).requiresCorrectToolForDrops().strength(5.0F).sound(SoundType.METAL).noOcclusion(), BlockSetType.IRON)); - public static final RegistrySupplier AMALGAM_TRAPDOOR = register("amalgam_trapdoor", () -> new TrapDoorBlock(copy(IRON_BLOCK).requiresCorrectToolForDrops().strength(5.0F).sound(SoundType.METAL).isValidSpawn((state, world, pos, type) -> false), BlockSetType.IRON)); - public static final RegistrySupplier RUST = register("rust", () -> new Block(copy(OAK_WOOD))); + public static final RegistrySupplier AMALGAM_BLOCK = registerDecay("amalgam_block", () -> new Block(copy(IRON_BLOCK).mapColor(COLOR_LIGHT_GRAY).requiresCorrectToolForDrops().strength(5.0F, 6.0F).sound(SoundType.METAL))); + public static final RegistrySupplier AMALGAM_DOOR = registerDecay("amalgam_door", () -> new DoorBlock(copy(IRON_BLOCK).mapColor(COLOR_LIGHT_GRAY).requiresCorrectToolForDrops().strength(5.0F).sound(SoundType.METAL).noOcclusion(), BlockSetType.IRON)); + public static final RegistrySupplier AMALGAM_TRAPDOOR = registerDecay("amalgam_trapdoor", () -> new TrapDoorBlock(copy(IRON_BLOCK).requiresCorrectToolForDrops().strength(5.0F).sound(SoundType.METAL).isValidSpawn((state, world, pos, type) -> false), BlockSetType.IRON)); + public static final RegistrySupplier RUST = registerDecay("rust", () -> new Block(copy(OAK_WOOD))); public static final RegistrySupplier AMALGAM_SLAB = registerSlab("amalgam_slab", AMALGAM_BLOCK); public static final RegistrySupplier AMALGAM_STAIRS = registerStairs("amalgam_stairs", AMALGAM_BLOCK); - public static final RegistrySupplier AMALGAM_ORE = register("amalgam_ore", () -> new DropExperienceBlock(copy(STONE).requiresCorrectToolForDrops().strength(3.0F, 3.0F))); + public static final RegistrySupplier AMALGAM_ORE = registerDecay("amalgam_ore", () -> new DropExperienceBlock(copy(STONE).requiresCorrectToolForDrops().strength(3.0F, 3.0F))); - public static final RegistrySupplier CLOD_ORE = register("clod_ore", () -> new Block(copy(Blocks.AMETHYST_BLOCK))); - public static final RegistrySupplier CLOD_BLOCK = register("clod_block", () -> new Block(copy(Blocks.AMETHYST_BLOCK))); + public static final RegistrySupplier CLOD_ORE = registerDecay("clod_ore", () -> new Block(copy(Blocks.AMETHYST_BLOCK))); + public static final RegistrySupplier CLOD_BLOCK = registerDecay("clod_block", () -> new Block(copy(Blocks.AMETHYST_BLOCK))); public static final RegistrySupplier GRAVEL_FENCE = registerFence("gravel_fence", GRAVEL); public static final RegistrySupplier GRAVEL_BUTTON = registerButton("gravel_button", GRAVEL); @@ -221,8 +222,8 @@ public final class ModBlocks { public static final RegistrySupplier NETHERRACK_STAIRS = registerStairs("netherrack_stairs", Blocks.NETHERRACK); public static final RegistrySupplier NETHERRACK_WALL = registerWall("netherrack_wall", Blocks.NETHERRACK); - public static final RegistrySupplier UNRAVELED_SPIKE = register("unraveled_spike", () -> new PointedDripstoneBlock(of(UNRAVELLED_FABRIC.get()).lightLevel(state -> 0))); //TODO: make this proper class later - public static final RegistrySupplier GRITTY_STONE = register("gritty_stone", () -> new Block(of(STONE))); + public static final RegistrySupplier UNRAVELED_SPIKE = registerDecay("unraveled_spike", () -> new PointedDripstoneBlock(of(UNRAVELLED_FABRIC.get()).lightLevel(state -> 0))); //TODO: make this proper class later + public static final RegistrySupplier GRITTY_STONE = registerDecay("gritty_stone", () -> new Block(of(STONE))); public static void init() { BLOCKS.register(); @@ -265,6 +266,13 @@ public final class ModBlocks { return supplier; } + public static RegistrySupplier registerDecay(String name, Supplier block) { + var supplier = BLOCKS.register(name, block); + BLOCK_ITEMS.register(name, () -> new BlockItem(supplier.get(), new Item.Properties().arch$tab(DECAY))); + + return supplier; + } + public static RegistrySupplier registerWithoutTab(String name, Supplier block) { var supplier = BLOCKS.register(name, block); BLOCK_ITEMS.register(name, () -> new BlockItem(supplier.get(), new Item.Properties())); @@ -273,54 +281,54 @@ public final class ModBlocks { } public static RegistrySupplier registerFence(String name, Block block) { - return register(name, () -> new FenceBlock(of(block))); + return registerDecay(name, () -> new FenceBlock(of(block))); } public static RegistrySupplier registerFence(String name, RegistrySupplier block) { - return register(name, () -> new FenceBlock(of(block.get()))); + return registerDecay(name, () -> new FenceBlock(of(block.get()))); } public static RegistrySupplier registerFenceGate(String name, Block block) { - return register(name, () -> new FenceGateBlock(of(block), WoodType.OAK)); // TODO: parameterize WoodType and BlockSetType + return registerDecay(name, () -> new FenceGateBlock(of(block), WoodType.OAK)); // TODO: parameterize WoodType and BlockSetType } public static RegistrySupplier registerFenceGate(String name, RegistrySupplier block) { - return register(name, () -> new FenceGateBlock(of(block.get()), WoodType.OAK)); // TODO: parameterize WoodType and BlockSetType + return registerDecay(name, () -> new FenceGateBlock(of(block.get()), WoodType.OAK)); // TODO: parameterize WoodType and BlockSetType } public static RegistrySupplier registerButton(String name, Block block) { - return register(name, () -> new ButtonBlock(of(block).noCollission().strength(0.5F), BlockSetType.STONE, 20, false)); + return registerDecay(name, () -> new ButtonBlock(of(block).noCollission().strength(0.5F), BlockSetType.STONE, 20, false)); } public static RegistrySupplier registerButton(String name, RegistrySupplier block) { - return register(name, () -> new ButtonBlock(of(block.get()).noCollission().strength(0.5F), BlockSetType.STONE, 20, false)); + return registerDecay(name, () -> new ButtonBlock(of(block.get()).noCollission().strength(0.5F), BlockSetType.STONE, 20, false)); } public static RegistrySupplier registerSlab(String name, Block block) { - return register(name, () -> new SlabBlock(of(block))); + return registerDecay(name, () -> new SlabBlock(of(block))); } public static RegistrySupplier registerSlab(String name, RegistrySupplier block) { - return register(name, () -> new SlabBlock(of(block.get()))); + return registerDecay(name, () -> new SlabBlock(of(block.get()))); } public static RegistrySupplier registerStairs(String name, Block block) { - return register(name, () -> new StairBlock(block.defaultBlockState(), of(block))); + return registerDecay(name, () -> new StairBlock(block.defaultBlockState(), of(block))); } public static RegistrySupplier registerStairs(String name, RegistrySupplier block) { - return register(name, () -> { + return registerDecay(name, () -> { var b = block.get(); return new StairBlock(b.defaultBlockState(), of(b)); }); } public static RegistrySupplier registerWall(String name, Block block) { - return register(name, () -> new WallBlock(of(block))); + return registerDecay(name, () -> new WallBlock(of(block))); } public static RegistrySupplier registerWall(String name, RegistrySupplier block) { - return register(name, () -> new WallBlock(of(block.get()))); + return registerDecay(name, () -> new WallBlock(of(block.get()))); } // private static BlockBehaviour.Properties of(Material material, MaterialColor color) { diff --git a/common/src/main/java/org/dimdev/dimdoors/item/ModItems.java b/common/src/main/java/org/dimdev/dimdoors/item/ModItems.java index 24540706..20403a6b 100644 --- a/common/src/main/java/org/dimdev/dimdoors/item/ModItems.java +++ b/common/src/main/java/org/dimdev/dimdoors/item/ModItems.java @@ -6,28 +6,20 @@ import dev.architectury.core.item.ArchitecturySpawnEggItem; import dev.architectury.registry.CreativeTabRegistry; import dev.architectury.registry.registries.DeferredRegister; import dev.architectury.registry.registries.RegistrySupplier; -import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.Component; import net.minecraft.world.item.*; import org.dimdev.dimdoors.DimensionalDoors; -import org.dimdev.dimdoors.block.entity.EntranceRiftBlockEntity; +import org.dimdev.dimdoors.block.ModBlocks; import org.dimdev.dimdoors.entity.ModEntityTypes; import org.dimdev.dimdoors.fluid.ModFluids; -import org.dimdev.dimdoors.item.door.DimensionalDoorItem; -import org.dimdev.dimdoors.item.door.DimensionalDoorItemRegistrar; -import org.dimdev.dimdoors.rift.targets.RandomTarget; -import org.dimdev.dimdoors.rift.targets.UnstableTarget; import org.dimdev.dimdoors.sound.ModSoundEvents; import java.util.HashSet; import java.util.Set; -import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; -import static org.dimdev.dimdoors.DimensionalDoors.id; - public final class ModItems { // DO NOT REMOVE!!! public static final DeferredRegister REGISTRY = DeferredRegister.create(DimensionalDoors.MOD_ID, Registries.ITEM); @@ -47,81 +39,87 @@ public final class ModItems { // .build()) // )); - public static final RegistrySupplier WORLD_THREAD = register("world_thread", Item::new); + public static final RegistrySupplier WORLD_THREAD = registerRegular("world_thread", Item::new); - public static final RegistrySupplier INFRANGIBLE_FIBER = register("infrangible_fiber", properties -> new Item(properties.fireResistant())); + public static final RegistrySupplier INFRANGIBLE_FIBER = registerRegular("infrangible_fiber", properties -> new Item(properties.fireResistant())); - public static final RegistrySupplier FRAYED_FILAMENTS = register("frayed_filament", Item::new); + public static final RegistrySupplier FRAYED_FILAMENTS = registerRegular("frayed_filament", Item::new); public static final RegistrySupplier RIFT_CONFIGURATION_TOOL = register("rift_configuration_tool", RiftConfigurationToolItem::new); - public static final RegistrySupplier RIFT_BLADE = register("rift_blade", properties -> new RiftBladeItem(properties.durability(100))); + public static final RegistrySupplier RIFT_BLADE = registerRegular("rift_blade", properties -> new RiftBladeItem(properties.durability(100))); - public static final RegistrySupplier RIFT_REMOVER = register("rift_remover", properties -> new RiftRemoverItem(properties.stacksTo(1).durability(100))); + public static final RegistrySupplier RIFT_REMOVER = registerRegular("rift_remover", properties -> new RiftRemoverItem(properties.stacksTo(1).durability(100))); - public static final RegistrySupplier RIFT_SIGNATURE = register("rift_signature", properties -> new RiftSignatureItem(properties.stacksTo(1).durability(1),true)); + public static final RegistrySupplier RIFT_SIGNATURE = registerRegular("rift_signature", properties -> new RiftSignatureItem(properties.stacksTo(1).durability(1),true)); - public static final RegistrySupplier STABILIZED_RIFT_SIGNATURE = register("stabilized_rift_signature", properties -> new StabilizedRiftSignatureItem(properties.stacksTo(1).durability(20))); + public static final RegistrySupplier STABILIZED_RIFT_SIGNATURE = registerRegular("stabilized_rift_signature", properties -> new StabilizedRiftSignatureItem(properties.stacksTo(1).durability(20))); - public static final RegistrySupplier RIFT_STABILIZER = register("rift_stabilizer", properties -> new RiftStabilizerItem(properties.stacksTo(1).durability(6))); + public static final RegistrySupplier RIFT_STABILIZER = registerRegular("rift_stabilizer", properties -> new RiftStabilizerItem(properties.stacksTo(1).durability(6))); - public static final RegistrySupplier RIFT_KEY = register("rift_key", properties -> new RiftKeyItem(properties.fireResistant().stacksTo(1))); + public static final RegistrySupplier RIFT_KEY = registerRegular("rift_key", properties -> new RiftKeyItem(properties.fireResistant().stacksTo(1))); - public static final RegistrySupplier DIMENSIONAL_ERASER = register("dimensional_eraser", properties -> new DimensionalEraserItem(properties.durability(100))); + public static final RegistrySupplier DIMENSIONAL_ERASER = registerRegular("dimensional_eraser", properties -> new DimensionalEraserItem(properties.durability(100))); - public static final RegistrySupplier MONOLITH_SPAWNER = register("monolith_spawner", properties -> new ArchitecturySpawnEggItem(ModEntityTypes.MONOLITH, 0xffffff, 0xffffff, properties)); + public static final RegistrySupplier MONOLITH_SPAWNER = registerRegular("monolith_spawner", properties -> new ArchitecturySpawnEggItem(ModEntityTypes.MONOLITH, 0xffffff, 0xffffff, properties)); - public static final RegistrySupplier WORLD_THREAD_HELMET = register("world_thread_helmet", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.HELMET, properties)); + public static final RegistrySupplier WORLD_THREAD_HELMET = registerRegular("world_thread_helmet", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.HELMET, properties)); - public static final RegistrySupplier WORLD_THREAD_CHESTPLATE = register("world_thread_chestplate", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.CHESTPLATE, properties)); + public static final RegistrySupplier WORLD_THREAD_CHESTPLATE = registerRegular("world_thread_chestplate", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.CHESTPLATE, properties)); - public static final RegistrySupplier WORLD_THREAD_LEGGINGS = register("world_thread_leggings", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.LEGGINGS, properties)); + public static final RegistrySupplier WORLD_THREAD_LEGGINGS = registerRegular("world_thread_leggings", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.LEGGINGS, properties)); - public static final RegistrySupplier WORLD_THREAD_BOOTS = register("world_thread_boots", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.BOOTS, properties)); + public static final RegistrySupplier WORLD_THREAD_BOOTS = registerRegular("world_thread_boots", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.BOOTS, properties)); - public static final RegistrySupplier MASK_WAND = register("mask_wand", properties -> new MaskWandItem(properties.stacksTo(100))); + public static final RegistrySupplier MASK_WAND = registerRegular("mask_wand", properties -> new MaskWandItem(properties.stacksTo(100))); - public static final RegistrySupplier STABLE_FABRIC = register("stable_fabric", Item::new); + public static final RegistrySupplier STABLE_FABRIC = registerRegular("stable_fabric", Item::new); - public static final RegistrySupplier CREEPY_RECORD = register("creepy_record", properties -> new ArchitecturyRecordItem(10, ModSoundEvents.CREEPY, properties, 317)); + public static final RegistrySupplier CREEPY_RECORD = registerRegular("creepy_record", properties -> new ArchitecturyRecordItem(10, ModSoundEvents.CREEPY, properties, 317)); - public static final RegistrySupplier WHITE_VOID_RECORD = register("white_void_record", properties -> new ArchitecturyRecordItem(10, ModSoundEvents.WHITE_VOID, properties, 225)); + public static final RegistrySupplier WHITE_VOID_RECORD = registerRegular("white_void_record", properties -> new ArchitecturyRecordItem(10, ModSoundEvents.WHITE_VOID, properties, 225)); - public static final RegistrySupplier ETERNAL_FLUID_BUCKET = register("eternal_fluid_bucket", properties -> new ArchitecturyBucketItem(ModFluids.ETERNAL_FLUID, properties.craftRemainder(Items.BUCKET).stacksTo(1))); - public static final RegistrySupplier LEAK_BUCKET = register("leak_bucket", properties -> new ArchitecturyBucketItem(ModFluids.LEAK, properties.craftRemainder(Items.BUCKET).stacksTo(1))); + public static final RegistrySupplier ETERNAL_FLUID_BUCKET = registerRegular("eternal_fluid_bucket", properties -> new ArchitecturyBucketItem(ModFluids.ETERNAL_FLUID, properties.craftRemainder(Items.BUCKET).stacksTo(1))); + public static final RegistrySupplier LEAK_BUCKET = registerDecay("leak_bucket", properties -> new ArchitecturyBucketItem(ModFluids.LEAK, properties.craftRemainder(Items.BUCKET).stacksTo(1))); - public static final RegistrySupplier MASK_SHARD = register("mask_shard", Item::new); + public static final RegistrySupplier MASK_SHARD = registerRegular("mask_shard", Item::new); - public static final RegistrySupplier FUZZY_FIREBALL = register("fuzzy_fireball", Item::new); + public static final RegistrySupplier FUZZY_FIREBALL = registerRegular("fuzzy_fireball", Item::new); - public static final RegistrySupplier FABRIC_OF_FINALITY = register("fabric_of_finality", Item::new); + public static final RegistrySupplier FABRIC_OF_FINALITY = registerRegular("fabric_of_finality", Item::new); - public static final RegistrySupplier LIMINAL_LINT = register("liminal_lint", Item::new); + public static final RegistrySupplier LIMINAL_LINT = registerRegular("liminal_lint", Item::new); - public static final RegistrySupplier ENDURING_FIBERS = register("enduring_fibers", Item::new); + public static final RegistrySupplier ENDURING_FIBERS = registerRegular("enduring_fibers", Item::new); - public static final RegistrySupplier RIFT_PEARL = register("rift_pearl", Item::new); + public static final RegistrySupplier RIFT_PEARL = registerRegular("rift_pearl", Item::new); - public static final RegistrySupplier AMALGAM_LUMP = register("amalgam_lump", Item::new); + public static final RegistrySupplier AMALGAM_LUMP = registerDecay("amalgam_lump", Item::new); - public static final RegistrySupplier CLOD = register("clod", Item::new); + public static final RegistrySupplier CLOD = registerDecay("clod", Item::new); - public static final RegistrySupplier GARMENT_OF_REALITY_HELMET = register("garment_of_reality_helmet", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.HELMET, properties)); + public static final RegistrySupplier GARMENT_OF_REALITY_HELMET = registerRegular("garment_of_reality_helmet", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.HELMET, properties)); - public static final RegistrySupplier GARMENT_OF_REALITY_CHESTPLATE = register("garment_of_reality_chestplate", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.CHESTPLATE, properties)); + public static final RegistrySupplier GARMENT_OF_REALITY_CHESTPLATE = registerRegular("garment_of_reality_chestplate", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.CHESTPLATE, properties)); - public static final RegistrySupplier GARMENT_OF_REALITY_LEGGINGS = register("garment_of_reality_leggings", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.LEGGINGS, properties)); + public static final RegistrySupplier GARMENT_OF_REALITY_LEGGINGS = registerRegular("garment_of_reality_leggings", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.LEGGINGS, properties)); - public static final RegistrySupplier GARMENT_OF_REALITY_BOOTS = register("garment_of_reality_boots", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.BOOTS, properties)); + public static final RegistrySupplier GARMENT_OF_REALITY_BOOTS = registerRegular("garment_of_reality_boots", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.BOOTS, properties)); public static final Set DOOR_ITEMS = new HashSet<>(); public static DeferredRegister CREATIVE_TABS = DeferredRegister.create(DimensionalDoors.MOD_ID, Registries.CREATIVE_MODE_TAB); - public static final RegistrySupplier DIMENSIONAL_DOORS = CREATIVE_TABS.register("dimensional_doors", () -> CreativeTabRegistry.create(builder -> builder.icon(() -> new ItemStack(ModItems.RIFT_BLADE.get())).title(Component.literal("Dimensional Doors")))); + public static final RegistrySupplier DIMENSIONAL_DOORS = CREATIVE_TABS.register("dimensional_doors", () -> CreativeTabRegistry.create(builder -> builder.icon(() -> new ItemStack(ModItems.RIFT_BLADE.get())).title(Component.translatable("itemGroup.dimdoors.dimensional_doors")))); + public static final RegistrySupplier DECAY = CREATIVE_TABS.register("decay", () -> CreativeTabRegistry.create(builder -> builder.icon(() -> new ItemStack(ModBlocks.UNRAVELED_FENCE.get())).title(Component.translatable("itemGroup.dimdoors.decay")))); - public static RegistrySupplier register(String name, Function item) { + public static RegistrySupplier registerRegular(String name, Function item) { return register(name, () -> item.apply(new Item.Properties().arch$tab(DIMENSIONAL_DOORS))); } + + public static RegistrySupplier registerDecay(String name, Function item) { + return register(name, () -> item.apply(new Item.Properties().arch$tab(DECAY))); + } + public static RegistrySupplier register(String name, Supplier item) { return REGISTRY.register(name, item); } diff --git a/common/src/main/resources/assets/dimdoors/lang/en_us.json b/common/src/main/resources/assets/dimdoors/lang/en_us.json index a3339f6d..559f511c 100644 --- a/common/src/main/resources/assets/dimdoors/lang/en_us.json +++ b/common/src/main/resources/assets/dimdoors/lang/en_us.json @@ -1,7 +1,8 @@ { "itemGroup.dimdoors.dimensional_doors": "Dimensional Doors", + "itemGroup.dimdoors.decay": "Decay", - "dimdoors.autogen_block_prefix": "Dimensional %s", + "dimdoors.autogen_block_prefix": "Dimensional ", "block.dimdoors.gold_door": "Gold Door", "block.dimdoors.quartz_door": "Quartz Door", "block.dimdoors.iron_dimensional_door": "Iron Dimensional Door", @@ -194,11 +195,11 @@ "block.dimdoors.oak_dimensional_door.info1": "to create a portal, or place anywhere.", "block.dimdoors.oak_dimensional_door.info2": "in a pocket dimension to exit.", "item.dimdoors.creepy_record": "Music Disc", - "item.dimdoors.creepy_record.desc": "Creepy - The sound of Limbo", + "item.dimdoors.creepy_record.desc": "Stevenrs11 - Creepy", "item.dimdoors.eternal_fluid_bucket": "Eternal Fluid Bucket", "item.dimdoors.leak_bucket": "Leak Bucket", "item.dimdoors.white_void_record": "Music Disc", - "item.dimdoors.white_void_record.desc": "White Void - The sound of Pocket", + "item.dimdoors.white_void_record.desc": "Lachney - White Void", "item.dimdoors.dimensional_eraser": "Dimensional Eraser", "item.dimdoors.dimensional_eraser.desc": "Erases entities", "item.dimdoors.monolith_spawner": "Monolith Spawner",