Record Class SulfurCubeArchetype.ExplosionData
java.lang.Object
java.lang.Record
net.minecraft.world.entity.SulfurCubeArchetype.ExplosionData
- Enclosing class:
SulfurCubeArchetype
public static record SulfurCubeArchetype.ExplosionData(int power, boolean causesFire, int fuse)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thecausesFirerecord component.static final com.mojang.serialization.Codec<SulfurCubeArchetype.ExplosionData> private final intThe field for thefuserecord component.private final intThe field for thepowerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionExplosionData(int power, boolean causesFire, int fuse) Creates an instance of aExplosionDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecausesFirerecord component.final booleanIndicates whether some other object is "equal to" this one.intfuse()Returns the value of thefuserecord component.final inthashCode()Returns a hash code value for this object.intpower()Returns the value of thepowerrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
power
private final int powerThe field for thepowerrecord component. -
causesFire
private final boolean causesFireThe field for thecausesFirerecord component. -
fuse
private final int fuseThe field for thefuserecord component. -
CODEC
-
-
Constructor Details
-
ExplosionData
public ExplosionData(int power, boolean causesFire, int fuse) Creates an instance of aExplosionDatarecord class.- Parameters:
power- the value for thepowerrecord componentcausesFire- the value for thecausesFirerecord componentfuse- the value for thefuserecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
power
public int power()Returns the value of thepowerrecord component.- Returns:
- the value of the
powerrecord component
-
causesFire
public boolean causesFire()Returns the value of thecausesFirerecord component.- Returns:
- the value of the
causesFirerecord component
-
fuse
public int fuse()Returns the value of thefuserecord component.- Returns:
- the value of the
fuserecord component
-