GuiModule class

You can use this in your modules list in a pack or include it as usual widget somewhere in case you want to run it conditionally.

For each container type and size there is one constructor: GuiModule.chest, GuiModule.dropper, GuiModule.hopper, GuiModule.enderchest, GuiModule.inventory, GuiModule.minecart and GuiModule.item.

Constructors

GuiModule.chest(Location target, {required List<GuiPage> pages, Item? placeholder, String countScore = _DEF_Count, String pageScore = _DEF_Page, List<GuiSlot>? globalSlots, String path = 'gui'})
factory
GuiModule.dropper(Location target, {required List<GuiPage> pages, Item? placeholder, String countScore = _DEF_Count, String pageScore = _DEF_Page, List<GuiSlot>? globalSlots, String path = 'gui'})
factory
GuiModule.enderchest(Entity target, {required List<GuiPage> pages, Item? placeholder, String countScore = _DEF_Count, String pageScore = _DEF_Page, List<GuiSlot>? globalSlots, String path = 'gui'})
factory
GuiModule.hopper(Location target, {required List<GuiPage> pages, Item? placeholder, String countScore = _DEF_Count, String pageScore = _DEF_Page, List<GuiSlot>? globalSlots, String path = 'gui'})
factory
GuiModule.inventory(Entity target, {required List<GuiPage> pages, Item? placeholder, String countScore = _DEF_Count, String pageScore = _DEF_Page, bool fillHotbar = false, List<GuiSlot>? globalSlots, String path = 'gui'})
factory
GuiModule.item(Item handItem, {required List<GuiPage> pages, Item? placeholder, String countScore = _DEF_Count, String pageScore = _DEF_Page, Location? offset, bool alwaysActive = true, TextComponent? name, List<GuiSlot>? globalSlots, String path = 'gui'})
objd_gui also includes the feature to show and hide the gui(as a minecart) if the player holds a specific item in their hand. So this acts kind of like a game menu or portable menu. Therefore a few additional arguments can be specified.
factory
GuiModule.minecart(Entity target, {required List<GuiPage> pages, Item? placeholder, String countScore = _DEF_Count, String pageScore = _DEF_Page, List<GuiSlot>? globalSlots, String path = 'gui'})
factory

Properties

blockLocation ↔ Location?
getter/setter pair
called bool
Contains the Information, if this RestAction is already called (and can't be called again)
getter/setter pairinherited
container GuiContainer
getter/setter pair
countScore String
getter/setter pair
fillMax int?
getter/setter pair
globalSlots List<GuiSlot>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
minecartAlwaysActive bool
getter/setter pair
minecartName ↔ TextComponent?
getter/setter pair
offset ↔ Location?
getter/setter pair
pages List<GuiPage>
getter/setter pair
pageScore String
getter/setter pair
path String
getter/setter pair
placeholder ↔ Item?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetEntity ↔ Entity?
getter/setter pair
triggerGui ↔ Item?
getter/setter pair
writable List<Widget>?
The writable list the RestAction writes it's contents on
getter/setter pairinherited

Methods

generate(Context context) → Widget
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queue([List<Widget>? writable]) → void
Execute this method to add this to the WidgetList (can use default list or as parameter given list) This method can only be executed once, if it is executed multiple times you will get an Error. You can read out if it is already executed in the boolean Called Example for a queue method:
inherited
registerFiles() List<File>
toMap() → dynamic
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited