How does the Orebfuscator work?

Discussion in 'Plugin Development' started by perwin, Mar 17, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    perwin

    Hello,
    I am trying to develope a plugin that works like the Orebuscator. But could anyone help me doing that? I really don't know how the Orebfuscator works (and also how the X-Ray works), so I don't know where to start.
    Thanks for replies.
     
  2. I believe it sends modified packets to each player showing all ores as stone until they break them or are in close proximity to them. Seems like a very laggy way to go about avoiding xraying.
     
  3. X-ray texture packs generally work by making all blocks that are of no interest (i.e. dirt, stone etc.) transparent. This allows x-ray-ers to see more important blocks that are generally given a bright solid colour - this only works if the block is on the surface of a rock face, so for example, on the bed of a lava lake or on a cave wall.

    X-ray mods workd by hiding all blocks except the blocks you tell it to show you and will highlight all blocks of this kind whether hidden or not. (I may be slightly wrong on this front as I haven't actually researched much about them).

    Orebfuscator blocks both by modifying packets received by players so that blocks that are hidden from view are truly hidden, either, it seems, by making those bocks non-viewable or by making all hidden (not in player LoS) blocks appear to be a special ores.
     
  4. Offline

    perwin

    Hmm I already knew this, so I will specify my question. How does the server plugin know that someone just pressed the "X" button and activated X-Ray (is there any packet for this to handle)? Because I thought that server sends all informations about the map and blocks to generate (to show) on player's monitor, when the player connects, and then the X-Ray mod just says what received data from server will the player see on monitor. So why would the X-Ray mod send packets about itself to the server, something like "Hey server, I am X-Ray and a I see everything a want!"?
    Thanks.
     
  5. Offline

    kreashenz

    My guess, is that the blocks are already there, just waiting for someone to check for diamonds. I have been up against OrebFuscator in my own server a few times, and I have crashed because of it. It probably just has the top layer/sides/bottom of top layered block ( ground level block ) and everything underneath it changed so you do not see the blocks, to cause lag. I don't really know, but yeah, just a wild guess there.
     
  6. The server doesn't know that. The plugin is active regardless if the player has xray or not. As explained before xray only hides all unneeded blocks from the players view by making them transparent and show only the blocks the user wants to see. Orbfuscator tricks this out by changing all ore blocks to blocks that get transparent when the user enables xray. Only the blocks, that are next to air, water or lava are what they are supposed to be. When you diff a block away, orbfuscator changes the blocks behind this block, to what they should be. That is quite hard work and therefore performance consuming. As I know orbfuscator uses some tricks to speed things up, like caching the results and using cab and nms code, but anyway, it has a big performance impact on a server, especially when new chunks are generated.
     
Thread Status:
Not open for further replies.

Share This Page