Class LightLevelGrowthModifierAsset

java.lang.Object
com.hypixel.hytale.server.core.asset.type.blocktype.config.farming.GrowthModifierAsset
com.hypixel.hytale.builtin.adventure.farming.config.modifiers.LightLevelGrowthModifierAsset
All Implemented Interfaces:
JsonAsset<String>, JsonAssetWithMap<String, DefaultAssetMap<String, GrowthModifierAsset>>

public class LightLevelGrowthModifierAsset extends GrowthModifierAsset
A growth modifier asset that modifies growth rate based on light levels.
  • Field Details

  • Constructor Details

    • LightLevelGrowthModifierAsset

      public LightLevelGrowthModifierAsset()
  • Method Details

    • getArtificialLight

      public LightLevelGrowthModifierAsset.ArtificialLight getArtificialLight()
    • getSunlight

      public Rangef getSunlight()
    • isRequireBoth

      public boolean isRequireBoth()
    • getCurrentGrowthMultiplier

      public double getCurrentGrowthMultiplier(@Nonnull CommandBuffer<ChunkStore> commandBuffer, @Nonnull Ref<ChunkStore> sectionRef, @Nonnull Ref<ChunkStore> blockRef, int x, int y, int z, boolean initialTick)
      Description copied from class: GrowthModifierAsset
      Called to fetch the current growth multiplier for a block at the given position.
      Overrides:
      getCurrentGrowthMultiplier in class GrowthModifierAsset
      Parameters:
      commandBuffer - The CommandBuffer<ChunkStore> for component access.
      sectionRef - The entity reference of the section containing the block.
      blockRef - The entity reference of the block.
      x - The X coordinate of the block, local to the section.
      y - The Y coordinate of the block, local to the section.
      z - The Z coordinate of the block, local to the section.
      initialTick - Whether this is the initial tick for the block.
      Returns:
      the growth multiplier to apply.
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class GrowthModifierAsset