Class BotanyPotBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
net.darkhax.botanypots.common.impl.block.entity.AbstractBotanyPotBlockEntity
net.darkhax.botanypots.common.impl.block.entity.BotanyPotBlockEntity
All Implemented Interfaces:
net.fabricmc.fabric.api.attachment.v1.AttachmentTarget, net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity, net.fabricmc.fabric.api.screenhandler.v1.FabricScreenHandlerFactory, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable, net.minecraft.world.RandomizableContainer, net.minecraft.world.WorldlyContainer

public class BotanyPotBlockEntity extends AbstractBotanyPotBlockEntity
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity

    net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
    protected net.darkhax.bookshelf.common.api.util.TickAccumulator
     
    protected net.darkhax.bookshelf.common.api.util.TickAccumulator
     
    net.darkhax.bookshelf.common.api.util.TickAccumulator
     
    static final net.darkhax.bookshelf.common.api.function.CachedSupplier<net.minecraft.world.level.block.entity.BlockEntityType<BotanyPotBlockEntity>>
     

    Fields inherited from class net.darkhax.botanypots.common.impl.block.entity.AbstractBotanyPotBlockEntity

    below, DEFAULT_NAME, EMPTY_SLOTS, potType, SEED_SLOT, SLOT_COUNT, SOIL_SLOT, STORAGE_SLOTS, TOOL_SLOT

    Fields inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity

    lootTable, lootTableSeed

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    NBT_ATTACHMENT_KEY

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_BUFFER

    Fields inherited from interface net.minecraft.world.RandomizableContainer

    LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG
  • Constructor Summary

    Constructors
    Constructor
    Description
    BotanyPotBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    protected @NotNull net.minecraft.world.inventory.AbstractContainerMenu
    createMenu(int containerId, @NotNull net.minecraft.world.entity.player.Inventory playerInv)
     
    <T extends BotanyPotRecipe>
    T
    getOrInvalidate(net.minecraft.world.item.ItemStack stack, net.darkhax.bookshelf.common.api.function.ReloadableCache<net.minecraft.world.item.crafting.RecipeHolder<T>> cache)
     
     
     
     
    int
     
    net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket
     
    @NotNull net.minecraft.nbt.CompoundTag
    getUpdateTag(net.minecraft.core.HolderLookup.Provider registries)
     
    float
     
    void
    loadAdditional(@NotNull net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    onSeedChanged(net.minecraft.world.item.ItemStack newStack)
     
    void
    onSoilChanged(net.minecraft.world.item.ItemStack newStack)
     
    void
    onToolChanged(net.minecraft.world.item.ItemStack newStack)
     
    void
     
    void
    saveAdditional(@NotNull net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    setBonemealCooldown(int cooldown)
     
    static void
    tickPot(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BotanyPotBlockEntity pot)
     
    void
    updateComparatorLevel(int newLevel)
     
    void
    updateGrowthTime(float newTime)
     

    Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity

    applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, isEmpty, removeComponentsFromTag, removeItem, removeItemNoUpdate, setLootTable, setLootTableSeed

    Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity

    canUnlock, clearContent, getCustomName, getDisplayName, getName, stillValid

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, removeAttached, setAttached

    Methods inherited from interface net.minecraft.world.Clearable

    clearContent

    Methods inherited from interface net.minecraft.world.Container

    canPlaceItem, canTakeItem, countItem, getItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, startOpen, stillValid, stopOpen

    Methods inherited from interface net.fabricmc.fabric.api.screenhandler.v1.FabricScreenHandlerFactory

    shouldCloseCurrentScreen

    Methods inherited from interface net.minecraft.world.Nameable

    hasCustomName

    Methods inherited from interface net.minecraft.world.RandomizableContainer

    getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTable

    Methods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity

    getRenderData
  • Field Details

    • TYPE

      public static final net.darkhax.bookshelf.common.api.function.CachedSupplier<net.minecraft.world.level.block.entity.BlockEntityType<BotanyPotBlockEntity>> TYPE
    • growthTime

      public net.darkhax.bookshelf.common.api.util.TickAccumulator growthTime
    • comparatorLevel

      public int comparatorLevel
    • exportCooldown

      protected net.darkhax.bookshelf.common.api.util.TickAccumulator exportCooldown
    • growCooldown

      protected net.darkhax.bookshelf.common.api.util.TickAccumulator growCooldown
  • Constructor Details

    • BotanyPotBlockEntity

      public BotanyPotBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • tickPot

      public static void tickPot(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BotanyPotBlockEntity pot)
    • canHarvest

      public boolean canHarvest()
    • reset

      public void reset()
    • updateGrowthTime

      public void updateGrowthTime(float newTime)
    • updateComparatorLevel

      public void updateComparatorLevel(int newLevel)
    • growthTime

      public float growthTime()
    • getRecipeContext

      public BlockEntityContext getRecipeContext()
    • canBonemeal

      public boolean canBonemeal()
    • setBonemealCooldown

      public void setBonemealCooldown(int cooldown)
    • onSoilChanged

      public void onSoilChanged(net.minecraft.world.item.ItemStack newStack)
      Specified by:
      onSoilChanged in class AbstractBotanyPotBlockEntity
    • onSeedChanged

      public void onSeedChanged(net.minecraft.world.item.ItemStack newStack)
      Specified by:
      onSeedChanged in class AbstractBotanyPotBlockEntity
    • onToolChanged

      public void onToolChanged(net.minecraft.world.item.ItemStack newStack)
      Specified by:
      onToolChanged in class AbstractBotanyPotBlockEntity
    • getOrInvalidateSoil

      public Soil getOrInvalidateSoil()
    • getOrInvalidateCrop

      public Crop getOrInvalidateCrop()
    • getOrInvalidate

      @Nullable public <T extends BotanyPotRecipe> T getOrInvalidate(net.minecraft.world.item.ItemStack stack, net.darkhax.bookshelf.common.api.function.ReloadableCache<net.minecraft.world.item.crafting.RecipeHolder<T>> cache)
    • loadAdditional

      public void loadAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag, @NotNull net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      loadAdditional in class AbstractBotanyPotBlockEntity
    • saveAdditional

      public void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag, @NotNull net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      saveAdditional in class AbstractBotanyPotBlockEntity
    • getUpdateTag

      @NotNull public @NotNull net.minecraft.nbt.CompoundTag getUpdateTag(@NotNull net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      getUpdateTag in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdatePacket

      public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()
      Overrides:
      getUpdatePacket in class net.minecraft.world.level.block.entity.BlockEntity
    • createMenu

      @NotNull protected @NotNull net.minecraft.world.inventory.AbstractContainerMenu createMenu(int containerId, @NotNull @NotNull net.minecraft.world.entity.player.Inventory playerInv)
      Specified by:
      createMenu in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • getRequiredGrowthTicks

      public int getRequiredGrowthTicks()