@Override public BranchFunction rotate() { BranchFunction rotatedBranch = new BranchFunction(); rotatedBranch.x = z; rotatedBranch.y = y; rotatedBranch.z = -x; rotatedBranch.branches = branches; rotatedBranch.branchChances = branchChances; rotatedBranch.branchRotations = new ArrayList<Rotation>(); for (Rotation rotation : branchRotations) { rotatedBranch.branchRotations.add(Rotation.next(rotation)); } return rotatedBranch; }