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
Modifier and TypeFieldDescriptionprivate int
private int
protected final IIntArray
(package private) LazyOptional<? extends IItemHandler>[]
protected NonNullList<ItemStack>
private int
private int
private final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<ResourceLocation>
protected final IRecipeType<? extends AbstractCookingRecipe>
private static final int[]
private static final int[]
private static final int[]
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
ModifierConstructorDescriptionprotected
AbstractFurnaceTileEntity
(TileEntityType<?> p_i49964_1_, IRecipeType<? extends AbstractCookingRecipe> p_i49964_2_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
private static void
add
(Map<Item, Integer> p_213996_0_, IItemProvider p_213996_1_, int p_213996_2_) void
awardUsedRecipes
(PlayerEntity p_201560_1_) void
awardUsedRecipesAndPopExperience
(PlayerEntity p_235645_1_) private void
protected boolean
boolean
canPlaceItem
(int p_94041_1_, ItemStack p_94041_2_) boolean
canPlaceItemThroughFace
(int p_180462_1_, ItemStack p_180462_2_, Direction p_180462_3_) boolean
canTakeItemThroughFace
(int p_180461_1_, ItemStack p_180461_2_, Direction p_180461_3_) void
private static void
createExperience
(World p_235641_0_, Vector3d p_235641_1_, int p_235641_2_, float p_235641_3_) void
fillStackedContents
(RecipeItemHelper p_194018_1_) protected int
getBurnDuration
(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.int
getFuel()
Deprecated.getItem
(int p_70301_1_) getRecipesToAwardAndPopExperience
(World p_235640_1_, Vector3d p_235640_2_) IRecipe<?>
int[]
getSlotsForFace
(Direction p_180463_1_) protected int
protected void
boolean
isEmpty()
static boolean
private boolean
isLit()
private static boolean
isNeverAFurnaceFuel
(Item p_235644_0_) void
load
(BlockState p_230337_1_, CompoundNBT p_230337_2_) removeItem
(int p_70298_1_, int p_70298_2_) removeItemNoUpdate
(int p_70304_1_) save
(CompoundNBT p_189515_1_) void
void
setRecipeUsed
(IRecipe<?> p_193056_1_) boolean
stillValid
(PlayerEntity p_70300_1_) void
tick()
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 Details
-
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
-
litTime
private int litTime -
litDuration
private int litDuration -
cookingProgress
private int cookingProgress -
cookingTotalTime
private int cookingTotalTime -
dataAccess
-
recipesUsed
-
recipeType
-
handlers
LazyOptional<? extends IItemHandler>[] handlers
-
-
Constructor Details
-
AbstractFurnaceTileEntity
protected AbstractFurnaceTileEntity(TileEntityType<?> p_i49964_1_, IRecipeType<? extends AbstractCookingRecipe> p_i49964_2_)
-
-
Method Details
-
getFuel
Deprecated. -
isNeverAFurnaceFuel
-
add
-
add
-
isLit
private boolean isLit() -
load
- Overrides:
load
in classLockableTileEntity
-
save
- Overrides:
save
in classLockableTileEntity
-
tick
public void tick()- Specified by:
tick
in interfaceITickableTileEntity
-
canBurn
-
burn
-
getBurnDuration
-
getTotalCookTime
protected int getTotalCookTime() -
isFuel
-
getSlotsForFace
- Specified by:
getSlotsForFace
in interfaceISidedInventory
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int p_180462_1_, ItemStack p_180462_2_, @Nullable Direction p_180462_3_) - Specified by:
canPlaceItemThroughFace
in interfaceISidedInventory
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int p_180461_1_, ItemStack p_180461_2_, Direction p_180461_3_) - Specified by:
canTakeItemThroughFace
in interfaceISidedInventory
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSize
in interfaceIInventory
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceIInventory
-
getItem
- Specified by:
getItem
in interfaceIInventory
-
removeItem
- Specified by:
removeItem
in interfaceIInventory
-
removeItemNoUpdate
- Specified by:
removeItemNoUpdate
in interfaceIInventory
-
setItem
- Specified by:
setItem
in interfaceIInventory
-
stillValid
- Specified by:
stillValid
in interfaceIInventory
-
canPlaceItem
- Specified by:
canPlaceItem
in interfaceIInventory
-
clearContent
public void clearContent()- Specified by:
clearContent
in interfaceIClearable
-
setRecipeUsed
- Specified by:
setRecipeUsed
in interfaceIRecipeHolder
-
getRecipeUsed
- Specified by:
getRecipeUsed
in interfaceIRecipeHolder
-
awardUsedRecipes
- Specified by:
awardUsedRecipes
in interfaceIRecipeHolder
-
awardUsedRecipesAndPopExperience
-
getRecipesToAwardAndPopExperience
-
createExperience
-
fillStackedContents
- Specified by:
fillStackedContents
in interfaceIRecipeHelperPopulator
-
getCapability
Description copied from interface:ICapabilityProvider
Retrieves 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:
getCapability
in interfaceICapabilityProvider
- Overrides:
getCapability
in classLockableTileEntity
- Returns:
- The requested an optional holding the requested capability.
-
invalidateCaps
protected void invalidateCaps()- Overrides:
invalidateCaps
in classLockableTileEntity
-