Skip to content

Commit

Permalink
Update to 1.19.4 (Fixed) (#35)
Browse files Browse the repository at this point in the history
* Add files via upload

* Add files via upload

* Update devbuild.yml

---------

Co-authored-by: Cloudburst <[email protected]>
  • Loading branch information
CrytoPal and C10udburst authored Apr 16, 2023
1 parent d3918fd commit 63f481a
Show file tree
Hide file tree
Showing 14 changed files with 88 additions and 84 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/devbuild.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: devbuild

concurrency:
group: "build-1.19.2"
group: "build-1.19.4"
cancel-in-progress: true

on:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'fabric-loom' version '1.1-SNAPSHOT'
}

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
Expand All @@ -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:+"
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -123,7 +126,7 @@ private void onTick(TickEvent.Post event) {
List<RecipeResultCollection> 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);
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/me/ghosttypes/orion/modules/main/BedDisabler.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -36,9 +37,9 @@ public class BedDisabler extends Module {
private int wpt, delayTimer;


private final ArrayList<Vec3d> places = new ArrayList<Vec3d>() {{
add(new Vec3d(0, 1, 0));
add(new Vec3d(0, 2, 0));
private final ArrayList<Vec3i> places = new ArrayList<Vec3i>() {{
add(new Vec3i(0, 1, 0));
add(new Vec3i(0, 2, 0));
}};


Expand Down Expand Up @@ -79,12 +80,12 @@ private void onTick(TickEvent.Pre event) {

private void doPlace(FindItemResult string) {
wpt = 0;
ArrayList<Vec3d> p = new ArrayList<Vec3d>(places);
if (!ignoreFeet.get()) p.add(new Vec3d(0, 0, 0));
ArrayList<Vec3i> 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++;
}
Expand Down
40 changes: 20 additions & 20 deletions src/main/java/me/ghosttypes/orion/modules/main/SelfTrapPlus.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,19 +56,19 @@ public enum modes {
private BlockPos startPos;
private int bpt;

private final ArrayList<Vec3d> full = new ArrayList<Vec3d>() {{
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<Vec3i> full = new ArrayList<Vec3i>() {{
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<Vec3d> antiFacePlace = new ArrayList<Vec3d>() {{
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<Vec3i> antiFacePlace = new ArrayList<Vec3i>() {{
add(new Vec3i(1, 1, 0));
add(new Vec3i(-1, 1, 0));
add(new Vec3i(0, 1, 1));
add(new Vec3i(0, 1, -1));
}};


Expand All @@ -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++;
Expand All @@ -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<Vec3d> getTrapDesign() {
ArrayList<Vec3d> trapDesign = new ArrayList<Vec3d>();
private ArrayList<Vec3i> getTrapDesign() {
ArrayList<Vec3i> trapDesign = new ArrayList<Vec3i>();
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;
}
}
38 changes: 19 additions & 19 deletions src/main/java/me/ghosttypes/orion/modules/main/SurroundPlus.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -51,18 +51,18 @@ public class SurroundPlus extends Module {
private final Setting<SettingColor> sideColor = sgRender.add(new ColorSetting.Builder().name("side-color").description("The side color.").defaultValue(new SettingColor(15, 255, 211,75)).build());
private final Setting<SettingColor> lineColor = sgRender.add(new ColorSetting.Builder().name("line-color").description("The line color.").defaultValue(new SettingColor(15, 255, 211)).build());

private final ArrayList<Vec3d> surr = new ArrayList<Vec3d>() {{
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<Vec3i> surr = new ArrayList<Vec3i>() {{
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<Vec3d> surrDouble = new ArrayList<Vec3d>() {{
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<Vec3i> surrDouble = new ArrayList<Vec3i>() {{
add(new Vec3i(1, 1, 0));
add(new Vec3i(-1, 1, 0));
add(new Vec3i(0, 1, 1));
add(new Vec3i(0, 1, -1));
}};


Expand All @@ -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);
Expand All @@ -115,16 +115,16 @@ private void onTick(TickEvent.Pre event) {
}
}

private ArrayList<Vec3d> getSurrDesign() {
ArrayList<Vec3d> surrDesign = new ArrayList<Vec3d>(surr);
private ArrayList<Vec3i> getSurrDesign() {
ArrayList<Vec3i> surrDesign = new ArrayList<Vec3i>(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;
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
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;

import static meteordevelopment.meteorclient.MeteorClient.mc;

public class AutomationUtils {

public static ArrayList<Vec3d> surroundPositions = new ArrayList<Vec3d>() {{
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<Vec3i> surroundPositions = new ArrayList<Vec3i>() {{
add(new Vec3i(1, 0, 0));
add(new Vec3i(-1, 0, 0));
add(new Vec3i(0, 0, 1));
add(new Vec3i(0, 0, -1));
}};


Expand Down Expand Up @@ -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;
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/me/ghosttypes/orion/utils/player/BedUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
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;
import java.util.Random;

public class BedUtils {

public static ArrayList<Vec3d> selfTrapPositions = new ArrayList<Vec3d>() {{
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<Vec3i> selfTrapPositions = new ArrayList<Vec3i>() {{
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<BlockPos> 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;
Expand Down
Loading

0 comments on commit 63f481a

Please sign in to comment.