No X-Ray
No_Xray
Not Coming Back Yet
The author who said they were bringing back this plugin actually just stole Orebfuscator and re-published it. That is NOT going to happen under my watch.
NOTICE: I am officially deprecating this project (4/17/12)
What does this mean?
- I believe that this project is too inefficient, too insecure, and too difficult for me to fix to correct these issues.
Why are you doing this?
- I want to free my time for other projects. No need to be hung up here when better alternatives (for both you and me) are out there!
Where should I go now for anti x-ray?
- Use Orebfuscator. The plugin is far better http://dev.bukkit.org/server-mods/orebfuscator/
Is development over?
- Sort of. I won't be developing this plugin actively. I might come back to it later, either when I want to learn more about anti x-ray, although for a while, I will be spending my time elsewhere. I definitely won't be back till late June, due to exams and travel.
What needs to be done to fix the project?
- Vision needs serious debugging. Sometimes, the vision doesn't calculate right.
- Chunk sending needs to be overridden to hide all non-visible blocks on chunk load.
- The efficiency of the ray tracing and searching algorithms need improvement. Perhaps the search could spider out rather than simply iterating through a cuboid?
- Exposure hiding would be a big plus: hiding based on if a block is exposed to a transparent block.
- Auto-shutdown of plugin if the server is getting too laggy.
Can I take over this project?
- Be my guest! If you have submissions/fixes, please tell me. If you want full control of the development, I can give you/add you to the project.
Summary
No X-Ray by FalseVacuum is, as the name suggests, an anti-X-Ray hack plugin. No X-Ray is unlike some plugins in that it actually uses the line-of-sight of the player (sort of) to decide which blocks to hide. While many anti X-Ray plugins check if the given block is surrounded by opaque blocks, No X-Ray checks 8 different line-of-sight paths to the block. If all 8 paths are blocked at any point by an opaque block, the block's type is changed.
Configuration
There are 3 configuration nodes in config.yml:
- objects.transparent - a list of all transparent (see through, non-opaque) objects (defaults to too many objects to list
- objects.hidden - a list of all objects to hide (defaults to chest, diamond ore, moss stone, monster spawner)
- objects.isactuallyopaque - Is the transparent list actually an opaque list
- verbose - This is for debugging. Don't turn this on unless you're a developer
- search.x, y, z - The x, y, and z search distances. These default to 100 each (search.x, search.y, search.z).
- search.gothreadsafe - Choose to test out the experimental thread-safe method. This puts all changeBlockAt() calls in the main thread.
Commands
- /noxray reload - Reload the configuration of the plugin
- /noxray release - Release (disable) the plugin. This allows you to update the plugin without shutting down the server
Permissions
- vacuum.noxray - Gives access to all noxray commands.
- vacuum.noxray.hide - Give this permission to anyone from whom you want to hide things like chests, etc. This defaults to everyone but ops.
Known issues
No X-Ray occasionally will not determine if the desired block is visible or not. More often, it will decide a block is visible if it is not. This is often due to corners being transparent.
This application may or may not be thread-safe
I spoke with Lishid, author of Orebfuscator. He gave me some great tips, and I will do my best to get them into the next update. This will hopefully alleviate some of the issues with blocks appearing/disappearing when they shouldn't. He also spoke to me about some possible vulnerabilities. Implementing them will be a lot of work, but I will do my best to get this plugin up to speed with what it should be!
Performance
While it may seem appealing to make all diamond blocks (id = 56) hidden, remember that there are many, many diamonds. You might benefit from just searching for chests, monster spawners, and moss stone.
You can also try decreasing the search distances. You probably shouldn't go below 25 for any given direction (this gives a dimension of 50 for the cuboid because it is 25 forward, 25 backward)
Another thing you can try is reducing the number of people that have vacuum.noxray.hide. Set this permission to false on people you trust.
Source
Curious about how this plugin works? Ask in the comments below or dive into the source!
I hope I'm not the only one having trouble with NoXRay. It seems to not work! Here is a pastie of a startup, no errors. http://pastie.org/3712804
Alright so what is the problem? Doesn't actually work ingame. http://i.imgur.com/2BNkx.png The command doesn't work, so I would assume the plugin isn't working correctly.
Plus I get this when reloading the plugin. http://i.imgur.com/yQvZg.png
Thanks and hopefully you can help me out soon!
@ferrybig
Research suggests that the plugin is already thread-safe as-is. However, there is now a thread-safe option in the config.
@ferrybig
No offense ferry, but Spelling errors is a bad behavior... especially for permissions
@falsevacuum
I'll be able to test this out either tonight or tomorrow; looking forward to see the new changes :D
Thanks again for your hard work.
@All
Can people please try to test out the new thread safety feature and tell me if there's a performance issue? Run 1.3.3 (when Bukkit approves it) and set gothreadsafe to true in the config. Then reload the plugin with /noxray reload and see if it causes a performance boost, drop, or no change.
@ferrybig
The 1.3.3 build offers the option, off by default, to put all calls to Player.sendBlockChange() in the main thread by using an async Bukkit scheduler call.
@Rad_E_Zorack_synergy
Can you try updating to 1.3.3 and setting gothreadsafe to "true" and tell me if the error still occurs, please? Thanks!
@Rad_E_Zorack_synergy
Opaque list added in 1.3.0! Release, update, run it. A new option in the config will appear, "isActuallyOpaque". Set that to true, and "transparent" will be read as an opaque list rather than a transparent list.
@Rad_E_Zorack_synergy
I wonder if this might be a thread safety issue like what Ferry was discussing. I will have more updates for you as my research progresses.
@ferrybig
Please be more respectful. I will look into making this more thread safe, but not for you. I will do it for everyone but you.
so, your are using oher threads than the main server thread to acces Block objects, what an BAD behavor, this wil cause manny of other bugs
@falsevacuum
I can't seem to consistently reproduce the error; but it still happens occasionally and causes a burst of lag. (server doesn't crash or anything drastic).
It was happening on Craftbukkit 1.2.3 Beta, and now also on Craftbukkit 1.2.4 Beta.
We have been using Essentials for anything involving spawning or teleporting. And PermissionsEX for our permissions plugin.
I'll try turning on the "verbose" on the weekend to see what it tells me.
P.S. Thanks for looking into my request for Opaque blocks list :D
@Pandamatak
On certain events, like player movement, etc., the plugin checks each nearby block in objects.hidden to see if it is visible. If it is, it checks if the block is hidden to the client through a cache of changes and either sends a block update or no response. If the block is not visible, the plugin checks the cache to see if the block is hidden and either updates the block to air or does not react. The cache approach is vital to avoid client crashes.
Basically, it edits the pre loaded chunks.
If you're able to read code, see lines 45-63 http://code.google.com/p/vacuum-noxray/source/browse/trunk/src/vacuum/noxray/PlayerVision.java
Also, I tested this on texture packs and had my brother test the first release version with a client X-Ray mod.
Texture packs require no installation, hence why I used that instead of mods.
@falsevacuum
Wait, are you sure? X-Ray texture packs
Aren't chunks managed by the client once loaded? How did you do it?
@KimVinberg
@Rad_E_Zorack_synergy
Thanks :D
Can either of you explain to me how to replicate the issue? I downloaded a spawn plugin and I cannot replicate the issue. The issue has to do with teleportation events, but I'm not sure what causes it.
Also, Rad, as per your suggestion to just list opaque blocks, I can certainly do that, and will include that in the next update.
Also wondering, if instead of a "transparent" list, could you have an option for an "opaque" list instead.
Right now I'm finding the "transparent" list getting rather large and things like signs aren't listed by default. (when using lockette, chests were disappearing lol) I really only want to hide things behind basic blocks like: stone, dirt, water, lava, sand, gravel, sandstone, etc.
I feel an "opaque" list could make the txt file smaller.
Very cool plug in btw :)
I'm having a similar issue as KimVinberg.
Whenever a new player logs on and sometimes when players /spawn, the server lags and we get this showing on the console:
22.03 15:27:49 [Server] INFO ... 11 more 22.03 15:27:49 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) 22.03 15:27:49 [Server] INFO at java.lang.reflect.Method.invoke(Unknown Source) 22.03 15:27:49 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 22.03 15:27:49 [Server] INFO at sun.reflect.GeneratedMethodAccessor301.invoke(Unknown Source) 22.03 15:27:49 [Server] INFO at vacuum.noxray.Listener.onPlayerTeleport(Listener.java:49) 22.03 15:27:49 [Server] INFO at vacuum.noxray.PlayerVision.dumpPlayerCache(PlayerVision.java:188) 22.03 15:27:49 [Server] INFO at java.util.HashMap$KeyIterator.next(Unknown Source) 22.03 15:27:49 [Server] INFO at java.util.HashMap$HashIterator.nextEntry(Unknown Source) 22.03 15:27:49 [Server] INFO Caused by: java.util.ConcurrentModificationException 22.03 15:27:49 [Server] INFO at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) 22.03 15:27:49 [Server] INFO at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) 22.03 15:27:49 [Server] INFO at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554) 22.03 15:27:49 [Server] INFO at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) 22.03 15:27:49 [Server] INFO at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116) 22.03 15:27:49 [Server] INFO at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) 22.03 15:27:49 [Server] INFO at net.minecraft.server.Packet10Flying.handle(SourceFile:126) 22.03 15:27:49 [Server] INFO at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:395) 22.03 15:27:49 [Server] INFO at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:512) 22.03 15:27:49 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441) 22.03 15:27:49 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) 22.03 15:27:49 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303) 22.03 15:27:49 [Server] INFO org.bukkit.event.EventException 22.03 15:27:49 [Server] SEVERE Could not pass event PlayerTeleportEvent to NoXRay
sry if this counts as spam, just trying to help debug :)
@KimVinberg
Thanks. I'll take a look at that when I get home tonight.
2012-03-22 11:55:30 [SEVERE] Could not pass event PlayerTeleportEvent to NoXRay org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:512) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:81) at lishid.orebfuscator.hook.OrebfuscatorPlayerListenerHook.TryUpdateNetServerHandler(OrebfuscatorPlayerListenerHook.java:48) at lishid.orebfuscator.hook.OrebfuscatorPlayerListenerHook.onPlayerJoin(OrebfuscatorPlayerListenerHook.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441) at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:135) at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:128) at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:41) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:61) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.NullPointerException at vacuum.noxray.PlayerVision.dumpPlayerCache(PlayerVision.java:188) at vacuum.noxray.Listener.onPlayerTeleport(Listener.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) ... 20 more
It works even with this error. Using it to hide diamond blocks (error is there no matter what i hide) Works 100 times better than other hiders.
@Folipurba
As per the underground base deal, your base will appear to be a cavern, but your chests, etc. will not appear.
Also, I uploaded a slightly improved (O(n^4log(n)^2) rather than O(n^6) efficiency) algorithm with 1.2.8. If you don't know what that means, basically it's slightly more efficient. In addition, not hiding ores or reducing the search distance will greatly improve performance.
Very nice idea, this could even hide underground bases! It might need a different algorithm for better performance.
@falsevacuum
Ah, gotcha, I thought it may have been Vanish cause it popped up right as I joined vanished. I have a test server I generate the configuration on, then restart the server fresh most times as opposed to reloading everything :) .