Contents
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>>
A growth modifier asset that modifies growth rate based on light levels.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA class that represents the artificial light levels required for growth. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<LightLevelGrowthModifierAsset> The codec used to parseLightLevelGrowthModifierAssetinstances.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.booleantoString()Methods inherited from class GrowthModifierAsset
getAssetMap, getAssetStore, getId, getModifier
-
Field Details
-
CODEC
The codec used to parseLightLevelGrowthModifierAssetinstances.
-
-
Constructor Details
-
LightLevelGrowthModifierAsset
public LightLevelGrowthModifierAsset()
-
-
Method Details
-
getArtificialLight
-
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: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
-