Instant Decay

Instant Decay

This plugin makes leaves decay instantly when destroying logs from trees.

It uses the code which Minecraft itself uses to detect leaves and logs.

It also triggers and obeys the LeavesDecayEvent so other plugins can prevent these leaves from decaying if they need to (for whatever reason).


Features

  • Uses Minecraft decay logic
  • Drops are exacly the same as normal decay
  • It will not affect leaves placed by players
  • 10% chance for each leaf to make a break particle+sound effect
  • Plays nice with other plugins by sending leaf decay events
  • Uses only Bukkit API so it will not break with future updates !


Commands

  • /instantdecay disable - disables the plugin's events and remains disabled after "reload"
  • /instantdecay enable - re-enables the plugin
    Commands have permission "instantdecay.admin" and is defaulted to OP.


Demonstration video


Installing and using

  • Download jar file and place it in your "plugins" folder.
  • Run/restart the server and that's it !


Source code

As always, in the jar file.

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of PlanarWarp PlanarWarp Apr 08, 2014 at 02:26 UTC - 0 likes

    Because this doesn't affect 1.7 trees and leaves, I've updated it here.
    Changelog:

    • Updated to include 1.7 trees
    • removed usage of deprecated API methods

    Edit: Direct link to compiled binary has been removed. If you do want a build, feel free to PM me. Bear in mind that these builds would not be approved by Bukkit staff and could contain malicious code.

    Last edited Apr 10, 2014 by PlanarWarp: Link to binary removed entirely.

    EnchantedFurnaces: Because pickaxes can only do so much.

  • Avatar of DarkFoxDie DarkFoxDie Jan 05, 2014 at 17:50 UTC - 0 likes

    1.7.2 is the ultimate test for it though as there has been the most ever changed in the minecraft code

  • Avatar of herweg herweg Jan 03, 2014 at 22:01 UTC - 0 likes

    Just sharing some information: This plugin is working properly with Minecraft update 1.6.4 version. I also tested it with 1.7.2 version and.. the plugin works properly. :) Thank you for your plugin THDigi. Regards, Herweg

  • Avatar of THDigi THDigi Mar 21, 2013 at 23:32 UTC - 0 likes

    Well, I've uploaded a newer version, it needs approving :}

    The good news is that it works with 1.4.7, 1.5 and future versions !

  • Avatar of Mcpl3y Mcpl3y Mar 21, 2013 at 19:19 UTC - 0 likes

    Update plz.Great plugin =)

  • Avatar of THDigi THDigi Feb 04, 2013 at 13:28 UTC - 0 likes

    @Doompants409: Go

    Yep, CB now has strict code modification rules, plugin updated for CB 1.4.7-R1.0 !

    Last edited Feb 04, 2013 by THDigi
  • Avatar of Doompants409 Doompants409 Nov 12, 2012 at 01:58 UTC - 0 likes

    Hi! Don't know if you are updating this plugin anymore, but it appears to have broken with Minecraft update 1.4.2 (and Craftbukkit RC2.0 for 1.4.2)

    Here's the error we get whenever anyone interacts with trees now:

    17:53:49 [SEVERE] Could not pass event BlockBreakEvent to InstantDecay v1.0
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:341)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62)
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:477)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:462)
            at net.minecraft.server.ItemInWorldManager.breakBlock(ItemInWorldManager
    .java:278)
            at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:205
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:552)
            at net.minecraft.server.Packet14BlockDig.handle(SourceFile:46)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:282)
            at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:111)
            at net.minecraft.server.ServerConnection.b(SourceFile:35)
            at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30)
            at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:578)
            at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:215)
            at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:495)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:428)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:818)
    Caused by: java.lang.NoSuchMethodError: net.minecraft.server.World.c(IIIIII)Z
            at digi.instantDecay.InstantDecay.blockBreakEvent(InstantDecay.java:42)
            at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:339)
    

    Hope you get the time to update! I've always found this to be a great little mod. Thanks :D

  • Avatar of shukamu shukamu Sep 11, 2012 at 16:52 UTC - 0 likes

    2012-09-11 10:47:17 [SEVERE] Exception in thread "pool-1-thread-1522" 2012-09-11 10:47:17 [SEVERE] org.apache.commons.lang.UnhandledException: Plugin InstantDecay v1.0 generated an exception while executing task 718378 at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(Unknown Source) at java.util.ArrayList$Itr.next(Unknown Source) at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:611) at org.bukkit.craftbukkit.CraftWorld.playEffect(CraftWorld.java:761) at org.bukkit.craftbukkit.CraftWorld.playEffect(CraftWorld.java:734) at digi.instantDecay.InstantDecay.checkLeaves(InstantDecay.java:143) at digi.instantDecay.InstantDecay.access$0(InstantDecay.java:65) at digi.instantDecay.InstantDecay$1.run(InstantDecay.java:57) at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:52) at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) ... 3 more

    Too much it in log.

  • Avatar of Guswut Guswut Sep 04, 2012 at 19:26 UTC - 0 likes

    Mm, strange: McMMO's lumberjack ability seems to cause oak saplings to drop no matter the tree type, although I have not found any apples from other trees. I will play around with the dynamics of it, and see if I can get any apples as well, or if it's just the saplings. Thanks.

  • Avatar of Guswut Guswut Sep 04, 2012 at 19:13 UTC - 0 likes

    Are you psychic? I was looking for a good plugin to do exactly this a few days ago. This works wonderfully, thank you!

Facts

Date created
Sep 01, 2012
Category
Last update
Mar 21, 2013
Development stage
Release
License
GNU General Public License version 2 (GPLv2)
Curse link
Instant Decay
Downloads
2,921
Recent files
  • R: v1.3 for 1.5.1 Mar 21, 2013
  • R: v1.2 for CB 1.4.7-R1.0 Feb 20, 2013
  • R: v1.1 for CB 1.4.7-R1.0 Feb 04, 2013
  • R: v1.0 for 1.3.2 Sep 01, 2012

Authors