Inactive [ADMIN/FIX] ForeverALoad v1.1 - Keep your chunks forever a loaded [1.2.3-R0.1]

Discussion in 'Inactive/Unsupported Plugins' started by Piedo_bear, Jul 29, 2011.

  1. Offline

    Piedo_bear

    ForeverALoad - Keep your chunks forever a loaded
    Version: v1.1
    Download
    [​IMG]

    This plugin enables you to select individual chunks or entire areas and stop them from unloading. You can add, remove and check chunks, and also get information on how this may impact on your server.

    You use this, obviously, to keep chunks unloaded. This is useful for long redstone constructions, so the connection continues. Crops wont grow - see side note below.

    Side-note:
    Crops wont grow in loaded chunks, this is one thing I noticed with my testing. However, redstone charges DO carry over very long distances (it will be greater than the view-distance specified in the server.properties) but you need to make sure those chunks load first. This plugin stops chunks unloading, if you are in doubt use the logging mode and get the confirmation, I cancel the event of unloading quite accurately so if things aren't working it could be Bukkit, in-game mechanics or something else interfering - if not then its me XD

    Features:
    • Allow/Stop chunks from unloading
    • Check if a chunk can unload
    • Stats on how it may impact your server
    • Supports in-game adding or config based areas
    • Supports Permissions 3.x and SuperPerms (otherwise defaults to op)
    • Optionally load chunks into memory from the start
    Future features:

    • Suggestions?
    Configuration file:

    Code:
    Debug - tells you in console each time a chunk is prevented from unloading, or any errors encountered. Also tells you the percentage of loading rectangles on startup
    Rectangles - Used to stop areas unloading
        Use - If rectangles in config are being used to stop chunks unloading
        Quantity - Number of rectangles in use
        LoadFromStart - Loads defined rectangles from the start, if they are active
     
    Format of rectangles:
    rectangle0:
      world: world - world of the chunks
      points: -50,-50,50,50 - coords in the form of (x1,z1  x2,xz)
    
    Commands:
    (Note: will need ForeverALoad.usage in permissions or must have op status)

    Show Spoiler
    /chunk - Tells you how many chunks you will have (at a maximum) remaining from unloading, and give stats about it

    /chunk add - Adds the chunk you're on to the Do-Not-Unload list

    /chunk remove - Removes the chunk from the list

    /chunk check - Checks whether the chunk can unload

    /chunk addRect - After you have defined two blocks with a bone(ID: 352) by left and right clicking this will add the rectangle of chunks to your config file for you. You must have Use rectangles set as true in the config.


    Instalation:
    Show Spoiler

    1. Place ForeverALoad.jar into your plugins directory and start the server to generate the config.yml
    2. Go to the folder plugins/ForeverALoad and edit the config.yml to your needs (see above for an explanation) The config generates weird, be aware of putting the co-ord information in the right places!
    3. Restart the server for the new configuration to take effect!
    4. Go add chunks and enjoy!



    Changelog:
    Show Spoiler

    Version 1.1
    • Updated config handling - BREAKS YOUR CONFIG - so you will need to regeneate and edit, sorry. You can probably copy, paste,edit for your rectangles though.
    • Added the option to load chunks from the start
    Version 1.02
    • Fixed a sneaky typo
    • Hopefully corrected a calculation for area.
    Version 1.01

    • Updated to RB 1337
    • Added specific support for PermissionsEx
    • Fixed a null pointer with items
    Version 1.0

    • Updated to RB 1317
    • Changed config for Bukkits new API - requires a newly generated config
    • Completely recoded and organised to be prettier
    • Debug mode should help narrow down issues better now
    Version 0.5

    • Removed auto-protect of chests/furnaces since wiping bug is fixed
    • Ditched over-complicated part of protecting specific blocks
    • Added /chunk addRect to add rectangles ingame, using a bone as the selection tool.
    • Updated config NOTE: no longer uses ' around numbers so change '50' to just 50
    • Added support for SuperPerms
    • Updated to 1240 at last :p
    Version 0.4

    • Fixed an issue where /permissions would list chunk data, my bad
    • Added an option to load chunks straight into memory from the start. WARNING: this may take a while depending on the amount of chunks, it will load, and if the chunk does not exist it will be generated, but this might end up without flowers etc. So just use this for areas that already exist, or use a pre-rendering plugin/program first.
    • Updated the calculation of ram being used, to match experimental data opposed to theoretical
    Version 0.3

    • /chunk check now includes rectangles
    • /chunk [add/remove/check] will also tell you the coordinates of that chunk
    • AutoChestProtect now includes furnaces
    Version 0.2

    • Added auto chest protection option in configuration, stop all chests being unloaded.
    Version 0.1

    • Initial release


    Please post bugs, suggestions or anything related here and I will get looking :)

    Also, please include as much detail as possible, CraftBukkit build, stack traces, other conditions that may cause things.
    NOTE: Requires Vault installed
     
    Lancezh likes this.
  2. Offline

    Lancezh

    Sorry for the noobish question, does this fix work on regular SMP installations with no Bukkit stuff on them as well ?
    This little fix is the shiznut (meaning it is REALLY REALLY EPIC) by the way if i could get it to work with industrial / buildcraft, we were trying so many workarounds yet and nothing worked.

    Which is incompatible with IC and Buildcraft on the same server... shame. I cant believe noone made a mod yet (i cant find it at least) for the regular SMP, it is so obvious that this is preventing big machines from working.

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

    Piedo_bear

    The bug is built into vanilla minecraft, which will affect everything, sadly this plugin only works on craftbukkit, but the same concept could be applied to other things if the API exists, you just need somebody to make it.
     
  4. Offline

    Amonith

    Craftbukkit IS compatible with IC and Buildcraft through ModLoaderMP for Craftbukkit available here: http://www.minecraftforum.net/topic/382599-173-modloadermp-for-craftbukkit-and-canary/

    Read that thread carefully because you will need to install special, ported versions of BuildCraft or IC.

    Piedo_bear! I use your mod with BuildCraft and it works great!

    However, a way to define rectangles in game would be great.
    Calculations are simple, yeah, but you can automate them through onPlayerInteract() in special circumstances, perhaps after issuing some command.

    Sorry for bad english.
     
  5. Offline

    Slash1987

    just make the rectangle as made in WorldEdit, maybe look through theyr source to know how...
     
  6. Offline

    Raptor2213

    Aye, this would be a great addon - if you didn't have to add each and every chunk manually. If I want to select a chunk area with it, it doesn't want to do it right.

    For example. I use MineCartMania, but it will glitch occasionaly because it unloads the chunk the minecart is in, stopping the cart. If the minecart chunks were never unloaded, it would never be an issue. But programing the area seems ...difficult. Nothing I did seemed to make any sense (selection-wise).
     
  7. Offline

    1337phreak

    I hope this gets updated to 1060 soon!
     
  8. Offline

    gameswereus

    Hope you are back in time for 1.8
     
  9. I added some chunk in the list to keep them loaded, but mushrooms won't spread on the "loaded" chunks ?

    It only spread if a player is there. I though it was the same thing :/

    Anyone knows ?
     
  10. Offline

    sfxworks

    Hi. My world is 1.59 gb. I would like to be able to load all of it. When I attempted to do so, the plugin disabled itself and stopped the world.

    I don't get it. I can already load my entire directory on my 8 gigs of ram via RAMDisk. So...how come...?
     
  11. Offline

    Insanehero

    Does this keep redstone circuits loaded also?
     
  12. Offline

    Piedo_bear

    You can now select an area by left/right clicking with a bone (ID:352) then using /chunk addRect. This adds the area to your config file automatically and sets it into use, providing the Use flag for rectangles is set to true


    For some reason loaded chunks don't grow crops. However redstone charge still passes through these chunks, proof that they are in fact loaded. I have no idea why it needs players though, that stumped me.

    Redstone circuits will stay loaded. Its better to keep an area loaded bigger than the redstone circuitry, from my experience.
     
  13. Offline

    Fr0zenfr0g

    I have a 1gb world does it take 1gb to have the wole loaded or mush more?
    Does it work with nolagg or ptweaks?
     
  14. Offline

    Piedo_bear

    A 1gb world would use 1gb of RAM to be fully loaded, maybe a bit more for mobs.
    I haven't tested with either of those plugins but I am sure that they'd cause issues since they both mess with chunk loading. However I'm not sure what the effect would be, it would be too lengthy to try test all the scenarios, so they only way to tell would be through general usage but backup first just in case.
     
  15. Offline

    Piedo_bear

    Updated for RB 1317 and fully re-coded, so its much more manageable.
     
  16. Offline

    communist_llama

    Throws errors: could not pass CHUNK_UNLOAD
    On CB 1328
     
  17. Offline

    Piedo_bear

    Tested and works fine for me. Are you using any other plugins which play around with chunk unloading? They might be conflicting. If you give me the StackTrace I might get a little more info.
     
  18. Offline

    communist_llama

    Wasn't playing nice with the version of Minecart mania I was using. All is well now. Thanks for the reply ^^
     
  19. Offline

    Brvtvs

    I may be missing something simple, but I don't get the installation of the plugin. The default config is rejected as unparsable... so I don't understand what I change to make the YAML parsable and still have the right configuration
     
  20. Offline

    Piedo_bear

    What is your CB version, and your plugin version?
    You'll need CB1317 and version 1.0. If you had a version prior to 1.0 you will need to re-generate a brand new config file (Delete the entire directory if you want a fresh install - otherwise just the config file) The default generated file is:
    Code:
    Debug: 'false'
    Rectangles:
      Use: 'false'
      Quantity: '1'
    rectangle0:
      world: world
      points: -50,-50,50,50
    Also, make sure there are no tabs used, spaces only. If the problem persists post me the errors so I can try see whats going wrong.
     
  21. Offline

    Brvtvs

    My problem must be that I am on 1240, because 1317 screws a lot of stuff up. I am looking forward to using this once my other plugins are updated, thanks.
     
  22. Offline

    Piedo_bear

    http://dl.dropbox.com/u/19191105/ForeverALoad-0.5.jar
    Version 0.5, should work if you need it.
     
  23. Offline

    rockxz2135

    Could not pass event PLAYER_INTERACT to ForeverALoad
     
  24. Offline

    Kane

    @Piedo_bear

    Code:
    03:35:34 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.ForeverALoad.hasPerms(ForeverALoad.java:181)
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:25)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Anyone also notice @Piedo_bear checking this thread today :p

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

    Piedo_bear

    Can you tell me a little more about the conditions which sets this error off? Its most likely related to permissions, so what permissions system are you using, did it happen when somebody had or didn't have the permissions for the plugin? Also, for good measure, whats the CB build?
     
  26. Offline

    Kane

    I'm using Pex that works with 99% of all plugins as it seems. I was using 1337 though I don't think anything in that should have broken since. The plugin does not seem to work at all also when I tried to edit the config and add the coords that way.

    Also the error popped up when I tried using bone.

    @Piedo_bear

    I am still getting the error with 1317. Seems like if I enter or leave the chunk that is suppose to stay open I get the following error:

    Code:
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    21:33:41 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:22)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    21:33:41 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:22)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    21:33:46 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:22)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    21:33:46 [SEVERE] Could not pass event PLAYER_INTERACT to ForeverALoad
    java.lang.NullPointerException
            at com.bukkit.piedo_bear.foreveraload.pListener.onPlayerInteract(pListener.java:22)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:95)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:497)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:477)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  27. Offline

    londark

    we need a Update becaus we have errors like member before subscribed.
     
  28. Offline

    Piedo_bear

    I haven't been able to replicate the error. I think something might be interfering, perhaps I should make the tool configurable. The stack traces firstly implied it was something to do with permissions, then the second one happened when you tried to use fists to define corners, since the item was null.

    Try downloading 1.01 and see if its better, it's built against 1337, fixes a null pointer, and explicitly supports PermissionsEx. If it still persists, send me the stack trace and I'll see if I can figure it.
     
  29. Offline

    Kane

    @Piedo_bear

    So to test this out I added the following chunks:
    Code:
    rectangle0:
      world: world
      points: -144,-86,-140,-89
    Seems to be working now but when I do /chunk I get the following message:
    Max of 49700 chunks wil remain loaded.
    Consuming 4659 mb of RAM (maximum)

    Is your calculations just broken or is it really going keep that many chunks open lol.

    After lots and lots of testing. I can confirm chunks stay open the ones I have selected the others do close. But I can also confirm the /chunk feature is beyond broken in calculations hehe.

    But thanks for fixing it for 1337.


    So to run it down:
    1) Works
    2) /chunk calculation is wrong
    3) brand new config generates wrong and has about 8 enters down but still works.
    4) if you delete chunk rectangle in the config and don't set the Quantity say from 2 to 1 or whatever the plugin gives out config errors on startup. I think that is really unneeded.
    5) spelling mistake says Max of 666 chunks "wil" remain loaded hehe.

    Hope this helps you out.
     
  30. Offline

    Piedo_bear

    1- Yay!
    2- Should be fixed now, I messed up my math in the transistion
    3- I think this is to do with bukkit, because firstly it worked perfectly with 1317, also there are other developers with similar problems. Or...things changed and my way of handling configs blew up...but I checked through everything, changed a few things and no matter what there was always equal amounts of lines for each actual line of code.
    4-Its needed for ease of me, because I can't get that value from the config easily by checking. I use that value for loops, it makes it very easy. Perhaps in a future version I'll add a check which fills in any missing parts, so missing rectangles will be 0,0,0,0 and therefore wont blow up the plugin but wont impact anything :)
    5- Opps! fixed :p
     
    Kane likes this.
  31. Offline

    londark

    Now in the System it works realy nice. Tonight i will test it with dropchest to examine the log off loot.
    But So far Big THX to you :)
     

Share This Page