Package net.minecraft.block.enums
Enum Class Instrument
- All Implemented Interfaces:
Serializable
,Comparable<Instrument>
,Constable
,StringIdentifiable
- Mappings:
Namespace Name official czu
intermediary net/minecraft/class_2766
named net/minecraft/block/enums/Instrument
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiable
StringIdentifiable.Codec<E extends Enum<E> & StringIdentifiable>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private final RegistryEntry<SoundEvent>
private final Instrument.Type
Fields inherited from interface net.minecraft.util.StringIdentifiable
field_38377
-
Constructor Summary
ModifierConstructorDescriptionprivate
Instrument
(String name, RegistryEntry<SoundEvent> sound, Instrument.Type type) -
Method Summary
Modifier and TypeMethodDescriptionasString()
Returns the unique string representation of the enum, used for serialization.static Optional<Instrument>
fromAboveState
(BlockState state) static Instrument
fromBelowState
(BlockState state) getSound()
boolean
Returns whether note blocks playing this instrument should determine the sound from skulls above them.boolean
Returns whether this instrument should prevent note blocks from playing when they do not have air above them.boolean
Returns whether note blocks playing this instrument should produce note particles.static Instrument
Returns the enum constant of this class with the specified name.static Instrument[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HARP
- Mappings:
Namespace Name Mixin selector official a
Lczu;a:Lczu;
intermediary field_12648
Lnet/minecraft/class_2766;field_12648:Lnet/minecraft/class_2766;
named HARP
Lnet/minecraft/block/enums/Instrument;HARP:Lnet/minecraft/block/enums/Instrument;
-
BASEDRUM
- Mappings:
Namespace Name Mixin selector official b
Lczu;b:Lczu;
intermediary field_12653
Lnet/minecraft/class_2766;field_12653:Lnet/minecraft/class_2766;
named BASEDRUM
Lnet/minecraft/block/enums/Instrument;BASEDRUM:Lnet/minecraft/block/enums/Instrument;
-
SNARE
- Mappings:
Namespace Name Mixin selector official c
Lczu;c:Lczu;
intermediary field_12643
Lnet/minecraft/class_2766;field_12643:Lnet/minecraft/class_2766;
named SNARE
Lnet/minecraft/block/enums/Instrument;SNARE:Lnet/minecraft/block/enums/Instrument;
-
HAT
- Mappings:
Namespace Name Mixin selector official d
Lczu;d:Lczu;
intermediary field_12645
Lnet/minecraft/class_2766;field_12645:Lnet/minecraft/class_2766;
named HAT
Lnet/minecraft/block/enums/Instrument;HAT:Lnet/minecraft/block/enums/Instrument;
-
BASS
- Mappings:
Namespace Name Mixin selector official e
Lczu;e:Lczu;
intermediary field_12651
Lnet/minecraft/class_2766;field_12651:Lnet/minecraft/class_2766;
named BASS
Lnet/minecraft/block/enums/Instrument;BASS:Lnet/minecraft/block/enums/Instrument;
-
FLUTE
- Mappings:
Namespace Name Mixin selector official f
Lczu;f:Lczu;
intermediary field_12650
Lnet/minecraft/class_2766;field_12650:Lnet/minecraft/class_2766;
named FLUTE
Lnet/minecraft/block/enums/Instrument;FLUTE:Lnet/minecraft/block/enums/Instrument;
-
BELL
- Mappings:
Namespace Name Mixin selector official g
Lczu;g:Lczu;
intermediary field_12644
Lnet/minecraft/class_2766;field_12644:Lnet/minecraft/class_2766;
named BELL
Lnet/minecraft/block/enums/Instrument;BELL:Lnet/minecraft/block/enums/Instrument;
-
GUITAR
- Mappings:
Namespace Name Mixin selector official h
Lczu;h:Lczu;
intermediary field_12654
Lnet/minecraft/class_2766;field_12654:Lnet/minecraft/class_2766;
named GUITAR
Lnet/minecraft/block/enums/Instrument;GUITAR:Lnet/minecraft/block/enums/Instrument;
-
CHIME
- Mappings:
Namespace Name Mixin selector official i
Lczu;i:Lczu;
intermediary field_12647
Lnet/minecraft/class_2766;field_12647:Lnet/minecraft/class_2766;
named CHIME
Lnet/minecraft/block/enums/Instrument;CHIME:Lnet/minecraft/block/enums/Instrument;
-
XYLOPHONE
- Mappings:
Namespace Name Mixin selector official j
Lczu;j:Lczu;
intermediary field_12655
Lnet/minecraft/class_2766;field_12655:Lnet/minecraft/class_2766;
named XYLOPHONE
Lnet/minecraft/block/enums/Instrument;XYLOPHONE:Lnet/minecraft/block/enums/Instrument;
-
IRON_XYLOPHONE
- Mappings:
Namespace Name Mixin selector official k
Lczu;k:Lczu;
intermediary field_18284
Lnet/minecraft/class_2766;field_18284:Lnet/minecraft/class_2766;
named IRON_XYLOPHONE
Lnet/minecraft/block/enums/Instrument;IRON_XYLOPHONE:Lnet/minecraft/block/enums/Instrument;
-
COW_BELL
- Mappings:
Namespace Name Mixin selector official l
Lczu;l:Lczu;
intermediary field_18285
Lnet/minecraft/class_2766;field_18285:Lnet/minecraft/class_2766;
named COW_BELL
Lnet/minecraft/block/enums/Instrument;COW_BELL:Lnet/minecraft/block/enums/Instrument;
-
DIDGERIDOO
- Mappings:
Namespace Name Mixin selector official m
Lczu;m:Lczu;
intermediary field_18286
Lnet/minecraft/class_2766;field_18286:Lnet/minecraft/class_2766;
named DIDGERIDOO
Lnet/minecraft/block/enums/Instrument;DIDGERIDOO:Lnet/minecraft/block/enums/Instrument;
-
BIT
- Mappings:
Namespace Name Mixin selector official n
Lczu;n:Lczu;
intermediary field_18287
Lnet/minecraft/class_2766;field_18287:Lnet/minecraft/class_2766;
named BIT
Lnet/minecraft/block/enums/Instrument;BIT:Lnet/minecraft/block/enums/Instrument;
-
BANJO
- Mappings:
Namespace Name Mixin selector official o
Lczu;o:Lczu;
intermediary field_18288
Lnet/minecraft/class_2766;field_18288:Lnet/minecraft/class_2766;
named BANJO
Lnet/minecraft/block/enums/Instrument;BANJO:Lnet/minecraft/block/enums/Instrument;
-
PLING
- Mappings:
Namespace Name Mixin selector official p
Lczu;p:Lczu;
intermediary field_18289
Lnet/minecraft/class_2766;field_18289:Lnet/minecraft/class_2766;
named PLING
Lnet/minecraft/block/enums/Instrument;PLING:Lnet/minecraft/block/enums/Instrument;
-
ZOMBIE
- Mappings:
Namespace Name Mixin selector official q
Lczu;q:Lczu;
intermediary field_41324
Lnet/minecraft/class_2766;field_41324:Lnet/minecraft/class_2766;
named ZOMBIE
Lnet/minecraft/block/enums/Instrument;ZOMBIE:Lnet/minecraft/block/enums/Instrument;
-
SKELETON
- Mappings:
Namespace Name Mixin selector official r
Lczu;r:Lczu;
intermediary field_41325
Lnet/minecraft/class_2766;field_41325:Lnet/minecraft/class_2766;
named SKELETON
Lnet/minecraft/block/enums/Instrument;SKELETON:Lnet/minecraft/block/enums/Instrument;
-
CREEPER
- Mappings:
Namespace Name Mixin selector official s
Lczu;s:Lczu;
intermediary field_41326
Lnet/minecraft/class_2766;field_41326:Lnet/minecraft/class_2766;
named CREEPER
Lnet/minecraft/block/enums/Instrument;CREEPER:Lnet/minecraft/block/enums/Instrument;
-
DRAGON
- Mappings:
Namespace Name Mixin selector official t
Lczu;t:Lczu;
intermediary field_41327
Lnet/minecraft/class_2766;field_41327:Lnet/minecraft/class_2766;
named DRAGON
Lnet/minecraft/block/enums/Instrument;DRAGON:Lnet/minecraft/block/enums/Instrument;
-
WITHER_SKELETON
- Mappings:
Namespace Name Mixin selector official u
Lczu;u:Lczu;
intermediary field_41328
Lnet/minecraft/class_2766;field_41328:Lnet/minecraft/class_2766;
named WITHER_SKELETON
Lnet/minecraft/block/enums/Instrument;WITHER_SKELETON:Lnet/minecraft/block/enums/Instrument;
-
PIGLIN
- Mappings:
Namespace Name Mixin selector official v
Lczu;v:Lczu;
intermediary field_41329
Lnet/minecraft/class_2766;field_41329:Lnet/minecraft/class_2766;
named PIGLIN
Lnet/minecraft/block/enums/Instrument;PIGLIN:Lnet/minecraft/block/enums/Instrument;
-
CUSTOM_HEAD
- Mappings:
Namespace Name Mixin selector official w
Lczu;w:Lczu;
intermediary field_41604
Lnet/minecraft/class_2766;field_41604:Lnet/minecraft/class_2766;
named CUSTOM_HEAD
Lnet/minecraft/block/enums/Instrument;CUSTOM_HEAD:Lnet/minecraft/block/enums/Instrument;
-
-
Field Details
-
name
- Mappings:
Namespace Name Mixin selector official x
Lczu;x:Ljava/lang/String;
intermediary field_12646
Lnet/minecraft/class_2766;field_12646:Ljava/lang/String;
named name
Lnet/minecraft/block/enums/Instrument;name:Ljava/lang/String;
-
sound
- Mappings:
Namespace Name Mixin selector official y
Lczu;y:Lgz;
intermediary field_12649
Lnet/minecraft/class_2766;field_12649:Lnet/minecraft/class_6880;
named sound
Lnet/minecraft/block/enums/Instrument;sound:Lnet/minecraft/registry/entry/RegistryEntry;
-
type
- Mappings:
Namespace Name Mixin selector official z
Lczu;z:Lczu$a;
intermediary field_41605
Lnet/minecraft/class_2766;field_41605:Lnet/minecraft/class_2766$class_7994;
named type
Lnet/minecraft/block/enums/Instrument;type:Lnet/minecraft/block/enums/Instrument$Type;
-
-
Constructor Details
-
Instrument
- Mappings:
Namespace Name Mixin selector official <init>
Lczu;<init>(Ljava/lang/String;ILjava/lang/String;Lgz;Lczu$a;)V
intermediary <init>
Lnet/minecraft/class_2766;<init>(Ljava/lang/String;ILjava/lang/String;Lnet/minecraft/class_6880;Lnet/minecraft/class_2766$class_7994;)V
named <init>
Lnet/minecraft/block/enums/Instrument;<init>(Ljava/lang/String;ILjava/lang/String;Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/block/enums/Instrument$Type;)V
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asString
in interfaceStringIdentifiable
- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector official c
Laor;c()Ljava/lang/String;
intermediary method_15434
Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;
named asString
Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
-
getSound
- Mappings:
Namespace Name Mixin selector official a
Lczu;a()Lgz;
intermediary method_11886
Lnet/minecraft/class_2766;method_11886()Lnet/minecraft/class_6880;
named getSound
Lnet/minecraft/block/enums/Instrument;getSound()Lnet/minecraft/registry/entry/RegistryEntry;
-
shouldSpawnNoteParticles
public boolean shouldSpawnNoteParticles()Returns whether note blocks playing this instrument should produce note particles.- Returns:
- whether note blocks playing this instrument should produce note particles
- Mappings:
Namespace Name Mixin selector official b
Lczu;b()Z
intermediary method_47889
Lnet/minecraft/class_2766;method_47889()Z
named shouldSpawnNoteParticles
Lnet/minecraft/block/enums/Instrument;shouldSpawnNoteParticles()Z
-
hasCustomSound
public boolean hasCustomSound()Returns whether note blocks playing this instrument should determine the sound from skulls above them.- Returns:
- whether note blocks playing this instrument should determine the sound from skulls above them
- Mappings:
Namespace Name Mixin selector official d
Lczu;d()Z
intermediary method_47890
Lnet/minecraft/class_2766;method_47890()Z
named hasCustomSound
Lnet/minecraft/block/enums/Instrument;hasCustomSound()Z
-
shouldRequireAirAbove
public boolean shouldRequireAirAbove()Returns whether this instrument should prevent note blocks from playing when they do not have air above them.- Returns:
- whether this instrument should prevent note blocks from playing when they do not have air above them
- Mappings:
Namespace Name Mixin selector official e
Lczu;e()Z
intermediary method_47891
Lnet/minecraft/class_2766;method_47891()Z
named shouldRequireAirAbove
Lnet/minecraft/block/enums/Instrument;shouldRequireAirAbove()Z
-
fromAboveState
- Mappings:
Namespace Name Mixin selector official a
Lczu;a(Lcyt;)Ljava/util/Optional;
intermediary method_47590
Lnet/minecraft/class_2766;method_47590(Lnet/minecraft/class_2680;)Ljava/util/Optional;
named fromAboveState
Lnet/minecraft/block/enums/Instrument;fromAboveState(Lnet/minecraft/block/BlockState;)Ljava/util/Optional;
-
fromBelowState
- Mappings:
Namespace Name Mixin selector official b
Lczu;b(Lcyt;)Lczu;
intermediary method_47592
Lnet/minecraft/class_2766;method_47592(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2766;
named fromBelowState
Lnet/minecraft/block/enums/Instrument;fromBelowState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/enums/Instrument;
-