Class HTEmiRecipe
-
- All Implemented Interfaces:
-
dev.emi.emi.api.recipe.EmiRecipe,net.minecraft.client.gui.components.TabOrderedElement,net.minecraft.client.gui.components.events.ContainerEventHandler,net.minecraft.client.gui.components.events.GuiEventListener
public abstract class HTEmiRecipe<RECIPE extends Object> extends AbstractContainerEventHandler implements EmiRecipeHiiragi Coreとそれを前提とするmodで使用されるEmiRecipeの抽象クラスです。
- Since:
0.1.0
Hiiragi Tsubasa
-
-
Field Summary
Fields Modifier and Type Field Description private final List<EmiStack>outputsprivate final ComponentPathcurrentFocusPathprivate final List<EmiIngredient>catalystsprivate final ResourceLocationidprivate final IntegerdisplayWidthprivate final RecipeHolder<?>backingRecipeprivate GuiEventListenerfocusedprivate BooleanisFocusedprivate final IntegerdisplayHeightprivate final ScreenRectanglerectangleprivate final IntegertabOrderGroupprivate final List<EmiIngredient>inputsprivate final EmiRecipeCategorycategoryprivate BooleanisDragging
-
Constructor Summary
Constructors Constructor Description HTEmiRecipe(EmiRecipeCategory category, ResourceLocation id, RECIPE recipe, HTBounds bounds)HTEmiRecipe(HTEmiRecipeCategory category, ResourceLocation id, RECIPE recipe)
-
Method Summary
Modifier and Type Method Description final SlotWidgetaddInput(WidgetHolder $self, Integer index, Integer x, Integer y)このレシピに材料スロットを追加します。 final SlotWidgetaddCatalyst(WidgetHolder $self, Integer index, Integer x, Integer y)このレシピに触媒スロットを追加します。 final EmiRecipeCategorygetCategory()final ResourceLocationgetId()final List<EmiIngredient>getInputs()final List<EmiIngredient>getCatalysts()final List<EmiStack>getOutputs()final IntegergetDisplayWidth()final IntegergetDisplayHeight()RecipeHolder<?>getBackingRecipe()final List<GuiEventListener>children()final IntegergetPosition(Integer index)指定したインデックスから座標を返します。 final IntegergetPosition(Double index)指定したインデックスから座標を返します。 final SlotWidgetaddOutput(WidgetHolder $self, Integer index, Integer x, Integer y, Boolean large, Boolean drawBack)このレシピに完成品スロットを追加します。 final SlotWidgetaddTank(WidgetHolder $self, EmiIngredient ingredient, Integer x, Integer capacity, Integer y)このレシピに液体タンクを追加します。 final SlotWidgetaddGeneratedOutput(WidgetHolder $self, Function<Random, EmiIngredient> factory, Integer unique, Integer x, Integer y, Boolean large, Boolean drawBack)このレシピに動的な完成品スロットを追加します。 -
Methods inherited from class hiiragi283.core.api.integration.emi.HTEmiRecipe
getBackingRecipe, getCatalysts, getCategory, getDisplayHeight, getDisplayWidth, getId, getInputs, getOutputs -
Methods inherited from class net.minecraft.client.gui.components.events.ContainerEventHandler
getChildAt, getCurrentFocusPath, isFocused, setFocused -
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused -
Methods inherited from class net.minecraft.client.gui.components.events.GuiEventListener
charTyped, getRectangle, isMouseOver, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPath -
Methods inherited from class net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup -
Methods inherited from class dev.emi.emi.api.recipe.EmiRecipe
addWidgets, hideCraftable, supportsRecipeTree -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
HTEmiRecipe
HTEmiRecipe(EmiRecipeCategory category, ResourceLocation id, RECIPE recipe, HTBounds bounds)
- Parameters:
category- レシピのカテゴリid- このレシピのIDrecipe- RECIPEのインスタンスbounds- このレシピが表示される範囲
-
HTEmiRecipe
HTEmiRecipe(HTEmiRecipeCategory category, ResourceLocation id, RECIPE recipe)
-
-
Method Detail
-
addInput
final SlotWidget addInput(WidgetHolder $self, Integer index, Integer x, Integer y)
このレシピに材料スロットを追加します。
- Parameters:
index- 材料のインデックスx- x軸方向の座標y- y軸方向の座標- Since:
0.5.0
-
addCatalyst
final SlotWidget addCatalyst(WidgetHolder $self, Integer index, Integer x, Integer y)
このレシピに触媒スロットを追加します。
- Parameters:
index- 触媒のインデックスx- x軸方向の座標y- y軸方向の座標
-
getCategory
final EmiRecipeCategory getCategory()
-
getId
final ResourceLocation getId()
-
getCatalysts
final List<EmiIngredient> getCatalysts()
-
getOutputs
final List<EmiStack> getOutputs()
-
getDisplayWidth
final Integer getDisplayWidth()
-
getDisplayHeight
final Integer getDisplayHeight()
-
getBackingRecipe
RecipeHolder<?> getBackingRecipe()
-
getPosition
final Integer getPosition(Integer index)
指定したインデックスから座標を返します。
-
getPosition
final Integer getPosition(Double index)
指定したインデックスから座標を返します。
-
addOutput
final SlotWidget addOutput(WidgetHolder $self, Integer index, Integer x, Integer y, Boolean large, Boolean drawBack)
このレシピに完成品スロットを追加します。
- Parameters:
index- 触媒のインデックスx- x軸方向の座標y- y軸方向の座標large- スロットを大型で表示するかどうかdrawBack- スロットの背景を描画するかどうか
-
addTank
final SlotWidget addTank(WidgetHolder $self, EmiIngredient ingredient, Integer x, Integer capacity, Integer y)
このレシピに液体タンクを追加します。
- Parameters:
ingredient- 表示する材料x- x軸方向の座標capacity- このタンクの容量y- y軸方向の座標- Since:
0.5.0
-
addGeneratedOutput
final SlotWidget addGeneratedOutput(WidgetHolder $self, Function<Random, EmiIngredient> factory, Integer unique, Integer x, Integer y, Boolean large, Boolean drawBack)
このレシピに動的な完成品スロットを追加します。
- Parameters:
factory- 乱数からプレビューを生成するブロックunique- 多分識別用のユニークなIDな気がするx- x軸方向の座標y- y軸方向の座標large- スロットを大型で表示するかどうかdrawBack- スロットの背景を描画するかどうか
-
-
-
-