public class CampfireBlockEntity extends BlockEntity implements Clearable, Tickable
| Modifier and Type | Field and Description |
|---|---|
private int[] |
cookingTimes |
private int[] |
cookingTotalTimes |
private DefaultedList<ItemStack> |
itemsBeingCooked |
pos, removed, world| Constructor and Description |
|---|
CampfireBlockEntity() |
| Modifier and Type | Method and 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() |
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPosprivate final DefaultedList<ItemStack> itemsBeingCooked
private final int[] cookingTimes
private final int[] cookingTotalTimes
private void updateItemsBeingCooked()
private void spawnSmokeParticles()
public DefaultedList<ItemStack> getItemsBeingCooked()
public void fromTag(BlockState state, CompoundTag tag)
fromTag in class BlockEntitypublic CompoundTag toTag(CompoundTag tag)
toTag in class BlockEntityprivate CompoundTag saveInitialChunkData(CompoundTag tag)
@Nullable public BlockEntityUpdateS2CPacket toUpdatePacket()
toUpdatePacket in class BlockEntitypublic CompoundTag toInitialChunkDataTag()
toInitialChunkDataTag in class BlockEntitypublic Optional<CampfireCookingRecipe> getRecipeFor(ItemStack item)
public boolean addItem(ItemStack item, int integer)
private void updateListeners()
public void spawnItemsBeingCooked()