[INACTIVE][MECH] Redstone sponges! v0.6 - Makes sponges react to redstone! [440]

Discussion in 'Inactive/Unsupported Plugins' started by Mattie112, Jan 24, 2011.

  1. Offline

    Mattie112

    Redstone sponges! - Makes sponges react to redstone!

    Version:
    v0.6 - Download
    v0.45 - Download
    v0.4 - Download
    v0.3 - Download
    v0.25 - Download
    v0.2 - Download
    Source-Code is inside the jar-file!

    In Short:

    This plugin allows to let sponges react to redstone! (oh and it also let the sponges work like in the classic MC)
    A sponge with NO power == a sponge and sucksup (default) 3 block of water/lava, however apply a redstone current to it and it stops to work! So letting all water/lava trough! You can also choose any id you want the sponge to convert into (and even use wool-colours)

    Features:
    • Sponges remove water and lava (3 blocks by default)
    • A unpowered sponge works like a sponge!
    • A powered does NOT remove any water
    • Think of the nice things you can make :) shower, 'door', traps, ...
    Config file:

    Config file (open)

    This is the default config file created by the plugin:
    Code:
    #Minecraft bukkit server plugin properties
    #RedstoneSponge Plugin!
    #Sun Feb 06 17:53:58 CET 2011
    convert-id=35
    water-sponge=true
    redstone-sponge=true
    convert-when-powered=false
    sponge-radius=3
    lava-sponge=true
    wool-colour=YELLOW
    
    convert-id -> let you choose the ID you want the sponge to convert to.
    water-sponge -> enables or disables the water-sponge.
    redstone-sponge -> enables or disables redstone support.
    convert-when-powered -> set this to 'true' to let the sponge convert to any ID you choose!
    sponge-radius -> the radius of the sponge :) (note the sponge counts as 1)
    lava-sponge -> enables or disables the lava-sponge
    wool-colour -> if you choose convert-id 35 then you can set the colour of the wool you want!

    Available colours:

    WHITE, ORANGE, MAGENTA, LIGHTBLUE, YELLOW, LIME, PINK, GRAY, LIGHTGRAY, CYAN, PURPLE, BLUE, BROWN, GREEN, RED,
    BLACK



    Changelog:
    Version 0.1
    • Releasing of the plugin
    Version 0.2

    • You can now place redstone UNDER and ON TOP of the sponge/wool
    • It only converts YELLOW wool
    • java-code improved :)
    Version 0.3

    • Added serveral extra options in the config file
    • Sponge stays sponge, no need to convert to cloth
    • Used the new "isBlockPowered()" instead of checking if there is any redstone near the sponge (better performance)
    Version 0.4

    • Several fixes: automatic config file creation, debug messages, not-converting cloth
    • You can now set "convert" to true or false to choose what you want!
    • You can now choose the ID you want the sponge to convert to
    • If you choose ID 35 (wool) you can set the wool-color ("YELLOW,LIME,...")
    Version 0.45

    • Fix for bukkit 293!
    Version 0.6

    • Fixed for #440
    • Removed the stupid long blah blah blah...
    Todo:

    • Not just convert to cloth but set the range to 0 or something 
    • Add config file to change the range
    • Let the users decide what range on power (0 default) and what on unpowered (3 by default)
    Bugs:

    • Placing a redsone-torch ON the block WILL power it. However removing the torch doesn't seem to generate a event so the block will NOT convert back to sponge. Redstone on the side should work fine though, aswell as a lever on any side.
    edit:

    Feel free to copy/paste/use my code (just include my name "Matthijs/Mattie112" somewhere in the source) (basicley this licence: http://creativecommons.org/licenses/by-nc-sa/3.0/ will add this in the source)
     
  2. Offline

    Bliss

    Yes! Thank the lord!

    I *need* this plugin!
     
  3. Offline

    Redhaze

    how you install this??
     
  4. Offline

    Bilbo_248

    This plug-in cause many many many crash on my server.
    --- merged: Mar 1, 2011 12:26 PM ---
    And high cpu usage..
     
  5. Offline

    TrueEdge

    Can you please stop using " the stupidly long constructor com.bukkit.Matthijs.RedstoneSponge.RedstoneSponge(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader)" it "is no longer recommended."......"(Nothing is broken, we just like to keep code clean.)"

    Thanks. =)
     
  6. Offline

    Mattie112

    The plugin works @ build #440 however not at the new recommend build #493.
    I fixed TSLC and if i don't fix it for #493 today i'll upload the current version.
     
  7. Offline

    Bliss

    Awesome! Thanks!
     
  8. Offline

    Itssnowing

    How does one obtain the sponges? Do you have to hack them in?
    --- merged: Mar 4, 2011 8:20 PM ---
    Will this be updated to work with 440+ anytime soon?
     
  9. Offline

    JonReed

    I hope so, it was a great help with building dungeons and underwater traps/puzzels
     
  10. Offline

    jascotty2

    tested using .45 with last week's craftbukkit build

    powered yellow wool only deletes water in a 1-block radius, and doesn't keep it removed
    powered sponges do not allow water to fall onto them from above
     
  11. Offline

    TheDarkness73

    When the server starts up, I get this in the server log
    Code:
    ... 8 more
    2011-03-05 18:57:29 [SEVERE] Could not load plugins\Sponge.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:80)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:129)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:94)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.bukkit.Matthijs.RedstoneSponge.RedstoneSponge.<init>()
    at java.lang.Class.getConstructor0(Class.java:2706)
    at java.lang.Class.getConstructor(Class.java:1657)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:75)
    ... 8 more
    2011-03-05 18:57:29 [INFO] Big Catch version 0.3_1 is enabled!
    2011-03-05 18:57:29 [SEVERE] PLAYER_COMMAND loading bSwarm v0.3.2 (Is it up to date?)
    java.lang.NoSuchFieldError: PLAYER_COMMAND
    at com.bradsproject.BradleyJewell.bSwarm.bSwarm.onEnable(bSwarm.java:53)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-03-05 18:57:29 [INFO] [ColorMe] v1.0 has been enabled.
    2011-03-05 18:57:29 [INFO] CraftBookCommon 3.0-alpha1 enabled.
    2011-03-05 18:57:29 [INFO] CraftBookCircuits 3.0-alpha1 enabled.
    2011-03-05 18:57:29 [SEVERE] com/sk89q/worldedit/Vector loading CraftBookCircuits v3.0-alpha1 (Is it up to date?)
    java.lang.NoClassDefFoundError: com/sk89q/worldedit/Vector
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:30)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at com.sk89q.craftbook.bukkit.MechanicListenerAdapter.register(MechanicListenerAdapter.java:66)
    at com.sk89q.craftbook.bukkit.CircuitsPlugin.onEnable(CircuitsPlugin.java:51)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.ClassNotFoundException: com.sk89q.worldedit.Vector
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:30)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 24 more
    
     
  12. Offline

    Mattie112

  13. How's the update for 493 coming?
     
  14. Offline

    TankFox

    Would it be possible to include a per-sponge configuration option via signs attached to the side of the block? I have some situations where I need gigantic area clearing anti-water blasts and some situations where I simply want to clear out an airlock, but I can't have both at the same time due to them all sharing a pre configured range!
     
  15. Offline

    Bliss

    Yes, it should be possible after taking a look at the source. But on the other hand, i'm not the developer, so I'm not the one programming it!
     
  16. Offline

    Mattie112

    Well, that's an interesting idea.
    I'm having doubts. It sure could be done however in that case i need to 'store' the sponges in somekind of tekstfile. I always wanted to keep it as lightweight as possible. Also because of the many changes in bukkit/craftbukkit i didn't fix the plugin yet. It just doesn't work anymore. I really hope i'll be able to fix it soon because i use it myself aswell :)

    I keep you posted!
     
  17. Offline

    Bliss

    @Mattie112

    Maybe in the function where you preform the flow canceling, you can do a quick search of all the blocks near the sponge to see if there is a sign, and if that sign matches the format for radius specification. If it does, then that sponge should only use that radius.

    idk, that's probably what I would do, but I'm an amateur programmer, so take it with a bucket of salt.
     
  18. Offline

    Mattie112

    That's an idea, but in that case it won't 'remember' is if the server-restarts. So if i want that to work i need to 'save' it.
    Ah well, first i need to just 'fix' the plugin (working on it) then i 'll look into that!
     
  19. Offline

    Bliss

    Cool, i'm looking forward to that.

    I think i'm only going to update my bukkit server when your mod works with the new version, because as it is, your mod is single-handedly the most important one on my server. Mostly because it makes most of the traps in my dungeon work!
     
  20. Offline

    Bakuhatsu

    I have no idea if it's your plugin itself which is "saying" this or another plugin I use causing it. But whenever a sponge is stopping a waterflow it says: is event canceled: true, in the console

    In the plain cmd console it only tells it once, but if I start up with a gui console, for example Crafty it spams it like 6 times per second, i'm using build 552.

    Edit: It does spam the plain cmd console tons eventually too.
     
  21. Offline

    Mattie112

    What version did you downloaded?
     
  22. Offline

    Bakuhatsu

    The latest version you've got up.
     
  23. Offline

    T1tan1umTurtl3

    i realy love this pluging and it worked so good that it damaged the map the default radius was set to 15 and not 3 i never edded the seting i just pluged it in and ran it. Now i have a 30x30 hole in my ocean where water was. it upset me and my freind.it allso spamed my console with the following code 400+ times and laged the server (i think)[sponge] How do i fix this?!?!!?
    Code:
    [INFO] is event cancelled: true
    2011-03-20 16:10:36
    [​IMG]
     
  24. Offline

    Bakuhatsu

    Made a temporary fix, deleted the part that prints the message.

    I recompiled everything and it was my first time so... you're still stated as the author in the file I recon.
     

    Attached Files:

  25. Offline

    MasterMeNL

    I want this to be kept updated, this plugin is so damn useful for underwater building. :/
     
  26. Offline

    Bakuhatsu

    It still works for 556+ though, and the spam issue I made a temporary fix for which I attached a file for above.
     
  27. Offline

    but2002

    Anyone feel like making a fix for 600+?
     
  28. Offline

    admalledd

    I'm not that good at java programming, however, my players really wanted this plugin, so I updated it myself.
    download I offer no support, but so far there have been no porblems.
     

Share This Page