Class AvatarBlockEntity
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
vazkii.botania.common.block.block_entity.BotaniaBlockEntity
vazkii.botania.common.block.block_entity.SimpleInventoryBlockEntity
vazkii.botania.common.block.block_entity.AvatarBlockEntity
- All Implemented Interfaces:
net.minecraft.world.Clearable,Avatar,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 inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface vazkii.botania.api.mana.ManaReceiver
ID -
Constructor Summary
ConstructorsConstructorDescriptionAvatarBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCan this tile receive mana from bursts? Generally set to false for implementations of ManaCollector.static voidcommonTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos worldPosition, net.minecraft.world.level.block.state.BlockState state, AvatarBlockEntity self) protected net.minecraft.world.SimpleContainernet.minecraft.core.DirectionGets the avatar's facing.intGets the amount of mana currently in this block.intGets the amount of ticks that have elapsed on this avatar while it's functional (has redstone signal).net.minecraft.world.ContainerGets the avatar's inventorynet.minecraft.world.level.Levelnet.minecraft.core.BlockPosbooleanGets if this avatar is enabled (is powered by a redstone signal).booleanisFull()Is this Mana Receiver is full? Being full means no mana bursts will be sent.voidreadPacketNBT(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) voidreceiveMana(int mana) Called when this receiver receives mana.voidvoidwritePacketNBT(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) Methods inherited from class vazkii.botania.common.block.block_entity.SimpleInventoryBlockEntity
clearContent, getItemHandler, inventorySizeMethods inherited from class vazkii.botania.common.block.block_entity.BotaniaBlockEntity
getUpdatePacket, getUpdateTag, loadAdditional, saveAdditionalMethods 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, setComponents, setLevel, setRemoved, triggerEvent
-
Constructor Details
-
AvatarBlockEntity
public AvatarBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
commonTick
public static void commonTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos worldPosition, net.minecraft.world.level.block.state.BlockState state, AvatarBlockEntity self) -
writePacketNBT
public void writePacketNBT(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) - Overrides:
writePacketNBTin classSimpleInventoryBlockEntity
-
readPacketNBT
public void readPacketNBT(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) - Overrides:
readPacketNBTin classSimpleInventoryBlockEntity
-
createItemHandler
protected net.minecraft.world.SimpleContainer createItemHandler()- Specified by:
createItemHandlerin classSimpleInventoryBlockEntity
-
setChanged
public void setChanged()- Overrides:
setChangedin classnet.minecraft.world.level.block.entity.BlockEntity
-
isFull
public boolean isFull()Description copied from interface:ManaReceiverIs this Mana Receiver is full? Being full means no mana bursts will be sent.- Specified by:
isFullin interfaceManaReceiver
-
receiveMana
public void receiveMana(int mana) Description copied from interface:ManaReceiverCalled when this receiver receives mana.- Specified by:
receiveManain interfaceManaReceiver
-
canReceiveManaFromBursts
public boolean canReceiveManaFromBursts()Description copied from interface:ManaReceiverCan this tile receive mana from bursts? Generally set to false for implementations of ManaCollector.- Specified by:
canReceiveManaFromBurstsin interfaceManaReceiver
-
getManaReceiverLevel
public net.minecraft.world.level.Level getManaReceiverLevel()- Specified by:
getManaReceiverLevelin interfaceManaReceiver
-
getManaReceiverPos
public net.minecraft.core.BlockPos getManaReceiverPos()- Specified by:
getManaReceiverPosin interfaceManaReceiver
-
getCurrentMana
public int getCurrentMana()Description copied from interface:ManaReceiverGets the amount of mana currently in this block.- Specified by:
getCurrentManain interfaceManaReceiver
-
getInventory
public net.minecraft.world.Container getInventory()Description copied from interface:AvatarGets the avatar's inventory- Specified by:
getInventoryin interfaceAvatar
-
getAvatarFacing
public net.minecraft.core.Direction getAvatarFacing()Description copied from interface:AvatarGets the avatar's facing.- Specified by:
getAvatarFacingin interfaceAvatar
-
getElapsedFunctionalTicks
public int getElapsedFunctionalTicks()Description copied from interface:AvatarGets the amount of ticks that have elapsed on this avatar while it's functional (has redstone signal).- Specified by:
getElapsedFunctionalTicksin interfaceAvatar
-
isEnabled
public boolean isEnabled()Description copied from interface:AvatarGets if this avatar is enabled (is powered by a redstone signal). -
getBoostCooldowns
- Specified by:
getBoostCooldownsin interfaceAvatar- Returns:
- Tag of UUID -> cooldown for Rod of the Skies boosting
-