Package com.sk89q.worldedit.world.registry

Examples of com.sk89q.worldedit.world.registry.StateValue


            return changedBlock;
        }

        for (State state : states.values()) {
            if (state.hasDirection()) {
                StateValue value = state.getValue(block);
                if (value != null && value.getDirection() != null) {
                    StateValue newValue = getNewStateValue(state, transform, value.getDirection());
                    if (newValue != null) {
                        newValue.set(changedBlock);
                    }
                }
            }
        }
View Full Code Here


     * @return a new state or null if none could be found
     */
    @Nullable
    private static StateValue getNewStateValue(State state, Transform transform, Vector oldDirection) {
        Vector newDirection = transform.apply(oldDirection).subtract(transform.apply(Vector.ZERO)).normalize();
        StateValue newValue = null;
        double closest = -2;
        boolean found = false;

        for (StateValue v : state.valueMap().values()) {
            if (v.getDirection() != null) {
View Full Code Here

TOP

Related Classes of com.sk89q.worldedit.world.registry.StateValue

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.