HT's TreePlant

HT's TreePlant

71.2k Downloads

Saplings that fall from tree leaves will try to plant themselves soon after landing on the ground. Works well with HT's TreeChop.

Versions available (Requires Forge):

Cool features:

  • Compatible with modded trees
  • Compatible with tree felling and fast leaf decay mods
  • Different configuration settings for saplings that are tossed, broken, or fall from decaying leaves
  • Sapling items make one last attempt to plant themselves before despawning
  • Works with mushrooms and fungi
  • Low server overhead
  • Only needs to be installed server-side

Here's a quick demo by Mister Echo (and check out the other cool mods in the video!):

Sample config:

["What to plant"]
 #Items with this tag will be automatically planted when possible
 itemTagForPlantableItems = "treeplant:auto_plantables"

#Set chanceOfPlanting = 0.0 to disable
["When to plant"]

 ["When to plant"."Saplings tossed by players"]
  #A random number of seconds to add to the wait time
  #Range: 0.0 ~ 100000.0
  wiggle = 3.0
  #Chance that a dropped sapling will be planted if possible
  #Range: 0.0 ~ 1.0
  chanceOfPlanting = 0.0
  #The number of seconds to wait before planting saplings
  #Range: 0.0 ~ 100000.0
  numSecondsBeforePlanting = 5.0
  #The minimum allowed distance between saplings of the same type
  #Range: 1 ~ 16
  minDistanceBetweenSaplings = 1

 ["When to plant"."Saplings that fall naturally (e.g. when leaves decay or when using tree felling mods)"]
  #A random number of seconds to add to the wait time
  #Range: 0.0 ~ 100000.0
  wiggle = 3.0
  #Chance that a dropped sapling will be planted if possible
  #Range: 0.0 ~ 1.0
  chanceOfPlanting = 1.0
  #The number of seconds to wait before planting saplings
  #Range: 0.0 ~ 100000.0
  numSecondsBeforePlanting = 1.0
  #The minimum allowed distance between saplings of the same type
  #Range: 1 ~ 16
  minDistanceBetweenSaplings = 2

 ["When to plant"."Saplings that drop when a player breaks a block"]
  #A random number of seconds to add to the wait time
  #Range: 0.0 ~ 100000.0
  wiggle = 3.0
  #Chance that a dropped sapling will be planted if possible
  #Range: 0.0 ~ 1.0
  chanceOfPlanting = 1.0
  #The number of seconds to wait before planting saplings
  #Range: 0.0 ~ 100000.0
  numSecondsBeforePlanting = 10.0
  #The minimum allowed distance between saplings of the same type
  #Range: 1 ~ 16
  minDistanceBetweenSaplings = 1

 ["When to plant"."Saplings that are about to despawn, no matter where they came from"]
  #Chance that a dropped sapling will be planted if possible
  #Range: 0.0 ~ 1.0
  chanceOfPlanting = 1.0
  #The minimum allowed distance between saplings of the same type
  #Range: 1 ~ 16
  minDistanceBetweenSaplings = 2

[Miscellaneous]
 #The number of seconds to keep trying to plant a sapling after the first attempt
 #Range: 0.0 ~ 100000.0
 numSecondsToRetryPlanting = 120.0
 #Whether to allow players to plant saplings by right-clicking on dirt
 allowRightClickPlanting = true
 #The number of seconds to wait before trying to plant after a failed attempt
 #Range: 0.0 ~ 100000.0
 numSecondsBetweenTries = 1.0

Changelog:

0.3.1:
- Allow multiple plantable tags to be configured
- Added compatibility with Dynamic Trees seeds

0.3.0:
- Fixed configuration values not being applied correctly
- Added option to auto plant despawning saplings
0.2.1:
- Don't try to plant empty items
- Fixed display name

0.2.0:
- Added more config options for saplings dropped by leaf decay, block breaking, or item tossing
- Added config option to prevent players from manually planting saplings
- Added configurable wiggle time to spread out planting noises
- Fixed issue where saplings would sometimes be planted later than expected

0.1.1:
- Removed incorrect warning message
- Added more info to warning messages