Class RunicAltarBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
All Implemented Interfaces:
net.minecraft.world.Clearable, Wandable, ManaReceiver

public class RunicAltarBlockEntity extends SimpleInventoryBlockEntity implements ManaReceiver, Wandable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    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
     
    int
     

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

    level, remove, worldPosition

    Fields inherited from interface vazkii.botania.api.mana.ManaReceiver

    ID

    Fields inherited from interface vazkii.botania.api.block.Wandable

    ID
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
    addItem(@Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.world.InteractionHand hand)
     
    boolean
     
    boolean
    Can this tile receive mana from bursts? Generally set to false for implementations of ManaCollector.
    static void
    clientTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos worldPosition, net.minecraft.world.level.block.state.BlockState state, RunicAltarBlockEntity self)
     
    protected net.minecraft.world.SimpleContainer
     
    int
    Gets the amount of mana currently in this block.
    net.minecraft.world.level.Level
     
    net.minecraft.core.BlockPos
     
    int
     
    boolean
     
    boolean
    Is this Mana Receiver is full? Being full means no mana bursts will be sent.
    boolean
    onUsedByWand(@Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack wand, net.minecraft.core.Direction side)
    Called when the block is used by a wand.
    void
    readPacketNBT(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    receiveMana(int mana)
    Called when this receiver receives mana.
    static void
    serverTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos worldPosition, net.minecraft.world.level.block.state.BlockState state, RunicAltarBlockEntity self)
     
    boolean
    triggerEvent(int id, int param)
     
    net.minecraft.world.ItemInteractionResult
    trySetLastRecipe(net.minecraft.world.entity.player.Player player)
     
    void
    writePacketNBT(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     

    Methods inherited from class vazkii.botania.common.block.block_entity.SimpleInventoryBlockEntity

    clearContent, getItemHandler, inventorySize

    Methods inherited from class vazkii.botania.common.block.block_entity.BotaniaBlockEntity

    getUpdatePacket, getUpdateTag, loadAdditional, saveAdditional

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

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • manaToGet

      public int manaToGet
    • signal

      public int signal
  • Constructor Details

    • RunicAltarBlockEntity

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

    • addItem

      public boolean addItem(@Nullable @Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.world.InteractionHand hand)
    • triggerEvent

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

      public static void serverTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos worldPosition, net.minecraft.world.level.block.state.BlockState state, RunicAltarBlockEntity self)
    • clientTick

      public static void clientTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos worldPosition, net.minecraft.world.level.block.state.BlockState state, RunicAltarBlockEntity self)
    • trySetLastRecipe

      public net.minecraft.world.ItemInteractionResult trySetLastRecipe(net.minecraft.world.entity.player.Player player)
    • onUsedByWand

      public boolean onUsedByWand(@Nullable @Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack wand, net.minecraft.core.Direction side)
      Description copied from interface: Wandable
      Called when the block is used by a wand.
      Specified by:
      onUsedByWand in interface Wandable
      Parameters:
      player - Null if the block is being wanded by a dispenser
    • isEmpty

      public boolean isEmpty()
    • writePacketNBT

      public void writePacketNBT(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      writePacketNBT in class SimpleInventoryBlockEntity
    • readPacketNBT

      public void readPacketNBT(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      readPacketNBT in class SimpleInventoryBlockEntity
    • createItemHandler

      protected net.minecraft.world.SimpleContainer createItemHandler()
      Specified by:
      createItemHandler in class SimpleInventoryBlockEntity
    • getManaReceiverLevel

      public net.minecraft.world.level.Level getManaReceiverLevel()
      Specified by:
      getManaReceiverLevel in interface ManaReceiver
    • getManaReceiverPos

      public net.minecraft.core.BlockPos getManaReceiverPos()
      Specified by:
      getManaReceiverPos in interface ManaReceiver
    • getCurrentMana

      public int getCurrentMana()
      Description copied from interface: ManaReceiver
      Gets the amount of mana currently in this block.
      Specified by:
      getCurrentMana in interface ManaReceiver
    • isFull

      public boolean isFull()
      Description copied from interface: ManaReceiver
      Is this Mana Receiver is full? Being full means no mana bursts will be sent.
      Specified by:
      isFull in interface ManaReceiver
    • receiveMana

      public void receiveMana(int mana)
      Description copied from interface: ManaReceiver
      Called when this receiver receives mana.
      Specified by:
      receiveMana in interface ManaReceiver
    • canReceiveManaFromBursts

      public boolean canReceiveManaFromBursts()
      Description copied from interface: ManaReceiver
      Can this tile receive mana from bursts? Generally set to false for implementations of ManaCollector.
      Specified by:
      canReceiveManaFromBursts in interface ManaReceiver
    • canAddLastRecipe

      public boolean canAddLastRecipe()
    • getTargetMana

      public int getTargetMana()