aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md23
-rw-r--r--build.gradle18
-rw-r--r--gradle.properties12
-rw-r--r--gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--src/main/java/com/dulkirfabric/mixin/render/GameMenuScreenMixin.java3
-rw-r--r--src/main/java/com/dulkirfabric/mixin/render/GameRendererMixin.java17
-rw-r--r--src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java45
-rw-r--r--src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt12
-rw-r--r--src/main/kotlin/com/dulkirfabric/util/ScoreBoardUtils.kt18
-rw-r--r--src/main/kotlin/com/dulkirfabric/util/Utils.kt3
10 files changed, 79 insertions, 74 deletions
diff --git a/README.md b/README.md
index 19f086c..e5dbb83 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,8 @@
[![discord badge](https://img.shields.io/discord/819011720001224735?label=discord&color=9089DA&logo=discord&style=for-the-badge)](https://discord.gg/WnJwrNZQSn)
[![twitch](https://img.shields.io/twitch/status/dulkir?style=for-the-badge)](https://www.twitch.tv/dulkir)
-Future home of dulkirmod for modern versions of minecraft.
+Home of dulkirmod for modern versions of minecraft.
-## Beta 1.0 is available now! See the release panel on the right side for compiled source
DulkirMod 1.8.9 Can be found [here](https://github.com/inglettronald/DulkirMod).
@@ -54,27 +53,17 @@ DulkirMod 1.8.9 Can be found [here](https://github.com/inglettronald/DulkirMod).
<summary>
<b>Planned</b>
</summary>
- <ul>
- <li>More Enderman Slayer Features</li>
- <li>Farming Controls Scheme Features</li>
- </ul>
-</details>
-
-<details>
- <summary>
- <b>Suggestions</b>
- </summary>
- Please feel free to drop any suggestions for stuff to add to this mod over in my discord, linked above! I think I
- usually have a good understanding of what mod features need coding, but I'm always open to ideas.
+ There are no longer plans to add features to this mod, as I have been working at Lunar Client now. I will attempt
+ to keep up with bug-fixes and version bumps when I have the time.
</details>
<details>
<summary>
<b>Contributing</b>
</summary>
- Contributions are welcome! The best way to do this is to create a fork of this repository and suggest changes through
- a pull request on GitHub. Read more about contributions and pull requests <a href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork">here</a>.
- My discord dms are also publicly open if you have further questions.
+ Unfortunately, contributions are not open at this time. By all means, feel free to make your own branch and maintain
+ it if you'd like though. I will not directly endorse any forks of this mod, but I won't be taking any steps to take
+ them down so long as licenses are abided by.
</details>
## For Users
diff --git a/build.gradle b/build.gradle
index f2cff89..b18923a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,10 +1,9 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
- id 'fabric-loom' version '1.2-SNAPSHOT'
+ id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish'
id "org.jetbrains.kotlin.jvm" version "1.8.21"
- id "io.github.juuxel.loom-quiltflower" version "1.10.0"
id "org.jetbrains.kotlin.plugin.serialization" version "1.8.10"
}
@@ -45,16 +44,13 @@ dependencies {
modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.1.2")
implementation "meteordevelopment:orbit:0.2.3"
include "meteordevelopment:orbit:0.2.3"
- modApi "me.shedaniel.cloth:cloth-config-fabric:11.0.99"
- include "me.shedaniel.cloth:cloth-config-fabric:11.0.99"
- include "com.github.llamalad7.mixinextras:mixinextras-fabric:0.2.0-beta.9"
- implementation "com.github.llamalad7.mixinextras:mixinextras-fabric:0.2.0-beta.9"
- annotationProcessor "com.github.llamalad7.mixinextras:mixinextras-fabric:0.2.0-beta.9"
+ modApi "me.shedaniel.cloth:cloth-config-fabric:13.0.121"
+ include "me.shedaniel.cloth:cloth-config-fabric:13.0.121"
modImplementation("moe.nea.jarvis:jarvis-api:1.1.1")
include("moe.nea.jarvis:jarvis-fabric:1.1.1")
modLocalRuntime("moe.nea.jarvis:jarvis-fabric:1.1.1")
- modImplementation "maven.modrinth:modmenu:7.0.0"
- modLocalRuntime "maven.modrinth:modmenu:7.0.0"
+ modImplementation "maven.modrinth:modmenu:9.0.0"
+ modLocalRuntime "maven.modrinth:modmenu:9.0.0"
}
loom {
@@ -65,8 +61,8 @@ loom {
property("fabric.log.level", "info")
vmArg("-ea")
vmArg("-XX:+AllowEnhancedClassRedefinition")
- vmArg("-XX:HotswapAgent=external")
- vmArg("-javaagent:/home/ronald/Software-Packages/hotswap-agent-1.4.2-SNAPSHOT.jar")
+ /*vmArg("-XX:HotswapAgent=external")
+ vmArg("-javaagent:/home/ronald/Software-Packages/hotswap-agent-1.4.2-SNAPSHOT.jar")*/
}
}
accessWidenerPath = file("src/main/resources/dulkirmod.accesswidener")
diff --git a/gradle.properties b/gradle.properties
index 3908283..4e0eb4f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -4,15 +4,15 @@ org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/develop
-minecraft_version=1.20.1
-yarn_mappings=1.20.1+build.10
-loader_version=0.14.21
-fabric_kotlin_version=1.9.4+kotlin.1.8.21
+minecraft_version=1.20.4
+yarn_mappings=1.20.4+build.3
+loader_version=0.15.6
+fabric_kotlin_version=1.10.17+kotlin.1.9.22
# Mod Properties
-mod_version=1.0.1
+mod_version=1.0.2
maven_group=com.dulkirfabric
archives_base_name=dulkirmod-fabric
# Dependencies
-fabric_version=0.86.0+1.20.1 \ No newline at end of file
+fabric_version=0.94.1+1.20.4 \ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 37aef8d..3499ded 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/src/main/java/com/dulkirfabric/mixin/render/GameMenuScreenMixin.java b/src/main/java/com/dulkirfabric/mixin/render/GameMenuScreenMixin.java
index 6f09e51..86a4ecf 100644
--- a/src/main/java/com/dulkirfabric/mixin/render/GameMenuScreenMixin.java
+++ b/src/main/java/com/dulkirfabric/mixin/render/GameMenuScreenMixin.java
@@ -32,7 +32,8 @@ import java.util.function.Supplier;
@Mixin(GameMenuScreen.class)
public abstract class GameMenuScreenMixin extends ScreenMixin {
- private final Text buttonText = MutableText.of(new LiteralTextContent("Dulkir")).formatted(Formatting.BOLD, Formatting.YELLOW);
+ private final Text buttonText = MutableText.of(new PlainTextContent.Literal("Dulkir"))
+ .formatted(Formatting.BOLD, Formatting.YELLOW);
@Shadow
protected abstract ButtonWidget createButton(Text text, Supplier<Screen> screenSupplier);
diff --git a/src/main/java/com/dulkirfabric/mixin/render/GameRendererMixin.java b/src/main/java/com/dulkirfabric/mixin/render/GameRendererMixin.java
index 78b4dbd..40ac4af 100644
--- a/src/main/java/com/dulkirfabric/mixin/render/GameRendererMixin.java
+++ b/src/main/java/com/dulkirfabric/mixin/render/GameRendererMixin.java
@@ -2,18 +2,15 @@ package com.dulkirfabric.mixin.render;
import com.dulkirfabric.features.InventoryScale;
+import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.render.GameRenderer;
-import net.minecraft.client.util.Window;
-import net.minecraft.client.util.math.MatrixStack;
-import org.joml.Matrix4f;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(value = GameRenderer.class, priority = 1001)
public class GameRendererMixin {
@@ -37,9 +34,8 @@ public class GameRendererMixin {
opcode = Opcodes.GETFIELD,
target = "Lnet/minecraft/client/MinecraftClient;currentScreen:Lnet/minecraft/client/gui/screen/Screen;",
shift = At.Shift.BEFORE,
- ordinal = 1), locals = LocalCapture.CAPTURE_FAILHARD)
- public void onScreenRenderPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int i, int j,
- Window window, Matrix4f matrix4f, MatrixStack matrixStack, DrawContext drawContext) {
+ ordinal = 1))
+ public void onScreenRenderPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, @Local DrawContext drawContext) {
drawContext.getMatrices().push();
drawContext.getMatrices().scale(InventoryScale.INSTANCE.getScale(), InventoryScale.INSTANCE.getScale(), 1f);
}
@@ -49,10 +45,9 @@ public class GameRendererMixin {
opcode = Opcodes.GETFIELD,
target = "Lnet/minecraft/client/MinecraftClient;currentScreen:Lnet/minecraft/client/gui/screen/Screen;",
shift = At.Shift.AFTER,
- ordinal = 3), locals = LocalCapture.CAPTURE_FAILHARD
+ ordinal = 3)
)
- public void onScreenRenderPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int i, int j,
- Window window, Matrix4f matrix4f, MatrixStack matrixStack, DrawContext drawContext) {
- drawContext.getMatrices().pop();
+ public void onScreenRenderPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, @Local DrawContext drawContext) {
+ drawContext.getMatrices().pop();
}
} \ No newline at end of file
diff --git a/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java b/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java
index 7f90b3b..995b8af 100644
--- a/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java
+++ b/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java
@@ -6,6 +6,7 @@ import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.hud.InGameHud;
+import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
@@ -15,21 +16,36 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(InGameHud.class)
public class InGameHudMixin {
- @Inject(method = "renderStatusEffectOverlay", at = @At("HEAD"), cancellable = true)
+ @Inject(
+ method = "renderStatusEffectOverlay",
+ at = @At("HEAD"),
+ cancellable = true
+ )
public void onRenderStatusEffectOverlay(DrawContext context, CallbackInfo ci) {
if (DulkirConfig.ConfigVars.getConfigOptions().getStatusEffectHidden()) {
ci.cancel();
}
}
- @Redirect(method = "renderScoreboardSidebar(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/scoreboard/ScoreboardObjective;)V",
- at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawText(Lnet/minecraft/client/font/TextRenderer;Ljava/lang/String;IIIZ)I"))
- public int renderScoreBoardSidebar(DrawContext instance, TextRenderer textRenderer, String text, int x, int y, int color, boolean shadow) {
+ @Redirect(
+ method = "method_55440([Lnet/minecraft/client/gui/hud/InGameHud$SidebarEntry;ILnet/minecraft/client/gui/DrawContext;Lnet/minecraft/text/Text;I)V",
+ at = @At(
+ value = "INVOKE",
+ target = "Lnet/minecraft/client/gui/DrawContext;drawText(Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/Text;IIIZ)I",
+ ordinal = 2
+ )
+ )
+ public int removeScoreBoardNumbers(DrawContext instance, TextRenderer textRenderer, Text text, int x, int y, int color, boolean shadow) {
return 0;
}
- @ModifyExpressionValue(method = "renderStatusBars(Lnet/minecraft/client/gui/DrawContext;)V",
- at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;getArmor()I"))
+ @ModifyExpressionValue(
+ method = "renderStatusBars(Lnet/minecraft/client/gui/DrawContext;)V",
+ at = @At(
+ value = "INVOKE",
+ target = "Lnet/minecraft/entity/player/PlayerEntity;getArmor()I"
+ )
+ )
public int onGrabArmorAmount(int original) {
if (DulkirConfig.ConfigVars.getConfigOptions().getHideArmorOverlay() && Utils.INSTANCE.isInSkyblock()) {
return 0;
@@ -37,17 +53,24 @@ public class InGameHudMixin {
return original;
}
- @ModifyExpressionValue(method = "renderStatusBars(Lnet/minecraft/client/gui/DrawContext;)V",
- at = @At(value = "INVOKE",
- target = "Lnet/minecraft/client/gui/hud/InGameHud;getHeartCount(Lnet/minecraft/entity/LivingEntity;)I"))
+ @ModifyExpressionValue(
+ method = "renderStatusBars(Lnet/minecraft/client/gui/DrawContext;)V",
+ at = @At(
+ value = "INVOKE",
+ target = "Lnet/minecraft/client/gui/hud/InGameHud;getHeartCount(Lnet/minecraft/entity/LivingEntity;)I"
+ )
+ )
public int onCheckForRiding(int original) {
if (DulkirConfig.ConfigVars.getConfigOptions().getHideHungerOverlay() && Utils.INSTANCE.isInSkyblock())
return 1;
return original;
}
- @Inject(method = "renderHeldItemTooltip",
- at = @At("HEAD"), cancellable = true)
+ @Inject(
+ method = "renderHeldItemTooltip",
+ at = @At("HEAD"),
+ cancellable = true
+ )
public void changeItemDisplay (DrawContext context, CallbackInfo ci) {
if (DulkirConfig.ConfigVars.getConfigOptions().getHideHeldItemTooltip())
ci.cancel();
diff --git a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt
index 93db1a0..ccd5dd2 100644
--- a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt
+++ b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt
@@ -21,15 +21,17 @@ import com.dulkirfabric.util.render.AnimationPreset
import com.dulkirfabric.util.render.HudElement
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers
-import kotlinx.serialization.decodeFromString
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import me.shedaniel.clothconfig2.api.ConfigBuilder
import moe.nea.jarvis.api.Point
import net.minecraft.client.gui.screen.Screen
-import net.minecraft.client.util.InputUtil
-import net.minecraft.client.util.InputUtil.*
-import net.minecraft.text.*
+import net.minecraft.client.util.InputUtil.Key
+import net.minecraft.client.util.InputUtil.UNKNOWN_KEY
+import net.minecraft.text.MutableText
+import net.minecraft.text.PlainTextContent.Literal
+import net.minecraft.text.Text
+import net.minecraft.text.TextColor
import net.minecraft.util.Formatting
import net.minecraft.util.Identifier
import java.io.File
@@ -37,7 +39,7 @@ import java.io.File
class DulkirConfig {
private val buttonText: Text =
- MutableText.of(LiteralTextContent("Dulkir")).formatted(Formatting.BOLD, Formatting.YELLOW)
+ MutableText.of(Literal("Dulkir")).formatted(Formatting.BOLD, Formatting.YELLOW)
var screen: Screen = buildScreen(null)
fun buildScreen(parentScreen: Screen? = null): Screen {
diff --git a/src/main/kotlin/com/dulkirfabric/util/ScoreBoardUtils.kt b/src/main/kotlin/com/dulkirfabric/util/ScoreBoardUtils.kt
index c62cbab..d8acd4b 100644
--- a/src/main/kotlin/com/dulkirfabric/util/ScoreBoardUtils.kt
+++ b/src/main/kotlin/com/dulkirfabric/util/ScoreBoardUtils.kt
@@ -23,12 +23,12 @@ object ScoreBoardUtils {
fun getLines(): MutableList<String>? {
val scoreboard = DulkirModFabric.mc.player?.scoreboard ?: return null
// This returns null if we're not in skyblock curiously
- val sidebarObjective = scoreboard.getObjective("SBScoreboard") ?: return null
- val scores = scoreboard.getAllPlayerScores(sidebarObjective)
+ val sidebarObjective = scoreboard.getNullableObjective("SBScoreboard") ?: return null
+ val scores = scoreboard.getScoreboardEntries(sidebarObjective)
val lines: MutableList<String> = ArrayList()
for (score in scores.reversed()) {
- val team = scoreboard.getPlayerTeam(score.playerName)
- var str = Team.decorateName(team, Text.literal(score.playerName)).string
+ val team = scoreboard.getTeam(score.owner)
+ var str = Team.decorateName(team, Text.literal(score.owner)).string
.replace("ยง[^a-f0-9]".toRegex(), "")
lines.add(str)
}
@@ -42,12 +42,12 @@ object ScoreBoardUtils {
fun getLinesWithColor(): MutableList<String>? {
val scoreboard = DulkirModFabric.mc.player?.scoreboard ?: return null
// This returns null if we're not in skyblock curiously
- val sidebarObjective = scoreboard.getObjective("SBScoreboard") ?: return null
- val scores = scoreboard.getAllPlayerScores(sidebarObjective)
+ val sidebarObjective = scoreboard.getNullableObjective("SBScoreboard") ?: return null
+ val scores = scoreboard.getScoreboardEntries(sidebarObjective)
val lines: MutableList<String> = ArrayList()
for (score in scores.reversed()) {
- val team = scoreboard.getPlayerTeam(score.playerName)
- lines.add(Team.decorateName(team, Text.literal(score.playerName)).formattedString())
+ val team = scoreboard.getTeam(score.owner)
+ lines.add(Team.decorateName(team, Text.literal(score.owner)).formattedString())
}
return lines
}
@@ -97,7 +97,7 @@ object ScoreBoardUtils {
if (event.sound.id.path != "entity.wither.shoot") return
if (event.sound.pitch != 0.6984127f) return
if (event.sound.volume != .5f) return
- SlayerBossEvents.Spawn(slayerType?: return err()).post()
+ SlayerBossEvents.Spawn(slayerType ?: return err()).post()
}
fun err() {
diff --git a/src/main/kotlin/com/dulkirfabric/util/Utils.kt b/src/main/kotlin/com/dulkirfabric/util/Utils.kt
index a0fec78..342dc48 100644
--- a/src/main/kotlin/com/dulkirfabric/util/Utils.kt
+++ b/src/main/kotlin/com/dulkirfabric/util/Utils.kt
@@ -6,7 +6,6 @@ import com.dulkirfabric.events.WorldLoadEvent
import com.dulkirfabric.events.chat.ChatEvents
import meteordevelopment.orbit.EventHandler
import net.minecraft.block.entity.SkullBlockEntity
-import net.minecraft.client.texture.PlayerSkinProvider
import net.minecraft.entity.Entity
import net.minecraft.item.ItemStack
import net.minecraft.nbt.NbtHelper
@@ -74,6 +73,6 @@ object Utils {
fun getSkullTexture(itemStack: ItemStack): String? {
return itemStack.getSubNbt(SkullBlockEntity.SKULL_OWNER_KEY)?.let(NbtHelper::toGameProfile)?.properties?.get(
- PlayerSkinProvider.TEXTURES)?.first()?.value
+ "textures")?.first()?.value
}
} \ No newline at end of file