From ab0713c129be8c59422fb4173b512757fdfed9ce Mon Sep 17 00:00:00 2001 From: Chicken Bones Date: Tue, 1 Oct 2013 11:54:47 +1000 Subject: [PATCH] Added side function to Cuboid6 --- codechicken/lib/vec/Cuboid6.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/codechicken/lib/vec/Cuboid6.java b/codechicken/lib/vec/Cuboid6.java index 9233cf7..7c98df4 100644 --- a/codechicken/lib/vec/Cuboid6.java +++ b/codechicken/lib/vec/Cuboid6.java @@ -145,4 +145,17 @@ public class Cuboid6 if(min.z > max.z) {temp = min.z; min.z = max.z; max.z = temp;} return this; } + + public double side(int s) + { + switch(s) { + case 0: return min.y; + case 1: return max.y; + case 2: return min.z; + case 3: return max.z; + case 4: return min.x; + case 5: return max.x; + } + throw new IndexOutOfBoundsException("Switch Falloff"); + } }