From bdf875e652402fd591c2385cb5ae98d948897df0 Mon Sep 17 00:00:00 2001 From: etianl <115842502+etianl@users.noreply.github.com> Date: Fri, 16 Dec 2022 02:51:00 -0800 Subject: [PATCH] 1.19.3 update :D --- README.md | 5 +-- build.gradle | 11 ++---- gradle.properties | 10 +++--- settings.gradle | 1 - .../mixin/InventoryScreenMixin.java | 6 +++- .../mixin/InventoryScreenMixinBow.java | 35 +++++++++++++------ .../mixin/LecternScreenMixin.java | 12 +++++-- .../trouserstreak/modules/RedstoneNuker.java | 2 +- .../trouserstreak/utils/BEntityUtils.java | 3 +- .../trouserstreak/utils/BWorldUtils.java | 2 +- 10 files changed, 54 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index cb2cc6030..221457a47 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,8 @@ It can also retrieve arrows and items from a distance if you shoot in that direc - AutoMountain can cause damage once in a while and I'm not sure why. Be prepared to die in the name of mountain building. (it is really rare though) - TPFly can hurt you once in a while on disable. I tried to prevent this. You also rubberband if going toward a block because it attempts to teleport you through it. - Adjusting TPFly antikick values while flying can be deadly +- Normal Mode antikick for the velocity flight mode that I added can cause damage once in a while for an unknown reason. ## Requirements: -- Latest full build of Meteor-Client -- Don't forget to update any other mods you are using if it's still crashing +- Latest dev build of Meteor-Client +- Don't forget to update any other mods you are using if it's still crashing \ No newline at end of file diff --git a/build.gradle b/build.gradle index 87a9100aa..a32119da2 100644 --- a/build.gradle +++ b/build.gradle @@ -9,14 +9,9 @@ version = project.mod_version group = project.maven_group repositories { - maven { - name = "meteor-maven" - url = "https://maven.meteordev.org/releases" - } - maven { - name = "meteor-maven-snapshots" - url = "https://maven.meteordev.org/snapshots" - } + mavenCentral() + maven { url "https://maven.meteordev.org/releases"} + maven { url "https://maven.meteordev.org/snapshots" } } dependencies { diff --git a/gradle.properties b/gradle.properties index 7f5bfeddb..44a3c47de 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,16 +1,16 @@ org.gradle.jvmargs=-Xmx2G # Fabric (https://fabricmc.net/versions.html) -minecraft_version=1.19.2 -yarn_mappings=1.19.2+build.9 -loader_version=0.14.9 +minecraft_version=1.19.3 +yarn_mappings=1.19.3+build.3 +loader_version=0.14.11 # Mod Properties -mod_version=0.2.6 +mod_version=0.2.6-1.19.3 maven_group=pwn.noobs archives_base_name=trouser-streak # Dependency Versionsz # Meteor (https://maven.meteordev.org/) -meteor_version=0.5.1 +meteor_version=0.5.2-SNAPSHOT diff --git a/settings.gradle b/settings.gradle index b02216baa..f91a4fe7e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,7 +4,6 @@ pluginManagement { name = 'Fabric' url = 'https://maven.fabricmc.net/' } - mavenCentral() gradlePluginPortal() } } diff --git a/src/main/java/pwn/noobs/trouserstreak/mixin/InventoryScreenMixin.java b/src/main/java/pwn/noobs/trouserstreak/mixin/InventoryScreenMixin.java index e71aeecee..b27e98525 100644 --- a/src/main/java/pwn/noobs/trouserstreak/mixin/InventoryScreenMixin.java +++ b/src/main/java/pwn/noobs/trouserstreak/mixin/InventoryScreenMixin.java @@ -25,7 +25,11 @@ public InventoryScreenMixin(PlayerScreenHandler container, PlayerInventory playe @Inject(method = {"init"}, at = { @At("TAIL") }) protected void init(final CallbackInfo ci) { if(Modules.get().isActive(InvDupeModule.class)) { - addDrawableChild(new ButtonWidget(x + 124, height / 2 - 24, 48, 20, Text.literal("1.17Dupe"), b -> dupe())); + addDrawableChild(new ButtonWidget.Builder(Text.literal("1.17Dupe"), button -> dupe()) + .position(x + 124, height / 2 - 24) + .size( 48, 20) + .build() + ); } } diff --git a/src/main/java/pwn/noobs/trouserstreak/mixin/InventoryScreenMixinBow.java b/src/main/java/pwn/noobs/trouserstreak/mixin/InventoryScreenMixinBow.java index 0c51cf34c..2d98122fc 100644 --- a/src/main/java/pwn/noobs/trouserstreak/mixin/InventoryScreenMixinBow.java +++ b/src/main/java/pwn/noobs/trouserstreak/mixin/InventoryScreenMixinBow.java @@ -21,38 +21,53 @@ protected InventoryScreenMixinBow(Text title){ @Inject(method = "init", at = @At("HEAD")) public void onInit(CallbackInfo ci){ if(Modules.get().isActive(InstantKill.class)) { - ButtonWidget toggle = new ButtonWidget(1, 1, 90, 12, Text.of("MovePackets: " + (InstantKill.shouldAddVelocity0 ? "50" : "OFF")), b -> { + ButtonWidget toggle = new ButtonWidget.Builder(Text.of("MovePackets: " + (InstantKill.shouldAddVelocity0 ? "50" : "OFF")), b -> { InstantKill.shouldAddVelocity0 = !InstantKill.shouldAddVelocity0; InstantKill.mc.setScreen(new InventoryScreen(InstantKill.mc.player)); - }); + }) + .position(1, 1) + .size(90, 12) + .build(); this.addDrawableChild(toggle); } if(Modules.get().isActive(InstantKill.class)) { - ButtonWidget toggle = new ButtonWidget(1, 13, 90, 12, Text.of("MovePackets: " + (InstantKill.shouldAddVelocity ? "100" : "OFF")), b -> { + ButtonWidget toggle = new ButtonWidget.Builder(Text.of("MovePackets: " + (InstantKill.shouldAddVelocity ? "100" : "OFF")), b -> { InstantKill.shouldAddVelocity = !InstantKill.shouldAddVelocity; InstantKill.mc.setScreen(new InventoryScreen(InstantKill.mc.player)); - }); + }) + .position(1, 13) + .size(90, 12) + .build(); this.addDrawableChild(toggle); } if(Modules.get().isActive(InstantKill.class)) { - ButtonWidget toggle = new ButtonWidget(1, 25, 90, 12, Text.of("MovePackets: " + (InstantKill.shouldAddVelocity1 ? "150" : "OFF")), b -> { + ButtonWidget toggle = new ButtonWidget.Builder(Text.of("MovePackets: " + (InstantKill.shouldAddVelocity1 ? "150" : "OFF")), b -> { InstantKill.shouldAddVelocity1 = !InstantKill.shouldAddVelocity1; InstantKill.mc.setScreen(new InventoryScreen(InstantKill.mc.player)); - }); + }) + .position(1, 25) + .size(90, 12) + .build(); this.addDrawableChild(toggle); } if(Modules.get().isActive(InstantKill.class)) { - ButtonWidget toggle = new ButtonWidget(1, 37, 90, 12, Text.of("MovePackets: " + (InstantKill.shouldAddVelocity2 ? "200" : "OFF")), b -> { + ButtonWidget toggle = new ButtonWidget.Builder(Text.of("MovePackets: " + (InstantKill.shouldAddVelocity2 ? "200" : "OFF")), b -> { InstantKill.shouldAddVelocity2 = !InstantKill.shouldAddVelocity2; InstantKill.mc.setScreen(new InventoryScreen(InstantKill.mc.player)); - }); + }) + .position(1, 37) + .size(90, 12) + .build(); this.addDrawableChild(toggle); } if(Modules.get().isActive(InstantKill.class)) { - ButtonWidget toggle = new ButtonWidget(1, 49, 90, 12, Text.of("MovePackets: " + (InstantKill.shouldAddVelocity3 ? "300" : "OFF")), b -> { + ButtonWidget toggle = new ButtonWidget.Builder(Text.of("MovePackets: " + (InstantKill.shouldAddVelocity3 ? "300" : "OFF")), b -> { InstantKill.shouldAddVelocity3 = !InstantKill.shouldAddVelocity3; InstantKill.mc.setScreen(new InventoryScreen(InstantKill.mc.player)); - }); + }) + .position(1, 49) + .size(90, 12) + .build(); this.addDrawableChild(toggle); } } diff --git a/src/main/java/pwn/noobs/trouserstreak/mixin/LecternScreenMixin.java b/src/main/java/pwn/noobs/trouserstreak/mixin/LecternScreenMixin.java index e948afa4c..80f7a4cfe 100644 --- a/src/main/java/pwn/noobs/trouserstreak/mixin/LecternScreenMixin.java +++ b/src/main/java/pwn/noobs/trouserstreak/mixin/LecternScreenMixin.java @@ -32,7 +32,7 @@ protected LecternScreenMixin(Text title) { @Inject(at = @At("TAIL"), method = "init") public void init(CallbackInfo ci) { if(Modules.get().isActive(LecternCrash.class)){ - this.addDrawableChild(new ButtonWidget(5, 25, 100, 20, Text.of("CrashServer"), (button) -> { + this.addDrawableChild(new ButtonWidget.Builder(Text.of("CrashServer"), (button) -> { ScreenHandler screenHandler = client.player.currentScreenHandler; DefaultedList defaultedList = screenHandler.slots; int i = defaultedList.size(); @@ -55,7 +55,15 @@ public void init(CallbackInfo ci) { ((ClientConnectionAccessor) client.getNetworkHandler().getConnection()).getChannel().writeAndFlush(new ClickSlotC2SPacket(client.player.currentScreenHandler.syncId, client.player.currentScreenHandler.getRevision(), 0, 0, SlotActionType.QUICK_MOVE, client.player.currentScreenHandler.getCursorStack().copy(), int2ObjectMap)); client.player.sendMessage(Text.of("Crashing Server..."), false); button.active = false; - })); + }) + .position(5, 25) + .size(100, 20) + .build() + ); + + + + } } } diff --git a/src/main/java/pwn/noobs/trouserstreak/modules/RedstoneNuker.java b/src/main/java/pwn/noobs/trouserstreak/modules/RedstoneNuker.java index 5e14d4647..9a1dde5eb 100644 --- a/src/main/java/pwn/noobs/trouserstreak/modules/RedstoneNuker.java +++ b/src/main/java/pwn/noobs/trouserstreak/modules/RedstoneNuker.java @@ -592,7 +592,7 @@ private boolean isRedstoneBlock(Block block) { block instanceof RedstoneWireBlock || block instanceof ComparatorBlock || block instanceof RepeaterBlock || - block instanceof AbstractButtonBlock || + block instanceof ButtonBlock || block instanceof DetectorRailBlock || block instanceof LeverBlock || block instanceof SculkSensorBlock || diff --git a/src/main/java/pwn/noobs/trouserstreak/utils/BEntityUtils.java b/src/main/java/pwn/noobs/trouserstreak/utils/BEntityUtils.java index 261c2755e..1dc9fbd6d 100644 --- a/src/main/java/pwn/noobs/trouserstreak/utils/BEntityUtils.java +++ b/src/main/java/pwn/noobs/trouserstreak/utils/BEntityUtils.java @@ -16,7 +16,6 @@ import net.minecraft.item.Item; import net.minecraft.item.Items; import net.minecraft.network.packet.s2c.play.EntityStatusS2CPacket; -import net.minecraft.tag.FluidTags; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; @@ -100,7 +99,7 @@ public static int getBlockBreakingSpeed(BlockState block, BlockPos pos, int slot f *= k; } - if (player.isSubmergedIn(FluidTags.WATER) && !EnchantmentHelper.hasAquaAffinity(player)) { + if (player.isSubmergedInWater() && !EnchantmentHelper.hasAquaAffinity(player)) { f /= 5.0F; } diff --git a/src/main/java/pwn/noobs/trouserstreak/utils/BWorldUtils.java b/src/main/java/pwn/noobs/trouserstreak/utils/BWorldUtils.java index 0ae5858aa..85a9b89b5 100644 --- a/src/main/java/pwn/noobs/trouserstreak/utils/BWorldUtils.java +++ b/src/main/java/pwn/noobs/trouserstreak/utils/BWorldUtils.java @@ -133,7 +133,7 @@ public static Direction getPlaceSide(BlockPos blockPos) { public static boolean isClickable(Block block) { return block instanceof CraftingTableBlock || block instanceof AnvilBlock - || block instanceof AbstractButtonBlock + || block instanceof ButtonBlock || block instanceof AbstractPressurePlateBlock || block instanceof BlockWithEntity || block instanceof BedBlock