Record Class BlockItemId
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.util.BlockItemId
public record BlockItemId(net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> block, net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> item)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBlockItemId(net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> block, net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> item) Creates an instance of aBlockItemIdrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> block()Returns the value of theblockrecord component.static BlockItemIdcreate(net.minecraft.resources.Identifier id) static BlockItemIdcreate(net.minecraft.resources.Identifier blockId, net.minecraft.resources.Identifier itemId) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> item()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BlockItemId
public BlockItemId(net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> block, net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> item) Creates an instance of aBlockItemIdrecord class.- Parameters:
block- the value for theblockrecord componentitem- the value for theitemrecord component
-
-
Method Details
-
create
public static BlockItemId create(net.minecraft.resources.Identifier blockId, net.minecraft.resources.Identifier itemId) -
create
-
toString
-
hashCode
-
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.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
item
public net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-