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[]
cookingTimes
private int[]
cookingTotalTimes
private DefaultedList<ItemStack>
itemsBeingCooked
Fields 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 boolean
addItem(ItemStack item, int integer)
void
clear()
static void
clientTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire)
void
fromTag(CompoundTag tag)
DefaultedList<ItemStack>
getItemsBeingCooked()
Optional<CampfireCookingRecipe>
getRecipeFor(ItemStack item)
static void
litServerTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire)
private CompoundTag
saveInitialChunkData(CompoundTag tag)
void
spawnItemsBeingCooked()
CompoundTag
toInitialChunkDataTag()
CompoundTag
toTag(CompoundTag tag)
BlockEntityUpdateS2CPacket
toUpdatePacket()
static void
unlitServerTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire)
private void
updateListeners()
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:
fromTag
in classBlockEntity
-
toTag
- Overrides:
toTag
in classBlockEntity
-
saveInitialChunkData
-
toUpdatePacket
- Overrides:
toUpdatePacket
in classBlockEntity
-
toInitialChunkDataTag
- Overrides:
toInitialChunkDataTag
in classBlockEntity
-
getRecipeFor
-
addItem
-
updateListeners
private void updateListeners() -
clear
public void clear() -
spawnItemsBeingCooked
public void spawnItemsBeingCooked()
-