Minecraft Data Packs / Other

[Datapack] Deforest Snapshot18w45a+

    • 5,678 views, 1 today
    • 604 downloads, 0 today
    • 7
    • 5
    • 6
    Kaerum's Avatar Kaerum
    Level 16 : Journeyman Miner
    4
    Deforest is a Datapack that adds similar functionality to Timber! and Treecapitator mods.

    Yes, I am aware there is already a Datapack that implements this, but that one does not ignore structures made of logs that are not trees or player built trees. This Datapack SHOULD be able to do that.

    How does it define what is a tree and what is not?

    Starting from the first log block destroyed, the datapack will make its way up searching for adjacent and diagonal blocks that are either a log type or a naturally generated leaf type until it either reaches a search limit ( that can be changed ) or there are no more valid blocks nearby.
      
    Be warned: this does not mean it will never destroy your builds! If you create a structure directly adjacent to a naturally generated tree, made out of any log or leaf block It will still destroy them, as It considers that as part of the tree.

    Cool, you mentioned that the search limit can be changed, how?

    There are a few per-player based variables (scores) that can be changed:

    defor_AWoodenAxe, will allow the use of wooden axe if set to 1. Defaults to 0.

    defor_BreakLeaf, will break leaves if it is set to 1. Defaults to 0.

    defor_MinLeaves, minimum leaf count to decide if what the player is breaking is a tree or not. Defaults to 13.
      
    defor_MaxSearch, maximum VALID blocks to search for starting from the initial block. Valid blocks are leaves and logs. Defaults to 900.

    Decrease this if you are getting too much lag when destroying large trees, never set this limit too high or bad things will happen.

    You change them by changing a specific player score to a valid value, eg.:
    Lets say you want leaves to be destroyed, and your player name is Player123, you use the command
    /scoreboard players set Player123 defor_BreakLeaf 1
    Or you think that the limit is causing annoying lag when breaking a tree
    /scoreboard players set Player123 defor_MaxSearch <VALUE>
    or if you want to modify it for everyone currently on the server
    /scoreboard players set @a <VARIABLE> <VALUE>


    How to install?
    1. Download the datapack.
    2. Place it into your world's datapack folder.
    3. Restart or /reload your server, singleplayer world.

    If you find any problems or have any suggestions, feel free to comment or DM me!
    CompatibilityMinecraft 1.13
    Tags

    3 Update Logs

    Update #3 v1.0.3 : by Kaerum 11/23/2018 11:58:07 amNov 23rd, 2018

    • Changed back drops to drop where the block was broken, instead of going directly into the player inventory. This is to avoid some issues with having a full inventory and because it didn't really feel right to suddenly have items pop up into your inventory silently. Perfomance should be roughly the same as before.
    • Created a global profile for configuration, player specific config overrides global config. This is to fix an issue, if a player joined a server after it loaded, a reload would be needed for the datapack to trigger for them.
    • Fixed an exploit that would make it so you didn't need to break a block to trigger the datapack.
    Planned Changes:
    1. Better limit to how far the algorithm should go
    LOAD MORE LOGS

    Create an account or sign in to comment.

    1
    11/28/2018 12:08 pm
    Level 1 : New Miner
    rtester
    rtester's Avatar
    What am I doing wrong this does not work for me I am in 1.13.2 and I chop a log and nothing happens I tried it with a wooden axe with /scoreboard players set rtester defor_AWoodenAxe, 1, /scoreboard players set rtester defor_BreakLeaf 1 tried it with stone, iron, and diamond axes and still nothing seems to work for me.
    1
    11/28/2018 6:30 pm
    Level 16 : Journeyman Miner
    Kaerum
    Kaerum's Avatar
    As stated in my reply to the comment bellow, a change on how the datapack works has made it incompatible with 1.13.2 in its current version, the linked version still works and has all functionality the most recent one has, except it is laggier when breaking very large trees.
    1
    11/26/2018 10:00 pm
    Level 1 : New Miner
    MR_KIDD1
    MR_KIDD1's Avatar
    Hey so first off I don't really know what this meant when I loaded my server 18:40:55 ERROR]: Couldn't load function at deforest:functions/valid_leaves.mcfunction
    java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 6: Incorrect argument for command at position 161: ...hes 1 run <--[HERE]
    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_191]
    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) [?:1.8.0_191]
    at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:604) [?:1.8.0_191]
    at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) [?:1.8.0_191]
    at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443) [?:1.8.0_191]
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_191]
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_191]
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_191]
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_191]
    Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 6: Incorrect argument for command at position 161: ...hes 1 run <--[HERE]
    at br.a(SourceFile:66) ~[server.jar:?]
    at pp.a(SourceFile:147) ~[server.jar:?]
    at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) ~[?:1.8.0_191]
    ... 6 more

    But then at the end it said it loaded and in gamea ll fo the commands are in butttttt... When I try to do the commands it says this "Unknown command
    ..._BreakLeaf<--[HERE]


    I also dont know how to actual activate it so that I can use it lol like how to get it to work.
    1
    11/26/2018 11:13 pm
    Level 16 : Journeyman Miner
    Kaerum
    Kaerum's Avatar

    Right...I completely forgot to update the title. Since this datapack now uses /loot command, it is now only compatible with snapshot 18w45a and above, sorry about that!
    Meanwhile, while I figure out a way to fix that you can use v1.0.1:

    mega.nz/#!2xBkWKzZ!dNDdON7k7r67-iyOwvoNLMphYQ_no1Rv3z3aCJwwEaA
    It works the same as current version with the only difference being its laggier when breaking trees that are very tall or extense.
    1
    11/22/2018 2:59 pm
    Level 1 : New Miner
    Beaniboi
    Beaniboi's Avatar
    Hey, this datapack seems pretty cool, just one question:
    I can see when you set BreakLeaves to 1 no saplings dropped. Will saplings not drop with BreakLeaves set to 1?
    1
    11/22/2018 5:40 pm
    Level 16 : Journeyman Miner
    Kaerum
    Kaerum's Avatar
    BreakLeaves is not longer the used name, I had to change it cause it was too long, sorry for that. Now it is named defor_BreakLeaf. It should work just like the logs, they go directly into your inventory, if they drop at all.
    Planet Minecraft

    Website

    © 2010 - 2024
    www.planetminecraft.com

    Welcome