Contents
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>>
A growth modifier asset that increases growth rate when the crop is near water or when it is raining.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<WaterGrowthModifierAsset> The codec used to parseWaterGrowthModifierAssetinstances.Fields inherited from class GrowthModifierAsset
ABSTRACT_CODEC, CHILD_ASSET_CODEC, CHILD_ASSET_CODEC_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetCurrentGrowthMultiplier(CommandBuffer<ChunkStore> commandBuffer, Ref<ChunkStore> sectionRef, Ref<ChunkStore> blockRef, int x, int y, int z, boolean initialTick) Called to fetch the current growth multiplier for a block at the given position.it.unimi.dsi.fastutil.ints.IntOpenHashSetString[]intit.unimi.dsi.fastutil.ints.IntOpenHashSetString[]toString()Methods inherited from class GrowthModifierAsset
getAssetMap, getAssetStore, getId, getModifier
-
Field Details
-
CODEC
The codec used to parseWaterGrowthModifierAssetinstances.
-
-
Constructor Details
-
WaterGrowthModifierAsset
public WaterGrowthModifierAsset()
-
-
Method Details
-
getFluids
-
getFluidIds
public it.unimi.dsi.fastutil.ints.IntOpenHashSet getFluidIds() -
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:GrowthModifierAssetCalled to fetch the current growth multiplier for a block at the given position.- Overrides:
getCurrentGrowthMultiplierin classGrowthModifierAsset- Parameters:
commandBuffer- TheCommandBuffer<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
- Overrides:
toStringin classGrowthModifierAsset
-