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:
TypedInstance<BlockEntityType<?>>, DebugValueSource, Clearable, IAttachmentHolder, IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final int[]private final int[]private final NonNullList<ItemStack> private static final org.slf4j.Loggerprivate static final intFields inherited from class BlockEntity
level, remove, worldPositionFields inherited from class AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyImplicitComponents(DataComponentGetter components) voidprotected voidcollectImplicitComponents(DataComponentMap.Builder components) static voidcookTick(ServerLevel level, BlockPos pos, BlockState state, CampfireBlockEntity entity, RecipeManager.CachedCheck<SingleRecipeInput, CampfireCookingRecipe> recipeCache) static voidcooldownTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity entity) getItems()getUpdateTag(HolderLookup.Provider registries) protected voidloadAdditional(ValueInput input) private voidstatic voidparticleTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity entity) booleanplaceFood(ServerLevel serverLevel, @Nullable LivingEntity sourceEntity, ItemStack placeItem) voidpreRemoveSideEffects(BlockPos pos, BlockState state) voidremoveComponentsFromTag(ValueOutput output) protected voidsaveAdditional(ValueOutput output) Methods inherited from class BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, problemPath, registerDebugValues, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEvent, typeHolderMethods inherited from class AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
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 level, BlockPos pos, BlockState state, CampfireBlockEntity entity, RecipeManager.CachedCheck<SingleRecipeInput, CampfireCookingRecipe> recipeCache) -
cooldownTick
public static void cooldownTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity entity) -
particleTick
public static void particleTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity entity) -
getItems
-
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
getUpdatePacket
- Overrides:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
placeFood
public boolean placeFood(ServerLevel serverLevel, @Nullable LivingEntity sourceEntity, ItemStack placeItem) -
markUpdated
private void markUpdated() -
clearContent
public void clearContent()- Specified by:
clearContentin interfaceClearable
-
preRemoveSideEffects
- Overrides:
preRemoveSideEffectsin classBlockEntity
-
applyImplicitComponents
- Overrides:
applyImplicitComponentsin classBlockEntity
-
collectImplicitComponents
- Overrides:
collectImplicitComponentsin classBlockEntity
-
removeComponentsFromTag
- Overrides:
removeComponentsFromTagin classBlockEntity
-