[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

    mattylight

    Would it be possible to make batteries larger than one block or be able to place batteries next to and/or on top of each other, having them charge from a single input and discharge to a single output?

    My thought was that an array would charge right to left and discharge left to right... It wouldn't care where the input was on the left of a stack of batteries, but it would detect where the output (bottom or top, not in between) is and have that be the last block to discharge

    Simple example: (-> represents incoming or outgoing current)
    [0][0][0]
    ->[0][0][50]
    ->[0][0][100]
    ->[0][50][100]
    [100][100][100]
    [50][100][100]->
    [0][50][100]->
    [0][0][50]->

    I'm loving this mod! Thanks!
     
  3. Offline

    rominos2

    @mattylight

    It's very interesting but also very hard to do
    I'll look at that after the fix of the problem encountered
     
    bellardie likes this.
  4. Offline

    ndoorn

    when i use the battery plugin it is working fine, only i see a impossible thing happening. When a battery with AA in it and is powered from the rear it keeps active (right) even when the battery is empty. please fix this?
     
  5. Offline

    rominos2

    --- Release of the version v1.4.2 ---

    I made the code cleaning of the two main remaining classes
    It should fix some problems

    I hope it will help you

    BTW I made a awesome music player with batteries and note blocks but I've some problems with CamStudio and my Sounds on my computer so I cannot record it ^^

    Have fun !
     
    bellardie likes this.
  6. Offline

    M4xwellou

    @rominos2

    Testing it right now
    Ok I think it's the same thing as before but here's what I got :)

    2011-09-09 20:47:31 [INFO] [Battery] A Battery has been created by M4xwellou in proximity at -112.0,102.0,-215.0.
    2011-09-09 20:48:19 [INFO] [Seasons] Seasons in New_Skysura changes to Dry Season.
    2011-09-09 20:49:21 [SEVERE] Exception in thread "Timer-0"
    2011-09-09 20:49:21 [SEVERE] java.util.ConcurrentModificationException
    2011-09-09 20:49:21 [SEVERE] at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
    2011-09-09 20:49:21 [SEVERE] at java.util.HashMap$KeyIterator.next(Unknown Source)
    2011-09-09 20:49:21 [SEVERE] at java.util.AbstractCollection.toArray(Unknown Source)
    2011-09-09 20:49:21 [SEVERE] at java.util.ArrayList.<init>(Unknown Source)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:42)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:434)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:435)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:436)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:438)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:435)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:439)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:434)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:434)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:434)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:435)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:438)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:434)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:435)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:438)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:436)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:435)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.k(World.java:459)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.applyPhysics(World.java:434)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.update(World.java:407)
    2011-09-09 20:49:21 [SEVERE] at net.minecraft.server.World.setData(World.java:349)
    2011-09-09 20:49:21 [SEVERE] at org.bukkit.craftbukkit.block.CraftBlock.setData(CraftBlock.java:57)
    2011-09-09 20:49:21 [SEVERE] at org.bukkit.craftbukkit.block.CraftBlockState.update(CraftBlockState.java:182)
    2011-09-09 20:49:21 [SEVERE] at org.bukkit.craftbukkit.block.CraftSign.update(CraftSign.java:33)
    2011-09-09 20:49:21 [SEVERE] at org.rominos2.Battery.BatteryTimer.updateSign(BatteryTimer.java:129)
    2011-09-09 20:49:21 [SEVERE] at org.rominos2.Battery.BatteryTimer.updateBattery(BatteryTimer.java:115)
    2011-09-09 20:49:21 [SEVERE] at org.rominos2.Battery.BatteryTimer.charge(BatteryTimer.java:98)
    2011-09-09 20:49:21 [SEVERE] at org.rominos2.Battery.BatteryTimer.run(BatteryTimer.java:61)
    2011-09-09 20:49:21 [SEVERE] at java.util.TimerThread.mainLoop(Unknown Source)
    2011-09-09 20:49:21 [SEVERE] at java.util.TimerThread.run(Unknown Source)
    2011-09-09 20:49:59 [INFO] [Battery] A Battery has been destroyed by M4xwellou in proximity at -112,102,-215.
     
  7. Offline

    rominos2

    @M4xwellou
    Damned
    I'm going to become Crazy about this errors ?
    How do you get these ?
    How can these sign being modified in the same time as I do ?
     
    bellardie likes this.
  8. Offline

    disturbed13

    post a paint schematic of it so we can make it ourselfs :D

    ask them if they can take their server and email it to you or something so you can try it for yourself
    a copy i mean
    that way if you find the answer you can tell them exactly how to fix it

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  9. Offline

    rominos2

    @disturbed13
    I think I finnaly find out the error
    Trying right now to fix it
    He'll test and if it's ok I'll release it
     
    bellardie likes this.
  10. Offline

    ndoorn

    [1.4.2] Keeps powering (AA) even when left and back are off

    [1.4.2] (all types) When left is on and the batt is powering it doesn't charge
     
  11. Offline

    rominos2

    Yeah it will be fixed
    In the next version 1.4.3 ^^

    --- Release of the version 1.4.3 ---
    This version fix the CurrentModificationException and also modify a bit the timeCheck (now in 1/20 sec)

    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.
  12. Offline

    max001

    Thank's for the furnace edition :)
     
  13. Offline

    rominos2

    max001
    No problem
    You can als do music with batteries ^^
     
  14. Another one:

    Code:
    19:02:43 [SEVERE] Could not pass event SIGN_CHANGE to Battery
    java.lang.ClassCastException: org.bukkit.craftbukkit.block.CraftBlockState cannot be cast to org.bukkit.block.Sign
            at org.rominos2.Battery.BatteryBlockListener.onSignChange(BatteryBlockListener.java:24)
            at org.bukkit.plugin.java.JavaPluginLoader$33.execute(JavaPluginLoader.java:469)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:994)
            at net.minecraft.server.Packet130UpdateSign.a(SourceFile:41)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:453)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  15. Offline

    rominos2

    Ok I'll look at that but I'm a bit busy this time (new year at univerity)
    So I'll fix that but don't wait a fix today like the last month ^^

    EDIT :
    HUUh !!!
    What block do you place to have this issue ?
     
  16. Offline

    GravelSocks

    Hi - great plugin - extremely useful - it makes a great redstone gadget timer!! Fantastic!

    However, using APXXX mode, I have seen it get stuck when trying to charge. The battery should keep working for others even though I have logged out, right? There aren't any permissions issues are there?

    Also - would love a way to specify the charge/discharge time on the sign. Any way to scrunch the % on the charging line so that we can have an extra line of params? Right now, I set the charge/discharge values high in the config, then use % charge to fire the circuit at less than 100%...controlling for time, but it's not ideal for various reasons.

    Thanks!
     
  17. Offline

    rominos2

    @GravelSocks
    he problem with the Charge/Discharge Time on the sign is :
    • I've no more place on the sign sorry ^^
    • Any body can enter any times like 1/15000 or other bad input for RP
    That's why I won't make these params on the battery itself
     
    bellardie likes this.
  18. Offline

    GravelSocks

    Hi rominos - thx for the reply!

    Well - you could theoretically combine lines 3 & 4 and put the result on line 4, leaving line 3 free for an extra param.

    Charging: xxx% or Powering: xxx% (max is 100, min is 0)

    Store the label, '%', and incrementing/decrementing xxx value in variables, catenate them together during tick updates for line 4. (and get rid of the "...")

    Then, on line 3 allow user entry for the param for charge/power time and simply range-check and certify it.
    For example:
    - no negative values
    - strip off any decimal fraction & "." character
    - allow only ascii in 0x30-0x39 + delimiter char :) or /)
    - clip numerical input to 999 max and rewrite it, if necessary

    Possible BUG: Any thoughts on why the counter might get stuck on APXXX mode charging?
    Possible BUG: One player on my MP server reported that when I logged out, the battery stopped working. Do you know why they would stop if others are still logged in? (permissions issue, etc.?)

    (I have Battery 1.43 installed w/ mc1.73, and latest bukkit - nothing too strange)

    Thx. Your plugin is definitely useful and is a great timer, as I mentioned before. The tweaks above would make it even more useful.
     
  19. Offline

    rominos2

    @GravelSocks
    I don't understand a big part of your post
    Don't worry I ='ve got some things ^^

    1) the powering and Charging xx%
    I don't know if there is enough place on the line
    But I'll look at that

    2)I don't get one thing on the next part ...
    negative values ?
    ascii :confused: ?

    3)I don't understand the 1st possible bug

    4)For the second it's normal I think
    It's because the chunks are unloaded where noone are on.
    And redstone are not powered in unloaded chunks
    I'll modify it in the next version to load batteries chunks
     
    bellardie likes this.
  20. Offline

    GravelSocks

    I think you'll see there is enough room to combine the "Charging:" label & XXX% on line 4. Also - thanks for making the effort to communicate in English - you're doing great. I'm sure people here appreciate it.

    The part about "negative values" has to do with certifying (or verifying) the data on user input. I was just trying to help. I suppose you could just reject anything that isn't a number + the separator...anyway - again just trying to help to prevent parsing and other error conditions. Checking the XXX/XXX value input by the user for the charge/power time (on line 3) should be very easy and not give you any trouble.

    Re: The bugs - I think both bugs are the same issue. However, other players are still logged in but I am not, and I created the battery. Anyway - your chunk loading fix may resolve the issue. I'll try it out when it's ready.

    Thanks again for the fix and for being so responsive.

    OK - there is definitely a problem with the sign counter getting permanently stuck while charging. My APXXX battery is stuck now - I tried reloading plugins, restarting both client and server, but no luck. The XX% is no longer incrementing. It seemed to occur after I was away and the game went to the pause screen for a while. If you need more info, let me know.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  21. Offline

    rominos2

    @GravelSocks
    Ok I unserstand what you said about negate values
    I would have thought about that
    Just ask feature next time I'll add securities don't worry

    For the input XX/XX I'm not sure that I want to add that because it could be useful for you to make timers
    But others will see that as cheat for players
    You can easiliy do the same with your configs and APXX batteries (I made a little song I'll upload when I can)

    For the error, send me info (block positions, save of this world, config, any details you have)
     
    bellardie likes this.
  22. Offline

    Silvo

    This could be a great core plugin. Build plugins that consume certain percentage of the battery use.
     
  23. Offline

    rominos2

    @Silvo
    Yeah that could
    Now time for you tu make plugins that use Battery ^^
     
    bellardie likes this.
  24. Offline

    Silvo

    This plugin is awsome. Any know about cotroller block? You can disable/enable blocks with it when powered by redstone. I have a gate that can be opened ( disabled/enabled ) with controller block. A lever on the inside to open the gate and a button on the outside. Buttons send a quick redstone signal.. means the gate closes quickly too and I have to time it to push the button and run through the gate before it closes. But now... I apply a battery that uncharges when getting a redstone signal from behind it allowing me open a gate that autocloses after a few seconds insted of a second. When prolonging the time to charge and discharge in the ini.. I could even make things appear/dissapear at a day/nigh circle with battery.
     
  25. Offline

    GravelSocks

    Hi - not a cheat, really. Make the XXX/XXX functionality for line 3 a config option and always put the charging status on line 4. In addition, when XXX/XXX is set only by the admin, you could show the time on the sign so users know how long it will take to charge/discharge.

    Alternately, you could also support it as a permission node. Note that in order to be most useful, it needs to support 3 digit input for the times.

    As for the bug, definitely check the block/chunk handling. It looks like it fails (stops working for other players) when I log out and fails for me when the app suspends.

    I will try to get the information together.

    Thx.
     
  26. Offline

    GravelSocks

    Here's how to reproduce it - nothing special about my world data.

    Config Settings:
    Time to Charge: 360 seconds (had been using it as a sugar cane growth timer)
    Time to Drain: 10 seconds
    Battery Block: Obsidian / 49

    Steps to Reproduce for Server/Client 1.7.3:
    1. Set a long charge time in the Battery config file to allow time to test while Charging and reload the server plugin.
    2. Create a new battery using the APXX function, such as AP99 at a convenient location for warp or teleport, such as the home point (/home)
    2. Power the battery with a redstone torch and ensure that it begins charging as expected
    3. Hit escape, log out, quit the client
    4. Relaunch the client and log back in.

    Result: Battery is working as expected - still charging OK

    4. Travel a great distance from the battery, forcing the server to load all new chunks and unload old ones (I used the gold Rocketboots in my test and just flew away over the landscape)
    5. After allowing the server to fully load/draw all the new chunks, hit escape, log out, and quit the client
    6. Relaunch and log in
    7. Type /home or teleport back to the location of the battery

    Result: The battery is not working and stuck at some percentage of charging and the Battery plug-in ends up in a bad state. I cannot create a new battery by destroying and replacing the sign on the original block and cannot create other new battery blocks. The [Battery] tag on the sign is no longer recognized. In order to create a new battery, I had to completely destroy the old block and start over. I also reloaded plugins.

    The steps above are not fully generalized/minimal, but should allow you to find/reproduce the problem. It looks to me like your assumption about chunks being unloaded/purged is correct and is part of the problem. Something ends up in a very screwed up state, especially since the plug-in no longer recognizes the [Battery] tag.

    Good luck - let me know if you need anything else.
     
  27. Offline

    rominos2

    I've already said I'll keep the chuncks loaded (if I can) in the next version
    I'm right now on the Seasons and just after it's the time for Battery
     
    bellardie likes this.
  28. Offline

    GravelSocks

    Thx - hopefully the full description will help you reproduce the problem when you are ready to look at it. Thx for your work on the battery component. Besides the fact that it was something very basic missing in the world of redstone physics, it is also an important component for minecraft automation and timing. I look forward to the next version.
     
  29. Offline

    rominos2

    No problem.
    thanks
     
    bellardie likes this.
  30. Offline

    Evilhaunting

    Idea: batteries emit longer distance of power :]
     
  31. Offline

    rominos2

    @Evilhaunting
    No not in the plugin idea
    and (how to say ?) can not be linked in the code

    Everything is ready for tommorow

    I'll update ALL my plugins at one !

    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.

Share This Page