Package vazkii.botania.api.block_entity
Class GeneratingFlowerBlockEntity
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
vazkii.botania.api.block_entity.SpecialFlowerBlockEntity
vazkii.botania.api.block_entity.BindableSpecialFlowerBlockEntity<ManaCollector>
vazkii.botania.api.block_entity.GeneratingFlowerBlockEntity
- All Implemented Interfaces:
Bound,FloatingFlowerProvider,WandBindable
- Direct Known Subclasses:
DandelifeonBlockEntity,EndoflameBlockEntity,EntropinnyumBlockEntity,FluidGeneratorBlockEntity,GourmaryllisBlockEntity,KekimurusBlockEntity,MunchdewBlockEntity,NarslimmusBlockEntity,RafflowsiaBlockEntity,RosaArcanaBlockEntity,ShulkMeNotBlockEntity,SpectrolusBlockEntity
public abstract class GeneratingFlowerBlockEntity
extends BindableSpecialFlowerBlockEntity<ManaCollector>
The basic class for a Generating Flower.
-
Nested Class Summary
Nested classes/interfaces inherited from class vazkii.botania.api.block_entity.BindableSpecialFlowerBlockEntity
BindableSpecialFlowerBlockEntity.BindableFlowerWandHud<F extends BindableSpecialFlowerBlockEntity<?>>Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput -
Field Summary
FieldsFields inherited from class vazkii.botania.api.block_entity.BindableSpecialFlowerBlockEntity
bindingPosFields inherited from class vazkii.botania.api.block_entity.SpecialFlowerBlockEntity
MYCELIUM_DELAY, overgrowth, overgrowthBoost, PODZOL_DELAY, TAG_TICKS_EXISTED, ticksExistedFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface vazkii.botania.api.block.Bound
UNBOUND_POS -
Constructor Summary
ConstructorsConstructorDescriptionGeneratingFlowerBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMana(int mana) void@Nullable net.minecraft.core.BlockPosReturns the BlockPos of the nearest target within the binding radius, or `null` if there aren't any.intnet.minecraft.world.item.ItemStackintgetMana()voidreadFromPacketNBT(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries) Reads data from a network packet.voidvoidwriteToPacketNBT(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries) Writes some extra data to a network packet.Methods inherited from class vazkii.botania.api.block_entity.BindableSpecialFlowerBlockEntity
bindTo, canSelect, findBindCandidateAt, findBoundTile, getBinding, getBindingPos, getColor, getHudIcon, getMaxMana, isValidBinding, setBindingPos, setPlacedBy, wouldBeValidBindingMethods inherited from class vazkii.botania.api.block_entity.SpecialFlowerBlockEntity
commonTick, emitParticle, getComparatorSignal, getEffectivePos, getFloatingData, getModulatedDelay, getRadius, getRenderData, getSecondaryRadius, getUpdatePacket, getUpdateTag, isFloating, isOnSpecialSoil, isOvergrowthAffected, loadAdditional, saveAdditional, setFloating, syncMethods 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
-
Field Details
-
LINK_RANGE
public static final int LINK_RANGE- See Also:
-
-
Constructor Details
-
GeneratingFlowerBlockEntity
public GeneratingFlowerBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
tickFlower
public void tickFlower()- Overrides:
tickFlowerin classBindableSpecialFlowerBlockEntity<ManaCollector>
-
getBindingRadius
public int getBindingRadius()- Specified by:
getBindingRadiusin classBindableSpecialFlowerBlockEntity<ManaCollector>
-
findClosestTarget
@Nullable public @Nullable net.minecraft.core.BlockPos findClosestTarget()Description copied from class:BindableSpecialFlowerBlockEntityReturns the BlockPos of the nearest target within the binding radius, or `null` if there aren't any.- Specified by:
findClosestTargetin classBindableSpecialFlowerBlockEntity<ManaCollector>
-
emptyManaIntoCollector
public void emptyManaIntoCollector() -
getMana
public int getMana()- Specified by:
getManain classBindableSpecialFlowerBlockEntity<ManaCollector>
-
addMana
public void addMana(int mana) - Specified by:
addManain classBindableSpecialFlowerBlockEntity<ManaCollector>
-
getDefaultHudIcon
public net.minecraft.world.item.ItemStack getDefaultHudIcon()- Specified by:
getDefaultHudIconin classBindableSpecialFlowerBlockEntity<ManaCollector>
-
readFromPacketNBT
public void readFromPacketNBT(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries) Description copied from class:SpecialFlowerBlockEntityReads data from a network packet. This data is written by writeToPacketNBT in the server. Note: This method is also used to read from the world NBT.- Overrides:
readFromPacketNBTin classBindableSpecialFlowerBlockEntity<ManaCollector>
-
writeToPacketNBT
public void writeToPacketNBT(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries) Description copied from class:SpecialFlowerBlockEntityWrites some extra data to a network packet. This data is read by readFromPacketNBT on the client that receives the packet. Note: This method is also used to write to the world NBT.- Overrides:
writeToPacketNBTin classBindableSpecialFlowerBlockEntity<ManaCollector>
-