Class CampfireBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.CampfireBlockEntity
- All Implemented Interfaces:
Clearable
,IAttachmentHolder
,IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private final int[]
private final int[]
private final NonNullList
<ItemStack> private static final int
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyImplicitComponents
(DataComponentGetter p_397891_) void
protected void
static void
cookTick
(ServerLevel p_380207_, BlockPos p_155308_, BlockState p_155309_, CampfireBlockEntity p_155310_, RecipeManager.CachedCheck<SingleRecipeInput, CampfireCookingRecipe> p_380193_) static void
cooldownTick
(Level p_155314_, BlockPos p_155315_, BlockState p_155316_, CampfireBlockEntity p_155317_) getItems()
getUpdateTag
(HolderLookup.Provider p_324612_) protected void
loadAdditional
(CompoundTag p_155312_, HolderLookup.Provider p_323804_) private void
static void
particleTick
(Level p_155319_, BlockPos p_155320_, BlockState p_155321_, CampfireBlockEntity p_155322_) boolean
placeFood
(ServerLevel p_380019_, LivingEntity p_347582_, ItemStack p_238286_) void
preRemoveSideEffects
(BlockPos p_394031_, BlockState p_394253_) void
removeComponentsFromTag
(CompoundTag p_332690_) protected void
saveAdditional
(CompoundTag p_187486_, HolderLookup.Provider p_324005_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, removeData, saveCustomAndMetadata, saveCustomOnly, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
BURN_COOL_SPEED
private static final int BURN_COOL_SPEED- See Also:
-
NUM_SLOTS
private static final int NUM_SLOTS- See Also:
-
items
-
cookingProgress
private final int[] cookingProgress -
cookingTime
private final int[] cookingTime
-
-
Constructor Details
-
CampfireBlockEntity
-
-
Method Details
-
cookTick
public static void cookTick(ServerLevel p_380207_, BlockPos p_155308_, BlockState p_155309_, CampfireBlockEntity p_155310_, RecipeManager.CachedCheck<SingleRecipeInput, CampfireCookingRecipe> p_380193_) -
cooldownTick
public static void cooldownTick(Level p_155314_, BlockPos p_155315_, BlockState p_155316_, CampfireBlockEntity p_155317_) -
particleTick
public static void particleTick(Level p_155319_, BlockPos p_155320_, BlockState p_155321_, CampfireBlockEntity p_155322_) -
getItems
-
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
placeFood
public boolean placeFood(ServerLevel p_380019_, @Nullable LivingEntity p_347582_, ItemStack p_238286_) -
markUpdated
private void markUpdated() -
clearContent
public void clearContent()- Specified by:
clearContent
in interfaceClearable
-
preRemoveSideEffects
- Overrides:
preRemoveSideEffects
in classBlockEntity
-
applyImplicitComponents
- Overrides:
applyImplicitComponents
in classBlockEntity
-
collectImplicitComponents
- Overrides:
collectImplicitComponents
in classBlockEntity
-
removeComponentsFromTag
- Overrides:
removeComponentsFromTag
in classBlockEntity
-