Sounds
This commit is contained in:
parent
74992a7f68
commit
62698e8bf5
24 changed files with 64 additions and 30 deletions
|
@ -30,7 +30,7 @@ public class BlockEntityRegistry {
|
|||
BlockEntityType.Builder.create(ESignBlockEntity::new, getSigns()));
|
||||
|
||||
public static <T extends BlockEntity> BlockEntityType<T> registerBlockEntity(String id, BlockEntityType.Builder<T> builder) {
|
||||
return Registry.register(Registry.BLOCK_ENTITY_TYPE, BetterEnd.getIdentifier(id), builder.build(null));
|
||||
return Registry.register(Registry.BLOCK_ENTITY_TYPE, BetterEnd.makeID(id), builder.build(null));
|
||||
}
|
||||
|
||||
public static void register() {}
|
||||
|
|
|
@ -68,12 +68,12 @@ public class BlockRegistry {
|
|||
public static void register() {}
|
||||
|
||||
public static Block registerBlock(String name, Block block) {
|
||||
Registry.register(Registry.BLOCK, BetterEnd.getIdentifier(name), block);
|
||||
Registry.register(Registry.BLOCK, BetterEnd.makeID(name), block);
|
||||
ItemRegistry.registerItem(name, new BlockItem(block, new Item.Settings().group(CreativeTab.END_TAB)));
|
||||
return block;
|
||||
}
|
||||
|
||||
public static Block registerBlockNI(String name, Block block) {
|
||||
return Registry.register(Registry.BLOCK, BetterEnd.getIdentifier(name), block);
|
||||
return Registry.register(Registry.BLOCK, BetterEnd.makeID(name), block);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ public class BlockTagRegistry {
|
|||
public static final Tag.Identified<Block> END_GROUND = makeTag("end_ground");
|
||||
|
||||
private static Tag.Identified<Block> makeTag(String name) {
|
||||
return (Identified<Block>) TagRegistry.block(BetterEnd.getIdentifier(name));
|
||||
return (Identified<Block>) TagRegistry.block(BetterEnd.makeID(name));
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
|
|
|
@ -65,7 +65,7 @@ public class ItemRegistry {
|
|||
|
||||
protected static Item registerItem(String name, Item item) {
|
||||
if (item != Items.AIR) {
|
||||
Registry.register(Registry.ITEM, BetterEnd.getIdentifier(name), item);
|
||||
Registry.register(Registry.ITEM, BetterEnd.makeID(name), item);
|
||||
if (item instanceof BlockItem)
|
||||
MOD_BLOCKS.add(item);
|
||||
else
|
||||
|
@ -75,7 +75,7 @@ public class ItemRegistry {
|
|||
}
|
||||
|
||||
protected static ToolItem registerTool(String name, ToolItem item) {
|
||||
Registry.register(Registry.ITEM, BetterEnd.getIdentifier(name), item);
|
||||
Registry.register(Registry.ITEM, BetterEnd.makeID(name), item);
|
||||
MOD_ITEMS.add(item);
|
||||
|
||||
if (item instanceof ShovelItem) {
|
||||
|
|
|
@ -15,6 +15,6 @@ public class ParticleRegistry {
|
|||
}
|
||||
|
||||
private static DefaultParticleType register(String name) {
|
||||
return Registry.register(Registry.PARTICLE_TYPE, BetterEnd.getIdentifier(name), FabricParticleTypes.simple());
|
||||
return Registry.register(Registry.PARTICLE_TYPE, BetterEnd.makeID(name), FabricParticleTypes.simple());
|
||||
}
|
||||
}
|
||||
|
|
18
src/main/java/ru/betterend/registry/SoundsRegistry.java
Normal file
18
src/main/java/ru/betterend/registry/SoundsRegistry.java
Normal file
|
@ -0,0 +1,18 @@
|
|||
package ru.betterend.registry;
|
||||
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.BetterEnd;
|
||||
|
||||
public class SoundsRegistry
|
||||
{
|
||||
public static final SoundEvent AMBIENT_FOGGY_MUSHROOMLAND = registerAmbient("foggy_mushroomland");
|
||||
|
||||
public static void register() {}
|
||||
|
||||
private static SoundEvent registerAmbient(String id)
|
||||
{
|
||||
id = "betterend.ambient." + id;
|
||||
return Registry.register(Registry.SOUND_EVENT, id, new SoundEvent(BetterEnd.makeID(id)));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue