Record Class AltarStructureMaterial
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.altar.AltarStructureMaterial
public record AltarStructureMaterial(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.StairBlock stair, int power)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<AltarStructureMaterial>static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<AltarStructureMaterial>> -
Constructor Summary
ConstructorsConstructorDescriptionAltarStructureMaterial(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.StairBlock stair, int power) Creates an instance of aAltarStructureMaterialrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.Blockblock()Returns the value of theblockrecord 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.net.minecraft.world.level.block.StairBlockstair()Returns the value of thestairrecord 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<AltarStructureMaterial>> REGISTRY_KEY -
CODEC
-
-
Constructor Details
-
AltarStructureMaterial
public AltarStructureMaterial(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.StairBlock stair, int power) Creates an instance of aAltarStructureMaterialrecord class.- Parameters:
block- the value for theblockrecord componentstair- the value for thestairrecord 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 '=='. -
block
public net.minecraft.world.level.block.Block block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
stair
public net.minecraft.world.level.block.StairBlock stair()Returns the value of thestairrecord component.- Returns:
- the value of the
stairrecord component
-
power
public int power()Returns the value of thepowerrecord component.- Returns:
- the value of the
powerrecord component
-