aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-07-17 11:24:50 -0500
committeringlettronald <inglettronald@gmail.com>2023-07-17 11:24:50 -0500
commitd68c8bb34fe41d47777c4771364d2b94b4fdbdf1 (patch)
tree8b28111d93a1b5db2a7f98764f26b7ba8a15943a /src/main
parentd21dad73e37c1aaba1933a52b094534865594dc7 (diff)
downloadDulkirMod-Fabric-d68c8bb34fe41d47777c4771364d2b94b4fdbdf1.tar.gz
DulkirMod-Fabric-d68c8bb34fe41d47777c4771364d2b94b4fdbdf1.tar.bz2
DulkirMod-Fabric-d68c8bb34fe41d47777c4771364d2b94b4fdbdf1.zip
I'm all over the place today
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/dulkirfabric/mixin/render/HeldItemRendererMixin.java41
-rw-r--r--src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java12
-rw-r--r--src/main/java/com/dulkirfabric/mixin/render/LivingEntityMixin.java8
-rw-r--r--src/main/java/com/dulkirfabric/mixin/render/WorldRendererMixin.java50
-rw-r--r--src/main/kotlin/com/dulkirfabric/Registrations.kt4
-rw-r--r--src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt66
-rw-r--r--src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt2
-rw-r--r--src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt30
-rw-r--r--src/main/kotlin/com/dulkirfabric/features/KeyShortCutImpl.kt9
-rw-r--r--src/main/kotlin/com/dulkirfabric/features/RenderTest.kt18
-rw-r--r--src/main/resources/1.0 TODO.txt3
-rw-r--r--src/main/resources/dulkirmod-fabric.mixins.json1
12 files changed, 181 insertions, 63 deletions
diff --git a/src/main/java/com/dulkirfabric/mixin/render/HeldItemRendererMixin.java b/src/main/java/com/dulkirfabric/mixin/render/HeldItemRendererMixin.java
new file mode 100644
index 0000000..664af0d
--- /dev/null
+++ b/src/main/java/com/dulkirfabric/mixin/render/HeldItemRendererMixin.java
@@ -0,0 +1,41 @@
+package com.dulkirfabric.mixin.render;
+
+import com.dulkirfabric.config.DulkirConfig;
+import net.minecraft.client.network.AbstractClientPlayerEntity;
+import net.minecraft.client.render.VertexConsumerProvider;
+import net.minecraft.client.render.item.HeldItemRenderer;
+import net.minecraft.client.util.math.MatrixStack;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Hand;
+import net.minecraft.util.math.RotationAxis;
+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.callback.CallbackInfo;
+
+
+// SOURCE FOR A LOT OF THIS: https://github.com/cosrnic/smallviewmodel/blob/main/src/main/java/uk/cosrnic/smallviewmodel/mixin/MixinHeldItemRenderer.java
+@Mixin(HeldItemRenderer.class)
+public class HeldItemRendererMixin {
+ @Inject(method = "renderFirstPersonItem(Lnet/minecraft/client/network/AbstractClientPlayerEntity;FFLnet/minecraft/util/Hand;FLnet/minecraft/item/ItemStack;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V",
+ at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/item/HeldItemRenderer;renderItem(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformationMode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V"))
+ public void onRenderHeldItem(AbstractClientPlayerEntity player, float tickDelta, float pitch, Hand hand, float swingProgress, ItemStack item, float equipProgress, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
+ if (hand == Hand.MAIN_HAND) {
+ float rotX = DulkirConfig.ConfigVars.getConfigOptions().getHeldItemRotX();
+ float rotY = DulkirConfig.ConfigVars.getConfigOptions().getHeldItemRotY();
+ float rotZ = DulkirConfig.ConfigVars.getConfigOptions().getHeldItemRotZ();
+
+ float posX = DulkirConfig.ConfigVars.getConfigOptions().getHeldItemPosX() / 1000f;
+ float posY = DulkirConfig.ConfigVars.getConfigOptions().getHeldItemPosY() / 1000f;
+ float posZ = DulkirConfig.ConfigVars.getConfigOptions().getHeldItemPosZ() / 1000f;
+
+ float scale = DulkirConfig.ConfigVars.getConfigOptions().getHeldItemScale();
+
+ matrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(rotX));
+ matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(rotY));
+ matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(rotZ));
+ matrices.scale(scale, scale, scale);
+ matrices.translate(posX, posY, posZ);
+ }
+ }
+}
diff --git a/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java b/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java
index e192c59..c50f132 100644
--- a/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java
+++ b/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java
@@ -1,6 +1,9 @@
package com.dulkirfabric.mixin.render;
import com.dulkirfabric.config.DulkirConfig;
+import com.dulkirfabric.util.ScoreBoardUtils;
+import com.dulkirfabric.util.Utils;
+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;
@@ -26,4 +29,13 @@ public class InGameHudMixin {
public int renderScoreBoardSidebar(DrawContext instance, TextRenderer textRenderer, String 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"))
+ public int onGrabArmorAmount(int original) {
+ if (DulkirConfig.ConfigVars.getConfigOptions().getHideArmorOverlay() && Utils.INSTANCE.isInSkyblock()) {
+ return 0;
+ }
+ return original;
+ }
}
diff --git a/src/main/java/com/dulkirfabric/mixin/render/LivingEntityMixin.java b/src/main/java/com/dulkirfabric/mixin/render/LivingEntityMixin.java
index 1b86f5c..badac4c 100644
--- a/src/main/java/com/dulkirfabric/mixin/render/LivingEntityMixin.java
+++ b/src/main/java/com/dulkirfabric/mixin/render/LivingEntityMixin.java
@@ -6,6 +6,9 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.awt.*;
@@ -41,4 +44,9 @@ public class LivingEntityMixin implements GlowingEntityInterface {
public boolean shouldDulkirEntityESP() {
return shouldESP_DulkirMod;
}
+
+ @Inject(method = "getHandSwingDuration()I", at = @At("HEAD"), cancellable = true)
+ public void getHandSwingDuration(CallbackInfoReturnable<Integer> cir) {
+ cir.setReturnValue(50);
+ }
}
diff --git a/src/main/java/com/dulkirfabric/mixin/render/WorldRendererMixin.java b/src/main/java/com/dulkirfabric/mixin/render/WorldRendererMixin.java
index bb1a9be..db235df 100644
--- a/src/main/java/com/dulkirfabric/mixin/render/WorldRendererMixin.java
+++ b/src/main/java/com/dulkirfabric/mixin/render/WorldRendererMixin.java
@@ -3,32 +3,42 @@ package com.dulkirfabric.mixin.render;
import com.dulkirfabric.util.GlowingEntityInterface;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local;
+import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.Framebuffer;
-import net.minecraft.client.render.Camera;
-import net.minecraft.client.render.GameRenderer;
-import net.minecraft.client.render.LightmapTextureManager;
-import net.minecraft.client.render.WorldRenderer;
+import net.minecraft.client.gl.SimpleFramebuffer;
+import net.minecraft.client.render.*;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.Entity;
import org.jetbrains.annotations.Nullable;
import org.joml.Matrix4f;
+import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import static com.dulkirfabric.DulkirModFabric.mc;
@Mixin(WorldRenderer.class)
public class WorldRendererMixin {
- @Shadow private @Nullable Framebuffer entityOutlinesFramebuffer;
+ @Shadow
+ private @Nullable Framebuffer entityOutlinesFramebuffer;
+ @Shadow
+ @Final
+ public BufferBuilderStorage bufferBuilders;
+ @Shadow @Final private MinecraftClient client;
@Unique
- Framebuffer temp = this.entityOutlinesFramebuffer;
+ boolean shouldRenderOutlinesDirect = false;
+
+ @Unique
+ Framebuffer defaultEntityOutlineBuffer;
+
@ModifyExpressionValue(method = "render(Lnet/minecraft/client/util/math/MatrixStack;FJZLnet/minecraft/client/render/Camera;Lnet/minecraft/client/render/GameRenderer;Lnet/minecraft/client/render/LightmapTextureManager;Lorg/joml/Matrix4f;)V",
- at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;getTeamColorValue()I"))
+ at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;getTeamColorValue()I"))
public int getGlowColor(int existing, @Local Entity entity) {
if (entity instanceof GlowingEntityInterface dEntity) {
if (dEntity.getDulkirEntityGlowColor() != null) {
@@ -38,24 +48,34 @@ public class WorldRendererMixin {
return existing;
}
+ @Inject(method = "onResized", at = @At("HEAD"))
+ public void onResized(int width, int height, CallbackInfo ci) {
+ if (defaultEntityOutlineBuffer == null) {
+ defaultEntityOutlineBuffer = new SimpleFramebuffer(width, height, true, false);
+ defaultEntityOutlineBuffer.setClearColor(0, 0, 0, 0);
+ } else {
+ defaultEntityOutlineBuffer.resize(width, height, false);
+ }
+ }
+
@Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;FJZLnet/minecraft/client/render/Camera;Lnet/minecraft/client/render/GameRenderer;Lnet/minecraft/client/render/LightmapTextureManager;Lorg/joml/Matrix4f;)V",
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/BufferBuilderStorage;getEntityVertexConsumers()Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;", shift = At.Shift.AFTER))
public void saveDefaultBufferESP(MatrixStack matrices, float tickDelta, long limitTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightmapTextureManager lightmapTextureManager, Matrix4f positionMatrix, CallbackInfo ci) {
- temp = this.entityOutlinesFramebuffer;
+ if (defaultEntityOutlineBuffer != null) {
+ defaultEntityOutlineBuffer.copyDepthFrom(this.entityOutlinesFramebuffer);
+ }
}
@Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;FJZLnet/minecraft/client/render/Camera;Lnet/minecraft/client/render/GameRenderer;Lnet/minecraft/client/render/LightmapTextureManager;Lorg/joml/Matrix4f;)V",
- at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/EntityRenderDispatcher;shouldRender(Lnet/minecraft/entity/Entity;Lnet/minecraft/client/render/Frustum;DDD)Z"))
+ at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/EntityRenderDispatcher;shouldRender(Lnet/minecraft/entity/Entity;Lnet/minecraft/client/render/Frustum;DDD)Z"))
public void setOutlineESP(MatrixStack matrices, float tickDelta, long limitTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightmapTextureManager lightmapTextureManager, Matrix4f positionMatrix, CallbackInfo ci, @Local Entity entity) {
- if (entity instanceof GlowingEntityInterface dEntity) {
- if (dEntity.shouldDulkirEntityGlow() && !dEntity.shouldDulkirEntityESP()) {
- if (this.entityOutlinesFramebuffer != null)
- this.entityOutlinesFramebuffer.copyDepthFrom(mc.getFramebuffer());
- }
+ if (entity instanceof GlowingEntityInterface dEntity && dEntity.shouldDulkirEntityGlow() && !dEntity.shouldDulkirEntityESP()) {
+ if (this.entityOutlinesFramebuffer != null)
+ this.entityOutlinesFramebuffer.copyDepthFrom(mc.getFramebuffer());
} else {
// give esp back here
if (this.entityOutlinesFramebuffer != null)
- this.entityOutlinesFramebuffer.copyDepthFrom(temp);
+ this.entityOutlinesFramebuffer.copyDepthFrom(defaultEntityOutlineBuffer);
}
}
}
diff --git a/src/main/kotlin/com/dulkirfabric/Registrations.kt b/src/main/kotlin/com/dulkirfabric/Registrations.kt
index 519319e..16d6354 100644
--- a/src/main/kotlin/com/dulkirfabric/Registrations.kt
+++ b/src/main/kotlin/com/dulkirfabric/Registrations.kt
@@ -95,10 +95,10 @@ object Registrations {
!BlockOutlineEvent(worldRenderContext, blockOutlineContext).post()
}
ClientEntityEvents.ENTITY_LOAD.register { entity, world ->
- EntityLoadEvent(entity, world)
+ EntityLoadEvent(entity, world).post()
}
ServerWorldEvents.LOAD.register { server, world ->
- WorldLoadEvent(server, world)
+ WorldLoadEvent(server, world).post()
}
}
} \ No newline at end of file
diff --git a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt
index 3407738..6a72252 100644
--- a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt
+++ b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt
@@ -17,7 +17,6 @@ import com.dulkirfabric.DulkirModFabric.mc
import com.dulkirfabric.config.ConfigHelper.mkKeyField
import com.dulkirfabric.config.ConfigHelper.mkStringField
import com.dulkirfabric.config.ConfigHelper.mkToggle
-import com.dulkirfabric.features.InventoryScale
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers
import kotlinx.serialization.decodeFromString
@@ -60,10 +59,6 @@ class DulkirConfig {
.setTooltip(Text.literal("Size of GUI whenever you're in an inventory screen"))
.setSaveConsumer { newValue ->
configOptions.inventoryScale = newValue
- InventoryScale.scaleBuffer = newValue
- InventoryScale.prevTickScale = newValue
- InventoryScale.tickScale = newValue
- InventoryScale.frameScale = newValue
}
.build()
)
@@ -93,10 +88,10 @@ class DulkirConfig {
.build()
)
general.addEntry(
- entryBuilder.mkToggle(Text.literal("AbiPhone DND"), configOptions::abiPhoneDND)
+ entryBuilder.mkToggle(Text.literal("Abiphone DND"), configOptions::abiPhoneDND)
)
general.addEntry(
- entryBuilder.mkToggle(Text.literal("AbiPhone Caller ID"), configOptions::abiPhoneCallerID)
+ entryBuilder.mkToggle(Text.literal("Abiphone Caller ID"), configOptions::abiPhoneCallerID)
)
general.addEntry(
entryBuilder.mkToggle(Text.literal("Inactive Effigy Waypoints"), configOptions::inactiveEffigyDisplay)
@@ -107,6 +102,9 @@ class DulkirConfig {
general.addEntry(
entryBuilder.mkToggle(Text.literal("Durability-Based Cooldown Display"), configOptions::duraCooldown)
)
+ general.addEntry(
+ entryBuilder.mkToggle(Text.literal("Hide Armor Overlay in Skyblock"), configOptions::hideArmorOverlay)
+ )
val shortcuts = builder.getOrCreateCategory(Text.literal("Shortcuts"))
shortcuts.addEntry(
@@ -142,6 +140,48 @@ class DulkirConfig {
}
)
)
+ val animations = builder.getOrCreateCategory(Text.literal("Animations"))
+
+ //TODO: Come up with some custome float slider instead of int slider jank
+ animations.addEntry(
+ entryBuilder.startIntSlider(Text.literal("posX"), configOptions.heldItemPosX, -300, 300)
+ .setSaveConsumer { newValue -> configOptions.heldItemPosX = newValue }
+ .build()
+ )
+ animations.addEntry(
+ entryBuilder.startIntSlider(Text.literal("posY"), configOptions.heldItemPosY, -300, 300)
+ .setSaveConsumer { newValue -> configOptions.heldItemPosY = newValue }
+ .build()
+ )
+ animations.addEntry(
+ entryBuilder.startIntSlider(Text.literal("posZ"), configOptions.heldItemPosZ, -300, 300)
+ .setSaveConsumer { newValue -> configOptions.heldItemPosZ = newValue }
+ .build()
+ )
+ animations.addEntry(
+ entryBuilder.startIntSlider(Text.literal("rotationX"), configOptions.heldItemRotX, -180, 180)
+ .setSaveConsumer { newValue -> configOptions.heldItemRotX = newValue }
+ .build()
+ )
+ animations.addEntry(
+ entryBuilder.startIntSlider(Text.literal("rotationY"), configOptions.heldItemRotY, -180, 180)
+ .setSaveConsumer { newValue -> configOptions.heldItemRotY = newValue }
+ .build()
+ )
+ animations.addEntry(
+ entryBuilder.startIntSlider(Text.literal("rotationZ"), configOptions.heldItemRotZ, -180, 180)
+ .setSaveConsumer { newValue -> configOptions.heldItemRotZ = newValue }
+ .build()
+ )
+ animations.addEntry(
+ entryBuilder.startFloatField(Text.literal("scale"), configOptions.heldItemScale)
+ .setTooltip(Text.literal("Recommended range of .1 - 2"))
+ .setSaveConsumer { newValue ->
+ configOptions.heldItemScale = newValue
+ }
+ .build()
+ )
+
builder.transparentBackground()
screen = builder.build()
@@ -164,8 +204,16 @@ class DulkirConfig {
var statusEffectHidden: Boolean = false,
var inactiveEffigyDisplay: Boolean = false,
var disableExplosionParticles: Boolean = false,
- var duraCooldown: Boolean = false
- )
+ var duraCooldown: Boolean = false,
+ var hideArmorOverlay: Boolean = false,
+ var heldItemPosX: Int = 0,
+ var heldItemPosY: Int = 0,
+ var heldItemPosZ: Int = 0,
+ var heldItemRotX: Int = 0,
+ var heldItemRotY: Int = 0,
+ var heldItemRotZ: Int = 0,
+ var heldItemScale: Float = 0f
+ )
@Serializable
data class Macro(
diff --git a/src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt b/src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt
index 8c034b6..302beb9 100644
--- a/src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt
+++ b/src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt
@@ -1,5 +1,6 @@
package com.dulkirfabric.features
+import com.dulkirfabric.config.DulkirConfig
import com.dulkirfabric.events.AddParticleEvent
import meteordevelopment.orbit.EventHandler
import net.minecraft.client.particle.ExplosionLargeParticle
@@ -11,6 +12,7 @@ object CullExplosionParticles {
@EventHandler
fun onParticle(event: AddParticleEvent) {
+ if (!DulkirConfig.configOptions.disableExplosionParticles) return
val particle = event.particle
if (particle is ExplosionLargeParticle) {
event.cancel()
diff --git a/src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt b/src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt
index 80442c3..8e5e712 100644
--- a/src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt
+++ b/src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt
@@ -2,48 +2,18 @@ package com.dulkirfabric.features
import com.dulkirfabric.DulkirModFabric.mc
import com.dulkirfabric.config.DulkirConfig
-import com.dulkirfabric.events.ClientTickEvent
-import com.dulkirfabric.events.MouseScrollEvent
-import meteordevelopment.orbit.EventHandler
-import net.minecraft.client.MinecraftClient
import net.minecraft.client.gui.screen.ingame.HandledScreen
-import net.minecraft.client.util.InputUtil
-import org.lwjgl.glfw.GLFW
-import kotlin.math.max
object InventoryScale {
- var scaleBuffer = DulkirConfig.configOptions.inventoryScale
- var prevTickScale = DulkirConfig.configOptions.inventoryScale
- var tickScale = DulkirConfig.configOptions.inventoryScale
- var frameScale = DulkirConfig.configOptions.inventoryScale
-
-
/**
* Called every render frame, so don't put anything expensive in here.
*/
fun getScale(): Float {
if (DulkirConfig.configOptions.invScaleBool && mc.currentScreen is HandledScreen<*>) {
- val partialTicks = MinecraftClient.getInstance().tickDelta
- DulkirConfig.configOptions.inventoryScale = prevTickScale + ((tickScale - prevTickScale) * partialTicks)
return DulkirConfig.configOptions.inventoryScale
}
return 1f
}
- @EventHandler
- fun onScroll(event: MouseScrollEvent) {
- // TODO: ignore input in config screen
- if (event.verticalScrollAmount == 0.0) return
- val handle = MinecraftClient.getInstance().window.handle
- if (InputUtil.isKeyPressed(handle, GLFW.GLFW_KEY_LEFT_CONTROL) && InputUtil.isKeyPressed(handle, GLFW.GLFW_KEY_LEFT_ALT))
- scaleBuffer = max(scaleBuffer + (.05 * event.verticalScrollAmount).toFloat(), .1f)
- }
-
- @EventHandler
- fun onTick(event: ClientTickEvent) {
- // flushes the buffer to a scroll amount this tick, will be interpolated in calculatePos
- prevTickScale = tickScale
- tickScale = scaleBuffer
- }
} \ No newline at end of file
diff --git a/src/main/kotlin/com/dulkirfabric/features/KeyShortCutImpl.kt b/src/main/kotlin/com/dulkirfabric/features/KeyShortCutImpl.kt
index 8e2112a..f0ca052 100644
--- a/src/main/kotlin/com/dulkirfabric/features/KeyShortCutImpl.kt
+++ b/src/main/kotlin/com/dulkirfabric/features/KeyShortCutImpl.kt
@@ -21,7 +21,14 @@ object KeyShortCutImpl {
lastCommandHandle = System.currentTimeMillis()
prevCode = event.key
- TextUtils.sendCommand(it.command.trimStart('/'))
+ // This conditional allows for these shortcuts to work for commands or normal messages
+ // You have to do it this way because the messages are handled differently on the client
+ // side in modern versions of Minecraft.
+ if (it.command.startsWith("/")) {
+ TextUtils.sendCommand(it.command.trimStart('/'))
+ } else {
+ TextUtils.sendMessage(it.command)
+ }
}
}
diff --git a/src/main/kotlin/com/dulkirfabric/features/RenderTest.kt b/src/main/kotlin/com/dulkirfabric/features/RenderTest.kt
index 1f96a7b..7b6c5e6 100644
--- a/src/main/kotlin/com/dulkirfabric/features/RenderTest.kt
+++ b/src/main/kotlin/com/dulkirfabric/features/RenderTest.kt
@@ -1,12 +1,15 @@
package com.dulkirfabric.features
+import com.dulkirfabric.events.EntityLoadEvent
import com.dulkirfabric.events.WorldRenderLastEvent
+import com.dulkirfabric.util.GlowingEntityInterface
import com.dulkirfabric.util.WorldRenderUtils
import meteordevelopment.orbit.EventHandler
import net.minecraft.text.Style
import net.minecraft.text.Text
import net.minecraft.util.math.Vec3d
import java.awt.Color
+import kotlin.random.Random
object RenderTest {
@@ -16,11 +19,16 @@ object RenderTest {
Text.literal("Home Base").setStyle(Style.EMPTY.withColor(Color(255, 100, 150, 255).rgb)), event.context,
Vec3d(-183.5, 79.0, -465.5)
)
+
+// mc.world?.entities?.forEach {
+// if (it is GlowingEntityInterface)
+// it.setDulkirEntityGlow(true, Color(255, 255, 255, 255), Random(it.id).nextBoolean())
+// }
}
-// @EventHandler
-// fun onLoadEnt(event: EntityLoadEvent) {
-// if (event.entity !is GlowingEntityInterface) return
-// event.entity.setDulkirEntityGlow(true, Color(255, 255, 255, 255), true)
-// }
+ @EventHandler
+ fun onLoadEnt(event: EntityLoadEvent) {
+ if (event.entity !is GlowingEntityInterface) return
+ event.entity.setDulkirEntityGlow(true, Color(255, 255, 255, 255), Random(event.entity.id).nextBoolean())
+ }
} \ No newline at end of file
diff --git a/src/main/resources/1.0 TODO.txt b/src/main/resources/1.0 TODO.txt
index 8cd0f06..0968d7b 100644
--- a/src/main/resources/1.0 TODO.txt
+++ b/src/main/resources/1.0 TODO.txt
@@ -3,10 +3,11 @@
Hype Broken
Arachne Timer
Keeper Waypoints
-Item Ability Cooldown displays
Trim Useless Messages
Tablist Utility
+DECIDE HOW TO CANCEL RENDERING OF HUNGER TEXTURE ICON
+
Later:
Speed Display
Health/Mana Display
diff --git a/src/main/resources/dulkirmod-fabric.mixins.json b/src/main/resources/dulkirmod-fabric.mixins.json
index 110d9b4..dff1de2 100644
--- a/src/main/resources/dulkirmod-fabric.mixins.json
+++ b/src/main/resources/dulkirmod-fabric.mixins.json
@@ -13,6 +13,7 @@
"render.DrawContextMixin",
"render.GameMenuScreenMixin",
"render.GameRendererMixin",
+ "render.HeldItemRendererMixin",
"render.InGameHudMixin",
"render.KeyboardMixin",
"render.LoomScreenMixin",