Package com.sk89q.craftbook.access

Examples of com.sk89q.craftbook.access.BlockEntity


        int x = pos.getBlockX();
        int y = pos.getBlockY();
        int z = pos.getBlockZ();

        if (w.getId(pos) == BlockType.CHEST) {
            BlockEntity complexBlock =
                    w.getBlockEntity(x, y, z);

            if (complexBlock instanceof ChestInterface) {
                ChestInterface chest = (ChestInterface) complexBlock;
View Full Code Here


        x = pt.getBlockX();
        y = pt.getBlockY();
        z = pt.getBlockZ();

        BlockEntity blockEntity =
                w.getBlockEntity(x, y, z);
        if (blockEntity instanceof SignInterface)
            signText = (SignInterface) blockEntity;
        else throw new IllegalArgumentException("block not sign");
        this.pt = pt;
View Full Code Here

        int x = pt.getBlockX();
        int y1 = pt.getBlockY();
        int z = pt.getBlockZ();

        BlockEntity cBlock = w.getBlockEntity(x, y1, z);

        // This should not happen, but we need to check regardless
        if (!(cBlock instanceof SignInterface)) {
            return null;
        }
View Full Code Here

     *
     * @return
     */
    public int compare(BlockEntity o1, BlockEntity o2) {

        BlockEntity b1 = (BlockEntity) o1;
        BlockEntity b2 = (BlockEntity) o2;

        double dist1 = b1.getPosition().distance(origin);
        double dist2 = b2.getPosition().distance(origin);

        if (dist1 < dist2) {
            return -1;
        } else if (dist1 > dist2) {
            return 1;
View Full Code Here

     *
     * @return
     */
    public static boolean doesSignSay(WorldInterface w, Vector pt, int lineNo, String text) {

        BlockEntity e = w.getBlockEntity(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ());

        if (e instanceof SignInterface) {
            return ((SignInterface) e).getLine(lineNo).equalsIgnoreCase(text);
        }

View Full Code Here

     *
     * @return
     */
    public void addSingleSourcePosition(WorldInterface w, Vector pos) {

        BlockEntity e = w.getBlockEntity(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ());
        if (e instanceof SignInterface) {
            SignInterface s = (SignInterface) e;

            if (store && s.getLine2().equalsIgnoreCase("[Black Hole]")) {
                canStore = true;
View Full Code Here

TOP

Related Classes of com.sk89q.craftbook.access.BlockEntity

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.