Record Class CapItemHexHolder
java.lang.Object
java.lang.Record
at.petrak.hexcasting.forge.cap.adimpl.CapItemHexHolder
- All Implemented Interfaces:
at.petrak.hexcasting.api.addldata.ADHexHolder
public record CapItemHexHolder(at.petrak.hexcasting.api.item.HexHolderItem holder, net.minecraft.world.item.ItemStack stack)
extends Record
implements at.petrak.hexcasting.api.addldata.ADHexHolder
-
Constructor Summary
ConstructorsConstructorDescriptionCapItemHexHolder(at.petrak.hexcasting.api.item.HexHolderItem holder, net.minecraft.world.item.ItemStack stack) Creates an instance of aCapItemHexHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclearHex()final booleanIndicates whether some other object is "equal to" this one.@Nullable List<at.petrak.hexcasting.api.casting.iota.Iota>getHex(net.minecraft.server.level.ServerLevel level) @Nullable at.petrak.hexcasting.api.pigment.FrozenPigmentfinal inthashCode()Returns a hash code value for this object.booleanhasHex()at.petrak.hexcasting.api.item.HexHolderItemholder()Returns the value of theholderrecord component.net.minecraft.world.item.ItemStackstack()Returns the value of thestackrecord component.final StringtoString()Returns a string representation of this record class.voidwriteHex(List<at.petrak.hexcasting.api.casting.iota.Iota> patterns, @Nullable at.petrak.hexcasting.api.pigment.FrozenPigment pigment, long media)
-
Constructor Details
-
CapItemHexHolder
public CapItemHexHolder(at.petrak.hexcasting.api.item.HexHolderItem holder, net.minecraft.world.item.ItemStack stack) Creates an instance of aCapItemHexHolderrecord class.- Parameters:
holder- the value for theholderrecord componentstack- the value for thestackrecord component
-
-
Method Details
-
canDrawMediaFromInventory
public boolean canDrawMediaFromInventory()- Specified by:
canDrawMediaFromInventoryin interfaceat.petrak.hexcasting.api.addldata.ADHexHolder
-
hasHex
public boolean hasHex()- Specified by:
hasHexin interfaceat.petrak.hexcasting.api.addldata.ADHexHolder
-
getHex
@Nullable public @Nullable List<at.petrak.hexcasting.api.casting.iota.Iota> getHex(net.minecraft.server.level.ServerLevel level) - Specified by:
getHexin interfaceat.petrak.hexcasting.api.addldata.ADHexHolder
-
writeHex
public void writeHex(List<at.petrak.hexcasting.api.casting.iota.Iota> patterns, @Nullable @Nullable at.petrak.hexcasting.api.pigment.FrozenPigment pigment, long media) - Specified by:
writeHexin interfaceat.petrak.hexcasting.api.addldata.ADHexHolder
-
clearHex
public void clearHex()- Specified by:
clearHexin interfaceat.petrak.hexcasting.api.addldata.ADHexHolder
-
getPigment
@Nullable public @Nullable at.petrak.hexcasting.api.pigment.FrozenPigment getPigment()- Specified by:
getPigmentin interfaceat.petrak.hexcasting.api.addldata.ADHexHolder
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
holder
public at.petrak.hexcasting.api.item.HexHolderItem holder()Returns the value of theholderrecord component.- Returns:
- the value of the
holderrecord component
-
stack
public net.minecraft.world.item.ItemStack stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-