Package dev.itsharshxd.zentrix.api.block
Record Class TrackedBlockState
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.block.TrackedBlockState
public record TrackedBlockState(@NotNull BlockMechanicsScope scope, boolean protectionEnabled, boolean originalProtected, boolean playerPlaced, boolean fluidTracked, boolean decayScheduled)
extends Record
Current protection and decay classification of one block.
-
Constructor Summary
ConstructorsConstructorDescriptionTrackedBlockState(@NotNull BlockMechanicsScope scope, boolean protectionEnabled, boolean originalProtected, boolean playerPlaced, boolean fluidTracked, boolean decayScheduled) Creates an instance of aTrackedBlockStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedecayScheduledrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefluidTrackedrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theoriginalProtectedrecord component.booleanReturns the value of theplayerPlacedrecord component.booleanReturns the value of theprotectionEnabledrecord component.@NotNull BlockMechanicsScopescope()Returns the value of thescoperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TrackedBlockState
public TrackedBlockState(@NotNull @NotNull BlockMechanicsScope scope, boolean protectionEnabled, boolean originalProtected, boolean playerPlaced, boolean fluidTracked, boolean decayScheduled) Creates an instance of aTrackedBlockStaterecord class.- Parameters:
scope- the value for thescoperecord componentprotectionEnabled- the value for theprotectionEnabledrecord componentoriginalProtected- the value for theoriginalProtectedrecord componentplayerPlaced- the value for theplayerPlacedrecord componentfluidTracked- the value for thefluidTrackedrecord componentdecayScheduled- the value for thedecayScheduledrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
scope
Returns the value of thescoperecord component.- Returns:
- the value of the
scoperecord component
-
protectionEnabled
public boolean protectionEnabled()Returns the value of theprotectionEnabledrecord component.- Returns:
- the value of the
protectionEnabledrecord component
-
originalProtected
public boolean originalProtected()Returns the value of theoriginalProtectedrecord component.- Returns:
- the value of the
originalProtectedrecord component
-
playerPlaced
public boolean playerPlaced()Returns the value of theplayerPlacedrecord component.- Returns:
- the value of the
playerPlacedrecord component
-
fluidTracked
public boolean fluidTracked()Returns the value of thefluidTrackedrecord component.- Returns:
- the value of the
fluidTrackedrecord component
-
decayScheduled
public boolean decayScheduled()Returns the value of thedecayScheduledrecord component.- Returns:
- the value of the
decayScheduledrecord component
-