- 103
- 2
- 2
Код:
public class Sounds
{
public static SoundEvent bashkiriya;
public static void registerSounds()
{
bashkiriya = registerSound("soundbashkiriya");
}
private static SoundEvent registerSound(String name) {
ResourceLocation location = new ResourceLocation("differentthings", name);
SoundEvent event = new SoundEvent(location);
event.setRegistryName(name);
ForgeRegistries.SOUND_EVENTS.register(event);
return event;
}
}
Код:
public class ItemMusicDisc extends ItemRecord {
public ItemMusicDisc(SoundEvent id) {
super("music_discbashkiriya",id);
this.setRegistryName ("record."+"music_discbashkiriya");
this.setUnlocalizedName("record."+"music_discbashkiriya");
setMaxStackSize(1);
setCreativeTab(CTAB);
}
}
Код:
public static Item MUSICDISC = new ItemMusicDisc(Sounds.bashkiriya);