##NoXray
NoXray is a mixin plugin that works on SpongeVanilla and SpongeForge. Thanks to mixins I was able to make a system that is effective and doesn’t lag that much. It works by modifying the chunks at send time and updating surrounding blocks when players break a block. Please note that ores in caves are visible, due to the fact that their is an air-block next to it, but this should slow down people that xray very effectively .
Yeah I don’t really know a reliable way to hide lava. They mostly have an air-block on top and hiding the underlying blocks will make it so that players can place blocks in the air, what isn’t really what I am going for. I have used xray for a while (actually I am backstabbing myself with this but yeah), and the ability to avoid lava isn’t really that useful if your focusing on getting the ores you want.
I am confused right now. Are you saying that the plugin name is incorrect? And how does it take the same amount of time with this plugin enabled? Their are literally only maybe 3 diamonds on screen, while without it you can mine a stack in mater of 30 min.
Also banning players for xray is the reason I made this plugin for. I disagree with that concept. The server literally sends you all the information you need. Not using it would be dumb I think.
What I could do is flag the remaining visible ores and if a player mines to much of those warn an admin maybe. Also replacing all the stone by random ores could help, but doesn’t look server friendly to do for me.
Oh, I’m sorry if you misinterpreted what I was saying. I’m saying another thing you could add to this is forcing XRayers to conform to the statistical probabilities of diamonds to stone ratios (approximate, of course) and warn an admin if that happens. I mean to add statistical oversight to the plugin in addition to the active replacement of ores.
Also, the server sends you the data in chunks to make it easier on the server’s side. If it were to be redesigned to prevent cheating, that’s one of the primary changes. Only send the player what they are seeing.
Alright . I didn’t though this would count since I didn’t really put a lot of work in to this.
(3 days mangling with gradle to get a buildscript that allowed me to debug/code and 2 days coding)
The way that anti-xray generally hides lava, is by using “mode 2” xray. instead of hiding non visible ores, you instead set all non visible blocks to random ores, redstone, tnt, and lava, giving the xraying player too many false positives to determine what is real or not.
It’s not 100% effective as they could still work out continuous patches of lava vs the 1 off bits, but it’s annoying enough that they generally stop using it.
My only gripe with this method is potential issues with non cheating palyers on low end pc’s, as the client then needs to do a bunch more culling checks etc in order to keep up.
Their is a problem with that. For every 161616 chunk blocks (BlockStateContainer) the server generates some kind of “block registry” (BlockStatePallete). If I set a block that increases the block-pallet size it will cause an exception. I haven’t been able to figure out how exactly I can fix it (without writing 3 more mixins at least).
Not really, for the client it is just another texture for the block. As long I don’t spoof blocks that have custom renders (chests, end portals, …). The client shouldn’t really be affected by that.
I haven’t looked at any other anti-xray implementation. So no idea .
Idk should it? The only reason spigot has it build in, is because bukkit doesn’t provide enough tools to make plugins do it (properly).
Actually, I was thinking about making a plugin that would do just that (except it would work on the block level and would be pretty CPU-expensive). The only difficulty is sending the chunks when the player moves to a place from which they can see them.