Record Class SulfurCubeArchetype
java.lang.Object
java.lang.Record
net.minecraft.world.entity.SulfurCubeArchetype
public record SulfurCubeArchetype(HolderSet<Item> items, List<SulfurCubeArchetype.AttributeEntry> attributeModifiers, boolean buoyant, Optional<SulfurCubeArchetype.ExplosionData> explosion, Optional<SulfurCubeArchetype.ContactDamage> contactDamage, SulfurCubeArchetype.KnockbackModifiers knockbackModifiers, SulfurCubeArchetype.SoundSettings soundSettings)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<SulfurCubeArchetype.AttributeEntry> The field for theattributeModifiersrecord component.private final booleanThe field for thebuoyantrecord component.private final Optional<SulfurCubeArchetype.ContactDamage> The field for thecontactDamagerecord component.static final com.mojang.serialization.Codec<SulfurCubeArchetype> private final Optional<SulfurCubeArchetype.ExplosionData> The field for theexplosionrecord component.The field for theitemsrecord component.private final SulfurCubeArchetype.KnockbackModifiersThe field for theknockbackModifiersrecord component.private final SulfurCubeArchetype.SoundSettingsThe field for thesoundSettingsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSulfurCubeArchetype(HolderSet<Item> items, List<SulfurCubeArchetype.AttributeEntry> attributeModifiers, boolean buoyant, Optional<SulfurCubeArchetype.ExplosionData> explosion, Optional<SulfurCubeArchetype.ContactDamage> contactDamage, SulfurCubeArchetype.KnockbackModifiers knockbackModifiers, SulfurCubeArchetype.SoundSettings soundSettings) Creates an instance of aSulfurCubeArchetyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributeModifiersrecord component.booleanbuoyant()Returns the value of thebuoyantrecord component.Returns the value of thecontactDamagerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexplosionrecord component.final inthashCode()Returns a hash code value for this object.items()Returns the value of theitemsrecord component.Returns the value of theknockbackModifiersrecord component.Returns the value of thesoundSettingsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
items
-
attributeModifiers
The field for theattributeModifiersrecord component. -
buoyant
private final boolean buoyantThe field for thebuoyantrecord component. -
explosion
The field for theexplosionrecord component. -
contactDamage
The field for thecontactDamagerecord component. -
knockbackModifiers
The field for theknockbackModifiersrecord component. -
soundSettings
The field for thesoundSettingsrecord component. -
DIRECT_CODEC
-
DEFAULT_KNOCKBACK_MODIFIERS
-
DEFAULT_SOUND_SETTINGS
-
-
Constructor Details
-
SulfurCubeArchetype
public SulfurCubeArchetype(HolderSet<Item> items, List<SulfurCubeArchetype.AttributeEntry> attributeModifiers, boolean buoyant, Optional<SulfurCubeArchetype.ExplosionData> explosion, Optional<SulfurCubeArchetype.ContactDamage> contactDamage, SulfurCubeArchetype.KnockbackModifiers knockbackModifiers, SulfurCubeArchetype.SoundSettings soundSettings) Creates an instance of aSulfurCubeArchetyperecord class.- Parameters:
items- the value for theitemsrecord componentattributeModifiers- the value for theattributeModifiersrecord componentbuoyant- the value for thebuoyantrecord componentexplosion- the value for theexplosionrecord componentcontactDamage- the value for thecontactDamagerecord componentknockbackModifiers- the value for theknockbackModifiersrecord componentsoundSettings- the value for thesoundSettingsrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
items
-
attributeModifiers
Returns the value of theattributeModifiersrecord component.- Returns:
- the value of the
attributeModifiersrecord component
-
buoyant
public boolean buoyant()Returns the value of thebuoyantrecord component.- Returns:
- the value of the
buoyantrecord component
-
explosion
Returns the value of theexplosionrecord component.- Returns:
- the value of the
explosionrecord component
-
contactDamage
Returns the value of thecontactDamagerecord component.- Returns:
- the value of the
contactDamagerecord component
-
knockbackModifiers
Returns the value of theknockbackModifiersrecord component.- Returns:
- the value of the
knockbackModifiersrecord component
-
soundSettings
Returns the value of thesoundSettingsrecord component.- Returns:
- the value of the
soundSettingsrecord component
-