From 63f481a48c1fe461e0560fcb7fa2e8d5ed54de30 Mon Sep 17 00:00:00 2001 From: Cryo <110951096+CrytoPal@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:51:24 -0400 Subject: [PATCH] Update to 1.19.4 (Fixed) (#35) * Add files via upload * Add files via upload * Update devbuild.yml --------- Co-authored-by: Cloudburst <18114966+C10udburst@users.noreply.github.com> --- .github/workflows/devbuild.yml | 6 +-- README.md | 2 +- build.gradle | 4 +- gradle.properties | 8 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- .../orion/modules/main/AnchorAura.java | 8 ++-- .../orion/modules/main/AutoBedCraft.java | 5 ++- .../orion/modules/main/BedDisabler.java | 15 +++---- .../orion/modules/main/SelfTrapPlus.java | 40 +++++++++---------- .../orion/modules/main/SurroundPlus.java | 38 +++++++++--------- .../orion/utils/player/AutomationUtils.java | 15 +++---- .../orion/utils/player/BedUtils.java | 15 +++---- .../orion/utils/world/BlockHelper.java | 11 ++--- src/main/resources/fabric.mod.json | 3 +- 14 files changed, 88 insertions(+), 84 deletions(-) diff --git a/.github/workflows/devbuild.yml b/.github/workflows/devbuild.yml index 4a3a274..37dd28d 100644 --- a/.github/workflows/devbuild.yml +++ b/.github/workflows/devbuild.yml @@ -1,7 +1,7 @@ name: devbuild concurrency: - group: "build-1.19.2" + group: "build-1.19.4" cancel-in-progress: true on: @@ -30,8 +30,8 @@ jobs: - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest-1.19.2" + automatic_release_tag: "latest-1.19.4" prerelease: false - title: "1.19.2 Build" + title: "1.19.4 Build" files: | ./build/libs/*.jar diff --git a/README.md b/README.md index 6b261b1..4fcf09a 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ # How to use Download the [latest release](https://github.com/AntiCope/orion/releases/latest) and put it in your mods folder with Latest version of [Meteor Client](https://meteorclient.com) -Launch fabric loader for 1.18.x. +Launch fabric loader for 1.19.x. # Discord GhostTypes has retired from both Orion and Ion. Ion went to new ownership, and Orion has been left unmaintained. diff --git a/build.gradle b/build.gradle index cb2a3fb..f427e13 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.12-SNAPSHOT' + id 'fabric-loom' version '1.1-SNAPSHOT' } sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17 @@ -26,7 +26,7 @@ dependencies { modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" // Meteor - modImplementation "meteordevelopment:meteor-client:${project.meteor_version}" + modImplementation "meteordevelopment:meteor-client:${project.meteor_version}-SNAPSHOT" // Required for loading logo hud element images modImplementation "net.fabricmc.fabric-api:fabric-resource-loader-v0:+" diff --git a/gradle.properties b/gradle.properties index 36e4d72..92ff85c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,13 @@ org.gradle.jvmargs=-Xmx2G # Fabric (https://fabricmc.net/versions.html) -minecraft_version=1.19.3 -yarn_version=1.19.3+build.3 -loader_version=0.14.11 +minecraft_version=1.19.4 +yarn_version=1.19.4+build.1 +loader_version=0.14.19 # Mod Properties mod_version=0.1 maven_group=meteordevelopment.addons archives_base_name=orion -meteor_version=0.5.2-SNAPSHOT +meteor_version=0.5.3 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8049c68..e1bef7e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/me/ghosttypes/orion/modules/main/AnchorAura.java b/src/main/java/me/ghosttypes/orion/modules/main/AnchorAura.java index a23d367..7467455 100644 --- a/src/main/java/me/ghosttypes/orion/modules/main/AnchorAura.java +++ b/src/main/java/me/ghosttypes/orion/modules/main/AnchorAura.java @@ -257,12 +257,12 @@ private BlockPos findBreakPos(BlockPos targetPos) { return null; } - private boolean getDamagePlace(BlockPos pos) { - return placeMode.get() == Safety.Suicide || DamageUtils.bedDamage(mc.player, Utils.vec3d(pos.add(0.5, 0.5, 0.5))) <= maxDamage.get(); + private boolean getDamagePlace(BlockPos pos) { // Thanks Crosby :) + return placeMode.get() == Safety.Suicide || DamageUtils.bedDamage(mc.player, Utils.vec3d(pos).add(0.5, 0.5, 0.5)) <= maxDamage.get(); } - private boolean getDamageBreak(BlockPos pos) { - return breakMode.get() == Safety.Suicide || DamageUtils.anchorDamage(mc.player, Utils.vec3d(pos.add(0.5, 0.5, 0.5))) <= maxDamage.get(); + private boolean getDamageBreak(BlockPos pos) { // Thanks Crosby :) + return breakMode.get() == Safety.Suicide || DamageUtils.anchorDamage(mc.player, Utils.vec3d(pos).add(0.5, 0.5, 0.5)) <= maxDamage.get(); } private boolean isValidPlace(BlockPos pos) { diff --git a/src/main/java/me/ghosttypes/orion/modules/main/AutoBedCraft.java b/src/main/java/me/ghosttypes/orion/modules/main/AutoBedCraft.java index 60c9d0a..b1b65ae 100644 --- a/src/main/java/me/ghosttypes/orion/modules/main/AutoBedCraft.java +++ b/src/main/java/me/ghosttypes/orion/modules/main/AutoBedCraft.java @@ -17,7 +17,10 @@ import net.minecraft.client.gui.screen.recipebook.RecipeResultCollection; import net.minecraft.client.recipebook.RecipeBookGroup; import net.minecraft.item.BedItem; +import net.minecraft.item.Item; +import net.minecraft.item.Items; import net.minecraft.recipe.Recipe; +import net.minecraft.registry.DynamicRegistryManager; import net.minecraft.screen.CraftingScreenHandler; import net.minecraft.screen.ScreenHandler; import net.minecraft.screen.slot.SlotActionType; @@ -123,7 +126,7 @@ private void onTick(TickEvent.Post event) { List recipeResultCollectionList = mc.player.getRecipeBook().getResultsForGroup(RecipeBookGroup.CRAFTING_MISC); for (RecipeResultCollection recipeResultCollection : recipeResultCollectionList) { for (Recipe recipe : recipeResultCollection.getRecipes(true)) { - if (recipe.getOutput().getItem() instanceof BedItem) { + if (recipe.getOutput((DynamicRegistryManager) BedItem.BLOCK_ITEMS).getItem() instanceof BedItem) { assert mc.interactionManager != null; mc.interactionManager.clickRecipe(currentScreenHandler.syncId, recipe, false); windowClick(currentScreenHandler, 0, SlotActionType.QUICK_MOVE, 1); diff --git a/src/main/java/me/ghosttypes/orion/modules/main/BedDisabler.java b/src/main/java/me/ghosttypes/orion/modules/main/BedDisabler.java index ba5009e..cd884f4 100644 --- a/src/main/java/me/ghosttypes/orion/modules/main/BedDisabler.java +++ b/src/main/java/me/ghosttypes/orion/modules/main/BedDisabler.java @@ -16,6 +16,7 @@ import net.minecraft.item.Items; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Vec3i; import java.util.ArrayList; @@ -36,9 +37,9 @@ public class BedDisabler extends Module { private int wpt, delayTimer; - private final ArrayList places = new ArrayList() {{ - add(new Vec3d(0, 1, 0)); - add(new Vec3d(0, 2, 0)); + private final ArrayList places = new ArrayList() {{ + add(new Vec3i(0, 1, 0)); + add(new Vec3i(0, 2, 0)); }}; @@ -79,12 +80,12 @@ private void onTick(TickEvent.Pre event) { private void doPlace(FindItemResult string) { wpt = 0; - ArrayList p = new ArrayList(places); - if (!ignoreFeet.get()) p.add(new Vec3d(0, 0, 0)); + ArrayList p = new ArrayList<>(places); + if (!ignoreFeet.get()) p.add(new Vec3i(0, 0, 0)); BlockPos ppos = mc.player.getBlockPos(); - for (Vec3d b: p) { + for (Vec3i b: p) { if (wpt >= webPerTick.get()) break; - BlockPos bb = ppos.add(b.x, b.y, b.z); + BlockPos bb = ppos.add(b.getX(), b.getY(), b.getZ()); BlockUtils.place(bb, string, 50, false); wpt++; } diff --git a/src/main/java/me/ghosttypes/orion/modules/main/SelfTrapPlus.java b/src/main/java/me/ghosttypes/orion/modules/main/SelfTrapPlus.java index 466cce0..ebdb4f5 100644 --- a/src/main/java/me/ghosttypes/orion/modules/main/SelfTrapPlus.java +++ b/src/main/java/me/ghosttypes/orion/modules/main/SelfTrapPlus.java @@ -17,7 +17,7 @@ import net.minecraft.block.Blocks; import net.minecraft.item.Items; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Vec3i; import java.util.ArrayList; import java.util.List; @@ -56,19 +56,19 @@ public enum modes { private BlockPos startPos; private int bpt; - private final ArrayList full = new ArrayList() {{ - add(new Vec3d(0, 2, 0)); - add(new Vec3d(1, 1, 0)); - add(new Vec3d(-1, 1, 0)); - add(new Vec3d(0, 1, 1)); - add(new Vec3d(0, 1, -1)); + private final ArrayList full = new ArrayList() {{ + add(new Vec3i(0, 2, 0)); + add(new Vec3i(1, 1, 0)); + add(new Vec3i(-1, 1, 0)); + add(new Vec3i(0, 1, 1)); + add(new Vec3i(0, 1, -1)); }}; - private final ArrayList antiFacePlace = new ArrayList() {{ - add(new Vec3d(1, 1, 0)); - add(new Vec3d(-1, 1, 0)); - add(new Vec3d(0, 1, 1)); - add(new Vec3d(0, 1, -1)); + private final ArrayList antiFacePlace = new ArrayList() {{ + add(new Vec3i(1, 1, 0)); + add(new Vec3i(-1, 1, 0)); + add(new Vec3i(0, 1, 1)); + add(new Vec3i(0, 1, -1)); }}; @@ -92,10 +92,10 @@ private void onTick(TickEvent.Pre event) { if (BlockHelper.isVecComplete(getTrapDesign()) && turnOff.get()) { info("Finished self trap."); toggle(); return;} if (toggleOnMove.get() && startPos != mc.player.getBlockPos()) { toggle(); return; } if (onlyInHole.get() && !Wrapper.isInHole(mc.player)) { toggle(); return; } - for (Vec3d b : getTrapDesign()) { + for (Vec3i b : getTrapDesign()) { if (bpt >= blockPerTick.get()) return; BlockPos ppos = mc.player.getBlockPos(); - BlockPos bb = ppos.add(b.x, b.y, b.z); + BlockPos bb = ppos.add(b.getX(), b.getY(), b.getZ()); if (BlockHelper.getBlock(bb) == Blocks.AIR) { BlockUtils.place(bb, obsidian, rotate.get(), 100, true); bpt++; @@ -106,21 +106,21 @@ private void onTick(TickEvent.Pre event) { @EventHandler private void onRender(Render3DEvent event) { if (!render.get() || BlockHelper.isVecComplete(getTrapDesign())) return; - for (Vec3d b: getTrapDesign()) { + for (Vec3i b: getTrapDesign()) { BlockPos ppos = mc.player.getBlockPos(); - BlockPos bb = ppos.add(b.x, b.y, b.z); + BlockPos bb = ppos.add(b.getX(), b.getY(), b.getZ()); if (BlockHelper.getBlock(bb) == Blocks.AIR) event.renderer.box(bb, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } } - private ArrayList getTrapDesign() { - ArrayList trapDesign = new ArrayList(); + private ArrayList getTrapDesign() { + ArrayList trapDesign = new ArrayList(); switch (mode.get()) { case Full -> { trapDesign.addAll(full); } - case Top -> { trapDesign.add(new Vec3d(0, 2, 0)); } + case Top -> { trapDesign.add(new Vec3i(0, 2, 0)); } case AntiFacePlace -> { trapDesign.addAll(antiFacePlace); } } - if (antiCev.get()) { trapDesign.add(new Vec3d(0, 3, 0));} + if (antiCev.get()) { trapDesign.add(new Vec3i(0, 3, 0));} return trapDesign; } } diff --git a/src/main/java/me/ghosttypes/orion/modules/main/SurroundPlus.java b/src/main/java/me/ghosttypes/orion/modules/main/SurroundPlus.java index 5b91e3d..e5dfe14 100644 --- a/src/main/java/me/ghosttypes/orion/modules/main/SurroundPlus.java +++ b/src/main/java/me/ghosttypes/orion/modules/main/SurroundPlus.java @@ -20,7 +20,7 @@ import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Vec3i; import java.util.ArrayList; import java.util.Collections; @@ -51,18 +51,18 @@ public class SurroundPlus extends Module { private final Setting sideColor = sgRender.add(new ColorSetting.Builder().name("side-color").description("The side color.").defaultValue(new SettingColor(15, 255, 211,75)).build()); private final Setting lineColor = sgRender.add(new ColorSetting.Builder().name("line-color").description("The line color.").defaultValue(new SettingColor(15, 255, 211)).build()); - private final ArrayList surr = new ArrayList() {{ - add(new Vec3d(1, 0, 0)); - add(new Vec3d(-1, 0, 0)); - add(new Vec3d(0, 0, 1)); - add(new Vec3d(0, 0, -1)); + private final ArrayList surr = new ArrayList() {{ + add(new Vec3i(1, 0, 0)); + add(new Vec3i(-1, 0, 0)); + add(new Vec3i(0, 0, 1)); + add(new Vec3i(0, 0, -1)); }}; - private final ArrayList surrDouble = new ArrayList() {{ - add(new Vec3d(1, 1, 0)); - add(new Vec3d(-1, 1, 0)); - add(new Vec3d(0, 1, 1)); - add(new Vec3d(0, 1, -1)); + private final ArrayList surrDouble = new ArrayList() {{ + add(new Vec3i(1, 1, 0)); + add(new Vec3i(-1, 1, 0)); + add(new Vec3i(0, 1, 1)); + add(new Vec3i(0, 1, -1)); }}; @@ -88,9 +88,9 @@ private void onTick(TickEvent.Pre event) { } } else { BlockPos ppos = mc.player.getBlockPos(); - for (Vec3d b : getSurrDesign()) { + for (Vec3i b : getSurrDesign()) { if (bpt >= blockPerTick.get()) return; - BlockPos bb = ppos.add(b.x, b.y, b.z); + BlockPos bb = ppos.add(b.getX(), b.getY(), b.getZ()); if (BlockHelper.getBlock(bb) == Blocks.AIR) { if (placeInside.get()) { BlockUtils.place(bb, InvUtils.findInHotbar(itemStack -> blocks.get().contains(Block.getBlockFromItem(itemStack.getItem()))), rotation.get(), 100, false); @@ -115,16 +115,16 @@ private void onTick(TickEvent.Pre event) { } } - private ArrayList getSurrDesign() { - ArrayList surrDesign = new ArrayList(surr); + private ArrayList getSurrDesign() { + ArrayList surrDesign = new ArrayList(surr); if (useDouble.get()) surrDesign.addAll(surrDouble); return surrDesign; } private boolean isDangerousCrystal(BlockPos bp) { BlockPos ppos = mc.player.getBlockPos(); - for (Vec3d b : getSurrDesign()) { - BlockPos bb = ppos.add(b.x, b.y, b.z); + for (Vec3i b : getSurrDesign()) { + BlockPos bb = ppos.add(b.getX(), b.getY(), b.getZ()); if (!bp.equals(bb) && BlockHelper.distanceBetween(bb, bp) <= 2) return true; } return false; @@ -143,8 +143,8 @@ private boolean blockFilter(Block block) { private void onRender(Render3DEvent event) { if (render.get()) { BlockPos ppos = mc.player.getBlockPos(); - for (Vec3d b: getSurrDesign()) { - BlockPos bb = ppos.add(b.x, b.y, b.z); + for (Vec3i b: getSurrDesign()) { + BlockPos bb = ppos.add( b.getX(), b.getY(), b.getZ()); if (BlockHelper.getBlock(bb) == Blocks.AIR) event.renderer.box(bb, sideColor.get(), lineColor.get(), shapeMode.get(), 0); if (alwaysRender.get()) event.renderer.box(bb, sideColor.get(), lineColor.get(), shapeMode.get(), 0); } diff --git a/src/main/java/me/ghosttypes/orion/utils/player/AutomationUtils.java b/src/main/java/me/ghosttypes/orion/utils/player/AutomationUtils.java index ca94c28..a53a82e 100644 --- a/src/main/java/me/ghosttypes/orion/utils/player/AutomationUtils.java +++ b/src/main/java/me/ghosttypes/orion/utils/player/AutomationUtils.java @@ -11,6 +11,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Vec3i; import java.util.ArrayList; @@ -18,11 +19,11 @@ public class AutomationUtils { - public static ArrayList surroundPositions = new ArrayList() {{ - add(new Vec3d(1, 0, 0)); - add(new Vec3d(-1, 0, 0)); - add(new Vec3d(0, 0, 1)); - add(new Vec3d(0, 0, -1)); + public static ArrayList surroundPositions = new ArrayList() {{ + add(new Vec3i(1, 0, 0)); + add(new Vec3i(-1, 0, 0)); + add(new Vec3i(0, 0, 1)); + add(new Vec3i(0, 0, -1)); }}; @@ -57,8 +58,8 @@ public static boolean isSurroundBlock(BlockPos pos) { public static boolean canCrystal(PlayerEntity p) { BlockPos tpos = p.getBlockPos(); - for (Vec3d sp : surroundPositions) { - BlockPos sb = tpos.add(sp.x, sp.y, sp.z); + for (Vec3i sp : surroundPositions) { + BlockPos sb = tpos.add(sp.getX(), sp.getY(), sp.getZ()); if (BlockHelper.getBlock(sb) == Blocks.AIR) return true; } return false; diff --git a/src/main/java/me/ghosttypes/orion/utils/player/BedUtils.java b/src/main/java/me/ghosttypes/orion/utils/player/BedUtils.java index 0ddaaf1..ccfeab8 100644 --- a/src/main/java/me/ghosttypes/orion/utils/player/BedUtils.java +++ b/src/main/java/me/ghosttypes/orion/utils/player/BedUtils.java @@ -3,6 +3,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Vec3i; import java.util.ArrayList; import java.util.List; @@ -10,19 +11,19 @@ public class BedUtils { - public static ArrayList selfTrapPositions = new ArrayList() {{ - add(new Vec3d(1, 1, 0)); - add(new Vec3d(-1, 1, 0)); - add(new Vec3d(0, 1, 1)); - add(new Vec3d(0, 1, -1)); + public static ArrayList selfTrapPositions = new ArrayList() {{ + add(new Vec3i(1, 1, 0)); + add(new Vec3i(-1, 1, 0)); + add(new Vec3i(0, 1, 1)); + add(new Vec3i(0, 1, -1)); }}; public static BlockPos getSelfTrapBlock(PlayerEntity p, Boolean escapePrevention) { BlockPos tpos = p.getBlockPos(); List selfTrapBlocks = new ArrayList<>(); if (!escapePrevention && AutomationUtils.isTrapBlock(tpos.up(2))) return tpos.up(2); - for (Vec3d stp : selfTrapPositions) { - BlockPos stb = tpos.add(stp.x, stp.y, stp.z); + for (Vec3i stp : selfTrapPositions) { + BlockPos stb = tpos.add( stp.getX(), stp.getY(), stp.getZ()); if (AutomationUtils.isTrapBlock(stb)) selfTrapBlocks.add(stb); } if (selfTrapBlocks.isEmpty()) return null; diff --git a/src/main/java/me/ghosttypes/orion/utils/world/BlockHelper.java b/src/main/java/me/ghosttypes/orion/utils/world/BlockHelper.java index fca99bb..019fe82 100644 --- a/src/main/java/me/ghosttypes/orion/utils/world/BlockHelper.java +++ b/src/main/java/me/ghosttypes/orion/utils/world/BlockHelper.java @@ -5,10 +5,7 @@ import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Direction; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.*; import java.util.ArrayList; import java.util.Comparator; @@ -20,10 +17,10 @@ public class BlockHelper { - public static boolean isVecComplete(ArrayList vlist) { + public static boolean isVecComplete(ArrayList vlist) { BlockPos ppos = mc.player.getBlockPos(); - for (Vec3d b: vlist) { - BlockPos bb = ppos.add(b.x, b.y, b.z); + for (Vec3i b: vlist) { + BlockPos bb = ppos.add(b.getX(), (int) b.getY(), (int) b.getZ()); if (getBlock(bb) == Blocks.AIR) return false; } return true; diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 1f83434..76b4f7a 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -8,7 +8,8 @@ "GhostTypes", "Cloudburst", "Crosby", - "RedCarlos" + "RedCarlos", + "Cryo" ], "contact": { "repo": "https://github.com/GhostTypes/orion"