Record Class ContaminateDecayProduct
java.lang.Object
java.lang.Record
com.petrolpark.core.item.decay.product.ContaminateDecayProduct
- All Implemented Interfaces:
IDecayProduct
public record ContaminateDecayProduct(net.minecraft.core.Holder<Contaminant> contaminantHolder, ContaminationLootItemFunction.Action action)
extends Record
implements IDecayProduct
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ContaminateDecayProduct> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ContaminateDecayProduct> Fields inherited from interface com.petrolpark.core.item.decay.product.IDecayProduct
TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionContaminateDecayProduct(net.minecraft.core.Holder<Contaminant> contaminantHolder, ContaminationLootItemFunction.Action action) Creates an instance of aContaminateDecayProductrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.net.minecraft.core.Holder<Contaminant> Returns the value of thecontaminantHolderrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.item.ItemStackget(net.minecraft.world.item.ItemStack stack) getType()final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ContaminateDecayProduct> STREAM_CODEC
-
-
Constructor Details
-
ContaminateDecayProduct
public ContaminateDecayProduct(net.minecraft.core.Holder<Contaminant> contaminantHolder, ContaminationLootItemFunction.Action action) Creates an instance of aContaminateDecayProductrecord class.- Parameters:
contaminantHolder- the value for thecontaminantHolderrecord componentaction- the value for theactionrecord component
-
-
Method Details
-
get
public net.minecraft.world.item.ItemStack get(net.minecraft.world.item.ItemStack stack) - Specified by:
getin interfaceIDecayProduct
-
getType
- Specified by:
getTypein interfaceIDecayProduct
-
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). -
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. -
contaminantHolder
Returns the value of thecontaminantHolderrecord component.- Returns:
- the value of the
contaminantHolderrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-