mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-21 04:22:25 +00:00
- Added some aura effects.
This commit is contained in:
1 parent
bb848689f1
commit
2d0f15d0f9
12 files changed
+336
-20
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package makeo.gadomancy.common.utils;
|
||||
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
import java.util.Formatter;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
@@ -226,6 +228,18 @@ public class Vector3 {
|
||||
return random().setY(Math.abs(random().getY()));
|
||||
}
|
||||
|
||||
public static Vector3 fromCC(ChunkCoordinates cc) {
|
||||
return new Vector3(cc.posX, cc.posY, cc.posZ);
|
||||
}
|
||||
|
||||
public ChunkCoordinates getAsFloatCC() {
|
||||
return new ChunkCoordinates(Float.floatToIntBits((float) this.x), Float.floatToIntBits((float) this.y), Float.floatToIntBits((float) this.z));
|
||||
}
|
||||
|
||||
public static Vector3 getFromFloatCC(ChunkCoordinates cc) {
|
||||
return new Vector3(Float.intBitsToFloat(cc.posX), Float.intBitsToFloat(cc.posY), Float.intBitsToFloat(cc.posZ));
|
||||
}
|
||||
|
||||
public boolean isInAABB(Vector3 min, Vector3 max) {
|
||||
return (this.x >= min.x) && (this.x <= max.x) && (this.y >= min.y) && (this.y <= max.y) && (this.z >= min.z) && (this.z <= max.z);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user