mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-12 00:07:33 +00:00
Added setSide function to Cuboid6
This commit is contained in:
1 parent
ab0713c129
commit
3b762d300f
1 file changed
+15
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user