Class MenuBuilder<M extends net.minecraft.world.inventory.AbstractContainerMenu>
java.lang.Object
de.luckymcdev.foundryengine.common.builder.AbstractBuilder<net.minecraft.world.inventory.MenuType<M>>
de.luckymcdev.foundryengine.common.builder.menu.MenuBuilder<M>
- All Implemented Interfaces:
net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.neoforged.neoforge.common.extensions.IMenuProviderExtension
public class MenuBuilder<M extends net.minecraft.world.inventory.AbstractContainerMenu>
extends AbstractBuilder<net.minecraft.world.inventory.MenuType<M>>
implements net.minecraft.world.MenuProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceMenuBuilder.ContainerFactory<M extends net.minecraft.world.inventory.AbstractContainerMenu>static interfaceMenuBuilder.ScreenFactory<M extends net.minecraft.world.inventory.AbstractContainerMenu>static interfaceMenuBuilder.Supplier<M extends net.minecraft.world.inventory.AbstractContainerMenu> -
Field Summary
Fields inherited from class AbstractBuilder
generateData, id, object -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.inventory.MenuType<M> build()containerFactory(MenuBuilder.ContainerFactory<M> factory) static <M extends net.minecraft.world.inventory.AbstractContainerMenu>
MenuBuilder<M> create(net.minecraft.resources.Identifier id) net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player player) featureFlags(net.minecraft.world.flag.FeatureFlagSet flags) net.minecraft.network.chat.Component@Nullable MenuBuilder.ScreenFactory<M> booleannet.minecraft.world.inventory.MenuType<M> register(net.neoforged.neoforge.registries.RegisterEvent.RegisterHelper<net.minecraft.world.inventory.MenuType<?>> helper) screen(MenuBuilder.ScreenFactory<M> screenFactory) supplier(MenuBuilder.Supplier<M> supplier) Methods inherited from class AbstractBuilder
get, getId, getOrCreate, newID, setObject, shouldGenerateDataMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideData
-
Method Details
-
create
public static <M extends net.minecraft.world.inventory.AbstractContainerMenu> MenuBuilder<M> create(net.minecraft.resources.Identifier id) -
featureFlags
-
disableMenuScreen
-
isScreenDisabled
public boolean isScreenDisabled() -
getScreenFactory
-
createMenu
public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player player) - Specified by:
createMenuin interfacenet.minecraft.world.inventory.MenuConstructor
-
getDisplayName
public net.minecraft.network.chat.Component getDisplayName()- Specified by:
getDisplayNamein interfacenet.minecraft.world.MenuProvider
-
build
- Specified by:
buildin classAbstractBuilder<net.minecraft.world.inventory.MenuType<M extends net.minecraft.world.inventory.AbstractContainerMenu>>
-
register
public net.minecraft.world.inventory.MenuType<M> register(net.neoforged.neoforge.registries.RegisterEvent.RegisterHelper<net.minecraft.world.inventory.MenuType<?>> helper)
-