Class ScannerBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
me.alexdevs.classicPeripherals.peripherals.scanner.ScannerBlockEntity
All Implemented Interfaces:
net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.client.extensions.IMenuProviderExtension, net.neoforged.neoforge.common.extensions.IBlockEntityExtension

public class ScannerBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity implements net.minecraft.world.MenuProvider, net.minecraft.world.Container
  • 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
    protected final ScannerPeripheral
     

    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
    ScannerBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    @Nullable net.minecraft.world.inventory.AbstractContainerMenu
    createMenu(int i, @NonNull net.minecraft.world.entity.player.Inventory inventory, @NonNull net.minecraft.world.entity.player.Player player)
     
    void
     
    int
     
    net.minecraft.core.Direction
     
    @NonNull net.minecraft.network.chat.Component
     
    @NonNull net.minecraft.world.item.ItemStack
    getItem(int slot)
     
    net.minecraft.world.item.ItemStack
     
    boolean
     
    protected void
    loadAdditional(@NonNull net.minecraft.nbt.CompoundTag nbt, @NonNull net.minecraft.core.HolderLookup.Provider registries)
     
     
    @NonNull net.minecraft.world.item.ItemStack
    removeItem(int slot, int amount)
     
    @NonNull net.minecraft.world.item.ItemStack
     
    protected void
    saveAdditional(@NonNull net.minecraft.nbt.CompoundTag nbt, @NonNull net.minecraft.core.HolderLookup.Provider registries)
     
    void
     
    void
    setItem(int slot, @NonNull net.minecraft.world.item.ItemStack stack)
     
    void
    setPrintoutStack(net.minecraft.world.item.ItemStack stack)
     
    boolean
    stillValid(@NonNull net.minecraft.world.entity.player.Player player)
     
    static void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, ScannerBlockEntity scanner)
     

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

    addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, collectComponents, collectImplicitComponents, 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, setComponents, setData, setLevel, setRemoved, syncData, triggerEvent

    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

    canPlaceItem, canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen

    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

  • Constructor Details

    • ScannerBlockEntity

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

    • peripheral

      public ScannerPeripheral peripheral()
    • getPrintout

      public net.minecraft.world.item.ItemStack getPrintout()
    • eject

      public void eject()
    • setPrintoutStack

      public void setPrintoutStack(net.minecraft.world.item.ItemStack stack)
    • getDirection

      public net.minecraft.core.Direction getDirection()
    • tick

      public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, ScannerBlockEntity scanner)
    • setChanged

      public void setChanged()
      Specified by:
      setChanged in interface net.minecraft.world.Container
      Overrides:
      setChanged in class net.minecraft.world.level.block.entity.BlockEntity
    • getDisplayName

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

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

      protected void loadAdditional(@NonNull net.minecraft.nbt.CompoundTag nbt, @NonNull net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      loadAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • 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 @NonNull net.minecraft.world.item.ItemStack getItem(int slot)
      Specified by:
      getItem in interface net.minecraft.world.Container
    • removeItem

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

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

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

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

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

      public void clearRemoved()
      Overrides:
      clearRemoved in class net.minecraft.world.level.block.entity.BlockEntity
    • createMenu

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