Class CraftingProcessOverrideCraftingTable
java.lang.Object
org.cyclops.integratedcrafting.core.crafting.processoverride.CraftingProcessOverrideCraftingTable
- All Implemented Interfaces:
ICraftingProcessOverride
public class CraftingProcessOverrideCraftingTable
extends Object
implements ICraftingProcessOverride
A crafting process override for crafting tables.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancraft(Function<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?, ?>, org.cyclops.integrateddynamics.api.part.PartPos> targetGetter, org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients ingredients, ICraftingResultsSink resultsSink, boolean simulate) Start a crafting process with the given ingredients.static net.minecraftforge.common.util.FakePlayergetFakePlayer(net.minecraft.server.level.ServerLevel world) booleanisApplicable(org.cyclops.integrateddynamics.api.part.PartPos target) Check if this override applies to the given target.
-
Constructor Details
-
CraftingProcessOverrideCraftingTable
public CraftingProcessOverrideCraftingTable()
-
-
Method Details
-
getFakePlayer
public static net.minecraftforge.common.util.FakePlayer getFakePlayer(net.minecraft.server.level.ServerLevel world) -
isApplicable
public boolean isApplicable(org.cyclops.integrateddynamics.api.part.PartPos target) Description copied from interface:ICraftingProcessOverrideCheck if this override applies to the given target.- Specified by:
isApplicablein interfaceICraftingProcessOverride- Parameters:
target- A target position.- Returns:
- If this override is applicable.
-
craft
public boolean craft(Function<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?, ?>, org.cyclops.integrateddynamics.api.part.PartPos> targetGetter, org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients ingredients, ICraftingResultsSink resultsSink, boolean simulate) Description copied from interface:ICraftingProcessOverrideStart a crafting process with the given ingredients.- Specified by:
craftin interfaceICraftingProcessOverride- Parameters:
targetGetter- A function to get the target position.ingredients- The ingredients to insert.resultsSink- A sink where the ingredients can optionally be inserted into. This should only be used if the processor does not have an internal storage.simulate- If insertion should be simulated.- Returns:
- If all instances could be inserted.
-