diff --git a/core/src/mindustry/core/NetClient.java b/core/src/mindustry/core/NetClient.java index 2bd4bdb3eb..8c12884472 100644 --- a/core/src/mindustry/core/NetClient.java +++ b/core/src/mindustry/core/NetClient.java @@ -513,7 +513,7 @@ public class NetClient implements ApplicationListener{ return Core.settings.getString("usid-" + ip, null); }else{ byte[] bytes = new byte[8]; - new RandomXS128().nextBytes(bytes); + new Rand().nextBytes(bytes); String result = new String(Base64Coder.encode(bytes)); Core.settings.put("usid-" + ip, result); Core.settings.save(); diff --git a/core/src/mindustry/core/Platform.java b/core/src/mindustry/core/Platform.java index ebad75b9e7..fda4ea4564 100644 --- a/core/src/mindustry/core/Platform.java +++ b/core/src/mindustry/core/Platform.java @@ -90,7 +90,7 @@ public interface Platform{ String uuid = Core.settings.getString("uuid", ""); if(uuid.isEmpty()){ byte[] result = new byte[8]; - new RandomXS128().nextBytes(result); + new Rand().nextBytes(result); uuid = new String(Base64Coder.encode(result)); Core.settings.put("uuid", uuid); Core.settings.save(); diff --git a/core/src/mindustry/entities/effect/Lightning.java b/core/src/mindustry/entities/effect/Lightning.java index 59b7f833fa..e4658cd1ff 100644 --- a/core/src/mindustry/entities/effect/Lightning.java +++ b/core/src/mindustry/entities/effect/Lightning.java @@ -27,7 +27,7 @@ import static mindustry.Vars.*; public class Lightning extends TimedEntity implements DrawTrait, TimeTrait{ public static final float lifetime = 10f; - private static final RandomXS128 random = new RandomXS128(); + private static final Rand random = new Rand(); private static final Rect rect = new Rect(); private static final Array entities = new Array<>(); private static final IntSet hit = new IntSet(); diff --git a/core/src/mindustry/game/Team.java b/core/src/mindustry/game/Team.java index e6c05eb6e0..0e5d60fadc 100644 --- a/core/src/mindustry/game/Team.java +++ b/core/src/mindustry/game/Team.java @@ -35,7 +35,7 @@ public class Team implements Comparable{ for(int i = 6; i < all.length; i++){ new Team(i, "team#" + i, Color.HSVtoRGB(360f * Mathf.random(), 100f * Mathf.random(0.6f, 1f), 100f * Mathf.random(0.8f, 1f), 1f)); } - Mathf.random.setSeed(new RandomXS128().nextLong()); + Mathf.random.setSeed(new Rand().nextLong()); } public static Team get(int id){ diff --git a/core/src/mindustry/graphics/IndexedRenderer.java b/core/src/mindustry/graphics/IndexedRenderer.java index 4e9ff4d45a..cb42b6fe0b 100644 --- a/core/src/mindustry/graphics/IndexedRenderer.java +++ b/core/src/mindustry/graphics/IndexedRenderer.java @@ -46,9 +46,9 @@ public class IndexedRenderer implements Disposable{ private float[] tmpVerts = new float[vsize * 6]; private float[] vertices; - private Matrix3 projMatrix = new Matrix3(); - private Matrix3 transMatrix = new Matrix3(); - private Matrix3 combined = new Matrix3(); + private Mat projMatrix = new Mat(); + private Mat transMatrix = new Mat(); + private Mat combined = new Mat(); private float color = Color.white.toFloatBits(); public IndexedRenderer(int sprites){ @@ -210,11 +210,11 @@ public class IndexedRenderer implements Disposable{ mesh.updateVertices(index * vsize * 6, vertices); } - public Matrix3 getTransformMatrix(){ + public Mat getTransformMatrix(){ return transMatrix; } - public void setProjectionMatrix(Matrix3 matrix){ + public void setProjectionMatrix(Mat matrix){ projMatrix = matrix; } diff --git a/core/src/mindustry/graphics/MenuRenderer.java b/core/src/mindustry/graphics/MenuRenderer.java index 0e68f08307..099604bd6b 100644 --- a/core/src/mindustry/graphics/MenuRenderer.java +++ b/core/src/mindustry/graphics/MenuRenderer.java @@ -28,7 +28,7 @@ public class MenuRenderer implements Disposable{ private int cacheFloor, cacheWall; private Camera camera = new Camera(); - private Matrix3 mat = new Matrix3(); + private Mat mat = new Mat(); private FrameBuffer shadows; private CacheBatch batch; private float time = 0f; diff --git a/core/src/mindustry/world/blocks/production/Cultivator.java b/core/src/mindustry/world/blocks/production/Cultivator.java index e34929188c..3d924c1dbf 100644 --- a/core/src/mindustry/world/blocks/production/Cultivator.java +++ b/core/src/mindustry/world/blocks/production/Cultivator.java @@ -4,7 +4,7 @@ import arc.Core; import arc.graphics.Color; import arc.graphics.g2d.*; import arc.math.Mathf; -import arc.math.RandomXS128; +import arc.math.Rand; import arc.util.Time; import mindustry.content.Fx; import mindustry.entities.type.TileEntity; @@ -21,7 +21,7 @@ public class Cultivator extends GenericCrafter{ public Color bottomColor = Color.valueOf("474747"); public TextureRegion middleRegion, topRegion; - public RandomXS128 random = new RandomXS128(0); + public Rand random = new Rand(0); public float recurrence = 6f; public Attribute attribute = Attribute.spores; diff --git a/desktop/src/mindustry/desktop/DesktopLauncher.java b/desktop/src/mindustry/desktop/DesktopLauncher.java index 27b967f94e..b09894e521 100644 --- a/desktop/src/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/mindustry/desktop/DesktopLauncher.java @@ -280,7 +280,7 @@ public class DesktopLauncher extends ClientLauncher{ if(steam){ try{ byte[] result = new byte[8]; - new RandomXS128(SVars.user.user.getSteamID().getAccountID()).nextBytes(result); + new Rand(SVars.user.user.getSteamID().getAccountID()).nextBytes(result); return new String(Base64Coder.encode(result)); }catch(Exception e){ e.printStackTrace(); diff --git a/gradle.properties b/gradle.properties index d4613deadb..da699dc0b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=49849134b9321f44f0d7ee2e0bb533cc6c69d39a +archash=175a3f68bb887634add08339096a10a695608c16