Class CraftRecipeData
java.lang.Object
zombie.entity.components.crafting.recipe.CraftRecipeData
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCraftRecipeData(CraftMode craftMode, boolean allowInputResources, boolean allowInputItems, boolean allowOutputResources, boolean allowOutputItems) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOverfilledResource(InputScript input, HashMap<Resource, ArrayList<InventoryItem>> resources) static CraftRecipeDataAlloc(CraftMode craftMode, boolean allowInputResources, boolean allowInputItems, boolean allowOutputResources, boolean allowOutputItems) booleanbooleancanConsumeInputs(List<Resource> inputResources) booleancanConsumeInputs(List<Resource> inputResources, List<InventoryItem> overrideInputItems, boolean forceTestAll, boolean clearAllViable) booleancanCreateOutputs(List<Resource> outputResources) booleancanCreateOutputs(List<Resource> outputResources, IsoGameCharacter character) booleancanOfferInputItem(InventoryItem inventoryItem) booleancanOfferInputItem(InventoryItem inventoryItem, boolean verbose) booleancanOfferInputItem(InputScript inputScript, InventoryItem item) booleancanOfferInputItem(InputScript inputScript, InventoryItem item, boolean verbose) booleancanPerform(IsoGameCharacter character, List<Resource> inputResources, List<InventoryItem> overrideInputItems, boolean forceTestAll, ArrayList<ItemContainer> containers) voidvoidvoidbooleanconsumeInputs(List<Resource> inputResources) booleanconsumeOnTickInputs(List<Resource> inputResources) booleancontainsInputItem(CraftRecipeData.InputScriptData data, InventoryItem inventoryItem) booleancontainsInputItem(InventoryItem inventoryItem) booleancreateOnTickOutputs(List<Resource> outputResources) booleancreateOutputs(List<Resource> outputResources) booleancreateOutputs(List<Resource> outputResources, IsoGameCharacter character) booleancreateRecipeOutputs(boolean testOnly, List<Resource> outputResources, IsoGameCharacter character) getAllConsumedItems(ArrayList<InventoryItem> list, boolean includeKeep) getAllConsumedItems(ArrayList<InventoryItem> list, boolean includeKeep, boolean onlyRecorded) intintgetAppliedInputItemTypes(HashSet<String> appliedItemTypes) floatgetDataForInputScript(InputScript script) intdoublegetFirstInputItemWithTag(ItemTag itemTag) getFirstManualInputFor(InputScript inputScript) getInputItems(Integer index) getManualInputsFor(InputScript inputScript, ArrayList<InventoryItem> list) se.krka.kahlua.vm.KahluaTableintgetPossibleCraftCount(List<Resource> inputResources, List<InventoryItem> inputItems, List<Resource> consumedResources, List<InventoryItem> consumedItems, boolean limitItemsToAppliedItems) floatgetViableItem(int index) getViableResource(int index) booleanbooleanbooleanbooleanbooleanbooleanbooleanload(ByteBuffer input, int WorldVersion, CraftRecipe recipe, boolean recipeInvalidated) voidvoidluaCallOnCreate(IsoGameCharacter character) voidvoidvoidluaCallOnStart(IsoGameCharacter character) booleanvoidbooleanofferAndReplaceInputItem(CraftRecipeData.InputScriptData data, InventoryItem inventoryItem) booleanofferAndReplaceInputItem(InventoryItem inventoryItem) booleanofferInputItem(InputScript inputScript, InventoryItem item) booleanofferInputItem(InputScript inputScript, InventoryItem item, boolean verbose) booleanOnTestItem(InventoryItem inventoryItem) booleanperform(IsoGameCharacter character, List<Resource> inputResources, List<InventoryItem> overrideInputItems, ArrayList<ItemContainer> containers) voidpopulateInputs(List<InventoryItem> inputItems, List<Resource> resources, boolean clearExisting) voidprocessDestroyAndUsedItems(IsoGameCharacter character) static voidRelease(CraftRecipeData data) booleanremoveInputItem(InventoryItem inventoryItem) voidreset()voidsave(ByteBuffer output) voidsetCalculatedVariableInputRatio(float value) voidsetEatPercentage(int percentage) voidsetElapsedTime(double elapsedTime) booleansetManualInputsFor(InputScript inputScript, ArrayList<InventoryItem> list) voidsetMonitor(CraftRecipeMonitor monitor) voidsetRecipe(CraftRecipe recipe) voidsetTargetVariableInputRatio(float target)
-
Field Details
-
inputs
-
-
Constructor Details
-
CraftRecipeData
public CraftRecipeData(CraftMode craftMode, boolean allowInputResources, boolean allowInputItems, boolean allowOutputResources, boolean allowOutputItems)
-
-
Method Details
-
Alloc
public static CraftRecipeData Alloc(CraftMode craftMode, boolean allowInputResources, boolean allowInputItems, boolean allowOutputResources, boolean allowOutputItems) -
Release
-
setMonitor
-
isAllowInputItems
public boolean isAllowInputItems() -
isAllowOutputItems
public boolean isAllowOutputItems() -
isAllowInputResources
public boolean isAllowInputResources() -
isAllowOutputResources
public boolean isAllowOutputResources() -
getToOutputItems
-
reset
public void reset() -
setRecipe
-
getRecipe
-
getDataForInputScript
-
getFirstManualInputFor
-
canOfferInputItem
-
canOfferInputItem
-
canOfferInputItem
-
canOfferInputItem
-
offerAndReplaceInputItem
-
offerAndReplaceInputItem
public boolean offerAndReplaceInputItem(CraftRecipeData.InputScriptData data, InventoryItem inventoryItem) -
offerInputItem
-
offerInputItem
-
containsInputItem
-
containsInputItem
-
removeInputItem
-
areAllInputItemsSatisfied
public boolean areAllInputItemsSatisfied() -
luaCallOnTest
public boolean luaCallOnTest() -
luaCallOnStart
public void luaCallOnStart() -
luaCallOnStart
-
luaCallOnUpdate
public void luaCallOnUpdate() -
luaCallOnCreate
public void luaCallOnCreate() -
luaCallOnCreate
-
luaCallOnFailed
public void luaCallOnFailed() -
canPerform
public boolean canPerform(IsoGameCharacter character, List<Resource> inputResources, List<InventoryItem> overrideInputItems, boolean forceTestAll, ArrayList<ItemContainer> containers) -
perform
public boolean perform(IsoGameCharacter character, List<Resource> inputResources, List<InventoryItem> overrideInputItems, ArrayList<ItemContainer> containers) -
processDestroyAndUsedItems
-
getPossibleCraftCount
public int getPossibleCraftCount(List<Resource> inputResources, List<InventoryItem> inputItems, List<Resource> consumedResources, List<InventoryItem> consumedItems, boolean limitItemsToAppliedItems) -
canConsumeInputs
public boolean canConsumeInputs(List<Resource> inputResources, List<InventoryItem> overrideInputItems, boolean forceTestAll, boolean clearAllViable) -
canConsumeInputs
-
consumeInputs
-
consumeOnTickInputs
-
canCreateOutputs
-
createOutputs
-
canCreateOutputs
-
createOutputs
-
createOnTickOutputs
-
OnTestItem
-
createRecipeOutputs
public boolean createRecipeOutputs(boolean testOnly, List<Resource> outputResources, IsoGameCharacter character) -
save
- Throws:
IOException
-
load
public boolean load(ByteBuffer input, int WorldVersion, CraftRecipe recipe, boolean recipeInvalidated) throws IOException - Throws:
IOException
-
getModData
public se.krka.kahlua.vm.KahluaTable getModData() -
getModelHandOne
-
getModelHandTwo
-
getAllConsumedItems
-
getAllRecordedConsumedItems
-
getAllConsumedItems
-
getAllRecordedConsumedItems
-
getAllConsumedItems
public ArrayList<InventoryItem> getAllConsumedItems(ArrayList<InventoryItem> list, boolean includeKeep) -
getAllConsumedItems
public ArrayList<InventoryItem> getAllConsumedItems(ArrayList<InventoryItem> list, boolean includeKeep, boolean onlyRecorded) -
getAllKeepInputItems
-
getAllKeepInputItems
-
getAllInputItemsWithFlag
-
getAllInputItemsWithFlag
-
getInputItems
-
getFirstInputItemWithFlag
-
getFirstInputItemWithFlag
-
getFirstInputItemWithTag
-
getAllInputItems
-
getAppliedInputItemTypes
-
getAllDestroyInputItems
-
getAllPutBackInputItems
-
getAllNotKeepInputItems
-
getFirstCreatedItem
-
getAllCreatedItems
-
getAllCreatedItems
-
getFirstInputFluidWithFlag
-
getFirstInputFluidWithFlag
-
getAllViableItemsCount
public int getAllViableItemsCount() -
getViableItem
-
getAllViableResourcesCount
public int getAllViableResourcesCount() -
getViableResource
-
isVariableAmount
public boolean isVariableAmount() -
getVariableInputRatio
public float getVariableInputRatio() -
setTargetVariableInputRatio
public void setTargetVariableInputRatio(float target) -
clearTargetVariableInputRatio
public void clearTargetVariableInputRatio() -
addOverfilledResource
public void addOverfilledResource(InputScript input, HashMap<Resource, ArrayList<InventoryItem>> resources) -
getCalculatedVariableInputRatio
public float getCalculatedVariableInputRatio() -
setCalculatedVariableInputRatio
public void setCalculatedVariableInputRatio(float value) -
getManualInputsFor
public ArrayList<InventoryItem> getManualInputsFor(InputScript inputScript, ArrayList<InventoryItem> list) -
clearManualInputs
public void clearManualInputs() -
clearManualInputs
-
setManualInputsFor
-
populateInputs
public void populateInputs(List<InventoryItem> inputItems, List<Resource> resources, boolean clearExisting) -
setEatPercentage
public void setEatPercentage(int percentage) -
getEatPercentage
public int getEatPercentage() -
getElapsedTime
public double getElapsedTime() -
setElapsedTime
public void setElapsedTime(double elapsedTime) -
isFinished
public boolean isFinished()
-