Class AbstractFurnaceBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity
- All Implemented Interfaces:
- Clearable,- Container,- MenuConstructor,- RecipeCraftingHolder,- StackedContentsCompatible,- MenuProvider,- Nameable,- WorldlyContainer,- IAttachmentHolder,- IMenuProviderExtension,- IBlockEntityExtension,- INBTSerializable<CompoundTag>
- Direct Known Subclasses:
- BlastFurnaceBlockEntity,- FurnaceBlockEntity,- SmokerBlockEntity
public abstract class AbstractFurnaceBlockEntity
extends BaseContainerBlockEntity
implements WorldlyContainer, RecipeCraftingHolder, StackedContentsCompatible
- 
Nested Class SummaryNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolderAttachmentHolder.AsField
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final int(package private) int(package private) intstatic final intstatic final intstatic final intstatic final intprotected final ContainerDataprotected NonNullList<ItemStack>(package private) int(package private) intstatic final intprivate final RecipeManager.CachedCheck<Container,? extends AbstractCookingRecipe> private final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<ResourceLocation>private final RecipeType<? extends AbstractCookingRecipe>protected static final intprotected static final intprotected static final intprivate static final int[]private static final int[]private static final int[]Fields inherited from class net.minecraft.world.level.block.entity.BlockEntitylevel, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolderATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.world.ContainerDEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractFurnaceBlockEntity(BlockEntityType<?> p_154991_, BlockPos p_154992_, BlockState p_154993_, RecipeType<? extends AbstractCookingRecipe> p_154994_) 
- 
Method SummaryModifier and TypeMethodDescriptionprivate static voidadd(ObjIntConsumer<com.mojang.datafixers.util.Either<Item, TagKey<Item>>> consumer, TagKey<Item> tag, int time) private static voidadd(ObjIntConsumer<com.mojang.datafixers.util.Either<Item, TagKey<Item>>> consumer, ItemLike item, int time) private static voidprivate static voidvoidawardUsedRecipes(Player p_58396_, List<ItemStack> p_282202_) voidawardUsedRecipesAndPopExperience(ServerPlayer p_155004_) static voidbuildFuels(ObjIntConsumer<com.mojang.datafixers.util.Either<Item, TagKey<Item>>> map) private booleanburn(RegistryAccess p_266740_, RecipeHolder<?> p_300910_, NonNullList<ItemStack> p_267073_, int p_267157_) private booleancanBurn(RegistryAccess p_266924_, RecipeHolder<?> p_301107_, NonNullList<ItemStack> p_155007_, int p_155008_) booleancanPlaceItem(int p_58389_, ItemStack p_58390_) booleancanPlaceItemThroughFace(int p_58336_, ItemStack p_58337_, Direction p_58338_) booleancanTakeItemThroughFace(int p_58392_, ItemStack p_58393_, Direction p_58394_) voidprivate static voidcreateExperience(ServerLevel p_154999_, Vec3 p_155000_, int p_155001_, float p_155002_) voidfillStackedContents(StackedContents p_58342_) protected intgetBurnDuration(ItemStack p_58343_) intgetFuel()Deprecated.Forge: get burn times by calling CommonHooks#getBurnTime(ItemStack)getItem(int p_58328_) List<RecipeHolder<?>>getRecipesToAwardAndPopExperience(ServerLevel p_154996_, Vec3 p_154997_) RecipeHolder<?>int[]getSlotsForFace(Direction p_58363_) private static intgetTotalCookTime(Level p_222693_, AbstractFurnaceBlockEntity p_222694_) booleanisEmpty()static booleanprivate booleanisLit()private static booleanisNeverAFurnaceFuel(Item p_58398_) voidload(CompoundTag p_155025_) removeItem(int p_58330_, int p_58331_) removeItemNoUpdate(int p_58387_) protected voidsaveAdditional(CompoundTag p_187452_) static voidserverTick(Level p_155014_, BlockPos p_155015_, BlockState p_155016_, AbstractFurnaceBlockEntity p_155017_) voidvoidsetRecipeUsed(RecipeHolder<?> p_301245_) booleanstillValid(Player p_58340_) Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntitycanOpen, canUnlock, createMenu, createMenu, getCustomName, getDefaultName, getDisplayName, getName, setCustomNameMethods inherited from class net.minecraft.world.level.block.entity.BlockEntityaddEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, removeData, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setData, setLevel, setRemoved, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolderareAttachmentsCompatible, deserializeAttachments, getData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.ContainercanTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpenMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHoldergetData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtensiondeserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtensionshouldTriggerClientSideContainerClosingOnOpenMethods inherited from interface net.minecraft.world.NameablehasCustomNameMethods inherited from interface net.minecraft.world.inventory.RecipeCraftingHoldersetRecipeUsed
- 
Field Details- 
SLOT_INPUTprotected static final int SLOT_INPUT- See Also:
 
- 
SLOT_FUELprotected static final int SLOT_FUEL- See Also:
 
- 
SLOT_RESULTprotected static final int SLOT_RESULT- See Also:
 
- 
DATA_LIT_TIMEpublic static final int DATA_LIT_TIME- See Also:
 
- 
SLOTS_FOR_UPprivate static final int[] SLOTS_FOR_UP
- 
SLOTS_FOR_DOWNprivate static final int[] SLOTS_FOR_DOWN
- 
SLOTS_FOR_SIDESprivate static final int[] SLOTS_FOR_SIDES
- 
DATA_LIT_DURATIONpublic static final int DATA_LIT_DURATION- See Also:
 
- 
DATA_COOKING_PROGRESSpublic static final int DATA_COOKING_PROGRESS- See Also:
 
- 
DATA_COOKING_TOTAL_TIMEpublic static final int DATA_COOKING_TOTAL_TIME- See Also:
 
- 
NUM_DATA_VALUESpublic static final int NUM_DATA_VALUES- See Also:
 
- 
BURN_TIME_STANDARDpublic static final int BURN_TIME_STANDARD- See Also:
 
- 
BURN_COOL_SPEEDpublic static final int BURN_COOL_SPEED- See Also:
 
- 
recipeType
- 
items
- 
litTimeint litTime
- 
litDurationint litDuration
- 
cookingProgressint cookingProgress
- 
cookingTotalTimeint cookingTotalTime
- 
dataAccess
- 
recipesUsed
- 
quickCheck
 
- 
- 
Constructor Details- 
AbstractFurnaceBlockEntityprotected AbstractFurnaceBlockEntity(BlockEntityType<?> p_154991_, BlockPos p_154992_, BlockState p_154993_, RecipeType<? extends AbstractCookingRecipe> p_154994_) 
 
- 
- 
Method Details- 
getFuelDeprecated.Forge: get burn times by calling CommonHooks#getBurnTime(ItemStack)
- 
addprivate static void add(ObjIntConsumer<com.mojang.datafixers.util.Either<Item, TagKey<Item>>> consumer, ItemLike item, int time) 
- 
add
- 
buildFuels@Internal public static void buildFuels(ObjIntConsumer<com.mojang.datafixers.util.Either<Item, TagKey<Item>>> map) 
- 
isNeverAFurnaceFuel
- 
add
- 
add
- 
isLitprivate boolean isLit()
- 
load- Overrides:
- loadin class- BaseContainerBlockEntity
 
- 
saveAdditional- Overrides:
- saveAdditionalin class- BaseContainerBlockEntity
 
- 
serverTickpublic static void serverTick(Level p_155014_, BlockPos p_155015_, BlockState p_155016_, AbstractFurnaceBlockEntity p_155017_) 
- 
canBurnprivate boolean canBurn(RegistryAccess p_266924_, @Nullable RecipeHolder<?> p_301107_, NonNullList<ItemStack> p_155007_, int p_155008_) 
- 
burnprivate boolean burn(RegistryAccess p_266740_, @Nullable RecipeHolder<?> p_300910_, NonNullList<ItemStack> p_267073_, int p_267157_) 
- 
getBurnDuration
- 
getTotalCookTime
- 
isFuel
- 
getSlotsForFace- Specified by:
- getSlotsForFacein interface- WorldlyContainer
 
- 
canPlaceItemThroughFacepublic boolean canPlaceItemThroughFace(int p_58336_, ItemStack p_58337_, @Nullable Direction p_58338_) - Specified by:
- canPlaceItemThroughFacein interface- WorldlyContainer
 
- 
canTakeItemThroughFace- Specified by:
- canTakeItemThroughFacein interface- WorldlyContainer
 
- 
getContainerSizepublic int getContainerSize()- Specified by:
- getContainerSizein interface- Container
 
- 
isEmptypublic boolean isEmpty()
- 
getItem
- 
removeItem- Specified by:
- removeItemin interface- Container
 
- 
removeItemNoUpdate- Specified by:
- removeItemNoUpdatein interface- Container
 
- 
setItem
- 
stillValid- Specified by:
- stillValidin interface- Container
 
- 
canPlaceItem- Specified by:
- canPlaceItemin interface- Container
 
- 
clearContentpublic void clearContent()- Specified by:
- clearContentin interface- Clearable
 
- 
setRecipeUsed- Specified by:
- setRecipeUsedin interface- RecipeCraftingHolder
 
- 
getRecipeUsed- Specified by:
- getRecipeUsedin interface- RecipeCraftingHolder
 
- 
awardUsedRecipes- Specified by:
- awardUsedRecipesin interface- RecipeCraftingHolder
 
- 
awardUsedRecipesAndPopExperience
- 
getRecipesToAwardAndPopExperiencepublic List<RecipeHolder<?>> getRecipesToAwardAndPopExperience(ServerLevel p_154996_, Vec3 p_154997_) 
- 
createExperienceprivate static void createExperience(ServerLevel p_154999_, Vec3 p_155000_, int p_155001_, float p_155002_) 
- 
fillStackedContents- Specified by:
- fillStackedContentsin interface- StackedContentsCompatible
 
 
-