Examples of Side


Examples of org.terasology.math.Side

    @Override
    public Block getBlockFor(BlockUri blockUri) {
        if (getURI().equals(blockUri.getFamilyUri())) {
            try {
                Side side = Side.valueOf(blockUri.getIdentifier().toUpperCase());
                return blocks.get(side);
            } catch (IllegalArgumentException e) {
                return null;
            }
        }
View Full Code Here

Examples of org.terasology.math.Side

    public AllSidesFamily(BlockUri uri, Iterable<String> categories, Block archetypeBlock, Map<Side, Block> sideBlocks) {
        super(uri, categories);

        for (Map.Entry<Side, Block> blockBySide : sideBlocks.entrySet()) {
            final Side side = blockBySide.getKey();
            final Block block = blockBySide.getValue();
            if (block == null) {
                throw new IllegalArgumentException("Missing block for side: " + side.toString());
            }
            block.setBlockFamily(this);
            block.setUri(new BlockUri(uri, side.name()));
        }

        this.archetypeBlock = archetypeBlock;
        this.sideBlocks = sideBlocks;
    }
View Full Code Here

Examples of org.terasology.math.Side

    @Override
    public Block getBlockFor(BlockUri blockUri) {
        if (getURI().equals(blockUri.getFamilyUri())) {
            try {
                Side side = Side.valueOf(blockUri.getIdentifier().toUpperCase());
                return sideBlocks.get(side);
            } catch (IllegalArgumentException e) {
                return null;
            }
        }
View Full Code Here

Examples of org.terasology.math.Side

            return;
        }

        BlockItemComponent blockItem = item.getComponent(BlockItemComponent.class);
        BlockFamily type = blockItem.blockFamily;
        Side surfaceSide = Side.inDirection(event.getHitNormal());
        Side secondaryDirection = TeraMath.getSecondaryPlacementDirection(event.getDirection(), event.getHitNormal());

        BlockComponent blockComponent = event.getTarget().getComponent(BlockComponent.class);
        if (blockComponent == null) {
            // If there is no block there (i.e. it's a BlockGroup, we don't allow placing block, try somewhere else)
            event.consume();
View Full Code Here

Examples of org.terasology.math.Side

    @Override
    public Block getBlockFor(BlockUri blockUri) {
        if (getURI().equals(blockUri.getFamilyUri())) {
            try {
                Side side = Side.valueOf(blockUri.getIdentifier().toUpperCase());
                return blocks.get(side);
            } catch (IllegalArgumentException e) {
                return null;
            }
        }
View Full Code Here

Examples of org.terasology.math.Side

    }

    private void validateSupportForBlockOnSide(Vector3i replacedBlockPosition, Side side) {
        final Vector3i blockPosition = side.getAdjacentPos(replacedBlockPosition);
        if (worldProvider.isBlockRelevant(blockPosition)) {
            final Side sideReverse = side.reverse();

            for (BlockStructuralSupport support : supports) {
                if (support.shouldBeRemovedDueToChange(blockPosition, sideReverse)) {
                    System.out.println("Removing block due to: " + support.getClass());
                    blockEntityRegistry.getBlockEntityAt(blockPosition).send(new DestroyEvent(gatheringEntity,
View Full Code Here

Examples of quickfix.field.Side

    private NewOrderSingle createNewOrderMessage() {
        NewOrderSingle order = new NewOrderSingle(
            new ClOrdID("CLIENT_ORDER_ID"),
            new HandlInst('1'),
            new Symbol("GOOG"),
            new Side(Side.BUY),
            new TransactTime(new Date()),
            new OrdType(OrdType.LIMIT));
       
        order.set(new OrderQty(10));
        order.set(new Price(300.00));
View Full Code Here

Examples of quickfix.field.Side

            String replySessionID = "FIX.4.2:MARKET->TRADER";
            LOG.info("Given the requestSessionID '{}' calculated the replySessionID as '{}'", requestSessionID, replySessionID);

            String orderID = exchange.getIn().getHeader("orderID", String.class);

            OrderStatusRequest request = new OrderStatusRequest(new ClOrdID("XYZ"), new Symbol("GOOG"), new Side(Side.BUY));
            request.set(new OrderID(orderID));
            
            // Look for a reply execution report back to the requester session
            // and having the requested OrderID. This is a loose correlation but the best
            // we can do with FIX 4.2. Newer versions of FIX have an optional explicit correlation field.
View Full Code Here

Examples of quickfix.field.Side

                new ExecID(UUID.randomUUID().toString()),
                new ExecTransType(ExecTransType.STATUS),
                new ExecType(ExecType.REJECTED),
                new OrdStatus(OrdStatus.REJECTED),
                new Symbol("GOOG"),
                new Side(Side.BUY),
                new LeavesQty(100),
                new CumQty(0),
                new AvgPx(0));
        }
View Full Code Here

Examples of quickfix.field.Side

    private NewOrderSingle createNewOrderMessage() {
        NewOrderSingle order = new NewOrderSingle(
            new ClOrdID("CLIENT_ORDER_ID"),
            new HandlInst('1'),
            new Symbol("GOOG"),
            new Side(Side.BUY),
            new TransactTime(new Date()),
            new OrdType(OrdType.LIMIT));
       
        order.set(new OrderQty(10));
        order.set(new Price(300.00));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.