[FUN/MECH] Battery - Store and Release the Power of Redstone [1.5.1]

Discussion in 'Archived: Plugin Releases' started by rominos2, Jun 23, 2011.

  1. Offline

    rominos2

    Battery - Store and Release the Power of Redstone
    Version : 1.5 (Power Plant Edition)

    This plugin is now on BukkitDev

    Old Post


    Create batteries.
    Catch any redstone activity in a battery and release it later with a lever.
    For example, you can use it with my ThunderTower plugin.

    Features :
    • Create Batteries with a block, a sign, and a lever
    • Save it in a flatfile
    • Charge your battery
    • Uncharge it
    • Full configurable
    Download Links :

    Battery v1.4.3


    How To Use :
    • Place a Battery Block (configurable)
    • Put a Sign with the first line [Battery]
    • Optional : See the Parameters section to make special batteries
    • Let's charge with redstone on the left side (redstone wire) or with an active furnace
    • Click on the Sign yo power on the right side (redstone wire) or a to active a furnace
    Parameters on Sign :

    All the Parameters can be written on the second line of the Battery sign on the creation of the Battery
    Only One parameter can be set for a battery

    Params (open)

    AutoPower
    Battery will automaticly uncharge it when arrive to a define level
    Usage : APxx when xx is the specific level

    AutoActivation
    Battery will uncharge it only if a redstone wire is powering the back of the battery
    Usage :AA

    Screenshots:
    Screenshots (open)

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    Todo :
    • Load Batteries Chunks
    Known Issues :

    • No more
    ChangeLog :

    Version 1.4.3 (11-09-2011)
    • Fix the remaining problems with the CurrentModificationException
    • The timeCheck is no more in miliseconds but now in 1/20 seconds (10 = 0.5sec)
    ChangeLog (open)



    Version v1.4.2 (09-09-2011)
    • Code cleaning of the remaining classes
    • Fix a lot of bugs
    Version 1.4.1(08-09-2011)

    • Enormous Code Cleaning
    • Fix battery loose problem
    • Fix AP Problem
    Version 1.4(05-09-2011) (Furnace Edition)

    • Add furnace powering
    • Add AA param (AutoActivation) on a battery to activate it with a redstone current on the back of the block
    Version 1.3(28-08-2011) (Timer Edition)

    • Some code cleaning
    • Add Furnace charging
    • Add AutoPower to X% with the parameter APXX (where XX is the number)
    Version 1.2.2(27-07-2011)

    • Perhaps fix the non charging error
    • Delete batteries instead of spamming the console don't finding them
    Version 1.2.1(13-07-2011)

    • Fix a little bug in the configs on the plugin loading
    Version 1.2(09-07-2011) (St-Evarzec Edition)

    • Rewrite of the energy support (using my own RedstoneManager)
    • Delete of the AutoPower configs in properties
    • Add AutoPower optional on Batteries Sign
    Version 1.1(27-06-2011)

    • Fix the right Click issue
    • Add an autoPower config to deliver power when charged at 100%
    Version 1.0(23-06-2011)

    • Just the release of this awesome plugin


     
  2. Offline

    nausir

    hey i used this plugin and the wireless redstone one and made a power plant so just wanted to say thanks if you want to know about my power plant i can take a video or something
     
  3. Offline

    rominos2

    @yakasuki
    Thanks I apreciate feedbacks like that

    @nausir
    I don't really get what you did but every screens or vids are welcome
     
    bellardie likes this.
  4. Offline

    M4xwellou

    Hey man, first, thanks a lot for making this. That's what I needed.

    Second, juste to let you know that it constantly stops during charge. I also had a major server crash and could'n"t take the error message !
    As soon as I have one, i'll post it here ! :)
     
  5. Offline

    rominos2

    @M4xwellou
    A major crash ?
    An error ?
    That's cool for me (not for you) because there an error log so I can see whre is the problem
    I'm actually coding the new version with furnace charging (done)

    But I have a major problem with the redstone activation you asked for

    For the moment, it can be activated by redstone but when it's not activated and when you click on the sign, it's still not activated by redstone so it don't active (have the same problem with autoPower)

    It's why I ask you some more details on the way you want the redstone activation
     
    bellardie likes this.
  6. Offline

    M4xwellou

    Hey, I thing that's what i got :)
    For information, tha battery charging configuration was set on 1600 seconds, so thirty minutes !
    The first two error was during 69%.
    Then I set the timer on 15 and 5 minutes but I got the same error ! (This time, not àat 69% of charge)


    [SEVERE] Exception in thread "Timer-1"
    2011-08-18 16:39:02 [SEVERE] java.util.ConcurrentModificationException
    2011-08-18 16:39:02 [SEVERE] at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
    2011-08-18 16:39:02 [SEVERE] at java.util.HashMap$KeyIterator.next(Unknown Source)
    2011-08-18 16:39:02 [SEVERE] at java.util.AbstractCollection.toArray(Unknown Source)
    2011-08-18 16:39:02 [SEVERE] at java.util.ArrayList.<init>(Unknown Source)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:42)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.k(World.java:453)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:428)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.k(World.java:453)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:432)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.k(World.java:453)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:432)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.update(World.java:401)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.setData(World.java:343)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:118)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:156)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:156)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:156)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:156)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:156)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:156)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:41)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.k(World.java:453)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:429)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.k(World.java:453)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:428)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.update(World.java:401)
    2011-08-18 16:39:02 [SEVERE] at net.minecraft.server.World.setData(World.java:343)
    2011-08-18 16:39:02 [SEVERE] at org.bukkit.craftbukkit.block.CraftBlock.setData(CraftBlock.java:57)
    2011-08-18 16:39:02 [SEVERE] at org.bukkit.craftbukkit.block.CraftBlockState.update(CraftBlockState.java:182)
    2011-08-18 16:39:02 [SEVERE] at org.bukkit.craftbukkit.block.CraftSign.update(CraftSign.java:33)
    2011-08-18 16:39:02 [SEVERE] at org.rominos2.Battery.BatteryTimer.updateSign(BatteryTimer.java:81)
    2011-08-18 16:39:02 [SEVERE] at org.rominos2.Battery.BatteryTimer.updateBattery(BatteryTimer.java:75)
    2011-08-18 16:39:02 [SEVERE] at org.rominos2.Battery.BatteryTimer.run(BatteryTimer.java:47)
    2011-08-18 16:39:02 [SEVERE] at java.util.TimerThread.mainLoop(Unknown Source)
    2011-08-18 16:39:02 [SEVERE] at java.util.TimerThread.run(Unknown Source)
     
  7. Offline

    rominos2

    @M4xwellou
    Arg !
    that's he biggest error I ever seen ^^
    Let's search !
     
    bellardie likes this.
  8. Offline

    Chr0nos

    hi, i like you're plugin but it is possible to make the battery working like that:

    if (battery.powered) forwad_power();
    else use_battery_power();

    then clicking on the sign will be useless, i"m tring to use battery to make a "timed" signal
    a good think will be to be able to make "custom" baterry like "if charged at X % -> start auto powering"

    what do you think about it ?
     
  9. Offline

    rominos2

    @Chr0nos
    I don't really understand the first part of your post

    But the AutoPower at X% is very interesting
    I add that to the Todo List

    @M4xwellou
    How many batteries do you have ?
     
    bellardie likes this.
  10. Offline

    M4xwellou

    only one ;)
     
  11. Offline

    Arkamond

    What method is used to process the redstone? If you dont mind answering.
     
  12. Offline

    rominos2

    @Arkamond
    I just modify the data of the redstone block to 15
    Was that your question ?

    --- Release of the version 1.3 --- Timer Edition ---

    New good features

    AutoPower at XX%
    Furnace Charging

    Have Fun !

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
    bellardie likes this.
  13. But I can also set a redstone torch ?
    than i don't set a battery ?
    What then makes for a sense
     
  14. Offline

    rominos2

    bellardie likes this.
  15. Offline

    M4xwellou

    YAY !
    Does that solve my problem ? :p
     
  16. Offline

    rominos2

    @M4xwellou
    I don't really know
    There is only a little bit of info for me in the error log
    Just try and send me the errors if it's still having issues
     
    bellardie likes this.
  17. Offline

    M4xwellou

    Ok i'll try it right now and let you know :)
     
  18. Offline

    rominos2

    bellardie likes this.
  19. Offline

    M4xwellou

    Just had this (sorry :p)

    Do you also need extra info ? Like what plug-ins am I using, what's next to the battery, what's attached after the battery etc ?

    [SEVERE] Exception in thread "Timer-1"
    2011-08-29 11:16:43 [SEVERE] java.util.ConcurrentModificationException
    2011-08-29 11:16:43 [SEVERE] at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
    2011-08-29 11:16:43 [SEVERE] at java.util.HashMap$KeyIterator.next(Unknown Source)
    2011-08-29 11:16:43 [SEVERE] at java.util.AbstractCollection.toArray(Unknown Source)
    2011-08-29 11:16:43 [SEVERE] at java.util.ArrayList.<init>(Unknown Source)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:42)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:434)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:436)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:436)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:434)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:437)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:439)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:434)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.update(World.java:407)
    2011-08-29 11:16:43 [SEVERE] at net.minecraft.server.World.setData(World.java:349)
    2011-08-29 11:16:43 [SEVERE] at org.bukkit.craftbukkit.block.CraftBlock.setData(CraftBlock.java:57)
    2011-08-29 11:16:43 [SEVERE] at org.bukkit.craftbukkit.block.CraftBlockState.update(CraftBlockState.java:182)
    2011-08-29 11:16:43 [SEVERE] at org.bukkit.craftbukkit.block.CraftSign.update(CraftSign.java:33)
    2011-08-29 11:16:43 [SEVERE] at org.rominos2.Battery.BatteryTimer.updateSign(BatteryTimer.java:81)
    2011-08-29 11:16:43 [SEVERE] at org.rominos2.Battery.BatteryTimer.updateBattery(BatteryTimer.java:75)
    2011-08-29 11:16:43 [SEVERE] at org.rominos2.Battery.BatteryTimer.run(BatteryTimer.java:47)
    2011-08-29 11:16:43 [SEVERE] at java.util.TimerThread.mainLoop(Unknown Source)
    2011-08-29 11:16:43 [SEVERE] at java.util.TimerThread.run(Unknown Source)
     
  20. Offline

    rominos2

    @M4xwellou
    There is a problem with the sign
    Is there a sign on the battery ?
    Are you modifying the sign ?

    It seems bukkit do not want to let me write on the sign ^^
     
    bellardie likes this.
  21. Offline

    M4xwellou

    Yep !
    Like you said i made a
    [Battery]
    AP

    Also it's auto powering after 1600 secondes and must discharge in 1 second.
    It's activated by a lever => redstone => Battery => redstone => engine
     
  22. Offline

    rominos2

    @M4xwellou
    In fact another plugin is modifying the sign in the same time
    Can I have a list of your plugins ?
     
    bellardie likes this.
  23. Offline

    M4xwellou

    Ok ! So here's what I have (with links and what they use to simplify your life :) :

    ChestLock (since yesterday so that can't be it since I got this problem way before, right ? Also, not using any signs)
    ChestShop (use signs)
    Citizens (got the problem with Battery 1.2 way before installing this plugin, not usins signs)
    CitizensSpout (got the problem with Battery 1.2 way before installing this plugin, not using signs)
    CookieMonster (one of the first plugin, not using any signs)
    CreativesGates (one of the first, not using any signs)
    Death & Rebirth (not using any signs)
    Essentials (Do I have to precise ? Ok, not using any signs :p)
    iConomy (linked to chestshop, but not using any signs by him alone)
    iQuest (Given by NPC's, so not using any signs)
    mcMMO (Not using any signs)
    Permissions (Sorry but... can't find myself in the mess of Permissions Plug-ins that exists in bukkit, that's the default anyway, not using any signs)
    Residence, not using, BUT linked with Residencesigns (use signs)
    Spire, not using signs, that's in fact the thing I'm trying to use with your plug-in
    Spout (not using any signs)
    Wireless redstone (use signs)
    WorldEdit & WorldGuard (I think it's not necessary to post the link :)

    That's all ! :)
    Thanks in advance ;)
     
  24. Offline

    rominos2

    @M4xwellou
    I don't promise anything but I'll stop to force sign update in the next releases
    So if it don't want to update, it won't update and won't spam the console

    PS : Essentials use signs !
     
    bellardie likes this.
  25. Offline

    Deh'Ja

    Thx for the plugin.
    Possible to add a feature to feed the furnaces with a battery?

    Battery ---> Redstone ---> Furnaces

    Sorry for my english, i am French
     
  26. Offline

    M4xwellou

    Français aussi :p
     
  27. Offline

    Deh'Ja

    cool :)
    Ta pas des plugin aussi fun que celui-ci et l' "attireur" de foudre à faire connaitre des fois stp ? ^^
     
  28. Offline

    rominos2

    @Deh'Ja
    Seems a bit hard to code
    I'll look at this

    @M4xwellou
    @Deh'Ja
    Please speak in english , it's an english forum
    I'm french too but I do as I can
     
    bellardie likes this.
  29. Offline

    Deh'Ja

    ok thank you:)
     
  30. Offline

    jack3456

    Thanks for the battery u got there ;)
     

Share This Page