Record Class BlockSoundGroupOverwrite
java.lang.Object
java.lang.Record
net.frozenblock.lib.sound.api.block_sound_group.BlockSoundGroupOverwrite
public record BlockSoundGroupOverwrite(@NotNull net.minecraft.resources.ResourceLocation blockId, @NotNull net.minecraft.world.level.block.SoundType soundOverwrite, BooleanSupplier condition)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBlockSoundGroupOverwrite(@NotNull net.minecraft.resources.ResourceLocation blockId, @NotNull net.minecraft.world.level.block.SoundType soundOverwrite, BooleanSupplier condition) Creates an instance of aBlockSoundGroupOverwriterecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull net.minecraft.resources.ResourceLocationblockId()Returns the value of theblockIdrecord component.Returns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull net.minecraft.world.level.block.SoundTypeReturns the value of thesoundOverwriterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BlockSoundGroupOverwrite
public BlockSoundGroupOverwrite(@NotNull @NotNull net.minecraft.resources.ResourceLocation blockId, @NotNull @NotNull net.minecraft.world.level.block.SoundType soundOverwrite, BooleanSupplier condition) Creates an instance of aBlockSoundGroupOverwriterecord class.- Parameters:
blockId- the value for theblockIdrecord componentsoundOverwrite- the value for thesoundOverwriterecord componentcondition- the value for theconditionrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
blockId
@NotNull public @NotNull net.minecraft.resources.ResourceLocation blockId()Returns the value of theblockIdrecord component.- Returns:
- the value of the
blockIdrecord component
-
soundOverwrite
@NotNull public @NotNull net.minecraft.world.level.block.SoundType soundOverwrite()Returns the value of thesoundOverwriterecord component.- Returns:
- the value of the
soundOverwriterecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-