Class CropDefinition
java.lang.Object
ke.ric.gardening.data.CropDefinition
Complete definition of a crop type, combining all settings.
Loaded from crops.json configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionCropDefinition(String id, String itemId, String plantTypeId, GrowthSettings growthSettings, PlantingSettings plantingSettings, HarvestSettings harvestSettings, SpreadSettings spreadSettings, String growingTexture, String ripeTexture) CropDefinition(String id, String itemId, String plantTypeId, GrowthSettings growthSettings, PlantingSettings plantingSettings, HarvestSettings harvestSettings, SpreadSettings spreadSettings, String growingTexture, String ripeTexture, String addon) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if this crop can spread (like vines).getAddon()Get addon identifier, or null if this is a core Heirloom cropgetId()getTextureForProgress(double progress) Get the texture URL for the current growth state.booleanisAddon()Check if this crop is from an addonbooleanisValidCeilingSupport(org.bukkit.Material material) Check whether the material can support this crop from above.booleanisValidWallSupport(org.bukkit.Material material) Check whether the material can support this crop as a wall-mounted vine.booleanCheck if this crop must be attached below a ceiling support.booleanCheck if this crop requires wall placement.booleanCheck if this crop requires water.voidsetPlantType(PlantType plantType) Link this crop to its plant type after both are loaded.
-
Constructor Details
-
CropDefinition
public CropDefinition(String id, String itemId, String plantTypeId, GrowthSettings growthSettings, PlantingSettings plantingSettings, HarvestSettings harvestSettings, SpreadSettings spreadSettings, String growingTexture, String ripeTexture) -
CropDefinition
public CropDefinition(String id, String itemId, String plantTypeId, GrowthSettings growthSettings, PlantingSettings plantingSettings, HarvestSettings harvestSettings, SpreadSettings spreadSettings, String growingTexture, String ripeTexture, String addon)
-
-
Method Details
-
getId
-
getItemId
-
getPlantTypeId
-
getPlantType
-
getGrowthSettings
-
getPlantingSettings
-
getHarvestSettings
-
getSpreadSettings
-
getGrowingTexture
-
getRipeTexture
-
getAddon
Get addon identifier, or null if this is a core Heirloom crop -
isAddon
public boolean isAddon()Check if this crop is from an addon -
setPlantType
Link this crop to its plant type after both are loaded. -
canSpread
public boolean canSpread()Check if this crop can spread (like vines). -
requiresWall
public boolean requiresWall()Check if this crop requires wall placement. -
requiresCeiling
public boolean requiresCeiling()Check if this crop must be attached below a ceiling support. -
isValidWallSupport
public boolean isValidWallSupport(org.bukkit.Material material) Check whether the material can support this crop as a wall-mounted vine. -
isValidCeilingSupport
public boolean isValidCeilingSupport(org.bukkit.Material material) Check whether the material can support this crop from above. -
requiresWater
public boolean requiresWater()Check if this crop requires water. -
getTextureForProgress
Get the texture URL for the current growth state.
-