Record Class AltarCapMaterial
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.altar.AltarCapMaterial
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<AltarCapMaterial>static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<AltarCapMaterial>> -
Constructor Summary
ConstructorsConstructorDescriptionAltarCapMaterial(net.minecraft.world.level.block.Block cap, int power) Creates an instance of aAltarCapMaterialrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.Blockcap()Returns the value of thecaprecord component.final booleanIndicates whether some other object is "equal to" this one.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
-
REGISTRY_KEY
public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<AltarCapMaterial>> REGISTRY_KEY -
CODEC
-
-
Constructor Details
-
AltarCapMaterial
public AltarCapMaterial(net.minecraft.world.level.block.Block cap, int power) Creates an instance of aAltarCapMaterialrecord class.- Parameters:
cap- the value for thecaprecord componentpower- the value for thepowerrecord 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 '=='. -
cap
public net.minecraft.world.level.block.Block cap()Returns the value of thecaprecord component.- Returns:
- the value of the
caprecord component
-
power
public int power()Returns the value of thepowerrecord component.- Returns:
- the value of the
powerrecord component
-