Record Class CopycatBlockConversion
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.core.block.CopycatBlockConversion
- All Implemented Interfaces:
Conversion<BlockStateAndEntity>,Conversion.BlockStateConversion
public record CopycatBlockConversion(Conversion.BlockStateConversion blockConversion)
extends Record
implements Conversion.BlockStateConversion
-
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
ConstructorsConstructorDescriptionCopycatBlockConversion(Conversion.BlockStateConversion blockConversion) Creates an instance of aCopycatBlockConversionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockConversionrecord component.convert(net.minecraft.world.level.Level level, BlockStateAndEntity 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.BlockStateConversion
swap, swap
-
Constructor Details
-
CopycatBlockConversion
Creates an instance of aCopycatBlockConversionrecord class.- Parameters:
blockConversion- the value for theblockConversionrecord component
-
-
Method Details
-
convert
public Conversion.ConversionResult<BlockStateAndEntity> convert(net.minecraft.world.level.Level level, BlockStateAndEntity object, @Nullable net.minecraft.world.entity.player.Player player) - Specified by:
convertin interfaceConversion<BlockStateAndEntity>
-
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
-