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, BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final int[]private final int[]private final NonNullList<ItemStack> private static final intprivate final RecipeManager.CachedCheck<SingleRecipeInput, CampfireCookingRecipe> Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyImplicitComponents(BlockEntity.DataComponentInput componentInput) voidprotected voidcollectImplicitComponents(DataComponentMap.Builder components) static voidcookTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity blockEntity) static voidcooldownTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity blockEntity) voiddowse()getCookableRecipe(ItemStack stack) getItems()getUpdateTag(HolderLookup.Provider registries) protected voidloadAdditional(CompoundTag tag, HolderLookup.Provider registries) private voidstatic voidparticleTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity blockEntity) booleanplaceFood(LivingEntity entity, ItemStack food, int cookTime) voidprotected voidsaveAdditional(CompoundTag tag, HolderLookup.Provider registries) 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, onlyOpCanSetNbt, parseCustomNameSafe, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, 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 -
quickCheck
-
-
Constructor Details
-
CampfireBlockEntity
-
-
Method Details
-
cookTick
public static void cookTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity blockEntity) -
cooldownTick
public static void cooldownTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity blockEntity) -
particleTick
public static void particleTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity blockEntity) -
getItems
-
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
getUpdatePacket
- Overrides:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
getCookableRecipe
-
placeFood
-
markUpdated
private void markUpdated() -
clearContent
public void clearContent()- Specified by:
clearContentin interfaceClearable
-
dowse
public void dowse() -
applyImplicitComponents
- Overrides:
applyImplicitComponentsin classBlockEntity
-
collectImplicitComponents
- Overrides:
collectImplicitComponentsin classBlockEntity
-
removeComponentsFromTag
- Overrides:
removeComponentsFromTagin classBlockEntity
-