public class PressureChamberRecipeImpl extends PressureChamberRecipe
| Modifier and Type | Class and Description |
|---|---|
static class |
PressureChamberRecipeImpl.Serializer<T extends PressureChamberRecipe> |
PressureChamberRecipe.RecipeSlot, PressureChamberRecipe.SlotCyclePneumaticCraftRecipe.DummyIInventory| Constructor and Description |
|---|
PressureChamberRecipeImpl(net.minecraft.util.ResourceLocation id,
java.util.List<net.minecraft.item.crafting.Ingredient> inputs,
float pressureRequired,
net.minecraft.item.ItemStack... outputs) |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
craftRecipe(net.minecraftforge.items.IItemHandler chamberHandler,
java.util.List<java.lang.Integer> ingredientSlots,
boolean simulate)
This method is called when the Pressure Chamber is ready to craft with this recipe, and will only be called when
PressureChamberRecipe.findIngredients(IItemHandler) returns a non-empty list of slot numbers, i.e. |
java.util.Collection<java.lang.Integer> |
findIngredients(net.minecraftforge.items.IItemHandler chamberHandler)
When called (by the pressure chamber TE when it detects a change in the chamber contents), try to find the
ingredients for this recipe in the given item handler, which represents all of the items currently in the
pressure chamber.
|
float |
getCraftingPressure(net.minecraftforge.items.IItemHandler chamberHandler,
java.util.List<java.lang.Integer> ingredientSlots)
Returns the minimum pressure required to craft the recipe.
|
float |
getCraftingPressureForDisplay()
Get the required crafting pressure for the items specified by
PressureChamberRecipe.getInputsForDisplay(), for display
purposes only (e.g. |
java.lang.String |
getGroup() |
java.util.List<net.minecraft.item.crafting.Ingredient> |
getInputsForDisplay()
Get the input items for this recipe.
|
net.minecraft.item.crafting.IRecipeSerializer<?> |
getSerializer() |
protected java.util.List<net.minecraft.item.ItemStack> |
getSingleResultsForDisplay()
Implement if no output slots display more than one stack.
|
net.minecraft.item.ItemStack |
getToastSymbol() |
net.minecraft.item.crafting.IRecipeType<?> |
getType() |
boolean |
isValidInputItem(net.minecraft.item.ItemStack stack)
Check if the given item is a valid input item for this recipe.
|
void |
write(net.minecraft.network.PacketBuffer buffer)
Writes this recipe to a PacketBuffer.
|
getCraftingPressure, getResultsForDisplay, getSyncForDisplay, getSyncGroupsForDisplay, getTooltipKeyassemble, canCraftInDimensions, getId, getResultItem, isSpecial, matchespublic PressureChamberRecipeImpl(net.minecraft.util.ResourceLocation id,
java.util.List<net.minecraft.item.crafting.Ingredient> inputs,
float pressureRequired,
net.minecraft.item.ItemStack... outputs)
public float getCraftingPressure(net.minecraftforge.items.IItemHandler chamberHandler,
java.util.List<java.lang.Integer> ingredientSlots)
PressureChamberRecipegetCraftingPressure in class PressureChamberRecipechamberHandler - what's currently in the pressure chamberingredientSlots - a list of slots in chamberHandler (as returned by PressureChamberRecipe.findIngredients(IItemHandler))
where the ingredients can be foundpublic float getCraftingPressureForDisplay()
PressureChamberRecipePressureChamberRecipe.getInputsForDisplay(), for display
purposes only (e.g. for JEI)getCraftingPressureForDisplay in class PressureChamberRecipepublic java.util.Collection<java.lang.Integer> findIngredients(net.minecraftforge.items.IItemHandler chamberHandler)
PressureChamberRecipePressureChamberRecipe.getCraftingPressure(IItemHandler, List) and
PressureChamberRecipe.craftRecipe(IItemHandler, List, boolean) by the pressure chamber.
Do not cache this list across ticks, since the chamber contents are quite likely to change in the meantime.
findIngredients in class PressureChamberRecipechamberHandler - what's currently in the pressure chamberpublic java.util.List<net.minecraft.item.crafting.Ingredient> getInputsForDisplay()
PressureChamberRecipegetInputsForDisplay in class PressureChamberRecipeprotected java.util.List<net.minecraft.item.ItemStack> getSingleResultsForDisplay()
PressureChamberRecipegetSingleResultsForDisplay in class PressureChamberRecipePressureChamberRecipe.getResultsForDisplay()public net.minecraft.item.crafting.IRecipeType<?> getType()
public net.minecraft.item.crafting.IRecipeSerializer<?> getSerializer()
public java.lang.String getGroup()
public net.minecraft.item.ItemStack getToastSymbol()
public boolean isValidInputItem(net.minecraft.item.ItemStack stack)
PressureChamberRecipeisValidInputItem in class PressureChamberRecipestack - item stack to check@Nonnull
public net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> craftRecipe(@Nonnull
net.minecraftforge.items.IItemHandler chamberHandler,
java.util.List<java.lang.Integer> ingredientSlots,
boolean simulate)
PressureChamberRecipePressureChamberRecipe.findIngredients(IItemHandler) returns a non-empty list of slot numbers, i.e. the necessary
items are definitely in the chamber.
The implementation is responsible for removing the items that have been used from the chamberHandler.
The implementation must also return the list of crafted items, for the Pressure Chamber to insert into its
output item handler.craftRecipe in class PressureChamberRecipechamberHandler - items in the pressure chamber; should be modified to remove recipe input items.ingredientSlots - slots in the chamber handler where the ingredients can be found, as returned from PressureChamberRecipe.findIngredients(IItemHandler)simulate - pass on to uses of chamberHandlerpublic void write(net.minecraft.network.PacketBuffer buffer)
PneumaticCraftRecipewrite in class PneumaticCraftRecipebuffer - The buffer to write to.