From 3b762d300fc2a29628603d7a7d816a2924c61191 Mon Sep 17 00:00:00 2001 From: Chicken Bones Date: Tue, 1 Oct 2013 11:58:04 +1000 Subject: [PATCH] Added setSide function to Cuboid6 --- codechicken/lib/vec/Cuboid6.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/codechicken/lib/vec/Cuboid6.java b/codechicken/lib/vec/Cuboid6.java index 7c98df4..d44d331 100644 --- a/codechicken/lib/vec/Cuboid6.java +++ b/codechicken/lib/vec/Cuboid6.java @@ -146,7 +146,7 @@ public class Cuboid6 return this; } - public double side(int s) + public double getSide(int s) { switch(s) { case 0: return min.y; @@ -158,4 +158,18 @@ public class Cuboid6 } throw new IndexOutOfBoundsException("Switch Falloff"); } + + public Cuboid6 setSide(int s, double d) + { + switch(s) { + case 0: min.y = d; break; + case 1: max.y = d; break; + case 2: min.z = d; break; + case 3: max.z = d; break; + case 4: min.x = d; break; + case 5: max.x = d; break; + default: throw new IndexOutOfBoundsException("Switch Falloff"); + } + return this; + } }