mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-11 07:47:47 +00:00
Added a few functions to BlockCoord
Made RedundantTransformation more redundant
This commit is contained in:
1 parent
5ef9f6174d
commit
c545683025
2 files changed
+25
No files matched your search
@@ -177,4 +177,24 @@ public class BlockCoord implements Comparable<BlockCoord>
|
||||
{
|
||||
return set(coord.x, coord.y, coord.z);
|
||||
}
|
||||
|
||||
public int toSide()
|
||||
{
|
||||
if(!isAxial()) return -1;
|
||||
if(y < 0) return 0;
|
||||
if(y > 0) return 1;
|
||||
if(z < 0) return 2;
|
||||
if(z > 0) return 3;
|
||||
if(x < 0) return 4;
|
||||
if(x > 0) return 5;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int absSum()
|
||||
{
|
||||
return (x < 0 ? -x : x) +
|
||||
(y < 0 ? -y : y) +
|
||||
(z < 0 ? -z : z);
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,11 @@ public class RedundantTransformation extends Transformation
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Transformation merge(Transformation next) {
|
||||
return next;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user