Record Class FrozenMobCategory
java.lang.Object
java.lang.Record
net.frozenblock.lib.mobcategory.impl.FrozenMobCategory
public record FrozenMobCategory(net.minecraft.resources.ResourceLocation key, int max, boolean isFriendly, boolean isPersistent, int despawnDistance)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionFrozenMobCategory(net.minecraft.resources.ResourceLocation key, int max, boolean isFriendly, boolean isPersistent, int despawnDistance) Creates an instance of aFrozenMobCategoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedespawnDistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisFriendlyrecord component.booleanReturns the value of theisPersistentrecord component.net.minecraft.resources.ResourceLocationkey()Returns the value of thekeyrecord component.intmax()Returns the value of themaxrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FrozenMobCategory
public FrozenMobCategory(net.minecraft.resources.ResourceLocation key, int max, boolean isFriendly, boolean isPersistent, int despawnDistance) Creates an instance of aFrozenMobCategoryrecord class.- Parameters:
key- the value for thekeyrecord componentmax- the value for themaxrecord componentisFriendly- the value for theisFriendlyrecord componentisPersistent- the value for theisPersistentrecord componentdespawnDistance- the value for thedespawnDistancerecord 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 '=='. -
key
public net.minecraft.resources.ResourceLocation key()Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
max
public int max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-
isFriendly
public boolean isFriendly()Returns the value of theisFriendlyrecord component.- Returns:
- the value of the
isFriendlyrecord component
-
isPersistent
public boolean isPersistent()Returns the value of theisPersistentrecord component.- Returns:
- the value of the
isPersistentrecord component
-
despawnDistance
public int despawnDistance()Returns the value of thedespawnDistancerecord component.- Returns:
- the value of the
despawnDistancerecord component
-