Inactive [SEC] AntiXRay v0.6.10 - protecting ore from XRay mod and transparent texturepacks [1000]

Discussion in 'Inactive/Unsupported Plugins' started by asdaarg, Apr 11, 2011.

  1. Offline



    Reporting Errors the follow things have to be mentioned:
    • CB Version and AXR version
    • Whether you started the AXR version with a fresh ore file or not (doing /axr off before upgrade)
    • If not, since what version you've been using the same ore file.
    • If you get any errors in console, check the debug.log for "Error"s and "Warning"s. and post those.

    Upcoming features for 0.7:
    - AXR Chest chest hiding feature developed by MrSelfDestrukt
    - New advanced visibility test (almost done, only need to test it now and decide whether its going to replace or be an alternative to the original light based test) Details here and here


    AntiXRay hides ores from players by turning them into stone until they have been exposed, thus making it impossible for any client side hacks to detect them, as their location is not sent to the client.

    Backup your world(s) I cannot guarantee that ore doesn't disappear from them due to this plugin. Even if you did not backup, there is a foolproof solution here. If you decide to uninstall, type /axr off, and not delete the ore data file before your ore is restored unless your intention is to strip your worlds from ore.

    If you upgrade from 0.5.21 it is recommended that you do /axr off first flush out errors from the ore file. If you do not have enough RAM, you can do this in steps using 0.6.9 but you need to set lenient=true in the config file to allow the file to be loaded
    NSCommand <-- Required
    Source and old versions

    - Specify what ores to hide(works with non ore blocks too as long as they don't use data values or extra data such as chests and signs (use some chest locking plugin for keeping your chests from xrayers)
    - Multi world support
    - Permissions support
    - Stores ore data in binary files (one per world) and only keeps data about loaded chunks in physical memory. It is on average 400 bytes per chunk in and guesstimatedly around 450 in physical memory, so it is reasonably small, but some people might play on huge worlds and want to conserve memory.
    - Saves data about chunks immediately on any changes (they are assumed to be by far sufficciently rare that any performance is won by buffering is neglible. As such it also prevents potential ore duplication on server crashes)
    - chunk and world statistics
    - ingame map of loaded chunks
    - background processes that does not freeze the server
    - dump ore statistics into file and compare them to see the changes in ore content.
    - lots of configuration options

    Ores will become visible under any of these circumstances:
    - A surrounding block is lit by torch and player is within the chunk or adjacent chunk and within 16 blocks to player on Y axis.
    - A surrounding block is lit by a third block broken falling or removed by explosion and player is within the chunk or adjacent chunk and within 16 blocks to player on Y axis (occurs once every 2 seconds, but configurable).
    - A surrounding block is broken or falls or removed by explosion
    - A surrounding block is changed by another plugin (can be cpu intensive if you worldedit a big area for instance - might do a workaround for this)

    Current Limitations:
    - Ores at light level above pitch black on chunk generation will not be hidden e.g. near lava or surface cave entrances.
    - Ores will not be found exploring caves in pitch black (who does that anyway?) These two limitations was to allow a light based visibility test that relies on a test already built into the server, thus avoiding extra performance overhead as well as headache of coding it myself. Despite these limitations, AntiXRay should make it far beyond pointless to search for ores using XRay or transparent textures.
    - Gravel and sand dropping on chunk generation may expose ore. This is assumed to be rare enough to have neglible effect.
    - The data file will not repack itself. The ratio between generated ore and mined ore is assumed to be very high, and the file size is considerably small but nonetheless, should you want to "repack" it, just turn axr off and on and the new file will be smaller excluding the gaps between chunk entries. But again, do some basic math and count the amount of ore blocks mined in total, multiply that by 2 bytes. After a month of mining 10000 ore blocks, you shaved 20k off that 3M file.
    - If you place a torch there is a tiny delay as seen in the video due to client side prediction and lag between the time the info of the ore to get back to the client from the server. This can seem unnatural so I might make a better vision test later that doesn't rely on light. However it would be more expensive in terms of cpu cycles.
    - If you have a slow server or a lot of players, you might want to remove coal from the config list. It speeds it up at least 200%. There are some optimizations I can do that I might add later that will speed up things further.


    /axr on - hides all unlit ore
    /axr off - reveals all hidden ore (and deletes the data file!)
    /axr on <world> - hides all unlit ore in specified world
    /axr off <world> - restores ore in specified world
    /axr worlds - world statistics
    /axr chunk - chunk statistics at chunk player is on
    /axr chunk <x> <z> - chunk statistics at specified chunk
    /axr map -shows map of loaded chunks in current world
    /axr map <world> -shows map of loaded chunks in specific world
    /axr map <zoom>
    /axr map <world> <zoom>
    /axr map <x> <z>
    /axr map <world> <x> <z>
    /axr map <zoom> <x> <z>
    /axr map <world> <zoom> <x> <z>
    /axr show
    /axr show <world>
    /axr hide
    /axr hide <world>
    /axr dump <world> <file>
    /axr diff <filein1> <filein2> <fileout>
    /axr gen <world> <x1> <z1> <x2> <z2> command for generating a rectangular area of chunks
    /axr gen copy <world1> <world2> command for generating all the chunks in world2 that are registered in world1
    /axr pack <world> - removes dead space in ore file (not that there is much from just mining but the axr chest will create significant amount of dead space.
    Auto-backup, that will backup your ore file on startup
    /axr backup <world> - backs up the ore file of the world if and only if the file passes the corruption test
    /axr test <world> - test the ore file and memory for errors for a specific world
    /axr test - test the ore file and memory for errors for all worlds
    /axr mirrorworld <world1> <world2> - creates a world world2 with the same seed as world1.
    These functions are not recommended for use unless you know what you're doing: (they can be destructive of tile entites)
    /axr chunk regen - regenerate chunk (to as it was when world was initially generated)
    /axr chunk regen <x> <z> - same but for specified chunk
    /axr chunk regen <x1> <z1> <x2> <z2> - same but for axis aligned rectangular area
    /axr chunk regen ore - only regenerate ores in chunk at player position
    /axr chunk regen ore <x> <z> - same but for specified chunk
    /axr chunk regen ore <x1> <z1> <x2> <z2> - same but for axis aligned rectangular area

    Note about regeneration: ores, trees, flowers and mushrooms are random each time and not tied to world seed (bukkit/mc issue)



    timerms - the time between light check by broken third block in milliseconds.
    maxdep - buffer size for number of ores that can occur in a chunk - don't change unless you have another plugin that adds tons of ore.
    maxheight - is the number of Y-levels in your map.
    ChunkFileBuffer - sets how much is buffered for new chunks to be stored until the index is rewritten (at the end of the file.)
    Materials - what ores you want to hide. (has to have same number of elements as maxys)
    maxys - the first Y level from bottom they cannot occur at. (has to have same number of elements as Materials)
    worlds - what worlds are loaded at startup (comma separated)
    autostart=all (normal) worlds are loaded at startup (unless CFGworlds is set)
    nounload = keeps all ore data in physical memory
    debug - turning on writes to a debug file keeping track of important info that may be needed to solve bugs or figure out why lag occurs
    fileindexdebug - turning on debug file needed as a quick check of the consistency of your ore file
    mapcol - the chatcode colour of each type of block in ascending order, shown in /axr map
    mapwidth - the width of the map shown in /axr map
    mapheight - the height of the map shown in /axr map
    schedulerload - 0-100 percentage of time going to execute any background process.
    schedulerstatustimer - time in millisecs between each status report of a background process
    filterorenotinstone - filters ore upon exposition that is not in stone (can be used to restore ore from a backupped ore file or ore file generated from a fresh world with same seed)
    autorepack - pack ore files automatically at startup - on by default
    autobackup - backup ore files automatically at startup(requires autorepack) - on by default
    maxfaces - specify max amount of exposed faces per chunk before error occurs
    lenient - ignore lindex errors when loading file (useful if you have them from before and want to filter them out)
    All CMD_... options are for redefining the commands so you can type something else.

    • Fixed Array index out of bounds in listindex accessing materials that has not been loaded yet.
    • Added /axr mirrorworld <world> <mirrorworld> command
    • Fixed NPE when trying to expose ores in world hole.
    • checking whether wrong file exist during repack.
    • fixed NPEs in some commands that can occur if you use it and the world is off.
    • fixed open file pointers during repack.
    • fixed NPE during repack when load fails.
    • fixed NPE when running test on all worlds and not all worlds are on
    • added various memory checks and chunk data entry overwrite checks
    • fixed NPE when trying to flush the debug file when debug file is turned off.
    • added lenient config option to ignore lindex errors when loading file (useful if you have them from before and want to filter them out)
    • added more information on error when loading from file
    • added config option maxfaces to specify max amount of exposed faces per chunk before error occurs
    • /axr off now gradually unregisters chunks - as a workaround to what appears to be a problem with chunks not getting fully removed from memory despite trying both unloadchunk calls through bukkit. This allows one to shut down the server and continue restoration after a restart if one does not have enough RAM
    • /axr pack <world> - removes dead space in ore file (not that there is much from just mining but the axr chest will create significant amount of dead space.
    • /axr backup <world> - backs up the ore file of the world if and only if the file passes the corruption test, also packs the new file.
    • /axr test <world> - test the ore file and memory for errors for a specific world
    • /axr test - test the ore file and memory for errors for all worlds
    • autorepack config option - pack ore files automatically at startup (if and only if the file passes the corruption test) - on by default
    • autobackup config option - backup ore files automatically at startup(if and only if the file passes the corruption test, and also requires autorepack) - on by default
    • new .ore extension for ore files (rename your old files)
    • removed glowing redstone ore from default ore list (never occurs naturally anyway)
    • fixed faulty scanning issue
    • fixed hopefully last exposed ore face index error
    • fixed false positive in memory check
    • debug.log flushed when error occurs (it is otherwise flushed once in a period of time)
    • more details in debug log when error occurs
    • removed lindex spam in debug log until lindex error occurs
    • Fixed /axr gen not triggering scan anymore
    • Fixed /axr gen not unloading chunks
    • Fixed (workaround) huge memory leak during /axr off /axr show /axr hide and /axr gen caused by bukkit's unloadchunk function
    • Additional file corruption checks that will make noise as soon as something goes wrong
    • Fixed another potential index derangement bug.
    • Fixed array out of bounds exception during previous fix
    • Fixed a couple of bugs offsetting exposed ore face indicies when mining adjacent block potentially causing array out of bounds exceptions at a later stage and the revealing of wrong ores when exposed to light.
    • Added debug logging of exposed ore face indices when found, as well as fault intolerant check that will warn you about any corruption of the indices after the event.
    • fixed half of ore not being hidden when a chunk is generated on load.
    • removed various unnecessary details to be logged in debug.log
    • fixed bug restoring ore, hiding and showing in wrong world
    • revert hack to set block material of a chunk to physical updates due to lacking javadocs to figure out what function to call
    • Switched to non physics updating block material setting hack
    • Updated to #733
    • Added detailed debug logging of background processes.
    • removed logging of filepointer
    • fixed failed scan after /axr gen unloading chunks that were originally not loaded, consequently also /axr gen causing server to freeze and timeouts on clients.
    • fixed /axr gen not unloading chunks that were originally not loaded
    • /axr gen and /axr gen copy now actually usable
    • ore in stone filter now also applies to /axr off and /axr show (not just when it is found by light detection)
    • added /axr gen command for generating a rectangular area of chunks
    • added /axr gen copy command for generating all chunks that are registered in another world
    • Configuration option CFGfilterorenotinstone implemented, that allows filtering of ores not in stone (can be useful in recovering lost ore from a world with the same seed)
    • fixed ore regen not working when axr is off in that world
    • removed physics lock spam
    • fixed more concurrency errors during background processes (hopefully for the last time)
    • fixed more concurrency errors during background processes
    • fixed concurrency errors during background processes
    • fixed debug off in config file causing unable to start (again! although different place now)
    • ore stats dump - listing all chunks ore counts into a text file
    • ore stats diff - showing difference between two ore stats dump files (these two tools are useful if you are worried that your ores might disappear)
    • show command - reveals the ore but does not unregister them or delete the file
    • hide command - hides again ore that was revealed with show.
    • show, hide and ore stat dump are background processes that does not freeze the server.
    • axr off is now a background process
    • load percentage of background processes can be configured
    • specify map zoom and center
    • Fixed file index debug listing not showing
    • file index debug listing can be turned off in config.txt (fileindexdebug)
    • area regeneration functions now tolerate any two coorner in rectangle in any order.
    • fixed debug off in config file causing unable to start
    • added axr map command for showing map of loaded chunks
    • fixed light expose unmapped material (probably why you got grass/smooth stones)
    • fixed light expose restored block being block at exposed face
    • fixed light expose no chunk location offset (why you got it at spawn)
    • fixed exposed face location wrong axis (probably floating blocks)
    • removed unnecessary cacheing of chunks at startup by not using chunks as keys for file index(probably solve memory problems for large worlds)
    • bypassing unnecessary cacheing of blocks using minecraft hackery.
    • revised scan algorithm, bypassing bukkit wrapcode resulting in at 5-10 times faster scanning.
    • fixed queries on unloaded sidechunks during scan resulting in loading and even generation of chunks that on top of it due to eventlock get ignored by onChunkLoad, thus leaving chunks of unhidden ore.
    • fixed light expose filling 0s after removed index
    • probably more bug fixes, can't remember them all
    • world statistics: type axr world - shows also what worlds are on/off
    • chunk statistics when axr is off no longer causes world to be registered without any chunks being loaded
    • axr on doesn't show NaN when there is nothing to hide
    • proper colouring
    • empty chunks are no longer ignored.
    • Fixed potential ore type shift bug
    • Moved listindex before file is loaded so debug info can be displayed even if it crashes while loading.
    • added rectangular area regen functions
    • Fixed silly nullpointer exceptions
    • Specify what worlds to turn on and off
    • Specify what worlds to load at startup
    • option to keep all ore data in memory
    • chunk statistics (useful for checking that your ore doesn't disappear or duplicate)
    • chunk regenertaion (restore a chunk to state at world generation)
    • chunk ore regenertaion (restore only ore)
    • Fixed some other bugs related to exposed-face-to-ore index
    • Index debug file working again (it was still expecting 0.1.5 files)
    • Added potential ore file corruption warnings to debug file output
    • Fixed bug locating exposed-face-to-ore index elements having no array bounds check.
    • Fixed bug exposed-face-to-ore index elements not being removed
    • Fixed bug exposed-face-to-ore index not being updated when ores are recovered and removed from hidden ore list (new bug in 0.2)
    • Fixed bug at y levels above 128-16 looking for ores above the map
    • Uses NSCommand now (it did right from the start but its now a separate plugin)
    • auto-creation of config files
    • defaults to ops only when permissions is not present
    • Light detection optimization based on a separate list of faces exposed to nonsolid materials (this might not work with all materials yet such as stairs and singlesteps, but its not like the world generator puts them in the caves anyway) resulting in at least 10 times faster execution of light checks. This should reduce all lag that's not due to scanning new chunks for ore.
    • Once again more detailed debug log
    • Fixed bug in ore restoring function causing large veins of ore to be generated out of nothing
    • More detailed debug log
    • Removed file corruption check that's hogging up some cpu cycles during file load and write events (the latter occured during scan event) - so this should speed up scan events.
    • pseudo error "load error 1" moved to debug log.
    • Added 1 tick delay of scan in onload event since it appears bukkit fires it before the chunk is populated with ore. This fixed the bug of ore appearing if you teleport or walk far away from initially scanned chunks.
    • removed physics event logging since it appears to always be neglible.
    • Added message at startup informing you about the waiting time of scanning all loaded chunks may take a while.
    • Fixed bug starting server without plugin data folder causing it unable to write debug file
    • Added more debug file details (when its scanning, loading from file, or just loading from memory when neither is shown)
    • Those who who don't hide coal, should experience faster chunk scanning now
    • Fixed bug due to player location being null for some weird reason
    • Added debug logging of time spent on the main time consuming procedures.
    • Fixed config file not loading properly
    • Removed wtfexception spam
    • Initial Release
    Donate (Not necessary but appreciated)
  2. Offline


    Asdaarg, thnx for this wonderful plug-in! Without this, my server would be griefed by x-ray n00bs. Anyways, just got a quick question: is it safe to use on Bukkit #803? Don't want my ores to go missing hahahaha
  3. Offline


    Well, I don't know TBH. 0.6.6 is yet to be proven stable, simply because I'm lacking feedback regarding testing it without a previous ore file and I cannot do this myself because its worked flawlessly for me since 0.6.0. and I cannot reproduce the errors others have reported. I have not had the time to test it with #803 either. If you want to be on the safe side, Make an initial backup of the whole world, and also the ore file after each major exploration of new chunks (one can easily recover ore from a backup except from new chunks) There is also a way to recover ore using the world seed (you don't even need a backup) but it is a lengthier process.
    RaCooN likes this.
  4. Offline

    The PC Tech Guy

    It's working OK for me, but as I said in some post before, it's simply saying "repack" then says "no ore file to repack." Backups and tests seem to work instantly, though. I haven't checked if there's a backup file, but I'd believe my results are the same as mmerner's. I'm now using CB 803.
  5. Offline


    It says "no ore file to repack" each time? Do you have an .ore file in your antixray folder, and do you have a .bak file?
    Edit: Ok, embarrassing bug. It doesn't repack at all because it checks whether the wrong file exists. Fixed now.
  6. Offline


    So today I got a bunch of new players, they were mining and noticed that they couldn't find iron, wierd I thought. So dug a megacave, and it seems like EVERY ORE except those who are lit up are gone. And this must've been here for a while. Because I haven't noticed anything except less succesful mining.

    How the hell should I do? My map is 90 mb, with loads of structures. I have no clue what to do, and I'm not gona create a new map. I don't have multiworld and didn't really understand how to restore ore. I tried turning axr off, to see if all ores really were gone and when I turned on Xray, indeed it was.

    I tried using Worldedit to regen a small region. No success, still no ores showing up.
    So basically this mod has destroyed my entire server.
    Is there anything I can do?
  7. Offline


    If you don't get your ore back when you type /axr off then they're gone. You can restore the ore using the world seed if you don't have a backup. What version are you using? Since what version have you been using AXR and have you done /axr off before upgrading?
  8. Offline


    I'm using Multiplay as my host so they update the plugin automatically. They used to have 5.? And then suddenly it was 0.6.4 which I've been using for a while. I think I've had it for 1.5 weeks. I only wanna restore parts below a certain Y coordinate, else I'll.. Destroy everything on the surface.

    EDIT: I only have backups for 3 days since I remove backups after a certain time. And well.. I don't wanna go back 1.5 weeks.
  9. Offline


    Only ore is restored. I'm not sure if host allows you to this though.
  10. Offline


    So basically, my host fucked up when they updated the plugin without notice and the plugin wasn't turned off before updating?
    So how should I go from here to restore the ore?
  11. Offline


    Read under description.
  12. Offline


    I don't get it.. I guess I'm stupid.

    I've installed Multiverse and made a new world. But I have no clue to.. Actually enroll with my host. How can I copy world 1 to world 2. I can't even find my second world in anywhere. So I can't delete regions

    I don't think it's possible with my host. Fuck this.
  13. Offline


    Can you download your world? If so, then you could do it locally and then upload it back when its done.
  14. Offline


    EDIT: Ok so I managed to do everything as the instructions said with help from an admin. Although it did not restore the ores in my entire world. Only ores from 4412 Chunks. And I had 52000 If I remember correctly. So why did it do like this?

    If I turn on X-ray now I can see the pattern. I'll have to re-do it all over again but this time I wanna make sure that I actually restore the entire world's ores.
  15. Offline



    i have a problem after server restart.
    at the first run of xray the ores perfectly removed.

    but after a server restart the ores are back and i can see them with xray.
    i set only debug to false.
    shutting gown with "save-all" and "stop"
  16. Offline


    I need to know why only a certain amount of my chunks got restored. After that I can figure everything else out.

    Thanks in advance.
  17. Offline


    Yes. How would I restore them. Do I need to use an old version. I have a map backup with the ores. I tried all of the listed solutions and none work all return "unknown command" when I replace the .ore file...
  18. Offline


    Would it be possible for you to add a way to update only certain chunks instead of rebuilding the entire database? Say I paste a region with 1% coal and 99% stone using worldedit, those ores will not be hidden until I rebuild the database, which takes ages.
    (In case this is already possible, please explain how in the OP, as I can't find it)
  19. Offline


    Since /axr gen world sucks up memory. I just used multiverse to create a world from a backup, hide chests all over and told ppl to find them =), let the players render all of the chunks for me hehehe
  20. Offline


    no issue, just nice to know: i have set an automatic daily restart at 6.00AM at my server and automatic "save-all" every 15 minutes. so when server restarts, does it can happen that ores will be deleted forever? or the file "world.ore" will persist all ores, i should have never a loss of ores? what is at server-crashes?
  21. Offline


    A restart shouldn't do antyhing but if the server crashes while its trying to write the ore file, it could get corrupted.

    Its not possible using any commands at the moment, but if you manage to call the right functions using for instance scriptinjector its possible. It was going to be a feature anyway with axr chest being added.

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


    what about options to have the files be backed up every Xhours interval to /backup/?
  23. Offline


    I could add such a feature, once I know that its stable.
  24. Offline


    740 + 0.6.7
    serverlog :
    call it if you need world.ore.index.txt or world.ore etc..

    i started server, was alone on server as admin, command /axr on: 0 chunks hidden, /axr off: nothing to restore. got error in serverlog and debug.log. before it seemed to be working last 2 days. but i hat feeling that after /axr off new diamons were shown on surface of cavegrounds... not seen before by walking the location by.
  25. Offline


    Have you used a previous version of axr? If so what version? Did you get errors after using /axr off?
  26. Offline


    1. no, i started using first time axr since thursday with 0.6.7.
    2. no, i get errors only using /axr on
  27. Offline


    Can I have a look at the full debug.log? If its big you can zip it down a lot.
  28. Offline


    don't suppose there's a chance of being able to enter commands via the server console?
  29. Offline


    Hi. I have got a problem. I have turned off my AXR(just remove plugin.jar), but forgot for ores. Today, i downloaded fresh Antixray, but ores dont want to appear. So, my build is 814(1.6), and i now this may be a problem, but anyway, could you guys help me? So, when i just regen ore in the chunk, they regenerate. But i cant just regen all the world. There is about 70k chunks. I have my indexes files, but i dont know how i could turn them into game. Also, i suppose that problem is AXR is not loading indexes, but this is just guees. So, help me. Cant play without ores. Thanx
  30. Offline


    you have my "full" debug.log already, look post above. it's only for ca. 2minutes server online time. before i haven't debug.log and i don't want to activate axr on my server again to get bigger debug.log, cause i fear that i could loss ores with this bug.
  31. Offline


    So basically you turned on debug logging after the error happened? Unfortunately that does not help me solving it.

Share This Page