Package net.minecraft.tileentity
Class AbstractFurnaceTileEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
-
- net.minecraft.tileentity.TileEntity
-
- net.minecraft.tileentity.LockableTileEntity
-
- net.minecraft.tileentity.AbstractFurnaceTileEntity
-
- All Implemented Interfaces:
IContainerProvider,INamedContainerProvider,IClearable,IInventory,IRecipeHelperPopulator,IRecipeHolder,ISidedInventory,ITickableTileEntity,INameable,ICapabilityProvider,ICapabilitySerializable<CompoundNBT>,IForgeTileEntity,INBTSerializable<CompoundNBT>
- Direct Known Subclasses:
BlastFurnaceTileEntity,FurnaceTileEntity,SmokerTileEntity
public abstract class AbstractFurnaceTileEntity extends LockableTileEntity implements ISidedInventory, IRecipeHolder, IRecipeHelperPopulator, ITickableTileEntity
-
-
Field Summary
Fields Modifier and Type Field Description private intcookingProgressprivate intcookingTotalTimeprotected IIntArraydataAccess(package private) LazyOptional<? extends IItemHandler>[]handlersprotected NonNullList<ItemStack>itemsprivate intlitDurationprivate intlitTimeprivate it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<ResourceLocation>recipesUsedprotected IRecipeType<? extends AbstractCookingRecipe>recipeTypeprivate static int[]SLOTS_FOR_DOWNprivate static int[]SLOTS_FOR_SIDESprivate static int[]SLOTS_FOR_UP-
Fields inherited from class net.minecraft.tileentity.TileEntity
level, remove, worldPosition
-
Fields inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
INFINITE_EXTENT_AABB
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFurnaceTileEntity(TileEntityType<?> p_i49964_1_, IRecipeType<? extends AbstractCookingRecipe> p_i49964_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private static voidadd(java.util.Map<Item,java.lang.Integer> p_213992_0_, ITag<Item> p_213992_1_, int p_213992_2_)private static voidadd(java.util.Map<Item,java.lang.Integer> p_213996_0_, IItemProvider p_213996_1_, int p_213996_2_)voidawardUsedRecipes(PlayerEntity p_201560_1_)voidawardUsedRecipesAndPopExperience(PlayerEntity p_235645_1_)private voidburn(IRecipe<?> p_214007_1_)protected booleancanBurn(IRecipe<?> p_214008_1_)booleancanPlaceItem(int p_94041_1_, ItemStack p_94041_2_)booleancanPlaceItemThroughFace(int p_180462_1_, ItemStack p_180462_2_, Direction p_180462_3_)booleancanTakeItemThroughFace(int p_180461_1_, ItemStack p_180461_2_, Direction p_180461_3_)voidclearContent()private static voidcreateExperience(World p_235641_0_, Vector3d p_235641_1_, int p_235641_2_, float p_235641_3_)voidfillStackedContents(RecipeItemHelper p_194018_1_)protected intgetBurnDuration(ItemStack p_213997_1_)<T> LazyOptional<T>getCapability(Capability<T> capability, Direction facing)Retrieves the Optional handler for the capability requested on the specific side.intgetContainerSize()static java.util.Map<Item,java.lang.Integer>getFuel()Deprecated.ItemStackgetItem(int p_70301_1_)java.util.List<IRecipe<?>>getRecipesToAwardAndPopExperience(World p_235640_1_, Vector3d p_235640_2_)IRecipe<?>getRecipeUsed()int[]getSlotsForFace(Direction p_180463_1_)protected intgetTotalCookTime()protected voidinvalidateCaps()booleanisEmpty()static booleanisFuel(ItemStack p_213991_0_)private booleanisLit()private static booleanisNeverAFurnaceFuel(Item p_235644_0_)voidload(BlockState p_230337_1_, CompoundNBT p_230337_2_)ItemStackremoveItem(int p_70298_1_, int p_70298_2_)ItemStackremoveItemNoUpdate(int p_70304_1_)CompoundNBTsave(CompoundNBT p_189515_1_)voidsetItem(int p_70299_1_, ItemStack p_70299_2_)voidsetRecipeUsed(IRecipe<?> p_193056_1_)booleanstillValid(PlayerEntity p_70300_1_)voidtick()-
Methods inherited from class net.minecraft.tileentity.LockableTileEntity
canOpen, canUnlock, createMenu, createMenu, createUnSidedHandler, getCustomName, getDefaultName, getDisplayName, getName, setCustomName
-
Methods inherited from class net.minecraft.tileentity.TileEntity
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Methods inherited from interface net.minecraft.inventory.IInventory
countItem, getMaxStackSize, hasAnyOf, setChanged, startOpen, stopOpen
-
Methods inherited from interface net.minecraft.util.INameable
hasCustomName
-
Methods inherited from interface net.minecraft.inventory.IRecipeHolder
setRecipeUsed
-
-
-
-
Field Detail
-
SLOTS_FOR_UP
private static final int[] SLOTS_FOR_UP
-
SLOTS_FOR_DOWN
private static final int[] SLOTS_FOR_DOWN
-
SLOTS_FOR_SIDES
private static final int[] SLOTS_FOR_SIDES
-
items
protected NonNullList<ItemStack> items
-
litTime
private int litTime
-
litDuration
private int litDuration
-
cookingProgress
private int cookingProgress
-
cookingTotalTime
private int cookingTotalTime
-
dataAccess
protected final IIntArray dataAccess
-
recipesUsed
private final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<ResourceLocation> recipesUsed
-
recipeType
protected final IRecipeType<? extends AbstractCookingRecipe> recipeType
-
handlers
LazyOptional<? extends IItemHandler>[] handlers
-
-
Constructor Detail
-
AbstractFurnaceTileEntity
protected AbstractFurnaceTileEntity(TileEntityType<?> p_i49964_1_, IRecipeType<? extends AbstractCookingRecipe> p_i49964_2_)
-
-
Method Detail
-
getFuel
@Deprecated public static java.util.Map<Item,java.lang.Integer> getFuel()
Deprecated.
-
isNeverAFurnaceFuel
private static boolean isNeverAFurnaceFuel(Item p_235644_0_)
-
add
private static void add(java.util.Map<Item,java.lang.Integer> p_213992_0_, ITag<Item> p_213992_1_, int p_213992_2_)
-
add
private static void add(java.util.Map<Item,java.lang.Integer> p_213996_0_, IItemProvider p_213996_1_, int p_213996_2_)
-
isLit
private boolean isLit()
-
load
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
- Overrides:
loadin classLockableTileEntity
-
save
public CompoundNBT save(CompoundNBT p_189515_1_)
- Overrides:
savein classLockableTileEntity
-
tick
public void tick()
- Specified by:
tickin interfaceITickableTileEntity
-
canBurn
protected boolean canBurn(@Nullable IRecipe<?> p_214008_1_)
-
burn
private void burn(@Nullable IRecipe<?> p_214007_1_)
-
getBurnDuration
protected int getBurnDuration(ItemStack p_213997_1_)
-
getTotalCookTime
protected int getTotalCookTime()
-
isFuel
public static boolean isFuel(ItemStack p_213991_0_)
-
getSlotsForFace
public int[] getSlotsForFace(Direction p_180463_1_)
- Specified by:
getSlotsForFacein interfaceISidedInventory
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int p_180462_1_, ItemStack p_180462_2_, @Nullable Direction p_180462_3_)- Specified by:
canPlaceItemThroughFacein interfaceISidedInventory
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int p_180461_1_, ItemStack p_180461_2_, Direction p_180461_3_)- Specified by:
canTakeItemThroughFacein interfaceISidedInventory
-
getContainerSize
public int getContainerSize()
- Specified by:
getContainerSizein interfaceIInventory
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceIInventory
-
getItem
public ItemStack getItem(int p_70301_1_)
- Specified by:
getItemin interfaceIInventory
-
removeItem
public ItemStack removeItem(int p_70298_1_, int p_70298_2_)
- Specified by:
removeItemin interfaceIInventory
-
removeItemNoUpdate
public ItemStack removeItemNoUpdate(int p_70304_1_)
- Specified by:
removeItemNoUpdatein interfaceIInventory
-
setItem
public void setItem(int p_70299_1_, ItemStack p_70299_2_)- Specified by:
setItemin interfaceIInventory
-
stillValid
public boolean stillValid(PlayerEntity p_70300_1_)
- Specified by:
stillValidin interfaceIInventory
-
canPlaceItem
public boolean canPlaceItem(int p_94041_1_, ItemStack p_94041_2_)- Specified by:
canPlaceItemin interfaceIInventory
-
clearContent
public void clearContent()
- Specified by:
clearContentin interfaceIClearable
-
setRecipeUsed
public void setRecipeUsed(@Nullable IRecipe<?> p_193056_1_)- Specified by:
setRecipeUsedin interfaceIRecipeHolder
-
getRecipeUsed
@Nullable public IRecipe<?> getRecipeUsed()
- Specified by:
getRecipeUsedin interfaceIRecipeHolder
-
awardUsedRecipes
public void awardUsedRecipes(PlayerEntity p_201560_1_)
- Specified by:
awardUsedRecipesin interfaceIRecipeHolder
-
awardUsedRecipesAndPopExperience
public void awardUsedRecipesAndPopExperience(PlayerEntity p_235645_1_)
-
getRecipesToAwardAndPopExperience
public java.util.List<IRecipe<?>> getRecipesToAwardAndPopExperience(World p_235640_1_, Vector3d p_235640_2_)
-
createExperience
private static void createExperience(World p_235641_0_, Vector3d p_235641_1_, int p_235641_2_, float p_235641_3_)
-
fillStackedContents
public void fillStackedContents(RecipeItemHelper p_194018_1_)
- Specified by:
fillStackedContentsin interfaceIRecipeHelperPopulator
-
getCapability
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
Description copied from interface:ICapabilityProviderRetrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- Specified by:
getCapabilityin interfaceICapabilityProvider- Overrides:
getCapabilityin classLockableTileEntity- Returns:
- The requested an optional holding the requested capability.
-
invalidateCaps
protected void invalidateCaps()
- Overrides:
invalidateCapsin classLockableTileEntity
-
-