Class PowerGeneratorBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
vazkii.botania.common.block.block_entity.BotaniaBlockEntity
vazkii.botania.common.block.block_entity.mana.PowerGeneratorBlockEntity
All Implemented Interfaces:
ManaReceiver

public class PowerGeneratorBlockEntity extends BotaniaBlockEntity implements ManaReceiver
  • 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
    static final 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
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
    Can this tile receive mana from bursts? Generally set to false for implementations of ManaCollector.
    int
    Gets the amount of mana currently in this block.
    int
     
    net.minecraft.world.level.Level
     
    net.minecraft.core.BlockPos
     
    boolean
    Is this Mana Receiver is full? Being full means no mana bursts will be sent.
    void
    readPacketNBT(net.minecraft.nbt.CompoundTag cmp, 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 pos, net.minecraft.world.level.block.state.BlockState state, PowerGeneratorBlockEntity self)
     
    void
    writePacketNBT(@NotNull net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
     

    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, triggerEvent

    Methods inherited from class java.lang.Object

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

    • MAX_ENERGY

      public static final int MAX_ENERGY
  • Constructor Details

    • PowerGeneratorBlockEntity

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

    • serverTick

      public static void serverTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, PowerGeneratorBlockEntity self)
    • 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
    • writePacketNBT

      public void writePacketNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      writePacketNBT in class BotaniaBlockEntity
    • readPacketNBT

      public void readPacketNBT(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      readPacketNBT in class BotaniaBlockEntity
    • getEnergy

      public int getEnergy()