Package com.petrolpark.util
Record Class Conversion.BlockStateItemStackConversion
java.lang.Object
java.lang.Record
com.petrolpark.util.Conversion.BlockStateItemStackConversion
- All Implemented Interfaces:
Conversion<net.minecraft.world.item.ItemStack>,Conversion.ItemStackConversion
- Enclosing interface:
Conversion<T>
public static record Conversion.BlockStateItemStackConversion(Conversion<BlockStateAndEntity> blockConversion)
extends Record
implements Conversion.ItemStackConversion
-
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
ConstructorsConstructorDescriptionBlockStateItemStackConversion(Conversion<BlockStateAndEntity> blockConversion) Creates an instance of aBlockStateItemStackConversionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockConversionrecord component.Conversion.ConversionResult<net.minecraft.world.item.ItemStack> convert(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack 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.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, supplyPassMethods inherited from interface com.petrolpark.util.Conversion.ItemStackConversion
swap, swap
-
Constructor Details
-
BlockStateItemStackConversion
Creates an instance of aBlockStateItemStackConversionrecord class.- Parameters:
blockConversion- the value for theblockConversionrecord component
-
-
Method Details
-
convert
public Conversion.ConversionResult<net.minecraft.world.item.ItemStack> convert(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack object, @Nullable net.minecraft.world.entity.player.Player player) - Specified by:
convertin interfaceConversion<net.minecraft.world.item.ItemStack>
-
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). -
blockConversion
Returns the value of theblockConversionrecord component.- Returns:
- the value of the
blockConversionrecord component
-