public class RecipeHandler<T extends net.minecraft.item.crafting.IRecipe<net.minecraft.inventory.IInventory>>
extends java.lang.Object
implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>
Constructor and Description |
---|
RecipeHandler(net.minecraft.item.crafting.IRecipeType<T> recipeType,
info.u_team.u_team_core.energy.BasicEnergyStorage energy,
info.u_team.u_team_core.inventory.UItemStackHandler ingredientSlots,
info.u_team.u_team_core.inventory.UItemStackHandler outputSlots,
RecipeData<T> recipeData,
java.lang.Runnable dirtyMarker) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canProcess(T recipe,
net.minecraftforge.items.wrapper.RecipeWrapper recipeWrapper,
info.u_team.u_team_core.inventory.UItemStackHandler outputHandler) |
void |
deserializeNBT(net.minecraft.nbt.CompoundNBT compound) |
protected boolean |
doConsumtionOnStart(T recipe,
info.u_team.u_team_core.energy.BasicEnergyStorage energyStorage) |
protected boolean |
doConsumtionPerTick(T recipe,
info.u_team.u_team_core.energy.BasicEnergyStorage energyStorage) |
info.u_team.u_team_core.energy.BasicEnergyStorage |
getEnergy() |
net.minecraftforge.common.util.LazyOptional<info.u_team.u_team_core.energy.BasicEnergyStorage> |
getEnergyOptional() |
info.u_team.u_team_core.inventory.UItemStackHandler |
getIngredientSlots() |
net.minecraftforge.common.util.LazyOptional<info.u_team.u_team_core.inventory.UItemStackHandler> |
getIngredientSlotsOptional() |
info.u_team.u_team_core.inventory.UItemStackHandler |
getOutputSlots() |
net.minecraftforge.common.util.LazyOptional<info.u_team.u_team_core.inventory.UItemStackHandler> |
getOutputSlotsOptional() |
float |
getPercent() |
info.u_team.u_team_core.api.sync.BufferReferenceHolder |
getPercentTracker() |
void |
handleInitialDataBuffer(net.minecraft.network.PacketBuffer buffer) |
void |
invalidate() |
protected boolean |
isRecipeValid(T recipe,
net.minecraftforge.items.wrapper.RecipeWrapper recipeWrapper) |
protected void |
process(T recipe,
net.minecraftforge.items.wrapper.RecipeWrapper recipeWrapper,
info.u_team.u_team_core.inventory.UItemStackHandler outputHandler) |
void |
sendInitialDataBuffer(net.minecraft.network.PacketBuffer buffer) |
net.minecraft.nbt.CompoundNBT |
serializeNBT() |
void |
setTotalTimeModifier(java.util.function.BiFunction<T,java.lang.Integer,java.lang.Integer> totalTimeModifier) |
void |
update(net.minecraft.world.World world) |
public RecipeHandler(net.minecraft.item.crafting.IRecipeType<T> recipeType, info.u_team.u_team_core.energy.BasicEnergyStorage energy, info.u_team.u_team_core.inventory.UItemStackHandler ingredientSlots, info.u_team.u_team_core.inventory.UItemStackHandler outputSlots, RecipeData<T> recipeData, java.lang.Runnable dirtyMarker)
public void update(net.minecraft.world.World world)
protected boolean doConsumtionPerTick(T recipe, info.u_team.u_team_core.energy.BasicEnergyStorage energyStorage)
protected boolean doConsumtionOnStart(T recipe, info.u_team.u_team_core.energy.BasicEnergyStorage energyStorage)
protected boolean isRecipeValid(T recipe, net.minecraftforge.items.wrapper.RecipeWrapper recipeWrapper)
protected boolean canProcess(T recipe, net.minecraftforge.items.wrapper.RecipeWrapper recipeWrapper, info.u_team.u_team_core.inventory.UItemStackHandler outputHandler)
protected void process(T recipe, net.minecraftforge.items.wrapper.RecipeWrapper recipeWrapper, info.u_team.u_team_core.inventory.UItemStackHandler outputHandler)
public net.minecraft.nbt.CompoundNBT serializeNBT()
serializeNBT
in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>
public void deserializeNBT(net.minecraft.nbt.CompoundNBT compound)
deserializeNBT
in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>
public void invalidate()
public void sendInitialDataBuffer(net.minecraft.network.PacketBuffer buffer)
public void handleInitialDataBuffer(net.minecraft.network.PacketBuffer buffer)
public info.u_team.u_team_core.energy.BasicEnergyStorage getEnergy()
public info.u_team.u_team_core.inventory.UItemStackHandler getIngredientSlots()
public info.u_team.u_team_core.inventory.UItemStackHandler getOutputSlots()
public net.minecraftforge.common.util.LazyOptional<info.u_team.u_team_core.energy.BasicEnergyStorage> getEnergyOptional()
public net.minecraftforge.common.util.LazyOptional<info.u_team.u_team_core.inventory.UItemStackHandler> getIngredientSlotsOptional()
public net.minecraftforge.common.util.LazyOptional<info.u_team.u_team_core.inventory.UItemStackHandler> getOutputSlotsOptional()
public info.u_team.u_team_core.api.sync.BufferReferenceHolder getPercentTracker()
public float getPercent()
public void setTotalTimeModifier(java.util.function.BiFunction<T,java.lang.Integer,java.lang.Integer> totalTimeModifier)