Package gripe._90.megacells.misc
Record Class DecompressionPattern.Encoded
java.lang.Object
java.lang.Record
gripe._90.megacells.misc.DecompressionPattern.Encoded
- Enclosing class:
DecompressionPattern
public static record DecompressionPattern.Encoded(net.minecraft.world.item.ItemStack base, net.minecraft.world.item.ItemStack variant, int factor, boolean toCompress)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DecompressionPattern.Encoded> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, DecompressionPattern.Encoded> -
Constructor Summary
ConstructorsConstructorDescriptionEncoded(net.minecraft.world.item.ItemStack base, net.minecraft.world.item.ItemStack variant, int factor, boolean toCompress) Creates an instance of aEncodedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackbase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.intfactor()Returns the value of thefactorrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thetoCompressrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.item.ItemStackvariant()Returns the value of thevariantrecord component.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,DecompressionPattern.Encoded> STREAM_CODEC
-
-
Constructor Details
-
Encoded
public Encoded(net.minecraft.world.item.ItemStack base, net.minecraft.world.item.ItemStack variant, int factor, boolean toCompress) Creates an instance of aEncodedrecord class.- Parameters:
base- the value for thebaserecord componentvariant- the value for thevariantrecord componentfactor- the value for thefactorrecord componenttoCompress- the value for thetoCompressrecord 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 '=='. -
base
public net.minecraft.world.item.ItemStack base()Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
variant
public net.minecraft.world.item.ItemStack variant()Returns the value of thevariantrecord component.- Returns:
- the value of the
variantrecord component
-
factor
public int factor()Returns the value of thefactorrecord component.- Returns:
- the value of the
factorrecord component
-
toCompress
public boolean toCompress()Returns the value of thetoCompressrecord component.- Returns:
- the value of the
toCompressrecord component
-