Package net.glowstone.net.message.play.player

Examples of net.glowstone.net.message.play.player.BlockPlacementMessage


        int direction = buf.readByte();
        ItemStack heldItem = GlowBufUtils.readSlot(buf);
        int cursorX = buf.readByte();
        int cursorY = buf.readByte();
        int cursorZ = buf.readByte();
        return new BlockPlacementMessage(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ(), direction, heldItem, cursorX, cursorY, cursorZ);
    }
View Full Code Here


        /**
         * Check if the message is a -1. If we *just* got a message with the
         * values filled, discard it, otherwise perform right-click-air.
         */
        if (message.getDirection() == -1) {
            BlockPlacementMessage previous = session.getPreviousPlacement();
            if (previous == null || !previous.getHeldItem().equals(message.getHeldItem())) {
                // perform normal right-click-air actions
                action = Action.RIGHT_CLICK_AIR;
                clicked = null;
            } else {
                // terminate processing of this event
View Full Code Here

TOP

Related Classes of net.glowstone.net.message.play.player.BlockPlacementMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.