public abstract class AbstractFurnaceTileEntity extends LockableTileEntity implements ISidedInventory, IRecipeHolder, IRecipeHelperPopulator, ITickableTileEntity
Modifier and Type | Field and Description |
---|---|
private int |
cookingProgress |
private int |
cookingTotalTime |
protected IIntArray |
dataAccess |
(package private) LazyOptional<? extends IItemHandler>[] |
handlers |
protected NonNullList<ItemStack> |
items |
private int |
litDuration |
private int |
litTime |
private it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<ResourceLocation> |
recipesUsed |
protected IRecipeType<? extends AbstractCookingRecipe> |
recipeType |
private static int[] |
SLOTS_FOR_DOWN |
private static int[] |
SLOTS_FOR_SIDES |
private static int[] |
SLOTS_FOR_UP |
level, remove, worldPosition
INFINITE_EXTENT_AABB
Modifier | Constructor and Description |
---|---|
protected |
AbstractFurnaceTileEntity(TileEntityType<?> p_i49964_1_,
IRecipeType<? extends AbstractCookingRecipe> p_i49964_2_) |
Modifier and Type | Method and Description |
---|---|
private static void |
add(java.util.Map<Item,java.lang.Integer> p_213996_0_,
IItemProvider p_213996_1_,
int p_213996_2_) |
private static void |
add(java.util.Map<Item,java.lang.Integer> p_213992_0_,
ITag<Item> p_213992_1_,
int p_213992_2_) |
void |
awardUsedRecipes(PlayerEntity p_201560_1_) |
void |
awardUsedRecipesAndPopExperience(PlayerEntity p_235645_1_) |
private void |
burn(IRecipe<?> p_214007_1_) |
protected boolean |
canBurn(IRecipe<?> p_214008_1_) |
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 |
clearContent() |
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 |
getContainerSize() |
static java.util.Map<Item,java.lang.Integer> |
getFuel()
Deprecated.
|
ItemStack |
getItem(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 int |
getTotalCookTime() |
protected void |
invalidateCaps() |
boolean |
isEmpty() |
static boolean |
isFuel(ItemStack p_213991_0_) |
private boolean |
isLit() |
private static boolean |
isNeverAFurnaceFuel(Item p_235644_0_) |
void |
load(BlockState p_230337_1_,
CompoundNBT p_230337_2_) |
ItemStack |
removeItem(int p_70298_1_,
int p_70298_2_) |
ItemStack |
removeItemNoUpdate(int p_70304_1_) |
CompoundNBT |
save(CompoundNBT p_189515_1_) |
void |
setItem(int p_70299_1_,
ItemStack p_70299_2_) |
void |
setRecipeUsed(IRecipe<?> p_193056_1_) |
boolean |
stillValid(PlayerEntity p_70300_1_) |
void |
tick() |
canOpen, canUnlock, createMenu, createMenu, createUnSidedHandler, getCustomName, getDefaultName, getDisplayName, getName, setCustomName
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countItem, getMaxStackSize, hasAnyOf, setChanged, startOpen, stopOpen
tryClear
setRecipeUsed
hasCustomName
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
getCapability
private static final int[] SLOTS_FOR_UP
private static final int[] SLOTS_FOR_DOWN
private static final int[] SLOTS_FOR_SIDES
protected NonNullList<ItemStack> items
private int litTime
private int litDuration
private int cookingProgress
private int cookingTotalTime
protected final IIntArray dataAccess
private final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<ResourceLocation> recipesUsed
protected final IRecipeType<? extends AbstractCookingRecipe> recipeType
LazyOptional<? extends IItemHandler>[] handlers
protected AbstractFurnaceTileEntity(TileEntityType<?> p_i49964_1_, IRecipeType<? extends AbstractCookingRecipe> p_i49964_2_)
@Deprecated public static java.util.Map<Item,java.lang.Integer> getFuel()
private static boolean isNeverAFurnaceFuel(Item p_235644_0_)
private static void add(java.util.Map<Item,java.lang.Integer> p_213992_0_, ITag<Item> p_213992_1_, int p_213992_2_)
private static void add(java.util.Map<Item,java.lang.Integer> p_213996_0_, IItemProvider p_213996_1_, int p_213996_2_)
private boolean isLit()
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
load
in class LockableTileEntity
public CompoundNBT save(CompoundNBT p_189515_1_)
save
in class LockableTileEntity
public void tick()
tick
in interface ITickableTileEntity
protected boolean canBurn(@Nullable IRecipe<?> p_214008_1_)
private void burn(@Nullable IRecipe<?> p_214007_1_)
protected int getBurnDuration(ItemStack p_213997_1_)
protected int getTotalCookTime()
public static boolean isFuel(ItemStack p_213991_0_)
public int[] getSlotsForFace(Direction p_180463_1_)
getSlotsForFace
in interface ISidedInventory
public boolean canPlaceItemThroughFace(int p_180462_1_, ItemStack p_180462_2_, @Nullable Direction p_180462_3_)
canPlaceItemThroughFace
in interface ISidedInventory
public boolean canTakeItemThroughFace(int p_180461_1_, ItemStack p_180461_2_, Direction p_180461_3_)
canTakeItemThroughFace
in interface ISidedInventory
public int getContainerSize()
getContainerSize
in interface IInventory
public boolean isEmpty()
isEmpty
in interface IInventory
public ItemStack getItem(int p_70301_1_)
getItem
in interface IInventory
public ItemStack removeItem(int p_70298_1_, int p_70298_2_)
removeItem
in interface IInventory
public ItemStack removeItemNoUpdate(int p_70304_1_)
removeItemNoUpdate
in interface IInventory
public void setItem(int p_70299_1_, ItemStack p_70299_2_)
setItem
in interface IInventory
public boolean stillValid(PlayerEntity p_70300_1_)
stillValid
in interface IInventory
public boolean canPlaceItem(int p_94041_1_, ItemStack p_94041_2_)
canPlaceItem
in interface IInventory
public void clearContent()
clearContent
in interface IClearable
public void setRecipeUsed(@Nullable IRecipe<?> p_193056_1_)
setRecipeUsed
in interface IRecipeHolder
@Nullable public IRecipe<?> getRecipeUsed()
getRecipeUsed
in interface IRecipeHolder
public void awardUsedRecipes(PlayerEntity p_201560_1_)
awardUsedRecipes
in interface IRecipeHolder
public void awardUsedRecipesAndPopExperience(PlayerEntity p_235645_1_)
public java.util.List<IRecipe<?>> getRecipesToAwardAndPopExperience(World p_235640_1_, Vector3d p_235640_2_)
private static void createExperience(World p_235641_0_, Vector3d p_235641_1_, int p_235641_2_, float p_235641_3_)
public void fillStackedContents(RecipeItemHelper p_194018_1_)
fillStackedContents
in interface IRecipeHelperPopulator
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class LockableTileEntity
protected void invalidateCaps()
invalidateCaps
in class LockableTileEntity