Package net.minecraft.sounds
Class SoundEvent
java.lang.Object
net.minecraft.sounds.SoundEvent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Holder<SoundEvent>> private static final floatstatic final com.mojang.serialization.Codec<SoundEvent> static final StreamCodec<io.netty.buffer.ByteBuf, SoundEvent> private final ResourceLocationprivate final booleanprivate final floatstatic final StreamCodec<RegistryFriendlyByteBuf, Holder<SoundEvent>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSoundEvent(ResourceLocation location, float range, boolean newSystem) -
Method Summary
Modifier and TypeMethodDescriptionprivate static SoundEventcreate(ResourceLocation location, Optional<Float> range) static SoundEventcreateFixedRangeEvent(ResourceLocation location, float range) static SoundEventcreateVariableRangeEvent(ResourceLocation location) floatgetRange(float volume)
-
Field Details
-
DIRECT_CODEC
-
CODEC
-
DIRECT_STREAM_CODEC
-
STREAM_CODEC
-
DEFAULT_RANGE
private static final float DEFAULT_RANGE- See Also:
-
location
-
range
private final float range -
newSystem
private final boolean newSystem
-
-
Constructor Details
-
SoundEvent
-
-
Method Details
-
create
-
createVariableRangeEvent
-
createFixedRangeEvent
-
getLocation
-
getRange
public float getRange(float volume) -
fixedRange
-