Class CraftingPreviewElementRegistry
java.lang.Object
com.refinedmods.refinedstorage.apiimpl.autocrafting.preview.CraftingPreviewElementRegistry
- All Implemented Interfaces:
ICraftingPreviewElementRegistry
public class CraftingPreviewElementRegistry
extends Object
implements ICraftingPreviewElementRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(net.minecraft.resources.ResourceLocation id, Function<net.minecraft.network.FriendlyByteBuf, ICraftingPreviewElement> factory) Adds a factory to the registry.Function<net.minecraft.network.FriendlyByteBuf,
ICraftingPreviewElement> get
(net.minecraft.resources.ResourceLocation id) Returns a factory from the registry.
-
Constructor Details
-
CraftingPreviewElementRegistry
public CraftingPreviewElementRegistry()
-
-
Method Details
-
add
public void add(net.minecraft.resources.ResourceLocation id, Function<net.minecraft.network.FriendlyByteBuf, ICraftingPreviewElement> factory) Description copied from interface:ICraftingPreviewElementRegistry
Adds a factory to the registry.- Specified by:
add
in interfaceICraftingPreviewElementRegistry
- Parameters:
id
- the id, as specified inICraftingPreviewElement.getId()
factory
- the factory
-
get
@Nullable public Function<net.minecraft.network.FriendlyByteBuf,ICraftingPreviewElement> get(net.minecraft.resources.ResourceLocation id) Description copied from interface:ICraftingPreviewElementRegistry
Returns a factory from the registry.- Specified by:
get
in interfaceICraftingPreviewElementRegistry
- Parameters:
id
- the id, as specified inICraftingPreviewElement.getId()
- Returns:
- the factory, or null if no factory was found
-