Record Class MenuScreenAdapter
java.lang.Object
java.lang.Record
net.darkhax.bookshelf.common.impl.registry.adapter.MenuScreenAdapter
public record MenuScreenAdapter(BiConsumer<net.minecraft.world.inventory.MenuType, MenuScreenAdapter.ScreenFactory> func)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceMenuScreenAdapter.ScreenFactory<T extends net.minecraft.world.inventory.AbstractContainerMenu, U extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<T>> -
Constructor Summary
ConstructorsConstructorDescriptionMenuScreenAdapter(BiConsumer<net.minecraft.world.inventory.MenuType, MenuScreenAdapter.ScreenFactory> func) Creates an instance of aMenuScreenAdapterrecord class. -
Method Summary
Modifier and TypeMethodDescription<M extends net.minecraft.world.inventory.AbstractContainerMenu, U extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<M>>
voidbind(net.minecraft.world.inventory.MenuType<? extends M> type, MenuScreenAdapter.ScreenFactory<M, U> factory) final booleanIndicates whether some other object is "equal to" this one.BiConsumer<net.minecraft.world.inventory.MenuType, MenuScreenAdapter.ScreenFactory> func()Returns the value of thefuncrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MenuScreenAdapter
public MenuScreenAdapter(BiConsumer<net.minecraft.world.inventory.MenuType, MenuScreenAdapter.ScreenFactory> func) Creates an instance of aMenuScreenAdapterrecord class.- Parameters:
func- the value for thefuncrecord component
-
-
Method Details
-
bind
public <M extends net.minecraft.world.inventory.AbstractContainerMenu, U extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<M>> void bind(net.minecraft.world.inventory.MenuType<? extends M> type, MenuScreenAdapter.ScreenFactory<M, U> factory) -
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). -
func
Returns the value of thefuncrecord component.- Returns:
- the value of the
funcrecord component
-