Package com.petrolpark.util
Record Class Conversion.ItemEntityConversion
java.lang.Object
java.lang.Record
com.petrolpark.util.Conversion.ItemEntityConversion
- All Implemented Interfaces:
Conversion<net.minecraft.world.entity.Entity>
- Enclosing interface:
Conversion<T>
public static record Conversion.ItemEntityConversion(Conversion<net.minecraft.world.item.ItemStack> itemStackConversion)
extends Record
implements Conversion<net.minecraft.world.entity.Entity>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.petrolpark.util.Conversion
Conversion.AlwaysConversion<T>, Conversion.ArmorItemConversion, Conversion.BlockIDRegexConversion, Conversion.BlockItemConversion, Conversion.BlockStateBlockConversion, Conversion.BlockStateConversion, Conversion.BlockStateItemStackConversion, Conversion.ColorEntityConversion, Conversion.ContainerConversion, Conversion.ConversionResult<T>, Conversion.DyedBlockConversion, Conversion.Entry<T>, Conversion.InventoryEntityConversion, Conversion.ItemEntityConversion, Conversion.ItemFrameItemConversion, Conversion.ItemIDRegexConversion, Conversion.ItemStackComponentConversion<T>, Conversion.ItemStackContainerConversion, Conversion.ItemStackConversion, Conversion.ItemStackItemConversion, Conversion.NoConversion<T>, Conversion.RegisterConversionEvent<T>, Conversion.ReplacementConversion<T>, Conversion.TaggedBlockConversion, Conversion.TaggedItemConversion, Conversion.TieredItemConversion -
Constructor Summary
ConstructorsConstructorDescriptionItemEntityConversion(Conversion<net.minecraft.world.item.ItemStack> itemStackConversion) Creates an instance of aItemEntityConversionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionConversion.ConversionResult<net.minecraft.world.entity.Entity> convert(net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity object, net.minecraft.world.entity.player.Player player) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Conversion<net.minecraft.world.item.ItemStack> Returns the value of theitemStackConversionrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.petrolpark.util.Conversion
finish, isChildInstance, isInstance, pass, supplyPass
-
Constructor Details
-
ItemEntityConversion
Creates an instance of aItemEntityConversionrecord class.- Parameters:
itemStackConversion- the value for theitemStackConversionrecord component
-
-
Method Details
-
convert
public Conversion.ConversionResult<net.minecraft.world.entity.Entity> convert(net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity object, @Nullable net.minecraft.world.entity.player.Player player) - Specified by:
convertin interfaceConversion<net.minecraft.world.entity.Entity>
-
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). -
itemStackConversion
Returns the value of theitemStackConversionrecord component.- Returns:
- the value of the
itemStackConversionrecord component
-