public class ProgWidgetCrafting extends ProgWidget implements ICraftingWidget, ICountWidget, ISidedWidget
IProgWidget.WidgetDifficultyALL_SIDES| Constructor and Description |
|---|
ProgWidgetCrafting() |
| Modifier and Type | Method and Description |
|---|---|
void |
addErrors(java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
java.util.List<IProgWidget> widgets) |
net.minecraft.item.DyeColor |
getColor() |
int |
getCount() |
net.minecraft.inventory.CraftingInventory |
getCraftingGrid() |
IProgWidget.WidgetDifficulty |
getDifficulty() |
java.util.List<ProgWidgetType<?>> |
getParameters()
Get the types of the widgets which connect to this widget on the right, in order (top to bottom).
|
java.util.Optional<net.minecraft.item.crafting.ICraftingRecipe> |
getRecipe(net.minecraft.world.World world,
net.minecraft.inventory.CraftingInventory grid) |
static net.minecraft.item.crafting.IRecipe<net.minecraft.inventory.CraftingInventory> |
getRecipe(net.minecraft.world.World world,
ICraftingWidget widget) |
net.minecraft.item.ItemStack |
getRecipeResult(net.minecraft.world.World world) |
boolean[] |
getSides() |
net.minecraft.util.ResourceLocation |
getTexture() |
void |
getTooltip(java.util.List<net.minecraft.util.text.ITextComponent> curTooltip) |
net.minecraft.entity.ai.goal.Goal |
getWidgetAI(IDroneBase drone,
IProgWidget widget)
Get the AI for this progwidget
|
protected boolean |
hasBlacklist() |
boolean |
hasStepInput()
Can this widget connect to a widget above?
|
void |
readFromNBT(net.minecraft.nbt.CompoundNBT tag) |
void |
readFromPacket(net.minecraft.network.PacketBuffer buf) |
ProgWidgetType<?> |
returnType()
For "auxiliary" widgets that are added onto the left or right of another widget, get the type of the widget
being connected to.
|
void |
setCount(int count) |
void |
setSides(boolean[] sides) |
void |
setUseCount(boolean useCount) |
boolean |
useCount() |
void |
writeToNBT(net.minecraft.nbt.CompoundNBT tag)
At least do
tag.putString("name", getTypeID().toString()); |
void |
writeToPacket(net.minecraft.network.PacketBuffer buf) |
addWarnings, canBeRunByComputers, canSetParameter, copy, fromNBT, fromPacket, getConnectedParameters, getExtraStringInfo, getHeight, getMaxUV, getOutputWidget, getOutputWidget, getParent, getTextureSize, getType, getTypeID, getWidgetTargetAI, getWidth, getX, getY, hasStepOutput, isAvailable, setOutputWidget, setParameter, setParent, setX, setYclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDirForSides, getSidesFromDir, isSideSelectedcreate, freeToUse, getTranslationKey, isDifficultyOKpublic void addErrors(java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
java.util.List<IProgWidget> widgets)
addErrors in interface IProgWidgetaddErrors in class ProgWidgetpublic void getTooltip(java.util.List<net.minecraft.util.text.ITextComponent> curTooltip)
getTooltip in interface IProgWidgetgetTooltip in class ProgWidgetpublic boolean hasStepInput()
IProgWidgethasStepInput in interface IProgWidgetpublic ProgWidgetType<?> returnType()
IProgWidgetreturnType in interface IProgWidgetpublic java.util.List<ProgWidgetType<?>> getParameters()
IProgWidgetIProgWidget.getConnectedParameters() will be double the length of this list,
since these widgets can be added on both the right (whitelist) and left (blacklist) sides.getParameters in interface IProgWidgetpublic net.minecraft.item.DyeColor getColor()
getColor in interface IProgWidgetpublic IProgWidget.WidgetDifficulty getDifficulty()
getDifficulty in interface IProgWidgetpublic net.minecraft.util.ResourceLocation getTexture()
getTexture in interface IProgWidgetprotected boolean hasBlacklist()
hasBlacklist in class ProgWidgetpublic net.minecraft.inventory.CraftingInventory getCraftingGrid()
getCraftingGrid in interface ICraftingWidgetpublic net.minecraft.item.ItemStack getRecipeResult(net.minecraft.world.World world)
public java.util.Optional<net.minecraft.item.crafting.ICraftingRecipe> getRecipe(net.minecraft.world.World world,
net.minecraft.inventory.CraftingInventory grid)
getRecipe in interface ICraftingWidgetpublic static net.minecraft.item.crafting.IRecipe<net.minecraft.inventory.CraftingInventory> getRecipe(net.minecraft.world.World world,
ICraftingWidget widget)
public net.minecraft.entity.ai.goal.Goal getWidgetAI(IDroneBase drone, IProgWidget widget)
IProgWidgetgetWidgetAI in interface IProgWidgetgetWidgetAI in class ProgWidgetdrone - the dronewidget - will be 'this' most of the time, but not when controlled externally (e.g. ComputerCraft)public void setSides(boolean[] sides)
setSides in interface ISidedWidgetpublic boolean[] getSides()
getSides in interface ISidedWidgetpublic boolean useCount()
useCount in interface ICountWidgetpublic void setUseCount(boolean useCount)
setUseCount in interface ICountWidgetpublic int getCount()
getCount in interface ICountWidgetpublic void setCount(int count)
setCount in interface ICountWidgetpublic void writeToNBT(net.minecraft.nbt.CompoundNBT tag)
IProgWidgettag.putString("name", getTypeID().toString());
Note that the base implementation ProgWidget does this.
writeToNBT in interface IProgWidgetwriteToNBT in class ProgWidgettag - NBT tag to write topublic void readFromNBT(net.minecraft.nbt.CompoundNBT tag)
readFromNBT in interface IProgWidgetreadFromNBT in class ProgWidgetpublic void writeToPacket(net.minecraft.network.PacketBuffer buf)
writeToPacket in interface IProgWidgetwriteToPacket in class ProgWidgetpublic void readFromPacket(net.minecraft.network.PacketBuffer buf)
readFromPacket in interface IProgWidgetreadFromPacket in class ProgWidget