summaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/funnyteleporters/FunnyRegistry.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/moe/nea/funnyteleporters/FunnyRegistry.java')
-rw-r--r--src/main/java/moe/nea/funnyteleporters/FunnyRegistry.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/moe/nea/funnyteleporters/FunnyRegistry.java b/src/main/java/moe/nea/funnyteleporters/FunnyRegistry.java
index 0297425..87f2c4f 100644
--- a/src/main/java/moe/nea/funnyteleporters/FunnyRegistry.java
+++ b/src/main/java/moe/nea/funnyteleporters/FunnyRegistry.java
@@ -11,19 +11,20 @@ import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
public class FunnyRegistry {
+ public static final String MODID = "funny_teleporters";
public static Block COLOURED_CHEST = registerBlock("coloured_chest", new ColouredChestBlock(AbstractBlock.Settings.create()));
public static BlockEntityType<ColouredChestBlockEntity> COLOURED_CHEST_ENTITY = registerBlockEntity("coloured_chest", BlockEntityType.Builder.create(ColouredChestBlockEntity::new, COLOURED_CHEST));
private static <T extends BlockEntity> BlockEntityType<T> registerBlockEntity(String name, BlockEntityType.Builder<T> builder, Block... blocks) {
return Registry.register(Registries.BLOCK_ENTITY_TYPE,
- Identifier.of("funny_teleporters", name),
+ Identifier.of(MODID, name),
builder.build()
);
}
private static <T extends Block> T registerBlock(String name, T block) {
- var id = Identifier.of("funny_teleporters", name);
+ var id = Identifier.of(MODID, name);
Registry.register(Registries.ITEM, id, new BlockItem(block, new Item.Settings()));
return Registry.register(Registries.BLOCK, id, block);
}