[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


    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)

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

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

    Screenshots (open)


    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


    --- Release of the version 1.4.4 on BukkitDev ---

    Perhpas some time for approval I don't know
    bellardie likes this.
  3. Offline


    Umm... there is a problem.
    Lets say I set the charging time to 90 and I set the power draining time to 60.
    While it's charging, the battery is draining very slowly. This shouldn't happen. the battery shouldn't drain while it's activated and charging. please fix this :)
  4. Offline


    the battery is charging AND powering
    so get for example 90 and drain 60 so it drain 30 for your eyes
    bellardie likes this.
  5. Offline


    Thanks for the new release.

    - No download link ( I manually changed the 1.4.3 link to 1.4.4, so I was able to get the build from dropbox) - project not yet approved on dev - maybe that's why
    - No change history providing a description of what changed in this version. It would be incredibly helpful if you would supply a versioned, dated, detailed change history describing changes/fixes, etc. for each release. It's hard to know what to test without a little more information.
    - Does NOT fix the problem where the APXX battery gets stuck while charging (create battery, fly far away and force new chunk loading, come back, battery no longer working) - easy to reproduce for your own testing purposes
    - Seems like chunk loading was globally a little slower, but I may be imagining it. You're not patching/parsing all chunk loading to look for battery unloading are you? That wouldn't be ideal.

    Thanks - look forward to the next release.
  6. Offline


    Well, it is charging and powering but it's still draining the battery very slowly. This shouldn't happen because batteries don't do that. I used [Battery]AA. I made it so the battery is ALWAYS powering the redstone next to it. I was trying to simulate a battery backup but since the battery is still draining from charging and powering. I had to use a circuit to fix this.
  7. Offline


    I don't really understand what's your problem
    can you send screens or something like that plz ?


    For the version and links I've gone on bukkitDev now
    So everuthing is there
    EDIT : It's not yet approved
    Just wait some hours more

    for the problem of chuncks I tried and it works can you send more details ?
    bellardie likes this.
  8. Offline


    Yes - I saw the project on BukkitDeve. However, there is no change history there. Putting the project up on the dev side is great, but not the same as providing a clear change history with each new version. So, exactly what changed in 1.4.4 vs. 1.4.3?

    Here is a template for you:
    [version] [release date] [bukkit version supported]
    1. [change 1]
    2. [change 2]
    3. [change 3]

    The steps to reproduce the problem I mention are the same as those listed above, which I emphasized that you should use for your testing.
    1. Create an APXX battery (my config is charge: 360, power: 10; my test battery was AP50)
    2. Fly far away from the location of the battery and force minecraft to load lots of new data (I used RocketBoots, flew away, and allowed minecraft ot fully redraw the new landscape)
    3. Go back to the battery location - teleport, fly, or whatever...
    Result: the battery is stuck/no longer charging and not at full capacity (Stuck at 13 out of 50 in this case)

    Subjectively speaking, redrawing of new terrain possibly seemed slower with Battery installed. Have you done anything that would cause a slow-down in chunk loading? For example, in order to fix the chunk loading issue, did you add code (a global listener/hook) that gets run on every chunk operation even though no battery is present? I haven't done any exact timed tests with & without...just noticed that chunk loading seemed to slow down a little with Battery installed. Can you confirm any code changes ( a change history would help ) that might involve something which would globally slow down chunk loading? I will try to measure more scientifically when I get a chance - I may be wrong.

    Thanks - I look forward to the next version.
  9. Offline


    You don't know BukkitDev right ?
    The changelog and the news for the release are on the File part

    For the chunks
    The only yhing I did was
    for each battery , if the chunck of this battery is not loaded --> load it
    I do not search on chucns or arnyrhing else

    For the errors I'll see that but I've some work to do before (Yes it will be hard ^^)
    bellardie likes this.
  10. Offline


    I see - the "file part" is not visible to me since the project is not approved. OK - I will wait to see.

    So...there *might* be some performance implications related to your change - "if the chunk is not loaded, then load it" but I don't know.

    If the chunk is being continuously unloaded (by flying away and forcing new chunk loading) and there is a check to see if it is unloaded, then it will load and then get unloaded again. Then, when the check sees it's unloaded, it will load it again, etc. meaning that whenever there are operations that unload chunks, like trying to draw lots of new ones - it may be causing a performance hit by interfering with chunk loading. Just a guess based on what seemed like slower performance. You might need a different conceptual method to fix the problem if any of this is really happening and if I did really see a slowdown.
  11. Offline


    Ok I'll see perhaps on the unloading of the chunks to cancel it
    bellardie likes this.
  12. Offline


    Show Spoiler

    You see, I want a bettery that is charging and powering at the same time without draining the battery (while it's on AutoActivation). The battery should charge without draining the battery.
    I have to make this circuit if I don't want the battery to not drain the battery while it's charging
    Show Spoiler

    If I just do it like this, the battery will drain while it's charging and powering
    Show Spoiler

    Still don't get what I'm saying?
  13. Offline


    You can just make an ingenious calculation to set the Time of discharge like that

    Charge : C sec
    Discharge : D sec
    1% of charge = C/TimeCheck
    1% of discharge = D/TimeCheck - C/TimeCheck
    bellardie likes this.
  14. Offline


    j'aimerais bien sa que quelle q'un sorte la mise a jour de ce packet pour la version 1.8.1 Car tres utilie mais les param├Ętre ne marche pas :(
  15. Offline


    Please speak english

    What is not working
    I'm actually busy but I'll recode everyhting in the next week
    bellardie likes this.
  16. Offline


    plz for my minecraft
    do you can add option to uncharge battery when my switch or redstone is connect and power on

    redstone is on​

    :) thx you i love you plugin is freaking good ideal

    and please if you have tutoriel who to put option on battery because 1.8.1 not work
  17. Offline



    What you want is already existing (it's autoActivation)
    bellardie likes this.
  18. Offline


    Nice plugin :) It is very helpful for future servers.
  19. Offline


    do you can teach me whit a screenshot who add option on the sign

    ahhhh!!! you need to write AA and not AutoActivation XD dahh im so bad
  20. Offline


    I've perhaps find where the problem is.
    Now trying to find a solution
  21. Offline


    --- Release of the version 1.4.5 ---

    Should work now (I hope)
    Some more things too

    Have Fun !
  22. Offline


    Please look at the BukkitDev poll and please vote
    I need answers before coding something nice
  23. Offline


    hi there im new to this, could you give me a simple explanation on how to make a battery, i dont quite get it. thanks m8
  24. Offline


    Just place a block (by default lapis block) and put a sign on it with the first line [Battery]

    Look at the Bukkitdev project to see screens
  25. Offline


    thank you soo much m8, i thought it was blue wool at first lol. nice1
  26. Offline


    Love this plugin in, works great wit hthe lightning tower, but when i do the AA thing, it does not work when i apply a pwered wire to tthe back of the block, how can i make this work?
  27. Offline


    Is there AutoActivation written on the Battery ?
  28. Offline


    when i write AutoActivation it disapears and then when i aplly power it says 'charging...'
  29. Offline


    Just read the Parameters Section
    The Usage is written
    Usage : AA
  30. Offline


    amazing plugin its really good but i only works to activate furnaces or anything more?
  31. Offline


    It permits to activate furnaces and Redstone wires
    It can be scheduled with an AutoPower setting
    And functions like a AND gate (with power) if you put the AutoActivation
    bellardie likes this.

Share This Page