Class HeatFrameCoolingRecipeImpl
java.lang.Object
me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
me.desht.pneumaticcraft.api.crafting.recipe.HeatFrameCoolingRecipe
me.desht.pneumaticcraft.common.recipes.machine.HeatFrameCoolingRecipeImpl
- All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<PneumaticCraftRecipe.DummyIInventory>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
PneumaticCraftRecipe.DummyIInventory -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHeatFrameCoolingRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Ingredient input, int temperature, net.minecraft.world.item.ItemStack output) HeatFrameCoolingRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Ingredient input, int temperature, net.minecraft.world.item.ItemStack output, float bonusMultiplier, float bonusLimit) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends net.minecraft.world.item.crafting.Recipe<?>>
voidcacheMaxThresholdTemp(Collection<T> recipes) floatGet the bonus limit; a hard ceiling on the bonus output chance.floatGet the bonus output multiplier; for every degree below the threshold temperature, this raises the chance of a bonus output by this amount.net.minecraft.world.item.crafting.IngredientgetInput()Get the input ingredient.static intgetMaxThresholdTemp(net.minecraft.world.level.Level world) net.minecraft.world.item.ItemStackGet the output item.net.minecraft.world.item.crafting.RecipeSerializer<?>intGet the threshold temperature (Kelvin) below which cooling occurs.net.minecraft.world.item.crafting.RecipeType<?>getType()booleanmatches(net.minecraft.world.item.ItemStack stack) Check if the given itemstack is valid for this recipe.voidwrite(net.minecraft.network.FriendlyByteBuf buffer) Writes this recipe to a PacketBuffer.Methods inherited from class me.desht.pneumaticcraft.api.crafting.recipe.HeatFrameCoolingRecipe
calculateOutputQuantityMethods inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
assemble, canCraftInDimensions, getId, getResultItem, isSpecial, matchesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getIngredients, getRemainingItems, getToastSymbol, isIncomplete, showNotification
-
Field Details
-
input
public final net.minecraft.world.item.crafting.Ingredient input -
output
public final net.minecraft.world.item.ItemStack output
-
-
Constructor Details
-
HeatFrameCoolingRecipeImpl
public HeatFrameCoolingRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Ingredient input, int temperature, net.minecraft.world.item.ItemStack output) -
HeatFrameCoolingRecipeImpl
public HeatFrameCoolingRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Ingredient input, int temperature, net.minecraft.world.item.ItemStack output, float bonusMultiplier, float bonusLimit)
-
-
Method Details
-
getInput
public net.minecraft.world.item.crafting.Ingredient getInput()Description copied from class:HeatFrameCoolingRecipeGet the input ingredient. Fluid ingredients (FluidIngredient) are acceptable and will be matching by an item containing that fluid, and which provides anIFluidHandlerItemcapability.- Specified by:
getInputin classHeatFrameCoolingRecipe- Returns:
- the input ingredient
-
getOutput
public net.minecraft.world.item.ItemStack getOutput()Description copied from class:HeatFrameCoolingRecipeGet the output item. This does not take into account any bonus multiplier.- Specified by:
getOutputin classHeatFrameCoolingRecipe- Returns:
- the output item
-
getThresholdTemperature
public int getThresholdTemperature()Description copied from class:HeatFrameCoolingRecipeGet the threshold temperature (Kelvin) below which cooling occurs.- Specified by:
getThresholdTemperaturein classHeatFrameCoolingRecipe- Returns:
- the threshold temperature
-
getBonusMultiplier
public float getBonusMultiplier()Description copied from class:HeatFrameCoolingRecipeGet the bonus output multiplier; for every degree below the threshold temperature, this raises the chance of a bonus output by this amount. E.g. with a multiplier of 0.01, there would be a 50% chance of a bonus output when the current temperature is 50 below the threshold temperature.Note that the calculated bonus chance could be greater than 1; in that case there is a guaranteed second output plus a chance of a third, and so on.
- Specified by:
getBonusMultiplierin classHeatFrameCoolingRecipe- Returns:
- a bonus multiplier
-
getBonusLimit
public float getBonusLimit()Description copied from class:HeatFrameCoolingRecipeGet the bonus limit; a hard ceiling on the bonus output chance. E.g. with a limit of 0.8, there will never be a better than 80% chance of a bonus output.- Specified by:
getBonusLimitin classHeatFrameCoolingRecipe- Returns:
- a bonus limit
-
matches
public boolean matches(net.minecraft.world.item.ItemStack stack) Description copied from class:HeatFrameCoolingRecipeCheck if the given itemstack is valid for this recipe.- Specified by:
matchesin classHeatFrameCoolingRecipe- Parameters:
stack- the itemstack- Returns:
- true if this itemstack is valid for this recipe
-
write
public void write(net.minecraft.network.FriendlyByteBuf buffer) Description copied from class:PneumaticCraftRecipeWrites this recipe to a PacketBuffer.- Specified by:
writein classPneumaticCraftRecipe- Parameters:
buffer- The buffer to write to.
-
getSerializer
public net.minecraft.world.item.crafting.RecipeSerializer<?> getSerializer() -
getType
public net.minecraft.world.item.crafting.RecipeType<?> getType() -
cacheMaxThresholdTemp
public static <T extends net.minecraft.world.item.crafting.Recipe<?>> void cacheMaxThresholdTemp(Collection<T> recipes) -
getMaxThresholdTemp
public static int getMaxThresholdTemp(net.minecraft.world.level.Level world)
-