From f05ef4128f4b0bcb9d0bf1a691ce17037f1bc765 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Sun, 16 Jul 2023 04:04:42 -0400 Subject: Rendering Improvements, Fixes + Occlusion Culling --- build.gradle | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index fec3b902..3c89f43f 100644 --- a/build.gradle +++ b/build.gradle @@ -29,6 +29,7 @@ repositories { url = "https://maven.meteordev.org/releases" } maven {url "https://jitpack.io"} + maven { url "https://repo.codemc.io/repository/maven-public/" } // For Occlusion Culling library } dependencies { @@ -63,6 +64,9 @@ dependencies { include modImplementation("com.github.0x3C50:Renderer:${project.renderer_version}") include(modImplementation ("meteordevelopment:discord-ipc:1.1")) + + // Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) + include implementation("com.logisticscraft:occlusionculling:${project.occlusionculling_version}") } base { -- cgit From 3a174f7b5a34b70206fbd556050a20546d344833 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Sun, 16 Jul 2023 14:02:17 -0400 Subject: Change repository order --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 3c89f43f..b5eaa09f 100644 --- a/build.gradle +++ b/build.gradle @@ -28,8 +28,8 @@ repositories { name = "meteor-maven" url = "https://maven.meteordev.org/releases" } - maven {url "https://jitpack.io"} maven { url "https://repo.codemc.io/repository/maven-public/" } // For Occlusion Culling library + maven {url "https://jitpack.io"} } dependencies { -- cgit From 08a120ef0433b23c8cee5df8625649d5a71655a6 Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Thu, 20 Jul 2023 21:28:11 +0800 Subject: Update build.gradle --- build.gradle | 13 +++++++------ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index b5eaa09f..44d47adc 100644 --- a/build.gradle +++ b/build.gradle @@ -41,11 +41,10 @@ dependencies { modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" // Cloth config - modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}") { + include modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}") { exclude group: "net.fabricmc.fabric-api" exclude module: "modmenu" } - include "me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}" // Mod Menu modImplementation "com.terraformersmc:modmenu:${project.mod_menu_version}" @@ -58,13 +57,15 @@ dependencies { modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" // https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit used pull data from the NEU item repo - include(implementation("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r")) + include implementation("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r") // Renderer (https://github.com/0x3C50/Renderer) - include modImplementation("com.github.0x3C50:Renderer:${project.renderer_version}") + include modImplementation("com.github.0x3C50:Renderer:${project.renderer_version}"){ + exclude group: "io.github.ladysnake" exclude module: "satin" + } + + include modImplementation("meteordevelopment:discord-ipc:1.1") - include(modImplementation ("meteordevelopment:discord-ipc:1.1")) - // Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) include implementation("com.logisticscraft:occlusionculling:${project.occlusionculling_version}") } diff --git a/gradle.properties b/gradle.properties index fe9595f0..a97ef816 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ mod_menu_version=7.0.1 ## REI (https://www.curseforge.com/minecraft/mc-mods/roughly-enough-items/files) rei_version=12.0.625 ## Renderer (https://github.com/0x3C50/Renderer) -renderer_version = d687aced4c +renderer_version = master-SNAPSHOT ## Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) occlusionculling_version = 0.0.7-SNAPSHOT -- cgit From cfae3b8ca91484ef7d9dc7e0eff919ffeeff89c7 Mon Sep 17 00:00:00 2001 From: Kevin <92656833+kevinthegreat1@users.noreply.github.com> Date: Tue, 25 Jul 2023 02:15:16 -0400 Subject: Hide spammed warnings (#209) --- build.gradle | 15 ++++++----- gradle.properties | 2 ++ .../mixin/ClientPlayNetworkHandlerMixin.java | 29 +++++++++++++++------- .../xmrvizzy/skyblocker/mixin/ScoreboardMixin.java | 16 ++++++++++++ .../skyblocker/skyblock/FishingHelper.java | 4 +-- src/main/resources/skyblocker.mixins.json | 1 + 6 files changed, 50 insertions(+), 17 deletions(-) create mode 100644 src/main/java/me/xmrvizzy/skyblocker/mixin/ScoreboardMixin.java (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 44d47adc..9e5e4e6a 100644 --- a/build.gradle +++ b/build.gradle @@ -40,6 +40,9 @@ dependencies { mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + // Fabric API. This is technically optional, but you probably want it anyway. + modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" + // Cloth config include modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}") { exclude group: "net.fabricmc.fabric-api" @@ -53,12 +56,6 @@ dependencies { modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}" modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}" - // Fabric API. This is technically optional, but you probably want it anyway. - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" - - // https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit used pull data from the NEU item repo - include implementation("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r") - // Renderer (https://github.com/0x3C50/Renderer) include modImplementation("com.github.0x3C50:Renderer:${project.renderer_version}"){ exclude group: "io.github.ladysnake" exclude module: "satin" @@ -66,6 +63,12 @@ dependencies { include modImplementation("meteordevelopment:discord-ipc:1.1") + // Mixin Extras (https://github.com/LlamaLad7/MixinExtras) + include implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:${project.mixin_extras_version}")) + + // https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit used pull data from the NEU item repo + include implementation("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r") + // Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) include implementation("com.logisticscraft:occlusionculling:${project.occlusionculling_version}") } diff --git a/gradle.properties b/gradle.properties index a97ef816..d28c538b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,6 +20,8 @@ rei_version=12.0.625 ## Renderer (https://github.com/0x3C50/Renderer) renderer_version = master-SNAPSHOT +## Mixin Extras (https://github.com/LlamaLad7/MixinExtras) +mixin_extras_version=0.2.0-beta.9 ## Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) occlusionculling_version = 0.0.7-SNAPSHOT diff --git a/src/main/java/me/xmrvizzy/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/me/xmrvizzy/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java index 80c98473..1d8b6565 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/me/xmrvizzy/skyblocker/mixin/ClientPlayNetworkHandlerMixin.java @@ -1,24 +1,35 @@ package me.xmrvizzy.skyblocker.mixin; +import com.llamalad7.mixinextras.injector.WrapWithCondition; import me.xmrvizzy.skyblocker.skyblock.FishingHelper; -import net.minecraft.client.MinecraftClient; +import me.xmrvizzy.skyblocker.utils.Utils; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket; -import org.spongepowered.asm.mixin.Final; +import org.slf4j.Logger; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(ClientPlayNetworkHandler.class) public abstract class ClientPlayNetworkHandlerMixin { - @Shadow - @Final - private MinecraftClient client; - @Inject(method = "onPlaySound", at = @At("RETURN")) - private void skyblockmod_onPlaySound(PlaySoundS2CPacket packet, CallbackInfo ci) { - FishingHelper.onSound(client, packet); + private void skyblocker$onPlaySound(PlaySoundS2CPacket packet, CallbackInfo ci) { + FishingHelper.onSound(packet); + } + + @WrapWithCondition(method = "onEntityPassengersSet", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;)V")) + private boolean skyblocker$cancelEntityPassengersWarning(Logger instance, String msg) { + return !Utils.isOnHypixel(); + } + + @WrapWithCondition(method = "onPlayerList", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V")) + private boolean skyblocker$cancelPlayerListWarning(Logger instance, String format, Object arg) { + return !Utils.isOnHypixel(); + } + + @WrapWithCondition(method = "onTeam", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;[Ljava/lang/Object;)V")) + private boolean skyblocker$cancelTeamWarning(Logger instance, String format, Object... arg) { + return !Utils.isOnHypixel(); } } diff --git a/src/main/java/me/xmrvizzy/skyblocker/mixin/ScoreboardMixin.java b/src/main/java/me/xmrvizzy/skyblocker/mixin/ScoreboardMixin.java new file mode 100644 index 00000000..6f88821c --- /dev/null +++ b/src/main/java/me/xmrvizzy/skyblocker/mixin/ScoreboardMixin.java @@ -0,0 +1,16 @@ +package me.xmrvizzy.skyblocker.mixin; + +import com.llamalad7.mixinextras.injector.WrapWithCondition; +import me.xmrvizzy.skyblocker.utils.Utils; +import net.minecraft.scoreboard.Scoreboard; +import org.slf4j.Logger; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + +@Mixin(Scoreboard.class) +public abstract class ScoreboardMixin { + @WrapWithCondition(method = "addTeam", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V")) + private boolean skyblocker$cancelTeamWarning(Logger instance, String format, Object arg) { + return !Utils.isOnHypixel(); + } +} diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/FishingHelper.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/FishingHelper.java index 8dee3fcb..b53157c5 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/FishingHelper.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/FishingHelper.java @@ -44,10 +44,10 @@ public class FishingHelper { startTime = 0; } - public static void onSound(MinecraftClient client, PlaySoundS2CPacket packet) { + public static void onSound(PlaySoundS2CPacket packet) { String path = packet.getSound().value().getId().getPath(); if (SkyblockerConfig.get().general.fishing.enableFishingHelper && startTime != 0 && System.currentTimeMillis() >= startTime + 2000 && ("entity.generic.splash".equals(path) || "entity.player.splash".equals(path))) { - ClientPlayerEntity player = client.player; + ClientPlayerEntity player = MinecraftClient.getInstance().player; if (player != null && player.fishHook != null) { Vec3d soundToFishHook = player.fishHook.getPos().subtract(packet.getX(), 0, packet.getZ()); if (Math.abs(normalYawVector.x * soundToFishHook.z - normalYawVector.z * soundToFishHook.x) < 0.2D && Math.abs(normalYawVector.dotProduct(soundToFishHook)) < 4D && player.getPos().squaredDistanceTo(packet.getX(), packet.getY(), packet.getZ()) > 1D) { diff --git a/src/main/resources/skyblocker.mixins.json b/src/main/resources/skyblocker.mixins.json index 701d54e5..83861112 100644 --- a/src/main/resources/skyblocker.mixins.json +++ b/src/main/resources/skyblocker.mixins.json @@ -18,6 +18,7 @@ "PlayerListHudAccessor", "PlayerListHudMixin", "RecipeBookWidgetAccessor", + "ScoreboardMixin", "accessor.BeaconBlockEntityRendererInvoker", "accessor.FrustumInvoker" ], -- cgit From 71f4d8ee4f3089caed638bd6dd19357b4e84f6f9 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Tue, 25 Jul 2023 04:08:58 -0400 Subject: Import BetterInject --- build.gradle | 3 +++ gradle.properties | 3 +++ src/main/resources/fabric.mod.json | 3 +++ 3 files changed, 9 insertions(+) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 9e5e4e6a..3d375d68 100644 --- a/build.gradle +++ b/build.gradle @@ -71,6 +71,9 @@ dependencies { // Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) include implementation("com.logisticscraft:occlusionculling:${project.occlusionculling_version}") + + // BetterInject (https://github.com/caoimhebyrne/BetterInject) + include implementation(annotationProcessor("com.github.cbyrneee:BetterInject:${project.betterinject_version}")) } base { diff --git a/gradle.properties b/gradle.properties index f39bf2cb..06c16d22 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,6 +25,9 @@ mixin_extras_version=0.2.0-beta.9 ## Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) occlusionculling_version = 0.0.7-SNAPSHOT +## Better Inject (https://github.com/caoimhebyrne/BetterInject) +betterinject_version=0.1.3 + # Mod Properties mod_version = 1.11.0 maven_group = me.xmrvizzy diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 5b383fe7..71d9763e 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -18,6 +18,9 @@ "client": [ "me.xmrvizzy.skyblocker.SkyblockerMod" ], + "preLaunch": [ + "dev.cbyrne.betterinject.BetterInject::initialize" + ], "modmenu": [ "me.xmrvizzy.skyblocker.config.modmenu.ModMenuEntry" ], -- cgit From 810d7f73da29189bf0b0ec813812e69a21ad085b Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Thu, 27 Jul 2023 10:59:57 +0800 Subject: Refactor build files --- build.gradle | 6 +++--- gradle.properties | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 3d375d68..b765d962 100644 --- a/build.gradle +++ b/build.gradle @@ -66,14 +66,14 @@ dependencies { // Mixin Extras (https://github.com/LlamaLad7/MixinExtras) include implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:${project.mixin_extras_version}")) + // BetterInject (https://github.com/caoimhebyrne/BetterInject) + include implementation(annotationProcessor("com.github.cbyrneee:BetterInject:${project.betterinject_version}")) + // https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit used pull data from the NEU item repo include implementation("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r") // Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) include implementation("com.logisticscraft:occlusionculling:${project.occlusionculling_version}") - - // BetterInject (https://github.com/caoimhebyrne/BetterInject) - include implementation(annotationProcessor("com.github.cbyrneee:BetterInject:${project.betterinject_version}")) } base { diff --git a/gradle.properties b/gradle.properties index 06c16d22..6ae74df8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,11 +22,10 @@ renderer_version = master-SNAPSHOT ## Mixin Extras (https://github.com/LlamaLad7/MixinExtras) mixin_extras_version=0.2.0-beta.9 -## Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) -occlusionculling_version = 0.0.7-SNAPSHOT - ## Better Inject (https://github.com/caoimhebyrne/BetterInject) betterinject_version=0.1.3 +## Occlusion Culling (https://github.com/LogisticsCraft/OcclusionCulling) +occlusionculling_version = 0.0.7-SNAPSHOT # Mod Properties mod_version = 1.11.0 -- cgit