Record Class FluidState
java.lang.Object
java.lang.Record
com.zenith.mc.block.FluidState
-
Constructor Summary
ConstructorsConstructorDescriptionFluidState(boolean water, boolean source, int amount, boolean falling) Creates an instance of aFluidStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfalling()Returns the value of thefallingrecord component.final inthashCode()Returns a hash code value for this object.booleanlava()booleansource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.booleanwater()Returns the value of thewaterrecord component.
-
Constructor Details
-
FluidState
public FluidState(boolean water, boolean source, int amount, boolean falling) Creates an instance of aFluidStaterecord class.- Parameters:
water- the value for thewaterrecord componentsource- the value for thesourcerecord componentamount- the value for theamountrecord componentfalling- the value for thefallingrecord component
-
-
Method Details
-
lava
public boolean lava() -
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. -
water
public boolean water()Returns the value of thewaterrecord component.- Returns:
- the value of the
waterrecord component
-
source
public boolean source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
falling
public boolean falling()Returns the value of thefallingrecord component.- Returns:
- the value of the
fallingrecord component
-