Package net.minecraft.block.entity
Class CampfireBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.CampfireBlockEntity
public class CampfireBlockEntity extends BlockEntity implements Clearable, Tickable
-
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()
-
Method Summary
Modifier and Type Method Description boolean
addItem(ItemStack item, int integer)
void
clear()
void
fromTag(BlockState state, CompoundTag tag)
DefaultedList<ItemStack>
getItemsBeingCooked()
Optional<CampfireCookingRecipe>
getRecipeFor(ItemStack item)
private CompoundTag
saveInitialChunkData(CompoundTag tag)
void
spawnItemsBeingCooked()
private void
spawnSmokeParticles()
void
tick()
CompoundTag
toInitialChunkDataTag()
CompoundTag
toTag(CompoundTag tag)
BlockEntityUpdateS2CPacket
toUpdatePacket()
private void
updateItemsBeingCooked()
private void
updateListeners()
Methods inherited from class net.minecraft.block.entity.BlockEntity
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos
-
Field Details
-
itemsBeingCooked
-
cookingTimes
private final int[] cookingTimes -
cookingTotalTimes
private final int[] cookingTotalTimes
-
-
Constructor Details
-
CampfireBlockEntity
public CampfireBlockEntity()
-
-
Method Details
-
tick
public void tick() -
updateItemsBeingCooked
private void updateItemsBeingCooked() -
spawnSmokeParticles
private void spawnSmokeParticles() -
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()
-