Class TackleBoxBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.wdiscute.starcatcher.blocks.tacklebox.TackleBoxBlockEntity
All Implemented Interfaces:
TickableBlockEntity, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.WorldlyContainer, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.client.extensions.IMenuProviderExtension, net.neoforged.neoforge.common.extensions.IBlockEntityExtension

public class TackleBoxBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity implements net.minecraft.world.WorldlyContainer, TickableBlockEntity, net.minecraft.world.MenuProvider
  • Nested Class Summary

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

    net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     

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

    level, remove, worldPosition

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_BUFFER
  • Constructor Summary

    Constructors
    Constructor
    Description
    TackleBoxBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState)
     
    TackleBoxBlockEntity(net.minecraft.world.item.DyeColor color, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    applyImplicitComponents(net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput componentInput)
     
    boolean
    canPlaceItem(int slot, net.minecraft.world.item.ItemStack stack)
     
    boolean
    canPlaceItemThroughFace(int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction)
     
    boolean
    canTakeItemThroughFace(int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction)
     
    void
     
    protected void
    collectImplicitComponents(net.minecraft.core.component.DataComponentMap.Builder components)
     
    @Nullable net.minecraft.world.inventory.AbstractContainerMenu
    createMenu(int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player player)
     
    net.minecraft.world.item.DyeColor
     
    int
     
    net.minecraft.network.chat.Component
     
    net.minecraft.world.item.ItemStack
    getItem(int i)
     
    protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>
     
    int[]
    getSlotsForFace(net.minecraft.core.Direction side)
     
    boolean
     
    protected void
    loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    static void
    loadAllFishes(net.minecraft.nbt.CompoundTag tag, List<net.minecraft.world.item.ItemStack> items, net.minecraft.core.HolderLookup.Provider levelRegistry)
     
    void
    loadFromTag(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider levelRegistry)
     
    net.minecraft.world.item.ItemStack
    removeItem(int slot, int amount)
     
    net.minecraft.world.item.ItemStack
     
    protected void
    saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    static void
    saveAllFishes(net.minecraft.nbt.CompoundTag tag, List<net.minecraft.world.item.ItemStack> items, boolean alwaysPutTag, net.minecraft.core.HolderLookup.Provider levelRegistry)
     
    void
    setItem(int slot, net.minecraft.world.item.ItemStack stack)
     
    void
    startOpen(net.minecraft.world.entity.player.Player player)
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    void
    stopOpen(net.minecraft.world.entity.player.Player player)
     
    void
     
    boolean
    triggerEvent(int id, int type)
     
    void
     

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

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

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachments

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.world.Container

    canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension

    getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate

    Methods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension

    shouldTriggerClientSideContainerClosingOnOpen, writeClientSideData
  • Field Details

    • openCount

      public int openCount
  • Constructor Details

    • TackleBoxBlockEntity

      public TackleBoxBlockEntity(@Nullable net.minecraft.world.item.DyeColor color, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState)
    • TackleBoxBlockEntity

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

    • tick

      public void tick()
      Specified by:
      tick in interface TickableBlockEntity
    • updateFishSlot

      public void updateFishSlot()
    • getContainerSize

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

      public boolean isEmpty()
      Specified by:
      isEmpty in interface net.minecraft.world.Container
    • getItem

      public net.minecraft.world.item.ItemStack getItem(int i)
      Specified by:
      getItem in interface net.minecraft.world.Container
    • removeItem

      public net.minecraft.world.item.ItemStack removeItem(int slot, int amount)
      Specified by:
      removeItem in interface net.minecraft.world.Container
    • removeItemNoUpdate

      public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot)
      Specified by:
      removeItemNoUpdate in interface net.minecraft.world.Container
    • setItem

      public void setItem(int slot, net.minecraft.world.item.ItemStack stack)
      Specified by:
      setItem in interface net.minecraft.world.Container
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in interface net.minecraft.world.Container
    • getSlotsForFace

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

      public boolean canPlaceItemThroughFace(int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction)
      Specified by:
      canPlaceItemThroughFace in interface net.minecraft.world.WorldlyContainer
    • canTakeItemThroughFace

      public boolean canTakeItemThroughFace(int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction)
      Specified by:
      canTakeItemThroughFace in interface net.minecraft.world.WorldlyContainer
    • canPlaceItem

      public boolean canPlaceItem(int slot, net.minecraft.world.item.ItemStack stack)
      Specified by:
      canPlaceItem in interface net.minecraft.world.Container
    • triggerEvent

      public boolean triggerEvent(int id, int type)
      Overrides:
      triggerEvent in class net.minecraft.world.level.block.entity.BlockEntity
    • startOpen

      public void startOpen(net.minecraft.world.entity.player.Player player)
      Specified by:
      startOpen in interface net.minecraft.world.Container
    • stopOpen

      public void stopOpen(net.minecraft.world.entity.player.Player player)
      Specified by:
      stopOpen in interface net.minecraft.world.Container
    • applyImplicitComponents

      protected void applyImplicitComponents(net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput componentInput)
      Overrides:
      applyImplicitComponents in class net.minecraft.world.level.block.entity.BlockEntity
    • collectImplicitComponents

      protected void collectImplicitComponents(net.minecraft.core.component.DataComponentMap.Builder components)
      Overrides:
      collectImplicitComponents in class net.minecraft.world.level.block.entity.BlockEntity
    • loadAdditional

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

      protected void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • saveAllFishes

      public static void saveAllFishes(net.minecraft.nbt.CompoundTag tag, List<net.minecraft.world.item.ItemStack> items, boolean alwaysPutTag, net.minecraft.core.HolderLookup.Provider levelRegistry)
    • loadFromTag

      public void loadFromTag(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider levelRegistry)
    • loadAllFishes

      public static void loadAllFishes(net.minecraft.nbt.CompoundTag tag, List<net.minecraft.world.item.ItemStack> items, net.minecraft.core.HolderLookup.Provider levelRegistry)
    • getItems

      protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()
    • getColor

      @Nullable public net.minecraft.world.item.DyeColor getColor()
    • clearContent

      public void clearContent()
      Specified by:
      clearContent in interface net.minecraft.world.Clearable
    • getDisplayName

      public net.minecraft.network.chat.Component getDisplayName()
      Specified by:
      getDisplayName in interface net.minecraft.world.MenuProvider
    • createMenu

      @Nullable public @Nullable net.minecraft.world.inventory.AbstractContainerMenu createMenu(int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player player)
      Specified by:
      createMenu in interface net.minecraft.world.inventory.MenuConstructor