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

    Kane

    Sweet looking good. Also how do you remove a whole chunk region from the config without doing by hand? Is their a way we could get /chunk delRect # and just look in the config for the one we want to destroy.
     
  3. Offline

    londark

    hmm, i dont know why but when no one is online there is still no drop.
    I am using dropchest. For example for Egg´s.
    Before 1.8 when the user where offline and joining next day, there where egg´s in the chest.
    After Updating to 1.8.1 no loot in the chests.
     
  4. Offline

    Piedo_bear

    Stopping the server and editing it should be fine, as long as rectangles are numbered in order and none are missing, I'll look at a delRect command in the future

    The chunks need to be loaded first. I simply stop the chunks unloading in bukkit every time they try, but if the chunk isnt loaded first then it will stay unloaded. If thats not the case then there is probably something in more depth that isnt covered by chunks unloading, such as requiring a player to be nearby. Wheat does not grow on loaded chunks without a player nearby, yet redstone charge still freely passes through the same chunks. I have no explanation why, I'd try fix it if I knew what was causing it.
     
  5. Offline

    londark

    how can i load the chunks ? The chunks are loading when i am nearby or ?
     
  6. Offline

    Piedo_bear

    As you move, chunks load. So if you walk around the area then the chunks will be loaded. They become unloaded on a server restart/stop.
     
  7. Offline

    londark

    ok, i tryed again and again no drop, ForeverALoad.usage is ops
     
  8. Offline

    Piedo_bear

    If the area is definitely is in either a rectangle or added manually then I suspect its something to do with minecraft mechanics. If you put it in debug mode you can make sure the chunks are stopped from unloading.
     
  9. Offline

    londark

    I have mark an area, i will start the debugmode and let you know what is in there

    Code:
    10:51:58 [INFORMATION] Craftalon lost connection: disconnect.quitting
    10:51:58 [SCHWERWIEGEND] java.net.SocketException: Socket closed
    10:51:58 [SCHWERWIEGEND]        at java.net.SocketOutputStream.socketWrite(Unkno
    wn Source)
    10:51:58 [SCHWERWIEGEND]        at java.net.SocketOutputStream.write(Unknown Sou
    rce)
    10:51:58 [SCHWERWIEGEND]        at java.io.BufferedOutputStream.flushBuffer(Unkn
    own Source)
    10:51:58 [SCHWERWIEGEND]        at java.io.BufferedOutputStream.flush(Unknown So
    urce)
    10:51:58 [SCHWERWIEGEND]        at java.io.DataOutputStream.flush(Unknown Source
    )
    10:51:58 [SCHWERWIEGEND]        at net.minecraft.server.NetworkWriterThread.run(
    SourceFile:104)
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -38
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -62, -38
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -61, -38
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -38
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -37
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -63, -37
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -62, -37
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -61, -37
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -37
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -36
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -63, -36
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -62, -36
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -36
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -35
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -35
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -34
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -34
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -62, -33
    10:51:59 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -61, -33
    After the second Time i disconnect he only says:
    Code:
    10:57:51 [INFORMATION] Craftalon lost connection: disconnect.quitting
    10:57:51 [INFORMATION] Connection reset
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -38
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -63, -38
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -62, -38
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -61, -38
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -38
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -37
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -63, -37
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -62, -37
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -61, -37
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -37
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -36
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -63, -36
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -62, -36
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -36
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -35
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -35
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -64, -34
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -60, -34
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -62, -33
    10:57:52 [INFORMATION] [ForeverALoad] Stopped unloading of chunk at: -61, -33
    >
    My config:
    Code:
    Debug: 'true'
    Rectangles:
      Use: 'true'
      Quantity: '2'
    rectangle0:
      world: world
      points: 10,10,-10,-10
    rectangle1:
      world: world
      points: -64,-34,-60,-38
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  10. Offline

    Piedo_bear

    Looks like everything is working fine on my part, so I guess the problem is with Minecraft mechanics, sorry =/
     
  11. Offline

    londark

    minecraft mechanis.. is the a chance to disable the chunk unload ?
     
  12. Offline

    Piedo_bear

    No, I stop all specified from chunks unloading. So if the chunks are staying loaded and you are expecting something to happen then it probably requires more than just the chunks being loaded, like a player being around. This is the case with wheat. Wheat wont grow even in loaded chunks without a player nearby.
     
  13. Offline

    Chett

    Hi Piedo.

    Thank you for sharing your work with us. Was looking for a tool to keep chunks loaded so bad and i'am happy that i found yours. Quoted above explains me how the mechanic works. And there is a big Question that puzzles me.

    In the op i can see this: Optionally load chunks into memory from the start.

    Version 0.4

    • - Snip
    • 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.
    • - Snip

    I think that's what a couple of peoples want here, like londark who wants to disable the chunk unload, i would prefer to load defined Chunks at the Server Start/Reload. Is that possible right now ?

    I used Worldboarder to fill the chunks, so i should have the rquirements to load em from start up. So whats the commands, parameters and stuff. Would appreciate your help.

    Thx in advance
     
  14. Offline

    Thequickthinkin

    So, if I keep a chunk with a mob spawner in it loaded, will the mobs spawn even when no-one is there?
     
  15. Offline

    Odai

    Its realy good working and without errors (so far). It uses about 10MB Ram each 100 chunks.

    Thx for the Plugin :)
     
  16. Offline

    agubelu

    Hi. We're getting a lot of errors:

    This error shows when any player moves:
    Show Spoiler
    [SEVERE] Could not pass event CHUNK_UNLOAD to ForeverALoad
    java.lang.NullPointerException
    at com.bukkit.piedo_bear.foreveraload.ChunkListener.onChunkUnload(ChunkListener.java:29)
    at org.bukkit.plugin.java.JavaPluginLoader$54.execute(JavaPluginLoader.java:635)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:231)
    at net.minecraft.server.World.doTick(World.java:1624)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:461)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)


    And this one when usign /chunk X

    Show Spoiler
    SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'chunk' in plugin ForeverALoad v1.01
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:355)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:501)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.NullPointerException
    at com.bukkit.piedo_bear.foreveraload.ChunkHandler.getRectChunkCount(ChunkHandler.java:124)
    at com.bukkit.piedo_bear.foreveraload.ForeverALoad.onCommand(ForeverALoad.java:90)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    ... 13 more


    We're on CB 1337
     
  17. Offline

    Zach Hinchy

    Great plugin, this is seriously useful. We have a large redstone digital clock at spawn in our server; the main circuitry was below spawn and wirelessly transmitted to the clock itself, but it caused lag for a few users.

    With this, I moved the main circuitry to another world very far out of the way that anyone could possibly get to (it's an entire world dedicated to being a "hub world" for our worlds) and set ForeverALoad to keep the chunks in memory, and it works fantastic. Thanks so much!

    One problem, however, is that the chunks are not actually loaded when the server restarts. ForeverALoad prevents those chunks for being unloaded, but it doesn't actually go out of the way to load those chunks on server start. Is it possible to do that? It'd be great if I didn't have to warp to the clock circuitry to jumpstart it when I restart the server. Just a suggestion.
     
  18. Offline

    danseaview

    Just Wondering is this Plugin Still being Updated i want it for my 1.0.0 server My builcraft quarry keeps getting unloaded and it really messes with it Love the Idea of this plugin though great job
     
  19. Offline

    loki4321

    please.. could u update it to latest rec. build.. :'(
     
  20. Offline

    kohina

    So does this work if i have very long rail tracks? Regular minecraft does not update very far so carts get stuck in some point.
     
  21. Offline

    Exor

    I have downloaded this for the latest bukkit. Wheat doesn't seem to be growing when nobody is in the server. I set up "/chunk addRect" after I made a first and second point. I logged out for like 15 mins or so and then I came in. Wheat isn't even grow a little at all. I then stand next to them. They do grow.

    Any idea?
     
  22. Offline

    Mrono

    "Side-note:Crops wont grow in loaded chunks, this is one thing I noticed with my testing. "


     
  23. Offline

    Exor

    I see, it's the problem on bukkit's side as the side-note said. Thanks for help.
     
  24. Offline

    Piedo_bear

    Updated to latest RB, although nothing has changed.

    BREAKS YOUR CONFIG so you will need to regenerate it and edit it. Should be tidy now, and wont need changing again.

    You can now load defined rectangles from the start and stop them from unloading.
     
    HanFox likes this.
  25. Offline

    SAMDAN

    Instead of the server keeping the chunks loaded, maybe figure out a way for the client to keep them downloaded? I don't know if this is possible.
     
  26. Offline

    HanFox

    How would that help?

    This mod is for more than just making sure chunks are easily accessible by players it's for allowing them to still be simulated when no one is there.

    You can't rely on a client to do that. That allows for cheating.

    Anyway, you'd still need to check between the client and server to see if the chunks had been updated as well.
     
  27. Offline

    SAMDAN

    Okay. Like I might have said, I don't know much :D
     
  28. Offline

    Mrstupidface

    I have Everything working but when defining a custom rectangle from 2 points wouldnt that just define like a line to keep loaded?
     
  29. Offline

    GenericCola

    Hmm :/ this plugin doesn't seem to be working for me. I installed it so that I could send mine carts over long distances without them getting stopped at unloaded chunks, but it seems the chunks are unloading anyway. The console says it's preventing them from being unloaded, but the carts are still getting stopped. Also, when I selected the rectangles to keep loaded, it initially said it was keeping somewhere around 1,000 chunks loaded and using 113 or so Mb of RAM. The next time I loaded the world (after restarting the server) it changed to say it was holding 110 chunks, and only using 10 Mb of RAM.
     
  30. Offline

    Mastergalen

    Being able to select an area with World Edit and then keeping the chunks loaded within the selection would make things far more easier :)
     
  31. Offline

    Amonith

    This plugin stops chunks from being unloaded. But you must first load them somehow.
    So when you restart your server you must manually walk/ride through every chunk you marked for persistence.
     

Share This Page