Class HTItemSlotWidget
-
- All Implemented Interfaces:
-
hiiragi283.core.api.gui.widget.HTWidget,hiiragi283.core.api.integration.jei.widget.HTGhostWidget,hiiragi283.core.api.integration.jei.widget.HTIngredientWidget
public final class HTItemSlotWidget extends HTAbstractWidget implements HTGhostWidget, HTIngredientWidget
-
-
Field Summary
Fields Modifier and Type Field Description private final Either<HTItemSyncSlot, Slot>contentsprivate final HTBackgroundTypebackgroundTypeprivate final SlotcontainerSlotprivate final HTBoundsbounds
-
Constructor Summary
Constructors Constructor Description HTItemSlotWidget(Slot slot, HTBackgroundType backgroundType)HTItemSlotWidget(HTResourceSlot.Mutable<HTItemResourceType> slot, Integer x, Integer y, HTBackgroundType backgroundType)HTItemSlotWidget(HTItemSyncSlot slot, Integer x, Integer y, HTBackgroundType backgroundType)
-
Method Summary
Modifier and Type Method Description final Either<HTItemSyncSlot, Slot>getContents()final HTBackgroundTypegetBackgroundType()final SlotgetContainerSlot()final HTBoundsgetBounds()final ItemStackgetStack()final UnitsetStack(ItemStack stack)HTWidgetType<HTItemSlotWidget>getType()HTWidgetTypeを取得します。 UnitsetupHolder(HTWidgetHolder widgetHolder)final HTItemSlotWidgetsetGhost()HTGhostWidget.GhostIngredientConsumergetGhostConsumer()保持しているGhostIngredientConsumerを取得します。 UnitmouseClicked(AbstractContainerMenu menu, Double mouseX, Double mouseY, Integer button)このウィジェットをクリックした時に呼び出されます。 ItemStackgetIngredient()保持しているオブジェクトを取得します。 -
-
Constructor Detail
-
HTItemSlotWidget
HTItemSlotWidget(Slot slot, HTBackgroundType backgroundType)
-
HTItemSlotWidget
HTItemSlotWidget(HTResourceSlot.Mutable<HTItemResourceType> slot, Integer x, Integer y, HTBackgroundType backgroundType)
-
HTItemSlotWidget
HTItemSlotWidget(HTItemSyncSlot slot, Integer x, Integer y, HTBackgroundType backgroundType)
-
-
Method Detail
-
getContents
final Either<HTItemSyncSlot, Slot> getContents()
-
getBackgroundType
final HTBackgroundType getBackgroundType()
-
getContainerSlot
final Slot getContainerSlot()
-
getStack
final ItemStack getStack()
-
getType
HTWidgetType<HTItemSlotWidget> getType()
HTWidgetTypeを取得します。
-
setupHolder
Unit setupHolder(HTWidgetHolder widgetHolder)
-
setGhost
final HTItemSlotWidget setGhost()
-
getGhostConsumer
HTGhostWidget.GhostIngredientConsumer getGhostConsumer()
保持しているGhostIngredientConsumerを取得します。
-
mouseClicked
Unit mouseClicked(AbstractContainerMenu menu, Double mouseX, Double mouseY, Integer button)
このウィジェットをクリックした時に呼び出されます。
-
getIngredient
ItemStack getIngredient()
保持しているオブジェクトを取得します。
- Returns:
空の場合は
null
-
-
-
-