Class AbstractBotanyPotBlockEntity

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
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
Direct Known Subclasses:
BotanyPotBlockEntity

public abstract class AbstractBotanyPotBlockEntity extends net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity implements net.minecraft.world.WorldlyContainer
  • 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
    protected net.darkhax.bookshelf.common.api.function.CachedSupplier<net.minecraft.core.BlockPos>
     
    static final net.minecraft.network.chat.Component
     
    static final int[]
     
    protected net.darkhax.bookshelf.common.api.function.CachedSupplier<PotType>
     
    static final int
     
    static final int
     
    static final int
     
    static final int[]
     
    static final int
     

    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
    Modifier
    Constructor
    Description
    protected
    AbstractBotanyPotBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canPlaceItemThroughFace(int slot, @NotNull net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction side)
     
    boolean
    canTakeItemThroughFace(int slot, @NotNull net.minecraft.world.item.ItemStack stack, @NotNull net.minecraft.core.Direction side)
     
    @Nullable net.minecraft.commands.CommandSourceStack
     
    int
     
    protected @NotNull net.minecraft.network.chat.Component
     
    net.minecraft.world.item.ItemStack
     
    protected @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>
     
     
    net.minecraft.world.item.ItemStack
     
    int @NotNull []
    getSlotsForFace(@NotNull net.minecraft.core.Direction side)
     
    net.minecraft.world.item.ItemStack
     
    boolean
     
    void
    loadAdditional(@NotNull net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    void
     
    abstract void
    onSeedChanged(net.minecraft.world.item.ItemStack newStack)
     
    abstract void
    onSoilChanged(net.minecraft.world.item.ItemStack newStack)
     
    abstract void
    onToolChanged(net.minecraft.world.item.ItemStack newStack)
     
    void
    runFunction(net.minecraft.resources.ResourceLocation functionId)
     
    void
    saveAdditional(@NotNull net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    setHoe(net.minecraft.world.item.ItemStack hoeStack)
     
    void
    setItem(int slotId, @NotNull net.minecraft.world.item.ItemStack stack)
     
    protected void
    setItems(@NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> newItems)
     
    void
    setSeed(net.minecraft.world.item.ItemStack newSeed)
     
    void
    setSoilItem(net.minecraft.world.item.ItemStack newSoil)
     

    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, createMenu, 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, getUpdatePacket, getUpdateTag, 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

    • SOIL_SLOT

      public static final int SOIL_SLOT
      See Also:
    • SEED_SLOT

      public static final int SEED_SLOT
      See Also:
    • TOOL_SLOT

      public static final int TOOL_SLOT
      See Also:
    • SLOT_COUNT

      public static final int SLOT_COUNT
      See Also:
    • STORAGE_SLOTS

      public static final int[] STORAGE_SLOTS
    • EMPTY_SLOTS

      public static final int[] EMPTY_SLOTS
    • DEFAULT_NAME

      public static final net.minecraft.network.chat.Component DEFAULT_NAME
    • below

      protected net.darkhax.bookshelf.common.api.function.CachedSupplier<net.minecraft.core.BlockPos> below
    • potType

      protected net.darkhax.bookshelf.common.api.function.CachedSupplier<PotType> potType
  • Constructor Details

    • AbstractBotanyPotBlockEntity

      protected AbstractBotanyPotBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • onSoilChanged

      public abstract void onSoilChanged(net.minecraft.world.item.ItemStack newStack)
    • onSeedChanged

      public abstract void onSeedChanged(net.minecraft.world.item.ItemStack newStack)
    • onToolChanged

      public abstract void onToolChanged(net.minecraft.world.item.ItemStack newStack)
    • getPotType

      public PotType getPotType()
    • isHopper

      public boolean isHopper()
    • getSoilItem

      public net.minecraft.world.item.ItemStack getSoilItem()
    • setSoilItem

      public void setSoilItem(net.minecraft.world.item.ItemStack newSoil)
    • getSeedItem

      public net.minecraft.world.item.ItemStack getSeedItem()
    • setSeed

      public void setSeed(net.minecraft.world.item.ItemStack newSeed)
    • getHarvestItem

      public net.minecraft.world.item.ItemStack getHarvestItem()
    • setHoe

      public void setHoe(net.minecraft.world.item.ItemStack hoeStack)
    • runFunction

      public void runFunction(net.minecraft.resources.ResourceLocation functionId)
    • createCommandSourceStack

      @Nullable public @Nullable net.minecraft.commands.CommandSourceStack createCommandSourceStack()
    • loadAdditional

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

      public void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag, @NotNull net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • markUpdated

      public void markUpdated()
    • setItem

      public void setItem(int slotId, @NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      Specified by:
      setItem in interface net.minecraft.world.Container
      Overrides:
      setItem in class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
    • getSlotsForFace

      public int @NotNull [] getSlotsForFace(@NotNull @NotNull net.minecraft.core.Direction side)
      Specified by:
      getSlotsForFace in interface net.minecraft.world.WorldlyContainer
    • canPlaceItemThroughFace

      public boolean canPlaceItemThroughFace(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.core.Direction side)
      Specified by:
      canPlaceItemThroughFace in interface net.minecraft.world.WorldlyContainer
    • canTakeItemThroughFace

      public boolean canTakeItemThroughFace(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, @NotNull @NotNull net.minecraft.core.Direction side)
      Specified by:
      canTakeItemThroughFace in interface net.minecraft.world.WorldlyContainer
    • getDefaultName

      @NotNull protected @NotNull net.minecraft.network.chat.Component getDefaultName()
      Specified by:
      getDefaultName in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • getItems

      @NotNull protected @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()
      Specified by:
      getItems in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • setItems

      protected void setItems(@NotNull @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> newItems)
      Specified by:
      setItems in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • getContainerSize

      public int getContainerSize()
      Specified by:
      getContainerSize in interface net.minecraft.world.Container