Examples of CircularVec3Queue


Examples of mods.railcraft.common.util.collections.CircularVec3Queue

    private void adjustCartFromHistory(EntityMinecart current, EntityMinecart linked) {
        // If we are leading, we don't want to adjust anything
        if (isCartLeading(current, linked))
            return;

        CircularVec3Queue leaderHistory = history.get(linked);

        // Optimal distance is how far apart the carts should be
        double optimalDist = getOptimalDistance(current, linked);
        optimalDist *= optimalDist;

View Full Code Here

Examples of mods.railcraft.common.util.collections.CircularVec3Queue

     * Saved the position history of the cart every tick in a Circular Buffer.
     *
     * @param cart
     */
    private void savePosition(EntityMinecart cart) {
        CircularVec3Queue myHistory = history.get(cart);
        if (myHistory == null) {
            myHistory = new CircularVec3Queue(TICK_HISTORY);
            history.put(cart, myHistory);
        }
        myHistory.add(cart.posX, cart.posY, cart.posZ);
    }
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.