public abstract class AbstractFurnaceTileEntity extends LockableTileEntity implements ISidedInventory, IRecipeHolder, IRecipeHelperPopulator, ITickableTileEntity
Modifier and Type | Field and Description |
---|---|
private int |
burnTime |
private int |
cookTime |
private int |
cookTimeTotal |
private java.util.Map<ResourceLocation,java.lang.Integer> |
field_214022_n |
protected IIntArray |
furnaceData |
(package private) LazyOptional<? extends IItemHandler>[] |
handlers |
protected NonNullList<ItemStack> |
items |
private int |
recipesUsed |
protected IRecipeType<? extends AbstractCookingRecipe> |
recipeType |
private static int[] |
SLOTS_DOWN |
private static int[] |
SLOTS_HORIZONTAL |
private static int[] |
SLOTS_UP |
pos, removed, world
INFINITE_EXTENT_AABB
Modifier | Constructor and Description |
---|---|
protected |
AbstractFurnaceTileEntity(TileEntityType<?> tileTypeIn,
IRecipeType<? extends AbstractCookingRecipe> recipeTypeIn) |
Modifier and Type | Method and Description |
---|---|
private static void |
addItemBurnTime(java.util.Map<Item,java.lang.Integer> map,
IItemProvider itemProvider,
int burnTimeIn) |
private static void |
addItemTagBurnTime(java.util.Map<Item,java.lang.Integer> map,
Tag<Item> itemTag,
int burnTimeIn) |
boolean |
canExtractItem(int index,
ItemStack stack,
Direction direction) |
boolean |
canInsertItem(int index,
ItemStack itemStackIn,
Direction direction) |
protected boolean |
canSmelt(IRecipe<?> recipeIn) |
void |
clear() |
ItemStack |
decrStackSize(int index,
int count) |
void |
fillStackedContents(RecipeItemHelper helper) |
void |
func_213995_d(PlayerEntity player) |
protected int |
getBurnTime(ItemStack fuel) |
static java.util.Map<Item,java.lang.Integer> |
getBurnTimes()
Deprecated.
|
<T> LazyOptional<T> |
getCapability(Capability<T> capability,
Direction facing)
Retrieves the Optional handler for the capability requested on the specific side.
|
protected int |
getCookTime() |
IRecipe<?> |
getRecipeUsed() |
int |
getSizeInventory() |
int[] |
getSlotsForFace(Direction side) |
ItemStack |
getStackInSlot(int index) |
private boolean |
isBurning() |
boolean |
isEmpty() |
static boolean |
isFuel(ItemStack stack) |
boolean |
isItemValidForSlot(int index,
ItemStack stack) |
boolean |
isUsableByPlayer(PlayerEntity player) |
void |
onCrafting(PlayerEntity player) |
void |
read(CompoundNBT compound) |
void |
remove() |
ItemStack |
removeStackFromSlot(int index) |
void |
setInventorySlotContents(int index,
ItemStack stack) |
void |
setRecipeUsed(IRecipe<?> recipe) |
private void |
smelt(IRecipe<?> recipe) |
private static void |
spawnExpOrbs(PlayerEntity player,
int p_214003_1_,
float experience) |
void |
tick() |
CompoundNBT |
write(CompoundNBT compound) |
canOpen, canUnlock, createMenu, createMenu, createUnSidedHandler, getCustomName, getDefaultName, getDisplayName, getName, setCustomName
addInfoToCrashReport, create, getBlockState, getDistanceSq, getMaxRenderDistanceSquared, getPos, getTileData, getType, getUpdatePacket, getUpdateTag, getWorld, hasWorld, isRemoved, markDirty, mirror, onlyOpsCanSetNbt, receiveClientEvent, rotate, setPos, setWorldAndPos, updateContainingBlockInfo, validate, warnInvalidBlock
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeInventory, count, getInventoryStackLimit, hasAny, markDirty, openInventory
clearObj
canUseRecipe
hasCustomName
canRenderBreaking, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, hasFastRenderer, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
getCapability
private static final int[] SLOTS_UP
private static final int[] SLOTS_DOWN
private static final int[] SLOTS_HORIZONTAL
protected NonNullList<ItemStack> items
private int burnTime
private int recipesUsed
private int cookTime
private int cookTimeTotal
protected final IIntArray furnaceData
private final java.util.Map<ResourceLocation,java.lang.Integer> field_214022_n
protected final IRecipeType<? extends AbstractCookingRecipe> recipeType
LazyOptional<? extends IItemHandler>[] handlers
protected AbstractFurnaceTileEntity(TileEntityType<?> tileTypeIn, IRecipeType<? extends AbstractCookingRecipe> recipeTypeIn)
@Deprecated public static java.util.Map<Item,java.lang.Integer> getBurnTimes()
private static void addItemTagBurnTime(java.util.Map<Item,java.lang.Integer> map, Tag<Item> itemTag, int burnTimeIn)
private static void addItemBurnTime(java.util.Map<Item,java.lang.Integer> map, IItemProvider itemProvider, int burnTimeIn)
private boolean isBurning()
public void read(CompoundNBT compound)
read
in class LockableTileEntity
public CompoundNBT write(CompoundNBT compound)
write
in class LockableTileEntity
public void tick()
tick
in interface ITickableTileEntity
protected boolean canSmelt(@Nullable IRecipe<?> recipeIn)
private void smelt(@Nullable IRecipe<?> recipe)
protected int getBurnTime(ItemStack fuel)
protected int getCookTime()
public static boolean isFuel(ItemStack stack)
public int[] getSlotsForFace(Direction side)
getSlotsForFace
in interface ISidedInventory
public boolean canInsertItem(int index, ItemStack itemStackIn, @Nullable Direction direction)
canInsertItem
in interface ISidedInventory
public boolean canExtractItem(int index, ItemStack stack, Direction direction)
canExtractItem
in interface ISidedInventory
public int getSizeInventory()
getSizeInventory
in interface IInventory
public boolean isEmpty()
isEmpty
in interface IInventory
public ItemStack getStackInSlot(int index)
getStackInSlot
in interface IInventory
public ItemStack decrStackSize(int index, int count)
decrStackSize
in interface IInventory
public ItemStack removeStackFromSlot(int index)
removeStackFromSlot
in interface IInventory
public void setInventorySlotContents(int index, ItemStack stack)
setInventorySlotContents
in interface IInventory
public boolean isUsableByPlayer(PlayerEntity player)
isUsableByPlayer
in interface IInventory
public boolean isItemValidForSlot(int index, ItemStack stack)
isItemValidForSlot
in interface IInventory
public void clear()
clear
in interface IClearable
public void setRecipeUsed(@Nullable IRecipe<?> recipe)
setRecipeUsed
in interface IRecipeHolder
@Nullable public IRecipe<?> getRecipeUsed()
getRecipeUsed
in interface IRecipeHolder
public void onCrafting(PlayerEntity player)
onCrafting
in interface IRecipeHolder
public void func_213995_d(PlayerEntity player)
private static void spawnExpOrbs(PlayerEntity player, int p_214003_1_, float experience)
public void fillStackedContents(RecipeItemHelper helper)
fillStackedContents
in interface IRecipeHelperPopulator
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class LockableTileEntity
public void remove()
remove
in class LockableTileEntity