JukeboxSongs .java

net.minecraft.world.item.JukeboxSongs (interface): members: CREATOR_MUSIC_BOX, LAVA_CHICKEN, OTHERSIDE, PRECIPICE, THIRTEEN, CREATOR, MELLOHI, PIGSTEP.

net.minecraft.world.iteminterface79 linescommon3.7 KB

API Surface (0)

No public/protected methods detected (fields or constants only).

Fields & Constants (26)

THIRTEEN
CAT
BLOCKS
CHIRP
FAR
MALL
MELLOHI
STAL
STRAD
WARD
ELEVEN
WAIT
PIGSTEP
OTHERSIDE
FIVE
RELIC
PRECIPICE
CREATOR
CREATOR_MUSIC_BOX
TEARS
LAVA_CHICKEN
BOUNCE
context
registryKey

…and 2 more (see full source).

String literals (18)

"blocks"
"chirp"
"mall"
"mellohi"
"stal"
"strad"
"ward"
"wait"
"pigstep"
"otherside"
"relic"
"precipice"
"creator"
"creator_music_box"
"tears"
"lava_chicken"
"bounce"
"jukebox_song"

Full Source

JukeboxSongs.java79 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.item;
2
3
import net.minecraft.core.Holder;
4
import net.minecraft.core.registries.Registries;
5
import net.minecraft.data.worldgen.BootstrapContext;
6
import net.minecraft.network.chat.Component;
7
import net.minecraft.resources.Identifier;
8
import net.minecraft.resources.ResourceKey;
9
import net.minecraft.sounds.SoundEvent;
10
import net.minecraft.sounds.SoundEvents;
11
import net.minecraft.util.Util;
12
13
public interface JukeboxSongs {
14
	ResourceKey<JukeboxSong> THIRTEEN = create("13");
15
	ResourceKey<JukeboxSong> CAT = create("cat");
16
	ResourceKey<JukeboxSong> BLOCKS = create("blocks");
17
	ResourceKey<JukeboxSong> CHIRP = create("chirp");
18
	ResourceKey<JukeboxSong> FAR = create("far");
19
	ResourceKey<JukeboxSong> MALL = create("mall");
20
	ResourceKey<JukeboxSong> MELLOHI = create("mellohi");
21
	ResourceKey<JukeboxSong> STAL = create("stal");
22
	ResourceKey<JukeboxSong> STRAD = create("strad");
23
	ResourceKey<JukeboxSong> WARD = create("ward");
24
	ResourceKey<JukeboxSong> ELEVEN = create("11");
25
	ResourceKey<JukeboxSong> WAIT = create("wait");
26
	ResourceKey<JukeboxSong> PIGSTEP = create("pigstep");
27
	ResourceKey<JukeboxSong> OTHERSIDE = create("otherside");
28
	ResourceKey<JukeboxSong> FIVE = create("5");
29
	ResourceKey<JukeboxSong> RELIC = create("relic");
30
	ResourceKey<JukeboxSong> PRECIPICE = create("precipice");
31
	ResourceKey<JukeboxSong> CREATOR = create("creator");
32
	ResourceKey<JukeboxSong> CREATOR_MUSIC_BOX = create("creator_music_box");
33
	ResourceKey<JukeboxSong> TEARS = create("tears");
34
	ResourceKey<JukeboxSong> LAVA_CHICKEN = create("lava_chicken");
35
	ResourceKey<JukeboxSong> BOUNCE = create("bounce");
36
37
	private static ResourceKey<JukeboxSong> create(final String id) {
38
		return ResourceKey.create(Registries.JUKEBOX_SONG, Identifier.withDefaultNamespace(id));
39
	}
40
41
	private static void register(
42
		final BootstrapContext<JukeboxSong> context,
43
		final ResourceKey<JukeboxSong> registryKey,
44
		final Holder.Reference<SoundEvent> soundEvent,
45
		final int lengthInSeconds,
46
		final int comparatorOutput
47
	) {
48
		context.register(
49
			registryKey,
50
			new JukeboxSong(soundEvent, Component.translatable(Util.makeDescriptionId("jukebox_song", registryKey.identifier())), lengthInSeconds, comparatorOutput)
51
		);
52
	}
53
54
	static void bootstrap(final BootstrapContext<JukeboxSong> context) {
55
		register(context, THIRTEEN, SoundEvents.MUSIC_DISC_13, 178, 1);
56
		register(context, CAT, SoundEvents.MUSIC_DISC_CAT, 185, 2);
57
		register(context, BLOCKS, SoundEvents.MUSIC_DISC_BLOCKS, 345, 3);
58
		register(context, CHIRP, SoundEvents.MUSIC_DISC_CHIRP, 185, 4);
59
		register(context, FAR, SoundEvents.MUSIC_DISC_FAR, 174, 5);
60
		register(context, MALL, SoundEvents.MUSIC_DISC_MALL, 197, 6);
61
		register(context, MELLOHI, SoundEvents.MUSIC_DISC_MELLOHI, 96, 7);
62
		register(context, STAL, SoundEvents.MUSIC_DISC_STAL, 150, 8);
63
		register(context, STRAD, SoundEvents.MUSIC_DISC_STRAD, 188, 9);
64
		register(context, WARD, SoundEvents.MUSIC_DISC_WARD, 251, 10);
65
		register(context, ELEVEN, SoundEvents.MUSIC_DISC_11, 71, 11);
66
		register(context, WAIT, SoundEvents.MUSIC_DISC_WAIT, 238, 12);
67
		register(context, PIGSTEP, SoundEvents.MUSIC_DISC_PIGSTEP, 149, 13);
68
		register(context, OTHERSIDE, SoundEvents.MUSIC_DISC_OTHERSIDE, 195, 14);
69
		register(context, FIVE, SoundEvents.MUSIC_DISC_5, 178, 15);
70
		register(context, RELIC, SoundEvents.MUSIC_DISC_RELIC, 218, 14);
71
		register(context, PRECIPICE, SoundEvents.MUSIC_DISC_PRECIPICE, 299, 13);
72
		register(context, CREATOR, SoundEvents.MUSIC_DISC_CREATOR, 176, 12);
73
		register(context, CREATOR_MUSIC_BOX, SoundEvents.MUSIC_DISC_CREATOR_MUSIC_BOX, 73, 11);
74
		register(context, TEARS, SoundEvents.MUSIC_DISC_TEARS, 175, 10);
75
		register(context, LAVA_CHICKEN, SoundEvents.MUSIC_DISC_LAVA_CHICKEN, 134, 9);
76
		register(context, BOUNCE, SoundEvents.MUSIC_DISC_BOUNCE, 234, 8);
77
	}
78
}
79

Decompiled Minecraft 26.3 source of JukeboxSongs (net/minecraft/world/item/JukeboxSongs.java) with Mojang official mappings, stored verbatim on the site.