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[]cookingTimesprivate int[]cookingTotalTimesprivate DefaultedList<ItemStack>itemsBeingCookedFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors Constructor Description CampfireBlockEntity() -
Method Summary
Modifier and Type Method Description booleanaddItem(ItemStack item, int integer)voidclear()voidfromTag(BlockState state, CompoundTag tag)DefaultedList<ItemStack>getItemsBeingCooked()Optional<CampfireCookingRecipe>getRecipeFor(ItemStack item)private CompoundTagsaveInitialChunkData(CompoundTag tag)voidspawnItemsBeingCooked()private voidspawnSmokeParticles()voidtick()CompoundTagtoInitialChunkDataTag()CompoundTagtoTag(CompoundTag tag)BlockEntityUpdateS2CPackettoUpdatePacket()private voidupdateItemsBeingCooked()private voidupdateListeners()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:
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()
-