[SEC/FUN] Per-player realtime block filtering

Discussion in 'WIP and Development Status' started by lahwran, Apr 13, 2011.

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

    lahwran

    Update: I've got this working and live on my server.


    I'm currently working on a block filtering system (a fork of both bukkit and craftbukkit) to allow plugins to filter what blocks are sent to each player before they're sent. I have it mostly working, see below for todo/known issues.

    Right now if you log into my test server with the username "rock" (it's in offline mode), all blocks but air load as stone.

    The main purpose for this project is an anti-xray to end all anti-xray, but it could also be used for things like hiding a block used as an admin tool (probably just sponge), making mirages of buildings in the distance in the desert, hallucination, dreams, so on and so forth. One catch is that the blocks are basically clientside only, as far as things like nocheat and physics are concerned; all you can do is change appearance, you can't alter physics any more than the client can.

    Screenshots:
    [​IMG]

    http://imgur.com/a/qYiEN

    Fork repos:
    https://github.com/lahwran/Bukkit
    https://github.com/lahwran/CraftBukkit

    Example plugin:
    https://github.com/lahwran/BlockFilterExample

    Still to be done:
    figure out a way to preprocess Packet51 and possibly turn it into a set of Packet52s when generated from a plugin.
     
  2. Offline

    Relentless_x

    im looking forward to the release of this ! Will be useful on my server!
     
  3. Offline

    woodzy

    maby not block flitering like in your picture. but more of broadcasting ores as something else like leafs and logs and so on, just to hid the blocks untill a player can see it on there screen
     
  4. Offline

    lahwran

    the picture is just my quick test.
    if(event.getBlockID(blockx, blocky, blockz) != 0) event.setBlockID(1, blockx, blocky, blockz);

    the antixray will check each block's surfaces for air, if none are air then it will send it as SUBSURFACEBLOCK (a config option which defaults to bedrock). if any *are* air, it will then check the distance to the player's last bounding box update. if the block is inside that, it then goes through unprocessed. if it's outside that, then if it's in the list of configurable "expensive blocks", then it gets replaced with the block that the list says. if it's not in the list, then it's left alone.
     
  5. Offline

    Deathly

    Totally would like to see this in Bukkit :)
     
  6. Offline

    lahwran

    Well, I need to do some testing that I've been putting off, but I think it's nearly ready for pull requesting. Soon as I can get an antixray plugin ready for action and tested on a production server, I'll release the plugin and pull request.

    Edit: I should mention that a large worry of mine was originally that it would be slowed by having to access the world once for each player - I'm currently running this bukkit on my production server but without any plugins that use the system.
     
Thread Status:
Not open for further replies.

Share This Page