Class WaterGrowthModifierAsset

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

public class WaterGrowthModifierAsset extends GrowthModifierAsset
A growth modifier asset that increases growth rate when the crop is near water or when it is raining.
  • Field Details

  • Constructor Details

    • WaterGrowthModifierAsset

      public WaterGrowthModifierAsset()
  • Method Details

    • getFluids

      public String[] getFluids()
    • getFluidIds

      public it.unimi.dsi.fastutil.ints.IntOpenHashSet getFluidIds()
    • getWeathers

      public String[] getWeathers()
    • getWeatherIds

      public it.unimi.dsi.fastutil.ints.IntOpenHashSet getWeatherIds()
    • getRainDuration

      public int getRainDuration()
    • 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