Class SpecialFlowerBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
vazkii.botania.api.block_entity.SpecialFlowerBlockEntity
All Implemented Interfaces:
FloatingFlowerProvider
Direct Known Subclasses:
BergamuteBlockEntity, BindableSpecialFlowerBlockEntity, ManastarBlockEntity, PureDaisyBlockEntity

public abstract class SpecialFlowerBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity implements FloatingFlowerProvider
Common superclass of all magical flower block entities
  • 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
     
    boolean
    true if this flower is working on Enchanted Soil
    boolean
    true if this flower is working on Enchanted Soil and this is the second tick
    static final int
     
    static final String
     
    int
     

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

    level, remove, worldPosition
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpecialFlowerBlockEntity(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 Type
    Method
    Description
    static void
    commonTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos worldPosition, net.minecraft.world.level.block.state.BlockState state, SpecialFlowerBlockEntity self)
     
    void
    emitParticle(net.minecraft.core.particles.ParticleOptions options, double xOffset, double yOffset, double zOffset, double xSpeed, double ySpeed, double zSpeed)
     
    int
     
    final net.minecraft.core.BlockPos
     
    @Nullable FloatingFlower
     
    int
    Returns the additional delay in ticks that an item must be on the ground before this flower will act on it.
    abstract @Nullable RadiusDescriptor
    Returns a descriptor for the radius of this sub tile.
    @Nullable Object
     
    Returns a descriptor for this flower's secondary radius.
    net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>
     
    @NotNull net.minecraft.nbt.CompoundTag
    getUpdateTag(net.minecraft.core.HolderLookup.Provider registries)
     
    final boolean
     
    boolean
     
    boolean
    Gets if this SubTileEntity is affected by Enchanted Soil's speed boost.
    final void
    loadAdditional(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    readFromPacketNBT(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
    Reads data from a network packet.
    final void
    saveAdditional(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
     
    final void
    setFloating(boolean floating)
    WARNING: This should only be called during or soon after construction.
    void
    setPlacedBy(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, @Nullable net.minecraft.world.entity.LivingEntity placer, net.minecraft.world.item.ItemStack stack)
    Called when this sub tile is placed in the world (by an entity).
    void
     
    protected void
     
    void
    writeToPacketNBT(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
    Writes some extra data to a network packet.

    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

    • PODZOL_DELAY

      public static final int PODZOL_DELAY
      See Also:
    • MYCELIUM_DELAY

      public static final int MYCELIUM_DELAY
      See Also:
    • ticksExisted

      public int ticksExisted
    • overgrowth

      public boolean overgrowth
      true if this flower is working on Enchanted Soil
    • overgrowthBoost

      public boolean overgrowthBoost
      true if this flower is working on Enchanted Soil and this is the second tick
    • TAG_TICKS_EXISTED

      public static final String TAG_TICKS_EXISTED
      See Also:
  • Constructor Details

    • SpecialFlowerBlockEntity

      public SpecialFlowerBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, 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, SpecialFlowerBlockEntity self)
    • getFloatingData

      @Nullable public @Nullable FloatingFlower getFloatingData()
      Specified by:
      getFloatingData in interface FloatingFlowerProvider
    • isFloating

      public final boolean isFloating()
    • setFloating

      public final void setFloating(boolean floating)
      WARNING: This should only be called during or soon after construction. Switching between nonfloating/floating at play time is not supported and a fresh Block Entity should be created instead.
    • isOnSpecialSoil

      public boolean isOnSpecialSoil()
    • getEffectivePos

      public final net.minecraft.core.BlockPos getEffectivePos()
      Returns:
      Where this flower's effects are centered at. This can differ from the true TE location due to red string spoofers.
    • tickFlower

      protected void tickFlower()
    • loadAdditional

      public final void loadAdditional(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      loadAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • saveAdditional

      public final void saveAdditional(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdateTag

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

      public void writeToPacketNBT(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
      Writes 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.
    • readFromPacketNBT

      public void readFromPacketNBT(net.minecraft.nbt.CompoundTag cmp, net.minecraft.core.HolderLookup.Provider registries)
      Reads 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.
    • getUpdatePacket

      public net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> getUpdatePacket()
      Overrides:
      getUpdatePacket in class net.minecraft.world.level.block.entity.BlockEntity
    • sync

      public void sync()
    • setPlacedBy

      public void setPlacedBy(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, @Nullable @Nullable net.minecraft.world.entity.LivingEntity placer, net.minecraft.world.item.ItemStack stack)
      Called when this sub tile is placed in the world (by an entity).
    • getRadius

      @Nullable public abstract @Nullable RadiusDescriptor getRadius()
      Returns a descriptor for the radius of this sub tile. This is called while a player is looking at the block with a Manaseer Monocle.
    • getSecondaryRadius

      @Nullable public @Nullable RadiusDescriptor getSecondaryRadius()
      Returns a descriptor for this flower's secondary radius. Use for e.g. when a flower has different ranges for picking up and using dropped items. Called when the player is looking at the block with a Manaseer Monocle.
    • isOvergrowthAffected

      public boolean isOvergrowthAffected()
      Gets if this SubTileEntity is affected by Enchanted Soil's speed boost.
    • getComparatorSignal

      public int getComparatorSignal()
    • getModulatedDelay

      public int getModulatedDelay()
      Returns the additional delay in ticks that an item must be on the ground before this flower will act on it.
    • getRenderData

      @Nullable public @Nullable Object getRenderData()
    • emitParticle

      public void emitParticle(net.minecraft.core.particles.ParticleOptions options, double xOffset, double yOffset, double zOffset, double xSpeed, double ySpeed, double zSpeed)