Package net.minecraft.entity.item

Examples of net.minecraft.entity.item.EntityMinecart


        return Math.min(min1, min2);
    }

    private void setTrainMaxSpeed(EntityMinecart cart, float trainSpeed) {
        LinkageManager lm = LinkageManager.instance();
        EntityMinecart linkA = lm.getLinkedCartA(cart);
        EntityMinecart linkB = lm.getLinkedCartB(cart);

        setTrainMaxSpeedRecursive(linkA, cart, trainSpeed);

        setTrainMaxSpeedRecursive(linkB, cart, trainSpeed);
View Full Code Here


    private void setTrainMaxSpeedRecursive(EntityMinecart cart, EntityMinecart prev, float trainSpeed) {
        if (cart == null)
            return;
        LinkageManager lm = LinkageManager.instance();
        EntityMinecart linkA = lm.getLinkedCartA(cart);
        EntityMinecart linkB = lm.getLinkedCartB(cart);

        if (linkA != prev)
            setTrainMaxSpeedRecursive(linkA, cart, trainSpeed);

        if (linkB != prev)
View Full Code Here

        if (isOnElevator(cart))
            return;

        boolean linked = false;

        EntityMinecart link_A = lm.getLinkedCartA(cart);
        if (link_A != null) {
            launched = link_A.getEntityData().getInteger("Launched");
            if (launched <= 0 && !isOnElevator(link_A)) {
                linked = true;
                adjustVelocity(cart, link_A, 'A');
                adjustCartFromHistory(cart, link_A);
            }
        }

        EntityMinecart link_B = lm.getLinkedCartB(cart);
        if (link_B != null) {
            launched = link_B.getEntityData().getInteger("Launched");
            if (launched <= 0 && !isOnElevator(link_B)) {
                linked = true;
                adjustVelocity(cart, link_B, 'B');
                adjustCartFromHistory(cart, link_B);
            }
View Full Code Here

     *
     * @param event
     */
    @SubscribeEvent
    public void onMinecartUpdate(MinecartUpdateEvent event) {
        EntityMinecart cart = event.minecart;

        LinkageManager lm = LinkageManager.instance();

        if (cart.isDead) {
            lm.removeLinkageId(cart);
View Full Code Here

        if (clock % FluidHelper.BUCKET_FILL_TIME == 0)
            FluidHelper.fillContainers(tankManager, this, SLOT_INPUT, SLOT_OUTPUT, tank.getFluidType());

        tankManager.outputLiquid(tileCache, TankManager.TANK_FILTER, ForgeDirection.VALID_DIRECTIONS, 0, TRANSFER_RATE);

        EntityMinecart cart = CartTools.getMinecartOnSide(worldObj, xCoord, yCoord, zCoord, 0.1f, ForgeDirection.UP);

        if (cart != currentCart) {
            setPowered(false);
            currentCart = cart;
            cartWasSent();
View Full Code Here

            return;

        transferedEnergy = false;
        transferRate = 0;

        EntityMinecart cart = CartTools.getMinecartOnSide(worldObj, xCoord, yCoord, zCoord, 0.1f, direction);

        if (cart != currentCart) {
            setPowered(false);
            currentCart = cart;
            cartWasSent();
View Full Code Here

TOP

Related Classes of net.minecraft.entity.item.EntityMinecart

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.