[1.17] TreeGravity - Tree Feller icon

[1.17] TreeGravity - Tree Feller -----

Chop entire trees down with just one swing!




Details: Oresweeper now works with new ore types (copper, deepslate, nether gold) and ore drops (raw iron/gold).

Need to add: Still working on making the nether trees work with the current logic, i ran into an issue here but its close. Also still working on getting ore XP from oresweeper to drop in the world as opposed to being given directly to the player.

Note: New bug with update checker, i think this was created with the 1.17 switch to Java 16. Looking into currently.

As always, let me know of any suggestions or bugs in the discussion section. Cheers!
----------, Sep 25, 2021

Had to take a bit of a hiatus there, but should be back for good now. Thank you all for your patience! See below for what's included in version 4.6.1:

Bug Fixes:

  • fixed sapling replant
  • fixed issues with logs and saplings being deleted after cutting a tree
  • updated to current versions of mcMMO and mcMMO Classic
  • updated to current version of CoreProtect
New Additions:
  • added PayPal donation link
Reported Issues (to fix soon):
  • no compatibility with crimson or warped trees from the nether
  • oresweeper EXP is added to player bar, not dropped on ground. Thus, mending tools do not repair
  • wood pickaxe can mine diamond (this shouldn't happen but i will look into nonetheless)
Planned Features for next update:
  • player toggle for oresweeper, sapling replant, and perhaps others
  • make houseprotection stricter

As always, let me know of any suggestions and bugs in the discussion section. Cheers!
----------, Aug 22, 2021

Changelog:
  • Should be fully updated to 1.16.4
  • Added official commands to add/remove Netherite axe to the allowed tools list
Potential issues:
  • I haven't yet tested McMMO or CoreProtect compatibility with this version, if you are willing to test please let me know if it works in a private message or in the discussion section

Sorry I've been away for a while. Life happened. As always, let me know of any bugs or issues in the discussion section. Thanks!
----------, Nov 21, 2020

As title says, i've added compatibility with CoreProtect. Logs broken by treegravity are now logged in CoreProtect. Also, ores and leaves* broken by Treegravity's oresweeper and leafdecay settings are logged in CoreProtect.

*One caveat to the leafdecay compatability: if leafdecay speed = 6 then it does not log the decayed leaves in CoreProtect (I am working on this issue). If you're looking for a similar functionality to leafdecay speed 6 but want leafdecay logged in coreprotect, then use speed 5 and radius 2 together.
Nothing needs to be done to enable this feature, the plugin automatically detects whether or not your server has CoreProtect, and then logs the blockbreak events I detailed above.

I was hoping to just call a blockbreak event which would then be detected by all world protection plugins (including coreprotect), but for some reason the blockbreak events I call are not being logged by coreprotect. So in the meantime, since coreprotect is the most widely used protection plugin, I used the API to log treegravity's blockbreak events. If you have any ideas or suggestions as to why treegravity calling a blockbreak event wouldn't be logged in coreprotect, please message me or post in the discussion section.

As always, let me know of any bugs you encounter or if you have any suggestions for the plugin in the discussion section!
----------, Jun 15, 2020

  • Fixed bug where if you used silk touch pickaxe to mine ore, you would get the ore but also XP as if you had mined the ore with a normal or fortune pickaxe.. so you could in theory keep placing ore, break ore to get xp, and repeat this process for infinite xp.
  • Deleted out console message spam. Sorry I use these for debugging, I must have forgotten to delete them.
----------, Jun 7, 2020

Version 4.4.2 is same as 4.4.1 just the plugin.yml version is updated. See this link for description of update 4.4.1: https://www.spigotmc.org/resources/1-15-treegravity.59283/update?update=339708
----------, Jun 5, 2020

Fixed CE autosmelt bug where fortune pickaxes were acting as if they had autosmelt enchant on them, therefore iron and gold ore mined with fortune pickaxes were dropping ingots instead of ore.
----------, Jun 5, 2020

Pretty much the title, added oresweeper compatibility with Custom Enchants Plus. Treegravity's oresweeper was interfering with Custom enchant's autosmelt enchantment, dropping the amount of ore in the vein plus 1 ingot, thus you were able to essentially duplicate ore with a silk touch pick. See Custom Enchants Plus resource here: https://www.spigotmc.org/resources/...-enchants-scrolls-actionbar-1-12-1-15✨.72678/
----------, Jun 5, 2020

Title says it all. The mcMMO + TreeGravity hook broke after the 1.15 update, and has been fixed.

Let me know ASAP if it is not fixed for Classic mcMMO, as I was only able to test with normal mcMMO @ExodusXIII

As always, let me know in the discussion section if you have any suggestions or find any bugs. Thanks!
----------, Jan 8, 2020

Hello all, nothing major in this update but some quality of life changes and bug fixes:
  • updated library with spigot 1.15.1 and updated API to 1.15.1 in plugin.yml
  • added new leafDecay setting that limits decayed leaves to those broken to those directly near the tree's trunks, and does so immediately. In order to enable this feature, make sure leafdecay is enabled and set leafdecayspeed to 6.
  • added 2 new fallMethods: "realistic.pop" and "realistic.break", which do the same thing as the pop and break fall methods, respectively, but the only difference is they will ONLY break the logs above where the player cuts on the tree. So there will be stumps left if you don't cut at the base of the tree.
  • reduced console spam (sorry about the stick scanning thing).
  • if mushroom trees are broken with a silk touch axe, they will now drop the mushroom blocks instead of mushrooms.
Not sure when the next update will be out, but next I'll like to add an option to allow/disallow stripped logs, and work on a few more community suggestions.

As always, if you have any suggestions or find any errors, let me know in the discussion session or send me a DM. Cheers!
----------, Dec 23, 2019

  • Title says it all. Servers would crash if the tree was larger than ~15,000 logs. Maybe the reason why Treegravity doesn't work with EWG for some players.
----------, Sep 28, 2019

[4.2.1] McMMO hook fix, Immediate LeafDecay, Fortune & Silk Touch support for OreSweeper
  • Issues with McMMO compatibility should now be fixed. They were caused by a change in McMMO's experience.yml file where the parent section "Experience:" was changed to "Experience_Levels:", sorry it took me so long to solve the issue.
  • Now there is a setting for immediate LeafDecay, just set "LeafDecay.speed" to "5" and the leaves will decay instantly. This setting will most likely change to LeafDecay.delay in the future, at the request of SlimeDog
  • OreSweeper now supports silk touch and fortune pickaxe enchantments
As always let me know of ANY and ALL bugs you encounter. If you have any suggestions, I'd love to add them to my to-do list. Cheers!
----------, Aug 17, 2019

[4.2.0] Log Pile Method, Leaf Decay, config.yml changes, additional structure protection

Summary:
  • Added new Log Pile Method (tgType = 5). It makes the tree’s logs fall in a pile similar to other gravity methods.
  • Added LeafDecay for Lumberjack methods. Will make leaves in the general area of the tree quickly dissipate. Can change the radius of leaves that decay, and the speed at which they decay.
  • Increased built in structure protection to check for “natural” blocks beneath potential trees, cannot be turned off in config as it’s baked into the plugin.
  • There are 6 new Config Settings:
    • Treegravity.Other.pilespread (integer values 0,1,2,3,4,5,6)
    • Treegravity.Lumberjack.LeafDecay.enabled (Boolean values true/false)
    • Treegravity.Lumberjack.LeafDecay.speed (integer values 1,2,3,4)
    • Treegravity.Lumberjack.LeafDecay.radius (integer values 1,2,3,4)
    • OreSweeper now has its own config seciton, the new config variables are as follows:
      • Treegravity.OreSweeper.enabled (Boolean values true/false)
      • Treegravity.OreSweeper.pickaxesAllowed (string list, values are pickaxe item IDs)
    • **As the config.yml got a slight makeover, I highly suggest you save your old config.yml elsewhere, delete it in your plugins>treegravity folder, and then update the new config.yml with your server's custom settings**


New Features:

Log Pile Method (tgType=5) – When a tree is chopped down, the logs on the tree fall in a pile. See below for the applicable config variable “pileSpread”, which sets how spread out the logs are when they fall in a pile. You can set this method by “/tgconfig set type 5”. Also, can set the spread by “/tgconfig set pilespread [0,1,2,3,4,5,6]. All issues aforementioned with jungle trees, large trees, vines, etc. should be solved. The biggest issue now is when multiple trees are cut down at the same time, one of them only drops a few logs. Due to my limited ability to test the plugin, I cannot truly tell how big a problem this is, please let me know if you run into any issues ASAP.

Leaf Decay – Will make leaves in proximity of the tree chopped down decay quickly, so that you don’t need to wait 3-7 minutes for all leaves to decay on their own. See config variables below for the speed and radius at which leaves decay. Speed meaning how fast the leaves decay, 4 is fast and 1 is slow. Radius meaning how wide the area around the tree is that searches for leaves. 1 is a small area and 4 is a large area. I suggest keeping leafDecay.radius at 1 or 2 as any higher than that, and surrounding trees might be adversely affected.

Additional structure protection – checks for “natural” blocks beneath potential trees (“natural” blocks being dirt/grass/grass path/farmland/podzol/mycelium/coarse dirt). Thus, if you ever have any problems with houses getting chopped down, simply replace dirt/grass/etc blcoks beneath the logs on your house with cobblestone, stone, or another block I did not list above. This additional structure protection does depend on your houseProtection setting, meaning that the higher your houseProtection is, the more strict the plugin is with checking for “natural” blocks. If you have houseProtection=0, the plugin will still search for “natural” blocks, but as long as 1 of the tree’s base logs is on a “natural” block the treefeller logic will work. As I said above, this setting cannot be turned off in the config as it’s baked into the plugin, but if you set houseProtection to 0 you should barely notice this unless you’re dealing with many trees that are planted on blocks besides those I listed above (e.g. floating trees, trees planted ON water, etc.).​



New Config Variables:

pileSpread – Works with the new LogPile method. Values 0,1,2,3,4,5,6 will work, and the settings work like you think they would. For example, pileSpread=0 will give you the closest pile grouping, while pileSpread=6 will make the pile of logs more spread out.

LeafDecay.enabled– Whether leafDecay is turned on or off. Set to true or false.

LeafDecay.speed – How fast leaves decay that are left behind from lumberjack methods. A value of 1 is slow, and 4 is fast. Valid config values are 1,2,3,4. Default is 4, the value you set is strictly preference.

LeafDecay.radius– How large the area around the tree is that is scanned for leaves. 1 is a small area, 4 is a large area around the tree. Valid config values are 1,2,3,4. Default is 2, I suggest leaving it at 2, but it’s a free country.

oreSweeper – Just changed up the config variables and section where they’re stored. Should be self-explanatory. *I haven’t added support yet for fortune or silk touch enchantments, but unbreaking should be supported.​




Thanks for your patience waiting on this update. Life, uh, got in the way. As always let me know of ANY and ALL bugs you encounter. If you have any suggestions, I'd love to add them to my to-do list. Cheers!
----------, Aug 17, 2019

See the additions from update 4.1 at this link

In update 4.1.2:
  • bug was fixed where mushroom trees wouldn't fall like they did in previous updates

Let me know of any other bugs you encounter in the discussion section. I'd also love to hear your suggestions for the plugin there as well. Enjoy!
----------, Jun 1, 2019

[4.1.1] Code overhaul, 5 new config settings, bug fixes

Summary:
  • Changed the code so that treegravity methods are classified differently in the config.yml. ALL old commands will still work, and change the config.yml exactly to what you want the plugin to do, so if you only use in-game commands, you can ignore this part. More details below
  • There are 5 new Config Settings: allowedWorlds, fallMethod, dropMethod, randomLogDrop, oreSweeper. See details below.
  • Bug Fixes:
    • added podzol to the list of blocks that autoReplant will work with
    • should have fixed any issues with the McMMO hook
    • fixed an issue where certain spruce trees wouldn't break because there were too few leaves on the tree, so the plugin wouldn't register them as trees
    • cleaned up code in general
    • [4.1.1] fixed plugin.yml api-version issue


'tgType' code interaction change:

Changed the way the code interacts with the config.yml. Again, if you only use in-game commands, this won't be of interest to you.

Before this update, available tgTypes were 1, 2, 3, 4 ,2.1, 4.1, and 4.2. Now, the only official tgType methods are 1 Lumberjack, 4 Basic Gravity, 2.1 Lumberjack Natural (logs & leaves), 4.1 Gravity (All Logs), and 4.2 Gravity (all logs with metadata). If you want the LumberJack natural or random methods (formerly tgTypes 2 and 3), there are new config settings to enable them. For LJ Natural see the 'fallMethod' config variable; and for LJ Random see the 'randomLogDrop' config variable.​



New Config Variables:

allowedWorlds - these are worlds that the plugin will work in, you should be able to add any world you want. Do this directly in the config.yml or use command '/tgconfig worlds add/remove [world]'

fallMethod - this is a variable that only applies to the Lumberjack method (where tgType = 1). Possible values for this variable are POP, BREAK, or NATURAL. Change this setting in-game with '/tgconfig set fallmethod [value]'.
POP and BREAK replace the tree's logs with an air block, and then drops a stack of logs. NATURAL breaks the tree's logs naturally, and thus the logs are dropped naturally.
POP breaks the tree logs all at once, so there is no runnable that spreads out the tree break event across multiple ticks. This may cause lag with larger trees. BREAK uses a runnable that spreads out the tree break event across multiple ticks, which should help in reducing lag. NATURAL breaks the tree's logs naturally, use this setting to replicate the former tgType 2 Natural method. You can still use the old command '/tgconfig set type 2'.

dropMethod - this is a variable that only applies to the Lumberjack method (where tgType = 1). Possible values for this variable are ITEMDROP or INVENTORY. Change this setting in-game with '/tgconfig set dropmethod [value]'.
ITEMDROP drops a stack of logs where the player first hit the tree, whereas the INVENTORY setting moves the logs directly into the player's inventory (and saplings if saplingdrop = true).

randomLogDrop - this is a variable that only applies to the Lumberjack method (where tgType = 1), but will not work with the lumberjack natural method. This setting can be true or false. Change this setting in-game with '/tgconfig toggle randomLogDrop'.
This function used to be fulfilled in previous versions by tgType = 3, or the Lumberjack Random method. When chopping a tree, you will get anywhere from 80% to 120% of the logs that were actually on the tree. You can still use the command 'tgconfig set type 3' to turn on this random lumberjack method on.

oreSweeper - I added this for fun and to use on my own server. It has pretty much the same code as the Lumberjack Natural method but it works with all ores, and you cannot customize any settings. Right now, the code abides by all Vanilla pickaxe rules (e.g. a wood pickaxe cannot mine iron ore, a stone pickaxe cannot mine diamond ore, etc.), except for enchantment rules - so if you have a fortune, silk touch, unbreaking pickaxes, I would not use this feature. I will account for enchantments in future updates.​


Obligatory "sorry this update took so long to get out", I've been swamped between work and school.

I hope you enjoy! As always let me know of ANY and ALL bugs you encounter. I've been slow to implement community suggestions, but if you have any I'd love to add them to my list. Thanks!
----------, May 26, 2019

[4.1.0] Code overhaul, 5 new config settings, bug fixes

Summary:
  • Changed the code so that treegravity methods are classified differently in the config.yml. ALL old commands will still work, and change the config.yml exactly to what you want the plugin to do, so if you only use in-game commands, you can ignore this part. More details below
  • There are 5 new Config Settings: allowedWorlds, fallMethod, dropMethod, randomLogDrop, oreSweeper. See details below.
  • Bug Fixes:
    • added podzol to the list of blocks that autoReplant will work with
    • should have fixed any issues with the McMMO hook
    • fixed an issue where certain spruce trees wouldn't break because there were too few leaves on the tree, so the plugin wouldn't register them as trees
    • cleaned up code in general
'tgType' code interaction change:

Changed the way the code interacts with the config.yml. Again, if you only use in-game commands, this won't be of interest to you.

Before this update, available tgTypes were 1, 2, 3, 4 ,2.1, 4.1, and 4.2. Now, the only official tgType methods are 1 Lumberjack, 4 Basic Gravity, 2.1 Lumberjack Natural (logs & leaves), 4.1 Gravity (All Logs), and 4.2 Gravity (all logs with metadata). If you want the LumberJack natural or random methods (formerly tgTypes 2 and 3), there are new config settings to enable them. For LJ Natural see the 'fallMethod' config variable; and for LJ Random see the 'randomLogDrop' config variable.​



New Config Variables:

allowedWorlds
- these are worlds that the plugin will work in, you should be able to add any world you want. Do this directly in the config.yml or use command '/tgconfig worlds add/remove [world]'

fallMethod - this is a variable that only applies to the Lumberjack method (where tgType = 1). Possible values for this variable are POP, BREAK, or NATURAL. Change this setting in-game with '/tgconfig set fallmethod [value]'.
POP and BREAK replace the tree's logs with an air block, and then drops a stack of logs. NATURAL breaks the tree's logs naturally, and thus the logs are dropped naturally.
POP breaks the tree logs all at once, so there is no runnable that spreads out the tree break event across multiple ticks. This may cause lag with larger trees. BREAK uses a runnable that spreads out the tree break event across multiple ticks, which should help in reducing lag. NATURAL breaks the tree's logs naturally, use this setting to replicate the former tgType 2 Natural method. You can still use the old command '/tgconfig set type 2'.

dropMethod - this is a variable that only applies to the Lumberjack method (where tgType = 1). Possible values for this variable are ITEMDROP or INVENTORY. Change this setting in-game with '/tgconfig set dropmethod [value]'.
ITEMDROP drops a stack of logs where the player first hit the tree, whereas the INVENTORY setting moves the logs directly into the player's inventory (and saplings if saplingdrop = true).

randomLogDrop - this is a variable that only applies to the Lumberjack method (where tgType = 1), but will not work with the lumberjack natural method. This setting can be true or false. Change this setting in-game with '/tgconfig toggle randomLogDrop'.
This function used to be fulfilled in previous versions by tgType = 3, or the Lumberjack Random method. When chopping a tree, you will get anywhere from 80% to 120% of the logs that were actually on the tree. You can still use the command 'tgconfig set type 3' to turn on this random lumberjack method on.

oreSweeper - I added this for fun and to use on my own server. It has pretty much the same code as the Lumberjack Natural method but it works with all ores, and you cannot customize any settings. Right now, the code abides by all Vanilla pickaxe rules (e.g. a wood pickaxe cannot mine iron ore, a stone pickaxe cannot mine diamond ore, etc.), except for enchantment rules - so if you have a fortune, silk touch, unbreaking pickaxes, I would not use this feature. I will account for enchantments in future updates.


Obligatory "sorry this update took so long to get out", I've been swamped between work and school.

I hope you enjoy! As always let me know of ANY and ALL bugs you encounter. I've been slow to implement community suggestions, but if you have any I'd love to add them to my list. Thanks!
----------, May 26, 2019

Added mcMMO support, so that every log you chop down with TreeGravity gets counted as XP in mcMMO.

New config.yml variables:
  • mcmmoCompatable mcmmoHook[true or false]: Toggle this on or off to choose whether you want TreeGravity to work with mcMMO.
  • mcmmoXpMultiplier[double between 0 and 1]: change this to a double value between 0.0 and 1.0. This variable directly influences the amount of XP given to a player when they chop down a tree. For example:
    • If a tree with 20 logs is chopped down and the multiplier is 1, then the player will receive mcMMO Woodcutting XP for all 20 logs (20 x 1 = 20)
    • If a tree with 20 logs is chopped down and the multiplier is 0.4, then the player will receive mcMMO Woodcutting XP for only 8 of the logs (20 x .4 = 8)
    • The XP per log is pulled from mcMMO's 'experience.yml' config that is in your server plugins folder, so any XP changes you make will be supported with this plugin.
New commands:
  • /tgconfig toggle mcmmoCompatability mcmmoHook
  • /tgconfig set mcmmoMultiplier [number between 0 and 1, or equal to 0 or 1]

There's also new debugger information relating to mcMMO stats, including log XP pulled from the experience.yml, number of logs used in the XP calculation, and the mcmmoXpMultiplier. Sorry it took so long to get this out, hope you enjoy and as always let me know of ANY and ALL bugs you encounter, and any suggestions you have for the plugin. Thanks!


**Edit: Changed the setting's name from "mcmmoCompatible" to "mcmmoHook" on 4/27/2019 on the forum and changed in the plugin. This will be available in the next update.



Side note: i noticed through testing that when dealing with trees with more than 40 logs, they took a really long time to disappear, drop your logs, and give you XP in mcMMO. Even without mcMMO, it still took a long time, meaning its the plugin's core logic that is slow for some reason. I will be taking a look at it and try to come up with some solutions. In the meantime, enjoy!
----------, Feb 17, 2019

New config settings with 3.10.0:
  • defaultUserPerm: [true, false]
  • sound: [none, scream, falling, treefiddy, creepy, LOTR]

Wanted to get this out before I'm out of town for a few days. Cleaned up the code a lot, hopefully it runs better. I didn't do much testing since I'm just trying to get this out ASAP to solve the Permissions issues that have been popping up. There is now a config setting to disable/enable the default permission of "tg.user", instead of the plugin trying to detect whether you have a perms plugin. You will need to change this setting manually in the config itself, there is no command yet to change it in game. You will still have to manually assign the tg.operator permission to those who aren't server operators.

Also, I've added sounds! I'm sure some of you remember the screaming trees plugin [1], I wanted to do a little tribute to that. Also wanted to add the "tree fiddy" sounds ever since I started the plugin, since I almost named the plugin TreeFiddy. Another new config setting is 'soundFrequency' which doesn't do anything yet. I'm sure you can assume what it will do, I'll make it work in an upcoming update. There also might be some console messages from the plugin that I use for testing but forgot to delete out. I will eliminate those in the next update. When sound is set to any setting besides none, players will be prompted to download a resource pack when they join the server. The resource pack is located at the following URL: https://www.dropbox.com/s/uzw5sxfjrr0u4wq/treegravitysounds.zip?dl=0

The following are the values you can set the sound config setting to:
- none
- scream
- falling
- treefiddy
- creepy
- LOTR​

I hope this will run smooth but if not, switch back to 3.9.1 temporarily. I wanted to get this out for those with permission problems, and therefore haven't had a chance to test this as much as I normally do. As always, let me know of any bugs and suggestions you have in the discussion section or on github. Thanks!!



[1]
----------, Feb 1, 2019

[3.9.1] New lumberjack + gravity methods, new player by player tg toggle command, new "stand" chopMethod, general optimization, and bug fix from 3.9.0
  • Added an altered lumberjack natural method (tgType = 2.1) to have leaves break along with the logs. Since the tree detection isn't optimized, a tree touching many other leaves in a forest will recognize them all as 1 tree. You could end up breaking hundreds of trees, I tried implementing something to limit the while loop but it isn't working. Sometimes a diamond axe got broken by chopping one tree, so I made durability go down only by the amount of logs broken. I'll have to solve this later; I'd advise against using tgType 2.1 at the moment.
  • Added altered gravity methods to have all logs on the tree fall down like sand/gravel when one block is chopped. Unlike tgType 4.0, these methods should be able to differentiate a tree from a manmade structure.
    • tgType = 4.1 - When a tree is chopped, all logs on the tree spawn a falling block. This is an experimental method, be careful with it.
    • tgType = 4.2 - When a tree is chopped, all logs on the tree spawn a falling block. However, once the logs fall Metadata is added to them, so that when you go to chop the fallen logs they will act as if the normal gravity method (tgType 4.0) is on, just spawning falling blocks directly above the log you chopped. This is an experimental method, be careful with it.
  • Added a player by player option to toggle TreeGravity on and off. command is /tg toggle. If you toggle tg off, and the server is reset or you leave and rejoin the server, tg will get toggled back on so you'll have to toggle it off again.
  • Added an option to "chopMethod" where trees only fell when hit with an axe while standing, they do not fell when sneaking. (chopMethod = stand)
  • fixed bug from 3.9.0 posted a few minutes ago, caused by API-version = 1.13.2 in plugin.yml (error = unsupported API). Should be good to go now.
**Sorry there's not more, I'll try to get more out before the end of the year. Let me know if you encounter any issues on the discussion page or on Github. Thanks!
----------, Nov 21, 2018

[3.9.0] Added variations of lumberjack and gravity methods
  • Added an altered lumberjack natural method (tgType = 2.1) to have leaves break along with the logs. Since the tree detection isn't optimized, a tree touching many other leaves in a forest will recognize them all as 1 tree. You could end up breaking hundreds of trees, I tried implementing something to limit the while loop but it isn't working. Sometimes a diamond axe got broken by chopping one tree, so I made durability go down only by the amount of logs broken. I'll have to solve this later; I'd advise against using tgType 2.1 at the moment.
  • Added altered gravity methods to have all logs on the tree fall down like sand/gravel when one block is chopped
    • tgType = 4.1 - When a tree is chopped, all logs on the tree spawn a falling block. This is an experimental method, be careful with it.
    • tgType = 4.2 - When a tree is chopped, all logs on the tree spawn a falling block. However, once the logs fall Metadata is added to them, so that when you go to chop the fallen logs they will act as if the normal gravity method (tgType 4.0) is on, just spawning falling blocks directly above the log you chopped. This is an experimental method, be careful with it.
  • Added a player by player option to toggle TreeGravity on and off. command is /tg toggle. If you toggle tg off, and the server is reset or you leave and rejoin the server, tg will get toggled back on so you'll have to toggle it off again.
  • Added an option to "chopMethod" where trees only fell when hit with an axe while standing, they do not fell when sneaking. (chopMethod = stand)
**Sorry there's not more, I'll try to get more out before the end of the year. Let me know if you encounter any issues on the discussion page or on Github. Thanks!
----------, Nov 21, 2018

[3.8.0] Added new config setting "chopMethod", fixed sapling autoplant bug, and created new config:
  • Added the config setting "chopMethod". The values you can put are: default, sneak, and sneak.notify. Default means you can fell trees like before, whether you're standing or sneaking/crouching. Sneak means you need to sneak in order to fell trees, but the player WONT get an action bar message saying "treegravity is enabled" when they crouch with an axe. Sneak.notify DOES send an actionbar message. the command to change this is '/tgconfig set chopmethod [default, sneak, sneak.notify]'
  • Bug for autoplant of saplings was where if a tree was floating, a sapling would get planted in mid air even if there was no dirt or grass block below it. Has been fixed.
  • Created a new config so that the config values are better segregated, and there are descriptions of the config variables and all of the variables' possible values, listed in comments above the actual config variables. You may need to delete your current config for this one to generate.
**Let me know if you encounter any issues on the discussion page or on Github. Thanks!
----------, Nov 3, 2018

[3.7.0] Added More House/Structure Protection with a new config setting, called "houseProtection":
  • Values for this config setting are 0, 1, 2, and 3. If houseProtection is set to 0, the extra house protection added in this update will be disabled. This means the plugin will perform exactly the same as the last update (version 3.6.2).
  • Setting houseProtection to 1, 2, or 3 will increasingly restrict what the plugin considers a tree. 1 being low, 3 being high.
  • On level 3, any trees with a "bottom base" of 4 logs (the logs touching the grass) will not get chopped down. You will need to chop one of the base logs so that there are only 3 on the ground.
  • Before using level 3, remember it applies to most jungle and dark oak trees since their base is 2x2 logs, so they will be more difficult to chop these trees down.
  • Due to the natural grouping of dark oak trees, two will usually combine and will now be difficult for players to chop them down with this config setting on. You must chop any logs connecting the two trees and then cut them down separately.
**Hopefully this fixes the issue where players would chop down their entire house when modifying the structure. As always, let me know of ANY and ALL issues you encounter.

Two variables are considered with the houseProtection setting: (1) number of "base logs" and (2) length of "branches". These variables help the plugin determine whether a group of logs and leaves are a manmade structure or a large tree (large oak trees, dark oak trees, and jungle trees).

Base logs are the lowest logs on the tree, and usually only consist of 1 log and are touching grass/dirt (jungle and dark oak trees usually have 4 logs, due to their 2x2 base). If there are more than 8, 5, or 3 base logs with houseProtection on level 1, 2, or 3, respectively, the tree will not fell.

Branches are any group of logs higher than the base of the tree that share the same Y value. If there are more than 15, 11, or 7 logs with the same Y value with houseProtection level 1, 2, or 3, respectively, the tree will not fell.

These two variables are checked and updated for the tree on every log break, so you can still chop trees fairly quickly with houseProtection on level 3. Quicker than vanilla woodcutting, anyways. You will just have to put in more work by "carving" the larger trees I listed above to fit the above specifications I listed above.

Any suggestions to optimize the variables/specs I listed above, are always welcome. If you'd like me to explain further what the plugin defines as base logs and branches, I'd be happy to. Just let me know in the discussion section.

Any suggestions to optimize the variables/specs I listed in the spoiler above, are always welcome and encouraged. If level 1 is found to be too restrictive or level 3 too liberal, I'd like to know right away so I can get an update out ASAP. If you'd like me to explain further how the variables in the spoiler work, I'd be happy to; just let me know in the discussion section. Thanks!

----------, Oct 27, 2018

[3.6.2] TreeGravity handles all cancelled events now, not just for WorldGuard + bug fix:
  • I've been looking at this wrong and was trying to cater to the specific rules of each plugin, instead of letting plugins like World Guard and Grief Prevention cancel the blockbreak events themselves.
  • Now, the TreeGravity blockbreak method runs after all other plugins, checks whether the blockbreakevent was cancelled by another plugins, and doesn't break any logs if the event was cancelled.
  • Much simpler this way than catering to the specific rules of every grief prevention plugin out there. Can't believe i didn't think of this before, thank you all for your patience!
  • Bug Fix: The last update, 3.6.1, should have fixed all griefing issues. Fixed a bug where when a player tried to break a tree in a protected region, they could not break any logs anywhere even if they were in an unprotected region.
**Hopefully this forever fixes the griefing issues, its been too long awaited. As always, let me know of ANY and ALL issues you encounter. Thanks!
----------, Oct 21, 2018

[3.6.1] TreeGravity handles all cancelled events now, not just for WorldGuard:
  • I've been looking at this wrong and was trying to cater to the specific rules of each plugin, instead of letting plugins like World Guard and Grief Prevention cancel the blockbreak events themselves.
  • Now, the TreeGravity blockbreak method runs after all other plugins, checks whether the blockbreakevent was cancelled by another plugins, and doesn't break any logs if the event was cancelled.
  • Much simpler this way than catering to the specific rules of every grief prevention plugin out there. Can't believe i didn't think of this before, thank you all for your patience!
**Hopefully this forever fixes the griefing issues, its been too long awaited. As always, let me know of ANY and ALL issues you encounter. Thanks!
----------, Oct 21, 2018

[3.6.0] Fixed Worldguard issues and bugs, which were the following:
  • When server didn't have WorldGuard, errors would occur when TreeGravity was enabled. Might have just been for my server, as a fresh version of 3.5.3 fixed this right away..
  • When a regular user (not a server operator) broke a tree in a WorldGuard Protected region, they wouldn't be allowed to break trees anywhere else on the server. Even if the region wasn't protected.
  • Server operators were unable to destroy tree logs at all in protected regions, should be fixed so that even if the region is protected treegravity will work.
  • These bugs were caused by the last update introducing WorldGuard compatibility, update 3.5.3. You can read about that update here: https://www.spigotmc.org/resources/1-13-treegravity.59283/update?update=248995
  • Again, please understand that I have very little experience with WorldGuard, and I could only do minimal testing of this update. If you find ANY issues with this plugin, please let me know immediately. I will work hard to solve any issues as quickly as I can, but I can't do that without knowing what those issues are.
  • Also, fixed naming convention from 3.5.x to 3.6.x. The initial WorldGuard update was not a bug fix, but an addition. Therefore this version update will be 3.6.0, a bug fix to version 3.5.3
**Again, sorry it took so long to get these WorldGuard updates out, I've been extremely busy with work. Again, let me know of ANY and ALL issues you encounter. Thanks!
----------, Oct 21, 2018

[3.5.3] Added functionality with WorldGuard:
  • Now, the plugin should work with WorldGuard.
  • If a player shouldn't be building/breaking blocks in a WorldGuard region, then the tree shouldn't fell, the log they hit shouldn't break, and they should get the basic WorldGuard blockbreak error message.
  • PLEASE understand that I have very little experience with WorldGuard, and therefore I could only do minimal testing of this update. If there are ANY issues with my plugin and WorldGuard, or players can STILL break trees in a protected area, you need to let me know of the issues. I will work hard to solve any issues and bugs as quickly as I can, but I can't do that without knowing what those issues are.
**Sorry it took so long to get this update out, I've been extremely busy with work. Again, let me know of ANY and ALL issues you encounter. Thanks!

Edit T+28: I know there are issues that arise when a server DOES NOT have WorldGuard, working on a fix now.
----------, Oct 21, 2018

[3.5.2] Improved how permissions work, cleaned up wording with commands:
  • Changed permissions so that if you have a permissions plugin like LuckPerms or GroupManager, the permission 'tg.user' isn't given to everyone on the server by default. Only to operators. This means:
  • If your server has a permissions plugin, nobody besides operators will be given the 'tg.user' permission by default. You will have to assign it to a permission group. So far, the plugin recognizes PermissionsEx, LuckPerms, and GroupManager as permissions plugins.
  • If your server doesn't have a permissions plugin, then everyone who joins your server will explicitly be given the permission 'tg.user'. I know this might be an issue for those using the permissions.yml file, but this is just a temporary fix. I am hoping to get around this by adding a config setting that lets you toggle whether everyone gets the tg.user permission by default.
  • If you have any suggestions for how to handle this better, then please let me know!
  • Also cleaned up the '/tgconfig' command results to include the new toggle settings
**As always, let me know of any and all bugs you encounter in the discussion section. Thanks!
----------, Oct 12, 2018

[3.5.1] Added commands+tabcompleters for the new config settings:
  • Added them to the '/tgconfig toggle' command, so you can now type:
    • /tgconfig toggle autoreplant
    • /tgconfig toggle saplingdrop
  • Also '/tg settings' will now reflect your server's current config.yml setting for both of the new settings
  • tabcompleters too, oh boy!
**Let me know if you encounter any issues (or have any suggestions) on the discussion page.
----------, Oct 10, 2018

[3.5.0] Added auto replant, couple new config settings relating to it:
  • Added an auto replant function, so saplings are automatically replanted once you chop down a tree. Works for 1x1 and 2x2 trees. Honestly it should work for any size width (base) tree.
  • As a result of autoreplant, there are two new config settings: autoReplant and saplingDrop. Both boolean values, the autoReplant is self explanatory: true if you want trees to replant themselves false if not. Set saplingDrop to true if you want sapling to drop with logs, or false if not.
  • Just to note, autoReplant and saplingDrop are only applicable to Lumberjack methods, not the Gravity method.
  • No commands yet to change the config values for these two new settings yet. No tabcompleters either. Cannot see their current config settings if you type /tg settings either. Will update this in a day or two.
**Sorry about the multiple updates in such a short time, didn't think I'd make this much progress so quickly. As always, let me know of ANY bugs or suggestions on the discussion page. Thanks!!
----------, Oct 9, 2018

[3.4.4] Fixed issue where unbreaking enchantment was ignored:
  • Unbreaking enchantment on axes is now recognized by the plugin, so if you have FairDurability ON then your axe durability will decrease at the different rates depending on its Unbreaking level. Should be almost exactly the same durability as in vanilla minecraft. If this isn't the case please let me know
  • Skipped 3.4.3 since the last update I named the .jar file 3.4.3, but named the Resource Update on Spigot 3.4.2.... so we're just going straight to 3.4.4 and forgetting about that..
**As always, let me know of any issues you encounter or suggestions in the discussion section.
----------, Oct 9, 2018

[3.4.2] Bug fix where unbreakable axes would stop working once they reached the max durability allowed for that axe type:
  • So the unbreakable axes still accumulate durability once they reach the maximum durability for their tool type (iron, diamond, etc.), but they don't break. They just keep accumulating a durability number. This plugin didn't allow axes above or at max durability to fell trees.
  • Fixed this so that once they go above their axe's maximum durability unbreakable axes will still fell trees, and they will also keep accumulating durability above the maximum in relation to the fair durability multiplier.
**Let me know if you encounter any issues on the discussion page. Thanks!
----------, Oct 7, 2018

[3.4.2] Bug fix where unbreakable axes would stop working once they reached the max durability allowed for that axe type:
  • So the unbreakable axes still accumulate durability once they reach the maximum durability for their tool type (iron, diamond, etc.), but they don't break. They just keep accumulating a durability number. This plugin didn't allow axes above or at max durability to fell trees.
  • Fixed this so that once they go above their axe's maximum durability unbreakable axes will still fell trees, and they will also keep accumulating durability above the maximum in relation to the fair durability multiplier.
Let me know of ANY other bugs! Thank you!!

**Deleted this version and uploaded a new 3.4.2, because the .jar file was either broken or exported incorrectly
----------, Oct 7, 2018

[3.4.1] Bug fix for the '/tgconfig toggle updatechecker' command:

  • Would only toggle the config setting once per restart/reload. Fixed it so that it works like the rest of the /tgconfig commands. The plugin reload and config value change should happen immediately.

Also, I set the default value for the update checker config setting to false. Will have to turn it on in game now.

Sorry about that! Let me know if you guys find any more bugs, thanks!
----------, Oct 6, 2018

[3.4.0] New Method, new config.yml setting and command:
  • New method is called "TreeGravity Random", and it drops 20% more or less of the logs actually in the tree. So if a tree has 10 logs, chopping it down will drop 8-12 logs. The config setting for this is tgType = 3, so the new tgType values are as follows:
    • 1 - Lumberjack Classic
    • 2 - Lumberjack Natural
    • 3 - Lumberjack Random
    • 4 - Gravity
  • There is also a new config setting called debugger. Its default value is set to false. With this config setting set to true, when you chop down a tree that tree's type, location, and number of logs will be printed in the server console. If LJ Random is your server's current method, the random number will be printed in console along with the new log number (the amount that are dropped).
  • I also altered the /tgconfig commands too, so there is now a '/tgconfig toggle' command. This will turn the following config settings to true or false depending on the setting's current state: fairdurability, updatechecker, and debugger
  • You can no longer use '/tgconfig set fairdurability' or '/tgconfig set updatechecker'. /tgconfig toggle is now the only way to change these values in-game.
----------, Oct 6, 2018

[3.3.0] Fixed permissions, added new config setting, and other optimizations:
  • Fixed permissions so that:
    • tg.user is checked for when TreeGravity methods are called
    • tg.user is checked when issuing '/tg' commands
    • tg.operator is checked when issuing '/tg reload' command
    • tg.operator is checked when issuing '/tgconfig' commands
  • New config.yml format, so make a copy of and delete your old config. Plan on finalizing the config format within the next couple of updates.
  • New config setting called updateChecker. It's default value is true, and will check for updates (after comparing server's version of TreeGravity to the latest version of TreeGravity). If you don't want the plugin accessing 'https://textuploader.com/d7v57/raw', then make this setting equal to false.
  • Added missing tab completers, so when you type '/tgconfig' the available items should now be: 'set, tools, enable, disable'
  • Added new '/tgconfig' commands for the "updateChecker" config setting
  • Further standardized the use of [TreeGravity]/[TG] in console messages and messages sent to the player. From here on out all messages with a suffix like this should only be [TreeGravity]
  • Condensed and eliminated repeating code.

As always, let me know if you find ANY bugs or issues in the discussion section! Suggestions are always welcome! Thanks!
----------, Oct 4, 2018

[3.2.0] Hotfixes for v3.1.0, and added/fixed Tab Completers:
  • Fixed the config so the toolsAllowed config setting has a proper list of values. Therefore, make a copy of your current config.yml and delete it from your plugins>TreeGravity folder so a new one can generate.
  • Further standardized messages sent to the server and player, particularly when the plugin starts and stops on plugin or server reload.
  • Fixed the existing tab completers with the /tg command, and added more tab completers for the /tgconfig command. Should be much easier to use commands, especially /tgconfig since you dont need to memorize the command arguments anymore.
More coming this week. As always, let me know of ANY bugs you encounter. Also, suggestions are always welcome! Just post in the discussion tab.
----------, Oct 1, 2018

[3.1.0] Quality of Life Update 2: This update includes permissions, commands that allow you to change the config in-game, a new method, and lag reduction code (should help when chopping large trees like jungle or dark oak trees).
  • The lag reduction shouldn't change things too much on the user side, except you'll notice the tree breaks down slower.
  • Permissions added are tg.operator and tg.user. You need tg.operator to access the new commands below. Server operators are given this permission by default. everyone on the server is given tg.user by default, and it allows them to use the /tg commands.
  • New commands mostly allow you to change configuration settings from within the game. Also, there is a command to reload the plugin by itself, so no need to reload the whole server when you're playing around with config settings. When you use one of the commands to change a config setting, the plugin automatically reloads to update the config file. New commands include:
    • /tg reload
    • /tgconfig [enable, disable]
    • /tgconfig set type [1, 2, 3]
    • /tgconfig set fairdurability [true, false]
    • /tgconfig set durabilitymultiplier [w/in 0.5 - 3.0]
    • /tgconfig tools add [any ONE tool]
    • /tgconfig tools remove [any ONE tool]
  • New method is called Lumberjack Natural, so now there are 3 available methods. In the config file they are changed by changing tgType: 1 = Lumberjack Classic, 2 = Gravity, and 3 = Lumberjack Natural.
    1. Lumberjack Classic drops the logs from a tree in an itemstack for the player, and replaces each log with air.
    2. Gravity has logs fall like sand/gravel if a log is broken below it.
    3. The new method Lumberjack Natural, is the same lumberjack function where you hit one log and the entire tree falls down. However, each log breaks naturally, so the logs drop in no uniform fashion since each one drops its item separately from others around it.
Let me know if you find ANY bugs or issues!!! Easiest way is to post on the discussion page! Thanks!
----------, Sep 30, 2018

Added an actual Gravity mode, so logs fall like sand when a log below it is broken. Therefore, new features include:
  • New config setting called: tgType
  • Set tgType to 1 if you want the old Lumberjack/Timber method to work, and set it to 2 if you want to use the new gravity mode. Set it to any other number to disable the plugins methods (plugin will still be running in the background, just won't work.
  • Also, I removed code that enabled anyone to hold a stick and hit a block and receive a message with the block's type and it's X and Z values. Sorry about this, didn't know that was in there.
Issue #1: Currently with the new gravity mode (mode 2) there is no way to detect whether the logs are a part of a tree, so any logs placed on top of each other will fall like gravity when broken with an axe . A way to work around this temporarily is to either just use the old plugin version by setting tgType to 1, or to change the allowed tools to just one type of axe. Then you use just one type of axe for woodcutting and any others for modifying manmade structures, or vice-versa.

As always, let me know if you find ANY bugs or issues in the discussion section. Thanks!
----------, Sep 25, 2018

[2.0.0] Quality of Life Update:
  • Changed the plugin’s version format to the suggested format by Spigot. 1.13.v# was the old format. #.#.# is the new version (2.0.0): Major version 2 (major updates), minor version 0 (minor additions), and release 0 (bug fixes).
  • Changed the mechanic when your tool is at 0 durability: instead of getting the “insufficient durability” message and your tool doesn’t break, now the player doesn’t receive any message and your tool just breaks.
  • Cleaned up the info provided when using the treegravity/tg commands.
**As always, let me know if you encounter any issues on the discussion page. Thanks!
----------, Sep 3, 2018

[1.13.v8] Major Update, new features:
  • Support for mushroom trees added. Unlike normal trees, these break naturally
  • Added a "version checker". Checks whether your server's version of treegravity is updated. Will not automatically update your plugin, but will notify console and the entire server upon server restart whether the plugin is updated or not
  • Changed the commands so there are now subcommands. Basically they just change the old commands which were one word, to being subcommands of the main command /treegravity or /tg.
  • The new commands:
    • /treegravity or /tg
    • /tg info
    • /tg help
    • /tg settings
**Let me know if you encounter any issues on the discussion page. Thanks!
----------, Aug 22, 2018

[1.13.v7.1] Changed the code so that instead of guessing the tree's log structure based on its type, the tree gets "scanned" so that all nearby logs (within 1 block) are located and destroyed.

Main changes:
  • no more floating logs, and thus no more floating leaves
  • acacia trees are now supported
  • ONLY logs and saplings drop upon "felling" a tree, nothing else
  • the simpler code may reduce lag that might've existed prior

Since metadata isn't stored on server restarts i was forced to determine if a log is part of a tree based on how many leaves it has. So extremely small trees or trees with very few leaves (notably acacia and spruce) probably won't fell at all. Also, only logs and 1 or 2 saplings drop upon felling. Vines will not drop anymore, and anything else in the vicinity will not drop except items like cocoa beans (because they're connected to the tree and fall when the tree breaks). Bedrock, stone, dirt, etc. will no longer break at all. If you want to farm vines or grass, you'll need to farm them with shears.

**shortly after this update there was an issue where unless you had a tool allowed to "fell" trees, you couldn't break down a tree at all. not even with your fist. should be fixed now, please let me know ASAP if there's any other issues or if you have suggestions, they can only help the plugin improve.
----------, Aug 18, 2018

[1.13.v7] Changed the code so that instead of guessing the tree's log structure based on its type, the tree gets "scanned" so that all nearby logs (within 1 block) are located and destroyed.

Main changes:
  • no more floating logs, and thus no more floating leaves
  • acacia trees are now supported
  • ONLY logs and saplings drop upon "felling" a tree, nothing else
  • the simpler code may reduce lag that might've existed prior

Since metadata isn't stored on server restarts i was forced to determine if a log is part of a tree based on how many leaves it has. So extremely small trees, while being rare, probably won't fell at all. Also, only logs and 1 or 2 saplings drop upon felling. Vines will not drop anymore, and anything else in the vicinity will not drop except items like cocoa beans (because they're connected to the tree). Bedrock, stone, dirt, etc. will no longer break at all. If you want to farm vines or grass, you'll need to farm them with shears.
----------, Aug 18, 2018

[1.13.v6.1]

1. Fixed the /tgsettings issue where the "allowed tools" would show a line of code (perhaps a hashed message?) instead of the tools that work with the plugin.

2. Made the log dropping more efficient. Instead of dropping each log one by one, the number of logs are counted and then the total amount is dropped at the end. Should cause less lag, especially with tall jungle trees.
----------, Aug 6, 2018

Config now generates with settings:
1. tools that make the plugin work
2. whether "fair" durability is on or off
3. the durability multiplier if fair durability is ON

Default Config:
1. allowed tools: all axes; wooden to diamond
2. fair durability: true
3. durability multiplier: 1.0

Commands:
/tg
/tginfo
/tghelp
/tgsettings
----------, Aug 5, 2018

Versions v4 and below of this mod were made with Java 10. This version (v5) and future versions will work with Java 8.
----------, Aug 2, 2018

Fixed axe durability "stalling" issue at max durability. Disallows the player from chopping down any tree when their axe is at or above full durability, and breaks their axe.
----------, Aug 1, 2018

Added durability to match the amount of logs you're cutting down. So if you chop one Jungle log to knock the whole tree down, giving you 64 logs, your axe durability will be changed as if you manually cut 64 logs.

I will be adding a config to have this as an option eventually. At the moment, once the axe reaches its max durability it "stalls". As in it will probably be at or above max durability for a while (without the axe breaking) if you are only chopping down trees with it. Breaking normal items will eventually cause your axe to break.
----------, Aug 1, 2018

Works now with Dark Oak and Jungle trees. There will still be a few logs, and thus leaves, floating at the very top of the chopped down tree due to the nature of this plugin.
----------, Aug 1, 2018

Eliminates counting how much wood the tree has in its center, and actually drops the items that disappear when you chop down the tree. Leaf blocks aren't dropped, grass blocks are replaced with dirt blocks, but other than that any block in the "disappearing" area will be dropped for the player.
----------, Jul 31, 2018

Resource Information
Author:
----------
Total Downloads: 200,015
First Release: Jul 31, 2018
Last Update: Sep 25, 2021
Category: ---------------
All-Time Rating:
45 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings