How to detect fluids etc.

Discussion in 'Plugin Development' started by TGF, Nov 8, 2012.

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


    Hi, I need to detect placing fluids and it's easy!
    But the problem is to detect what become from for example water block(am I sure that theoretically water flow 8 block at every side?).

    I found something what could help me but it's very hard to read sth from it^^
    Here it is:

    (just a little)Part of my code:
    BlockFromToEvent (open)
    public void fromto(BlockFromToEvent event){
        Block b = event.getBlock();
        int type = 0;
        Material typee = b.getType();
        int data = b.getData();
        int x = b.getX();
        int y = b.getY();
        int z = b.getZ();"BlockFromToEvent"); + "Id=" + type + "|X=" + x + "|Y=" + y +"|Z=" + z +"|DATA="+typee+":"+data);
        try {
            String query;
            sendQueryAlt(connection, query);
        } catch (Exception e) {
  "#Sendin Erro" + e);
  2. Offline


    say a = block from and b = block to
    if a = air, torch, etc, b = water
    if a = lava, b = cobble/obsidian
    if a = solid block, sign, etc. b = a
    TGF likes this.
Thread Status:
Not open for further replies.

Share This Page