From 2e62e9b969ce3b26bf7d950ddf4395422e2accaa Mon Sep 17 00:00:00 2001 From: PeytonPlayz595 <106421860+PeytonPlayz595@users.noreply.github.com> Date: Tue, 11 Jul 2023 19:59:33 -0400 Subject: [PATCH] Replaced com.mojang.util.MathHelper Replaced com.mojang.util.MathHelper with net.PeytonPlayz585.math.MathHelper --- .../java/com/mojang/minecraft/Entity.java | 2 +- .../java/com/mojang/minecraft/Minecraft.java | 2 +- .../com/mojang/minecraft/gui/HUDScreen.java | 2 +- .../java/com/mojang/minecraft/item/Arrow.java | 2 +- .../java/com/mojang/minecraft/item/Item.java | 2 +- .../com/mojang/minecraft/item/PrimedTnt.java | 2 +- .../com/mojang/minecraft/level/Level.java | 2 +- .../level/generator/LevelGenerator.java | 2 +- .../minecraft/level/tile/FlowerBlock.java | 2 +- .../com/mojang/minecraft/mob/Creeper$1.java | 2 +- .../com/mojang/minecraft/mob/Creeper.java | 2 +- .../java/com/mojang/minecraft/mob/Mob.java | 2 +- .../com/mojang/minecraft/mob/Sheep$1.java | 2 +- .../minecraft/mob/ai/BasicAttackAI.java | 2 +- .../mojang/minecraft/model/AnimalModel.java | 2 +- .../mojang/minecraft/model/CreeperModel.java | 2 +- .../mojang/minecraft/model/HumanoidModel.java | 2 +- .../mojang/minecraft/model/SpiderModel.java | 2 +- .../com/mojang/minecraft/model/Vec3D.java | 2 +- .../mojang/minecraft/model/ZombieModel.java | 2 +- .../mojang/minecraft/particle/Particle.java | 2 +- .../com/mojang/minecraft/player/Player.java | 2 +- .../com/mojang/minecraft/render/Chunk.java | 2 +- .../mojang/minecraft/render/FrustrumImpl.java | 2 +- .../com/mojang/minecraft/render/Renderer.java | 2 +- .../render/texture/TextureLavaFX.java | 2 +- .../java/com/mojang/util/MathHelper.java | 30 ------------------- 27 files changed, 26 insertions(+), 56 deletions(-) delete mode 100644 src/teavm/java/com/mojang/util/MathHelper.java diff --git a/src/teavm/java/com/mojang/minecraft/Entity.java b/src/teavm/java/com/mojang/minecraft/Entity.java index 0d47cf7..9a16951 100644 --- a/src/teavm/java/com/mojang/minecraft/Entity.java +++ b/src/teavm/java/com/mojang/minecraft/Entity.java @@ -9,7 +9,7 @@ import com.mojang.minecraft.model.Vec3D; import com.mojang.minecraft.net.PositionUpdate; import com.mojang.minecraft.phys.AABB; import com.mojang.minecraft.render.TextureManager; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import java.io.Serializable; import java.util.ArrayList; diff --git a/src/teavm/java/com/mojang/minecraft/Minecraft.java b/src/teavm/java/com/mojang/minecraft/Minecraft.java index 95e1e2b..0c24831 100644 --- a/src/teavm/java/com/mojang/minecraft/Minecraft.java +++ b/src/teavm/java/com/mojang/minecraft/Minecraft.java @@ -28,7 +28,7 @@ import com.mojang.minecraft.render.Renderer; import com.mojang.minecraft.render.texture.TextureFX; import com.mojang.minecraft.render.texture.TextureLavaFX; import com.mojang.minecraft.render.texture.TextureWaterFX; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import net.lax1dude.eaglercraft.GLAllocation; diff --git a/src/teavm/java/com/mojang/minecraft/gui/HUDScreen.java b/src/teavm/java/com/mojang/minecraft/gui/HUDScreen.java index b72d8c1..eb20d12 100644 --- a/src/teavm/java/com/mojang/minecraft/gui/HUDScreen.java +++ b/src/teavm/java/com/mojang/minecraft/gui/HUDScreen.java @@ -10,7 +10,7 @@ import com.mojang.minecraft.level.tile.Block; import com.mojang.minecraft.player.Inventory; import com.mojang.minecraft.render.ShapeRenderer; import com.mojang.minecraft.render.TextureManager; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import java.util.ArrayList; import java.util.List; import java.util.Random; diff --git a/src/teavm/java/com/mojang/minecraft/item/Arrow.java b/src/teavm/java/com/mojang/minecraft/item/Arrow.java index 641ab27..1b0e9a6 100644 --- a/src/teavm/java/com/mojang/minecraft/item/Arrow.java +++ b/src/teavm/java/com/mojang/minecraft/item/Arrow.java @@ -6,7 +6,7 @@ import com.mojang.minecraft.phys.AABB; import com.mojang.minecraft.player.Player; import com.mojang.minecraft.render.ShapeRenderer; import com.mojang.minecraft.render.TextureManager; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import java.util.List; import org.lwjgl.opengl.GL11; diff --git a/src/teavm/java/com/mojang/minecraft/item/Item.java b/src/teavm/java/com/mojang/minecraft/item/Item.java index 650cb9f..1a3bb84 100644 --- a/src/teavm/java/com/mojang/minecraft/item/Item.java +++ b/src/teavm/java/com/mojang/minecraft/item/Item.java @@ -5,7 +5,7 @@ import com.mojang.minecraft.level.Level; import com.mojang.minecraft.level.tile.Block; import com.mojang.minecraft.player.Player; import com.mojang.minecraft.render.TextureManager; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import org.lwjgl.opengl.GL11; public class Item extends Entity diff --git a/src/teavm/java/com/mojang/minecraft/item/PrimedTnt.java b/src/teavm/java/com/mojang/minecraft/item/PrimedTnt.java index 814d511..66b75e4 100644 --- a/src/teavm/java/com/mojang/minecraft/item/PrimedTnt.java +++ b/src/teavm/java/com/mojang/minecraft/item/PrimedTnt.java @@ -8,7 +8,7 @@ import com.mojang.minecraft.particle.TerrainParticle; import com.mojang.minecraft.player.Player; import com.mojang.minecraft.render.ShapeRenderer; import com.mojang.minecraft.render.TextureManager; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import java.util.Random; import org.lwjgl.opengl.GL11; diff --git a/src/teavm/java/com/mojang/minecraft/level/Level.java b/src/teavm/java/com/mojang/minecraft/level/Level.java index ab918a2..99bb127 100644 --- a/src/teavm/java/com/mojang/minecraft/level/Level.java +++ b/src/teavm/java/com/mojang/minecraft/level/Level.java @@ -11,7 +11,7 @@ import com.mojang.minecraft.model.Vec3D; import com.mojang.minecraft.particle.ParticleManager; import com.mojang.minecraft.phys.AABB; import com.mojang.minecraft.render.LevelRenderer; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/teavm/java/com/mojang/minecraft/level/generator/LevelGenerator.java b/src/teavm/java/com/mojang/minecraft/level/generator/LevelGenerator.java index 3727a02..02bbb63 100644 --- a/src/teavm/java/com/mojang/minecraft/level/generator/LevelGenerator.java +++ b/src/teavm/java/com/mojang/minecraft/level/generator/LevelGenerator.java @@ -5,7 +5,7 @@ import com.mojang.minecraft.level.Level; import com.mojang.minecraft.level.generator.noise.CombinedNoise; import com.mojang.minecraft.level.generator.noise.OctaveNoise; import com.mojang.minecraft.level.tile.Block; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import java.util.ArrayList; import java.util.Random; diff --git a/src/teavm/java/com/mojang/minecraft/level/tile/FlowerBlock.java b/src/teavm/java/com/mojang/minecraft/level/tile/FlowerBlock.java index 40a49c7..25cf60a 100644 --- a/src/teavm/java/com/mojang/minecraft/level/tile/FlowerBlock.java +++ b/src/teavm/java/com/mojang/minecraft/level/tile/FlowerBlock.java @@ -3,7 +3,7 @@ package com.mojang.minecraft.level.tile; import com.mojang.minecraft.level.Level; import com.mojang.minecraft.phys.AABB; import com.mojang.minecraft.render.ShapeRenderer; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import java.util.Random; diff --git a/src/teavm/java/com/mojang/minecraft/mob/Creeper$1.java b/src/teavm/java/com/mojang/minecraft/mob/Creeper$1.java index 2663cee..39de44d 100644 --- a/src/teavm/java/com/mojang/minecraft/mob/Creeper$1.java +++ b/src/teavm/java/com/mojang/minecraft/mob/Creeper$1.java @@ -5,7 +5,7 @@ import com.mojang.minecraft.level.tile.Block; import com.mojang.minecraft.mob.Creeper; import com.mojang.minecraft.mob.ai.BasicAttackAI; import com.mojang.minecraft.particle.TerrainParticle; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; final class Creeper$1 extends BasicAttackAI { diff --git a/src/teavm/java/com/mojang/minecraft/mob/Creeper.java b/src/teavm/java/com/mojang/minecraft/mob/Creeper.java index e27ce57..0ff9a0a 100644 --- a/src/teavm/java/com/mojang/minecraft/mob/Creeper.java +++ b/src/teavm/java/com/mojang/minecraft/mob/Creeper.java @@ -3,7 +3,7 @@ package com.mojang.minecraft.mob; import com.mojang.minecraft.level.Level; import com.mojang.minecraft.mob.Creeper$1; import com.mojang.minecraft.mob.Mob; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public class Creeper extends Mob { diff --git a/src/teavm/java/com/mojang/minecraft/mob/Mob.java b/src/teavm/java/com/mojang/minecraft/mob/Mob.java index 36a3e29..b86abd6 100644 --- a/src/teavm/java/com/mojang/minecraft/mob/Mob.java +++ b/src/teavm/java/com/mojang/minecraft/mob/Mob.java @@ -6,7 +6,7 @@ import com.mojang.minecraft.mob.ai.AI; import com.mojang.minecraft.mob.ai.BasicAI; import com.mojang.minecraft.model.ModelManager; import com.mojang.minecraft.render.TextureManager; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import org.lwjgl.opengl.GL11; public class Mob extends Entity { diff --git a/src/teavm/java/com/mojang/minecraft/mob/Sheep$1.java b/src/teavm/java/com/mojang/minecraft/mob/Sheep$1.java index 25c205e..2be4153 100644 --- a/src/teavm/java/com/mojang/minecraft/mob/Sheep$1.java +++ b/src/teavm/java/com/mojang/minecraft/mob/Sheep$1.java @@ -3,7 +3,7 @@ package com.mojang.minecraft.mob; import com.mojang.minecraft.level.tile.Block; import com.mojang.minecraft.mob.Sheep; import com.mojang.minecraft.mob.ai.BasicAI; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; final class Sheep$1 extends BasicAI { diff --git a/src/teavm/java/com/mojang/minecraft/mob/ai/BasicAttackAI.java b/src/teavm/java/com/mojang/minecraft/mob/ai/BasicAttackAI.java index a1eefb9..36a2ada 100644 --- a/src/teavm/java/com/mojang/minecraft/mob/ai/BasicAttackAI.java +++ b/src/teavm/java/com/mojang/minecraft/mob/ai/BasicAttackAI.java @@ -4,7 +4,7 @@ import com.mojang.minecraft.Entity; import com.mojang.minecraft.item.Arrow; import com.mojang.minecraft.mob.ai.BasicAI; import com.mojang.minecraft.model.Vec3D; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public class BasicAttackAI extends BasicAI { diff --git a/src/teavm/java/com/mojang/minecraft/model/AnimalModel.java b/src/teavm/java/com/mojang/minecraft/model/AnimalModel.java index d5094e8..f2136ef 100644 --- a/src/teavm/java/com/mojang/minecraft/model/AnimalModel.java +++ b/src/teavm/java/com/mojang/minecraft/model/AnimalModel.java @@ -2,7 +2,7 @@ package com.mojang.minecraft.model; import com.mojang.minecraft.model.Model; import com.mojang.minecraft.model.ModelPart; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public class AnimalModel extends Model { diff --git a/src/teavm/java/com/mojang/minecraft/model/CreeperModel.java b/src/teavm/java/com/mojang/minecraft/model/CreeperModel.java index 73c1478..e724029 100644 --- a/src/teavm/java/com/mojang/minecraft/model/CreeperModel.java +++ b/src/teavm/java/com/mojang/minecraft/model/CreeperModel.java @@ -2,7 +2,7 @@ package com.mojang.minecraft.model; import com.mojang.minecraft.model.Model; import com.mojang.minecraft.model.ModelPart; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public final class CreeperModel extends Model { diff --git a/src/teavm/java/com/mojang/minecraft/model/HumanoidModel.java b/src/teavm/java/com/mojang/minecraft/model/HumanoidModel.java index dc2bd24..e24bea1 100644 --- a/src/teavm/java/com/mojang/minecraft/model/HumanoidModel.java +++ b/src/teavm/java/com/mojang/minecraft/model/HumanoidModel.java @@ -2,7 +2,7 @@ package com.mojang.minecraft.model; import com.mojang.minecraft.model.Model; import com.mojang.minecraft.model.ModelPart; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public class HumanoidModel extends Model { diff --git a/src/teavm/java/com/mojang/minecraft/model/SpiderModel.java b/src/teavm/java/com/mojang/minecraft/model/SpiderModel.java index 0c065b0..8591d19 100644 --- a/src/teavm/java/com/mojang/minecraft/model/SpiderModel.java +++ b/src/teavm/java/com/mojang/minecraft/model/SpiderModel.java @@ -2,7 +2,7 @@ package com.mojang.minecraft.model; import com.mojang.minecraft.model.Model; import com.mojang.minecraft.model.ModelPart; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public final class SpiderModel extends Model { diff --git a/src/teavm/java/com/mojang/minecraft/model/Vec3D.java b/src/teavm/java/com/mojang/minecraft/model/Vec3D.java index cff068c..bae676f 100644 --- a/src/teavm/java/com/mojang/minecraft/model/Vec3D.java +++ b/src/teavm/java/com/mojang/minecraft/model/Vec3D.java @@ -1,6 +1,6 @@ package com.mojang.minecraft.model; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public final class Vec3D { diff --git a/src/teavm/java/com/mojang/minecraft/model/ZombieModel.java b/src/teavm/java/com/mojang/minecraft/model/ZombieModel.java index c5e6f23..a628806 100644 --- a/src/teavm/java/com/mojang/minecraft/model/ZombieModel.java +++ b/src/teavm/java/com/mojang/minecraft/model/ZombieModel.java @@ -1,7 +1,7 @@ package com.mojang.minecraft.model; import com.mojang.minecraft.model.HumanoidModel; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public class ZombieModel extends HumanoidModel { diff --git a/src/teavm/java/com/mojang/minecraft/particle/Particle.java b/src/teavm/java/com/mojang/minecraft/particle/Particle.java index d24916c..0cdd49e 100644 --- a/src/teavm/java/com/mojang/minecraft/particle/Particle.java +++ b/src/teavm/java/com/mojang/minecraft/particle/Particle.java @@ -3,7 +3,7 @@ package com.mojang.minecraft.particle; import com.mojang.minecraft.Entity; import com.mojang.minecraft.level.Level; import com.mojang.minecraft.render.ShapeRenderer; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public class Particle extends Entity { diff --git a/src/teavm/java/com/mojang/minecraft/player/Player.java b/src/teavm/java/com/mojang/minecraft/player/Player.java index 8009833..7da8b33 100644 --- a/src/teavm/java/com/mojang/minecraft/player/Player.java +++ b/src/teavm/java/com/mojang/minecraft/player/Player.java @@ -8,7 +8,7 @@ import com.mojang.minecraft.player.InputHandler; import com.mojang.minecraft.player.Inventory; import com.mojang.minecraft.player.Player$1; import com.mojang.minecraft.render.TextureManager; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import java.awt.image.BufferedImage; import java.util.List; import org.lwjgl.opengl.GL11; diff --git a/src/teavm/java/com/mojang/minecraft/render/Chunk.java b/src/teavm/java/com/mojang/minecraft/render/Chunk.java index 10d95cd..0e7eed5 100644 --- a/src/teavm/java/com/mojang/minecraft/render/Chunk.java +++ b/src/teavm/java/com/mojang/minecraft/render/Chunk.java @@ -5,7 +5,7 @@ import com.mojang.minecraft.level.tile.Block; import com.mojang.minecraft.player.Player; import com.mojang.minecraft.render.Frustrum; import com.mojang.minecraft.render.ShapeRenderer; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import org.lwjgl.opengl.GL11; public final class Chunk { diff --git a/src/teavm/java/com/mojang/minecraft/render/FrustrumImpl.java b/src/teavm/java/com/mojang/minecraft/render/FrustrumImpl.java index fce492d..946efb7 100644 --- a/src/teavm/java/com/mojang/minecraft/render/FrustrumImpl.java +++ b/src/teavm/java/com/mojang/minecraft/render/FrustrumImpl.java @@ -1,7 +1,7 @@ package com.mojang.minecraft.render; import com.mojang.minecraft.render.Frustrum; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import net.lax1dude.eaglercraft.GLAllocation; diff --git a/src/teavm/java/com/mojang/minecraft/render/Renderer.java b/src/teavm/java/com/mojang/minecraft/render/Renderer.java index bab588f..0410cf3 100644 --- a/src/teavm/java/com/mojang/minecraft/render/Renderer.java +++ b/src/teavm/java/com/mojang/minecraft/render/Renderer.java @@ -8,7 +8,7 @@ import com.mojang.minecraft.level.tile.Block; import com.mojang.minecraft.model.Vec3D; import com.mojang.minecraft.player.Player; import com.mojang.minecraft.render.HeldBlock; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; import net.lax1dude.eaglercraft.GLAllocation; diff --git a/src/teavm/java/com/mojang/minecraft/render/texture/TextureLavaFX.java b/src/teavm/java/com/mojang/minecraft/render/texture/TextureLavaFX.java index 8ba098f..6f70b90 100644 --- a/src/teavm/java/com/mojang/minecraft/render/texture/TextureLavaFX.java +++ b/src/teavm/java/com/mojang/minecraft/render/texture/TextureLavaFX.java @@ -2,7 +2,7 @@ package com.mojang.minecraft.render.texture; import com.mojang.minecraft.level.tile.Block; import com.mojang.minecraft.render.texture.TextureFX; -import com.mojang.util.MathHelper; +import net.PeytonPlayz585.math.MathHelper; public final class TextureLavaFX extends TextureFX { diff --git a/src/teavm/java/com/mojang/util/MathHelper.java b/src/teavm/java/com/mojang/util/MathHelper.java deleted file mode 100644 index daa8ff3..0000000 --- a/src/teavm/java/com/mojang/util/MathHelper.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.mojang.util; - - -public final class MathHelper { - - private static float[] SIN_TABLE = new float[4096]; - - - public static final float sin(float var0) { - return SIN_TABLE[(int)(var0 * 651.8986F) & 4095]; - } - - public static final float cos(float var0) { - return SIN_TABLE[(int)((var0 + ((float)Math.PI / 2F)) * 651.8986F) & 4095]; - } - - public static final float sqrt(float var0) { - return (float)Math.sqrt((double)var0); - } - - static { - for (int j = 0; j < 4096; ++j) { - SIN_TABLE[j] = (float)Math.sin((double)(((float)j + 0.5F) / 4096.0F * ((float)Math.PI * 2F))); - } - - for (int l = 0; l < 360; l += 90) { - SIN_TABLE[(int)((float)l * 11.377778F) & 4095] = (float)Math.sin((double)((float)l * 0.017453292F)); - } - } -}