Record Class BlockBlockItemHolder<T extends net.minecraft.world.level.block.Block,K extends net.minecraft.world.item.BlockItem>
java.lang.Object
java.lang.Record
team.lodestar.lodestone.systems.block.BlockBlockItemHolder<T,K>
- All Implemented Interfaces:
Supplier<T>
public record BlockBlockItemHolder<T extends net.minecraft.world.level.block.Block,K extends net.minecraft.world.item.BlockItem> (net.neoforged.neoforge.registries.DeferredHolder<net.minecraft.world.level.block.Block,T extends net.minecraft.world.level.block.Block> block, net.neoforged.neoforge.registries.DeferredHolder<net.minecraft.world.item.Item,K extends net.minecraft.world.item.BlockItem> item)
extends Record
implements Supplier<T>
-
Constructor Summary
ConstructorsConstructorDescriptionBlockBlockItemHolder(net.neoforged.neoforge.registries.DeferredHolder<net.minecraft.world.level.block.Block, T> block, net.neoforged.neoforge.registries.DeferredHolder<net.minecraft.world.item.Item, K> item) Creates an instance of aBlockBlockItemHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.neoforged.neoforge.registries.DeferredHolder<net.minecraft.world.level.block.Block, T> block()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.get()final inthashCode()Returns a hash code value for this object.net.neoforged.neoforge.registries.DeferredHolder<net.minecraft.world.item.Item, K> item()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BlockBlockItemHolder
public BlockBlockItemHolder(net.neoforged.neoforge.registries.DeferredHolder<net.minecraft.world.level.block.Block, T> block, net.neoforged.neoforge.registries.DeferredHolder<net.minecraft.world.item.Item, K> item) Creates an instance of aBlockBlockItemHolderrecord class.- Parameters:
block- the value for theblockrecord componentitem- the value for theitemrecord component
-
-
Method Details
-
get
-
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). -
block
public net.neoforged.neoforge.registries.DeferredHolder<net.minecraft.world.level.block.Block,T> block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-