Moved decay related blocks to its own creative tab.

This commit is contained in:
Waterpicker 2024-01-20 04:46:25 -06:00
parent ee32d6b641
commit 9c0d40bdbf
3 changed files with 82 additions and 75 deletions

View file

@ -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<Block> REALITY_SPONGE = register("reality_sponge", () -> new RealitySpongeBlock(UNRAVELLED_FABRIC_BLOCK_SETTINGS));
//Decay graph filler.
public static final RegistrySupplier<Block> DRIFTWOOD_WOOD = register("driftwood_wood", () -> new RotatedPillarBlock(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F).sound(SoundType.WOOD)));
public static final RegistrySupplier<Block> DRIFTWOOD_LOG = register("driftwood_log", () -> new RotatedPillarBlock(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F).sound(SoundType.WOOD)));
public static final RegistrySupplier<Block> 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<Block> DRIFTWOOD_LEAVES = register("driftwood_leaves", () -> new LeavesBlock(of(OAK_LEAVES)));
public static final RegistrySupplier<Block> DRIFTWOOD_SAPLING = register("driftwood_sapling", () -> new Block(of(OAK_SAPLING)));
public static final RegistrySupplier<Block> DRIFTWOOD_WOOD = registerDecay("driftwood_wood", () -> new RotatedPillarBlock(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F).sound(SoundType.WOOD)));
public static final RegistrySupplier<Block> DRIFTWOOD_LOG = registerDecay("driftwood_log", () -> new RotatedPillarBlock(copy(OAK_WOOD).mapColor(COLOR_LIGHT_GRAY).strength(2.0F).sound(SoundType.WOOD)));
public static final RegistrySupplier<Block> 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<Block> DRIFTWOOD_LEAVES = registerDecay("driftwood_leaves", () -> new LeavesBlock(of(OAK_LEAVES)));
public static final RegistrySupplier<Block> DRIFTWOOD_SAPLING = registerDecay("driftwood_sapling", () -> new Block(of(OAK_SAPLING)));
public static final RegistrySupplier<Block> DRIFTWOOD_FENCE = registerFence("driftwood_fence", DRIFTWOOD_PLANKS);
public static final RegistrySupplier<Block> DRIFTWOOD_GATE = registerFenceGate("driftwood_gate", DRIFTWOOD_PLANKS); // TODO: add driftwood wood type
public static final RegistrySupplier<Block> DRIFTWOOD_BUTTON = registerButton("driftwood_button", DRIFTWOOD_PLANKS);
public static final RegistrySupplier<Block> DRIFTWOOD_SLAB = registerSlab("driftwood_slab", DRIFTWOOD_PLANKS);
public static final RegistrySupplier<Block> DRIFTWOOD_STAIRS = registerStairs("driftwood_stairs", DRIFTWOOD_PLANKS);
public static final RegistrySupplier<Block> 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<Block> 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<Block> 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<Block> 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<Block> 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<Block> 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<Block> 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<Block> RUST = register("rust", () -> new Block(copy(OAK_WOOD)));
public static final RegistrySupplier<Block> 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<Block> 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<Block> 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<Block> RUST = registerDecay("rust", () -> new Block(copy(OAK_WOOD)));
public static final RegistrySupplier<Block> AMALGAM_SLAB = registerSlab("amalgam_slab", AMALGAM_BLOCK);
public static final RegistrySupplier<Block> AMALGAM_STAIRS = registerStairs("amalgam_stairs", AMALGAM_BLOCK);
public static final RegistrySupplier<Block> AMALGAM_ORE = register("amalgam_ore", () -> new DropExperienceBlock(copy(STONE).requiresCorrectToolForDrops().strength(3.0F, 3.0F)));
public static final RegistrySupplier<Block> AMALGAM_ORE = registerDecay("amalgam_ore", () -> new DropExperienceBlock(copy(STONE).requiresCorrectToolForDrops().strength(3.0F, 3.0F)));
public static final RegistrySupplier<Block> CLOD_ORE = register("clod_ore", () -> new Block(copy(Blocks.AMETHYST_BLOCK)));
public static final RegistrySupplier<Block> CLOD_BLOCK = register("clod_block", () -> new Block(copy(Blocks.AMETHYST_BLOCK)));
public static final RegistrySupplier<Block> CLOD_ORE = registerDecay("clod_ore", () -> new Block(copy(Blocks.AMETHYST_BLOCK)));
public static final RegistrySupplier<Block> CLOD_BLOCK = registerDecay("clod_block", () -> new Block(copy(Blocks.AMETHYST_BLOCK)));
public static final RegistrySupplier<Block> GRAVEL_FENCE = registerFence("gravel_fence", GRAVEL);
public static final RegistrySupplier<Block> GRAVEL_BUTTON = registerButton("gravel_button", GRAVEL);
@ -221,8 +222,8 @@ public final class ModBlocks {
public static final RegistrySupplier<Block> NETHERRACK_STAIRS = registerStairs("netherrack_stairs", Blocks.NETHERRACK);
public static final RegistrySupplier<Block> NETHERRACK_WALL = registerWall("netherrack_wall", Blocks.NETHERRACK);
public static final RegistrySupplier<Block> UNRAVELED_SPIKE = register("unraveled_spike", () -> new PointedDripstoneBlock(of(UNRAVELLED_FABRIC.get()).lightLevel(state -> 0))); //TODO: make this proper class later
public static final RegistrySupplier<Block> GRITTY_STONE = register("gritty_stone", () -> new Block(of(STONE)));
public static final RegistrySupplier<Block> UNRAVELED_SPIKE = registerDecay("unraveled_spike", () -> new PointedDripstoneBlock(of(UNRAVELLED_FABRIC.get()).lightLevel(state -> 0))); //TODO: make this proper class later
public static final RegistrySupplier<Block> 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 <T extends Block> RegistrySupplier<T> registerDecay(String name, Supplier<T> 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 <T extends Block> RegistrySupplier<T> registerWithoutTab(String name, Supplier<T> 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<Block> registerFence(String name, Block block) {
return register(name, () -> new FenceBlock(of(block)));
return registerDecay(name, () -> new FenceBlock(of(block)));
}
public static RegistrySupplier<Block> registerFence(String name, RegistrySupplier<Block> block) {
return register(name, () -> new FenceBlock(of(block.get())));
return registerDecay(name, () -> new FenceBlock(of(block.get())));
}
public static RegistrySupplier<Block> 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<Block> registerFenceGate(String name, RegistrySupplier<Block> 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<Block> 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<Block> registerButton(String name, RegistrySupplier<Block> 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<Block> registerSlab(String name, Block block) {
return register(name, () -> new SlabBlock(of(block)));
return registerDecay(name, () -> new SlabBlock(of(block)));
}
public static RegistrySupplier<Block> registerSlab(String name, RegistrySupplier<Block> block) {
return register(name, () -> new SlabBlock(of(block.get())));
return registerDecay(name, () -> new SlabBlock(of(block.get())));
}
public static RegistrySupplier<Block> 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<Block> registerStairs(String name, RegistrySupplier<Block> block) {
return register(name, () -> {
return registerDecay(name, () -> {
var b = block.get();
return new StairBlock(b.defaultBlockState(), of(b));
});
}
public static RegistrySupplier<Block> registerWall(String name, Block block) {
return register(name, () -> new WallBlock(of(block)));
return registerDecay(name, () -> new WallBlock(of(block)));
}
public static RegistrySupplier<Block> registerWall(String name, RegistrySupplier<Block> 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) {

View file

@ -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<Item> REGISTRY = DeferredRegister.create(DimensionalDoors.MOD_ID, Registries.ITEM);
@ -47,81 +39,87 @@ public final class ModItems {
// .build())
// ));
public static final RegistrySupplier<Item> WORLD_THREAD = register("world_thread", Item::new);
public static final RegistrySupplier<Item> WORLD_THREAD = registerRegular("world_thread", Item::new);
public static final RegistrySupplier<Item> INFRANGIBLE_FIBER = register("infrangible_fiber", properties -> new Item(properties.fireResistant()));
public static final RegistrySupplier<Item> INFRANGIBLE_FIBER = registerRegular("infrangible_fiber", properties -> new Item(properties.fireResistant()));
public static final RegistrySupplier<Item> FRAYED_FILAMENTS = register("frayed_filament", Item::new);
public static final RegistrySupplier<Item> FRAYED_FILAMENTS = registerRegular("frayed_filament", Item::new);
public static final RegistrySupplier<Item> RIFT_CONFIGURATION_TOOL = register("rift_configuration_tool", RiftConfigurationToolItem::new);
public static final RegistrySupplier<Item> RIFT_BLADE = register("rift_blade", properties -> new RiftBladeItem(properties.durability(100)));
public static final RegistrySupplier<Item> RIFT_BLADE = registerRegular("rift_blade", properties -> new RiftBladeItem(properties.durability(100)));
public static final RegistrySupplier<Item> RIFT_REMOVER = register("rift_remover", properties -> new RiftRemoverItem(properties.stacksTo(1).durability(100)));
public static final RegistrySupplier<Item> RIFT_REMOVER = registerRegular("rift_remover", properties -> new RiftRemoverItem(properties.stacksTo(1).durability(100)));
public static final RegistrySupplier<Item> RIFT_SIGNATURE = register("rift_signature", properties -> new RiftSignatureItem(properties.stacksTo(1).durability(1),true));
public static final RegistrySupplier<Item> RIFT_SIGNATURE = registerRegular("rift_signature", properties -> new RiftSignatureItem(properties.stacksTo(1).durability(1),true));
public static final RegistrySupplier<Item> STABILIZED_RIFT_SIGNATURE = register("stabilized_rift_signature", properties -> new StabilizedRiftSignatureItem(properties.stacksTo(1).durability(20)));
public static final RegistrySupplier<Item> STABILIZED_RIFT_SIGNATURE = registerRegular("stabilized_rift_signature", properties -> new StabilizedRiftSignatureItem(properties.stacksTo(1).durability(20)));
public static final RegistrySupplier<Item> RIFT_STABILIZER = register("rift_stabilizer", properties -> new RiftStabilizerItem(properties.stacksTo(1).durability(6)));
public static final RegistrySupplier<Item> RIFT_STABILIZER = registerRegular("rift_stabilizer", properties -> new RiftStabilizerItem(properties.stacksTo(1).durability(6)));
public static final RegistrySupplier<Item> RIFT_KEY = register("rift_key", properties -> new RiftKeyItem(properties.fireResistant().stacksTo(1)));
public static final RegistrySupplier<Item> RIFT_KEY = registerRegular("rift_key", properties -> new RiftKeyItem(properties.fireResistant().stacksTo(1)));
public static final RegistrySupplier<Item> DIMENSIONAL_ERASER = register("dimensional_eraser", properties -> new DimensionalEraserItem(properties.durability(100)));
public static final RegistrySupplier<Item> DIMENSIONAL_ERASER = registerRegular("dimensional_eraser", properties -> new DimensionalEraserItem(properties.durability(100)));
public static final RegistrySupplier<Item> MONOLITH_SPAWNER = register("monolith_spawner", properties -> new ArchitecturySpawnEggItem(ModEntityTypes.MONOLITH, 0xffffff, 0xffffff, properties));
public static final RegistrySupplier<Item> MONOLITH_SPAWNER = registerRegular("monolith_spawner", properties -> new ArchitecturySpawnEggItem(ModEntityTypes.MONOLITH, 0xffffff, 0xffffff, properties));
public static final RegistrySupplier<Item> WORLD_THREAD_HELMET = register("world_thread_helmet", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.HELMET, properties));
public static final RegistrySupplier<Item> WORLD_THREAD_HELMET = registerRegular("world_thread_helmet", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.HELMET, properties));
public static final RegistrySupplier<Item> WORLD_THREAD_CHESTPLATE = register("world_thread_chestplate", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.CHESTPLATE, properties));
public static final RegistrySupplier<Item> WORLD_THREAD_CHESTPLATE = registerRegular("world_thread_chestplate", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.CHESTPLATE, properties));
public static final RegistrySupplier<Item> WORLD_THREAD_LEGGINGS = register("world_thread_leggings", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.LEGGINGS, properties));
public static final RegistrySupplier<Item> WORLD_THREAD_LEGGINGS = registerRegular("world_thread_leggings", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.LEGGINGS, properties));
public static final RegistrySupplier<Item> WORLD_THREAD_BOOTS = register("world_thread_boots", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.BOOTS, properties));
public static final RegistrySupplier<Item> WORLD_THREAD_BOOTS = registerRegular("world_thread_boots", properties -> new ArmorItem(ModArmorMaterials.WORLD_THREAD, ArmorItem.Type.BOOTS, properties));
public static final RegistrySupplier<Item> MASK_WAND = register("mask_wand", properties -> new MaskWandItem(properties.stacksTo(100)));
public static final RegistrySupplier<Item> MASK_WAND = registerRegular("mask_wand", properties -> new MaskWandItem(properties.stacksTo(100)));
public static final RegistrySupplier<Item> STABLE_FABRIC = register("stable_fabric", Item::new);
public static final RegistrySupplier<Item> STABLE_FABRIC = registerRegular("stable_fabric", Item::new);
public static final RegistrySupplier<Item> CREEPY_RECORD = register("creepy_record", properties -> new ArchitecturyRecordItem(10, ModSoundEvents.CREEPY, properties, 317));
public static final RegistrySupplier<Item> CREEPY_RECORD = registerRegular("creepy_record", properties -> new ArchitecturyRecordItem(10, ModSoundEvents.CREEPY, properties, 317));
public static final RegistrySupplier<Item> WHITE_VOID_RECORD = register("white_void_record", properties -> new ArchitecturyRecordItem(10, ModSoundEvents.WHITE_VOID, properties, 225));
public static final RegistrySupplier<Item> WHITE_VOID_RECORD = registerRegular("white_void_record", properties -> new ArchitecturyRecordItem(10, ModSoundEvents.WHITE_VOID, properties, 225));
public static final RegistrySupplier<Item> ETERNAL_FLUID_BUCKET = register("eternal_fluid_bucket", properties -> new ArchitecturyBucketItem(ModFluids.ETERNAL_FLUID, properties.craftRemainder(Items.BUCKET).stacksTo(1)));
public static final RegistrySupplier<Item> LEAK_BUCKET = register("leak_bucket", properties -> new ArchitecturyBucketItem(ModFluids.LEAK, properties.craftRemainder(Items.BUCKET).stacksTo(1)));
public static final RegistrySupplier<Item> ETERNAL_FLUID_BUCKET = registerRegular("eternal_fluid_bucket", properties -> new ArchitecturyBucketItem(ModFluids.ETERNAL_FLUID, properties.craftRemainder(Items.BUCKET).stacksTo(1)));
public static final RegistrySupplier<Item> LEAK_BUCKET = registerDecay("leak_bucket", properties -> new ArchitecturyBucketItem(ModFluids.LEAK, properties.craftRemainder(Items.BUCKET).stacksTo(1)));
public static final RegistrySupplier<Item> MASK_SHARD = register("mask_shard", Item::new);
public static final RegistrySupplier<Item> MASK_SHARD = registerRegular("mask_shard", Item::new);
public static final RegistrySupplier<Item> FUZZY_FIREBALL = register("fuzzy_fireball", Item::new);
public static final RegistrySupplier<Item> FUZZY_FIREBALL = registerRegular("fuzzy_fireball", Item::new);
public static final RegistrySupplier<Item> FABRIC_OF_FINALITY = register("fabric_of_finality", Item::new);
public static final RegistrySupplier<Item> FABRIC_OF_FINALITY = registerRegular("fabric_of_finality", Item::new);
public static final RegistrySupplier<Item> LIMINAL_LINT = register("liminal_lint", Item::new);
public static final RegistrySupplier<Item> LIMINAL_LINT = registerRegular("liminal_lint", Item::new);
public static final RegistrySupplier<Item> ENDURING_FIBERS = register("enduring_fibers", Item::new);
public static final RegistrySupplier<Item> ENDURING_FIBERS = registerRegular("enduring_fibers", Item::new);
public static final RegistrySupplier<Item> RIFT_PEARL = register("rift_pearl", Item::new);
public static final RegistrySupplier<Item> RIFT_PEARL = registerRegular("rift_pearl", Item::new);
public static final RegistrySupplier<Item> AMALGAM_LUMP = register("amalgam_lump", Item::new);
public static final RegistrySupplier<Item> AMALGAM_LUMP = registerDecay("amalgam_lump", Item::new);
public static final RegistrySupplier<Item> CLOD = register("clod", Item::new);
public static final RegistrySupplier<Item> CLOD = registerDecay("clod", Item::new);
public static final RegistrySupplier<Item> GARMENT_OF_REALITY_HELMET = register("garment_of_reality_helmet", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.HELMET, properties));
public static final RegistrySupplier<Item> GARMENT_OF_REALITY_HELMET = registerRegular("garment_of_reality_helmet", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.HELMET, properties));
public static final RegistrySupplier<Item> GARMENT_OF_REALITY_CHESTPLATE = register("garment_of_reality_chestplate", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.CHESTPLATE, properties));
public static final RegistrySupplier<Item> GARMENT_OF_REALITY_CHESTPLATE = registerRegular("garment_of_reality_chestplate", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.CHESTPLATE, properties));
public static final RegistrySupplier<Item> GARMENT_OF_REALITY_LEGGINGS = register("garment_of_reality_leggings", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.LEGGINGS, properties));
public static final RegistrySupplier<Item> GARMENT_OF_REALITY_LEGGINGS = registerRegular("garment_of_reality_leggings", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.LEGGINGS, properties));
public static final RegistrySupplier<Item> GARMENT_OF_REALITY_BOOTS = register("garment_of_reality_boots", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.BOOTS, properties));
public static final RegistrySupplier<Item> GARMENT_OF_REALITY_BOOTS = registerRegular("garment_of_reality_boots", properties -> new ArmorItem(ModArmorMaterials.GARMENT_OF_REALITY, ArmorItem.Type.BOOTS, properties));
public static final Set<Item> DOOR_ITEMS = new HashSet<>();
public static DeferredRegister<CreativeModeTab> CREATIVE_TABS = DeferredRegister.create(DimensionalDoors.MOD_ID, Registries.CREATIVE_MODE_TAB);
public static final RegistrySupplier<CreativeModeTab> 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<CreativeModeTab> 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<CreativeModeTab> 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<Item> register(String name, Function<Item.Properties, Item> item) {
public static RegistrySupplier<Item> registerRegular(String name, Function<Item.Properties, Item> item) {
return register(name, () -> item.apply(new Item.Properties().arch$tab(DIMENSIONAL_DOORS)));
}
public static RegistrySupplier<Item> registerDecay(String name, Function<Item.Properties, Item> item) {
return register(name, () -> item.apply(new Item.Properties().arch$tab(DECAY)));
}
public static RegistrySupplier<Item> register(String name, Supplier<Item> item) {
return REGISTRY.register(name, item);
}

View file

@ -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",