Class TeslaSynthesizerBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
tech.anonymoushacker1279.immersiveweapons.blockentity.TeslaSynthesizerBlockEntity
All Implemented Interfaces:
Iterable<net.minecraft.world.item.ItemStack>, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.inventory.StackedContentsCompatible, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable, net.minecraft.world.WorldlyContainer, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension, net.neoforged.neoforge.common.extensions.IMenuProviderExtension

public class TeslaSynthesizerBlockEntity extends net.minecraft.world.level.block.entity.BaseContainerBlockEntity implements net.minecraft.world.WorldlyContainer, net.minecraft.world.inventory.StackedContentsCompatible
  • Nested Class Summary

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

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField

    Nested classes/interfaces inherited from interface net.minecraft.world.Container

    net.minecraft.world.Container.ContainerIterator
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final net.minecraft.world.inventory.ContainerData
     

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

    Modifier and Type
    Method
    Description
    boolean
    canPlaceItem(int slot, net.minecraft.world.item.ItemStack stack)
     
    boolean
    canPlaceItemThroughFace(int slot, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction direction)
     
    boolean
    canTakeItemThroughFace(int slot, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction direction)
     
    void
     
    protected net.minecraft.world.inventory.AbstractContainerMenu
    createMenu(int id, net.minecraft.world.entity.player.Inventory inventory)
     
    void
    fillStackedContents(net.minecraft.world.entity.player.StackedItemContents contents)
     
    int
     
    protected net.minecraft.network.chat.Component
     
    net.minecraft.world.item.ItemStack
    getItem(int slot)
     
    protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>
     
    int[]
    getSlotsForFace(net.minecraft.core.Direction side)
     
    net.minecraft.nbt.CompoundTag
    getUpdateTag(net.minecraft.core.HolderLookup.Provider registries)
     
    boolean
    Checks if fuel is currently burning
    boolean
     
    static boolean
    isFuel(net.minecraft.world.item.ItemStack stack)
    Checks if an item is valid fuel for the Tesla Synthesizer
    void
    loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
     
    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 provider)
     
    void
    setItem(int slot, net.minecraft.world.item.ItemStack stack)
     
    protected void
    setItems(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items)
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    void
    tick(net.minecraft.server.level.ServerLevel level)
    Processes recipes and manages fuel consumption each tick

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

    applyImplicitComponents, canOpen, canUnlock, collectImplicitComponents, createMenu, getCustomName, getDisplayName, getName, removeComponentsFromTag

    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, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, removeData, saveCustomAndMetadata, saveCustomOnly, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, 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

    canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, iterator, setChanged, startOpen, stopOpen

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

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

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

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

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

    shouldTriggerClientSideContainerClosingOnOpen, writeClientSideData

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface net.minecraft.world.Nameable

    hasCustomName
  • Field Details

    • containerData

      public final net.minecraft.world.inventory.ContainerData containerData
  • Constructor Details

    • TeslaSynthesizerBlockEntity

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

    • isFuel

      public static boolean isFuel(net.minecraft.world.item.ItemStack stack)
      Checks if an item is valid fuel for the Tesla Synthesizer
      Parameters:
      stack - The ItemStack to check
      Returns:
      true if the item is valid fuel
    • tick

      public void tick(net.minecraft.server.level.ServerLevel level)
      Processes recipes and manages fuel consumption each tick
    • isBurning

      public boolean isBurning()
      Checks if fuel is currently burning
      Returns:
      true if burning
    • 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 stack, @Nullable @Nullable 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 stack, 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
    • getDefaultName

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

      protected 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(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items)
      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
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface net.minecraft.world.Container
      Overrides:
      isEmpty in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • getItem

      public net.minecraft.world.item.ItemStack getItem(int slot)
      Specified by:
      getItem in interface net.minecraft.world.Container
      Overrides:
      getItem in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • removeItem

      public net.minecraft.world.item.ItemStack removeItem(int slot, int amount)
      Specified by:
      removeItem in interface net.minecraft.world.Container
      Overrides:
      removeItem in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • removeItemNoUpdate

      public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot)
      Specified by:
      removeItemNoUpdate in interface net.minecraft.world.Container
      Overrides:
      removeItemNoUpdate in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • setItem

      public void setItem(int slot, 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.BaseContainerBlockEntity
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in interface net.minecraft.world.Container
      Overrides:
      stillValid in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • clearContent

      public void clearContent()
      Specified by:
      clearContent in interface net.minecraft.world.Clearable
      Overrides:
      clearContent in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • loadAdditional

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

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

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

      public void fillStackedContents(net.minecraft.world.entity.player.StackedItemContents contents)
      Specified by:
      fillStackedContents in interface net.minecraft.world.inventory.StackedContentsCompatible
    • createMenu

      protected net.minecraft.world.inventory.AbstractContainerMenu createMenu(int id, net.minecraft.world.entity.player.Inventory inventory)
      Specified by:
      createMenu in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity