Package net.minecraft.block.entity
Class CampfireBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.CampfireBlockEntity
- All Implemented Interfaces:
Clearable
public class CampfireBlockEntity extends BlockEntity implements Clearable
-
Field Summary
Fields Modifier and Type Field Description private int[]cookingTimesprivate int[]cookingTotalTimesprivate DefaultedList<ItemStack>itemsBeingCookedFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors Constructor Description CampfireBlockEntity(BlockPos blockPos, BlockState blockState) -
Method Summary
Modifier and Type Method Description booleanaddItem(ItemStack item, int integer)voidclear()static voidclientTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire)voidfromTag(CompoundTag tag)DefaultedList<ItemStack>getItemsBeingCooked()Optional<CampfireCookingRecipe>getRecipeFor(ItemStack item)static voidlitServerTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire)private CompoundTagsaveInitialChunkData(CompoundTag tag)voidspawnItemsBeingCooked()CompoundTagtoInitialChunkDataTag()CompoundTagtoTag(CompoundTag tag)BlockEntityUpdateS2CPackettoUpdatePacket()static voidunlitServerTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire)private voidupdateListeners()Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, setCachedState, setWorld
-
Field Details
-
itemsBeingCooked
-
cookingTimes
private final int[] cookingTimes -
cookingTotalTimes
private final int[] cookingTotalTimes
-
-
Constructor Details
-
CampfireBlockEntity
-
-
Method Details
-
litServerTick
public static void litServerTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire) -
unlitServerTick
public static void unlitServerTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire) -
clientTick
public static void clientTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire) -
getItemsBeingCooked
-
fromTag
- Overrides:
fromTagin classBlockEntity
-
toTag
- Overrides:
toTagin classBlockEntity
-
saveInitialChunkData
-
toUpdatePacket
- Overrides:
toUpdatePacketin classBlockEntity
-
toInitialChunkDataTag
- Overrides:
toInitialChunkDataTagin classBlockEntity
-
getRecipeFor
-
addItem
-
updateListeners
private void updateListeners() -
clear
public void clear() -
spawnItemsBeingCooked
public void spawnItemsBeingCooked()
-