Class PotPatternAdapter
java.lang.Object
net.darkhax.bookshelf.common.api.registry.adapters.GameRegistryAdapter<net.minecraft.world.level.block.entity.DecoratedPotPattern>
net.darkhax.bookshelf.common.impl.registry.adapter.PotPatternAdapter
- All Implemented Interfaces:
RegistryAdapter<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.entity.DecoratedPotPattern>, net.minecraft.world.level.block.entity.DecoratedPotPattern>
public final class PotPatternAdapter
extends GameRegistryAdapter<net.minecraft.world.level.block.entity.DecoratedPotPattern>
A registry adapter for decorated pot patterns like sherds.
-
Field Summary
Fields inherited from class GameRegistryAdapter
context, registryFunc, registryKey -
Constructor Summary
ConstructorsConstructorDescriptionPotPatternAdapter(RegistrationContext context, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<net.minecraft.world.level.block.entity.DecoratedPotPattern>> regKey, BiConsumer<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.entity.DecoratedPotPattern>, Supplier<net.minecraft.world.level.block.entity.DecoratedPotPattern>> registryFunc) -
Method Summary
Modifier and TypeMethodDescriptionRegistryReference<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.entity.DecoratedPotPattern>, net.minecraft.world.level.block.entity.DecoratedPotPattern> Adds a new decorated pot pattern to the game registry.RegistryReference<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.entity.DecoratedPotPattern>, net.minecraft.world.level.block.entity.DecoratedPotPattern> addWithItem(String key, Supplier<net.minecraft.world.item.Item> item) Adds a new decorated pot pattern to the game registry and associates it with an item.RegistryReference<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.entity.DecoratedPotPattern>, net.minecraft.world.level.block.entity.DecoratedPotPattern> addWithItem(String key, net.minecraft.world.item.Item item) Adds a new decorated pot pattern to the game registry and associates it with an item.Methods inherited from class GameRegistryAdapter
add, idMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RegistryAdapter
add
-
Constructor Details
-
PotPatternAdapter
public PotPatternAdapter(RegistrationContext context, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<net.minecraft.world.level.block.entity.DecoratedPotPattern>> regKey, BiConsumer<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.entity.DecoratedPotPattern>, Supplier<net.minecraft.world.level.block.entity.DecoratedPotPattern>> registryFunc)
-
-
Method Details
-
add
public RegistryReference<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.entity.DecoratedPotPattern>, net.minecraft.world.level.block.entity.DecoratedPotPattern> add(String key) Adds a new decorated pot pattern to the game registry.- Parameters:
key- The ID to register the value under. This ID only needs to be unique within your namespace.- Returns:
- A reference to the registry entry.
-
addWithItem
public RegistryReference<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.entity.DecoratedPotPattern>, net.minecraft.world.level.block.entity.DecoratedPotPattern> addWithItem(String key, net.minecraft.world.item.Item item) Adds a new decorated pot pattern to the game registry and associates it with an item.- Parameters:
key- The ID to register the value under. This ID only needs to be unique within your namespace.item- The item to associate the pattern with.- Returns:
- A reference to the registry entry.
-
addWithItem
public RegistryReference<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.entity.DecoratedPotPattern>, net.minecraft.world.level.block.entity.DecoratedPotPattern> addWithItem(String key, Supplier<net.minecraft.world.item.Item> item) Adds a new decorated pot pattern to the game registry and associates it with an item.- Parameters:
key- The ID to register the value under. This ID only needs to be unique within your namespace.item- The item to associate the pattern with.- Returns:
- A reference to the registry entry.
-