aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-11-15 23:57:55 +0100
committerLinnea Gräf <nea@nea.moe>2025-11-15 23:57:55 +0100
commitb132826a3149eae8fe2e3d4aa4d69d289557e2a4 (patch)
tree859e2d4b69e067ba81ff36ea9b9db7e81cbcf706 /src
parent5632c1d50bb0319886fb6acd54df92bf01491532 (diff)
downloadFirmament-b132826a3149eae8fe2e3d4aa4d69d289557e2a4.tar.gz
Firmament-b132826a3149eae8fe2e3d4aa4d69d289557e2a4.tar.bz2
Firmament-b132826a3149eae8fe2e3d4aa4d69d289557e2a4.zip
snapshot: mixin cleanup p1
Diffstat (limited to 'src')
-rw-r--r--src/main/java/moe/nea/firmament/mixins/CopyChatPatch.java7
-rw-r--r--src/main/java/moe/nea/firmament/mixins/IncomingPacketListenerPatches.java2
-rw-r--r--src/main/java/moe/nea/firmament/mixins/MixinHandledScreen.java20
-rw-r--r--src/main/java/moe/nea/firmament/mixins/feature/devcosmetics/SaveCapeToPlayerEntityRenderState.java19
-rw-r--r--src/main/java/moe/nea/firmament/mixins/render/entitytints/ChangeColorOfLivingEntities.java23
-rw-r--r--src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableEquipmentRenderer.java4
-rw-r--r--src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableHeadFeatureRenderer.java5
-rw-r--r--src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableItemRenderer.java3
-rw-r--r--src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableSkullBlockEntityRenderer.java2
-rw-r--r--src/main/kotlin/keybindings/GenericInputButton.kt4
-rw-r--r--src/test/kotlin/MixinTest.kt5
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/CustomSkullTexturePatch.java2
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/screenlayouts/ExpandScreenBoundaries.java2
13 files changed, 43 insertions, 55 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/CopyChatPatch.java b/src/main/java/moe/nea/firmament/mixins/CopyChatPatch.java
index 6996818..ba337da 100644
--- a/src/main/java/moe/nea/firmament/mixins/CopyChatPatch.java
+++ b/src/main/java/moe/nea/firmament/mixins/CopyChatPatch.java
@@ -4,6 +4,7 @@ import moe.nea.firmament.features.chat.CopyChat;
import moe.nea.firmament.mixins.accessor.AccessorChatHud;
import moe.nea.firmament.util.ClipboardUtils;
import net.minecraft.client.MinecraftClient;
+import net.minecraft.client.gui.Click;
import net.minecraft.client.gui.hud.ChatHud;
import net.minecraft.client.gui.hud.ChatHudLine;
import net.minecraft.client.gui.screen.ChatScreen;
@@ -20,11 +21,11 @@ import java.util.List;
@Mixin(ChatScreen.class)
public class CopyChatPatch {
@Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true)
- private void onRightClick(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) throws NoSuchFieldException, IllegalAccessException {
- if (button != 1 || !CopyChat.TConfig.INSTANCE.getCopyChat()) return;
+ private void onRightClick(Click click, boolean doubled, CallbackInfoReturnable<Boolean> cir) throws NoSuchFieldException, IllegalAccessException {
+ if (click.button() != 1 || !CopyChat.TConfig.INSTANCE.getCopyChat()) return;
MinecraftClient client = MinecraftClient.getInstance();
ChatHud chatHud = client.inGameHud.getChatHud();
- int lineIndex = getChatLineIndex(chatHud, mouseY);
+ int lineIndex = getChatLineIndex(chatHud, click.y());
if (lineIndex < 0) return;
List<ChatHudLine.Visible> visible = ((AccessorChatHud) chatHud).getVisibleMessages_firmament();
if (lineIndex >= visible.size()) return;
diff --git a/src/main/java/moe/nea/firmament/mixins/IncomingPacketListenerPatches.java b/src/main/java/moe/nea/firmament/mixins/IncomingPacketListenerPatches.java
index a7c3875..5ba38c7 100644
--- a/src/main/java/moe/nea/firmament/mixins/IncomingPacketListenerPatches.java
+++ b/src/main/java/moe/nea/firmament/mixins/IncomingPacketListenerPatches.java
@@ -24,7 +24,7 @@ public abstract class IncomingPacketListenerPatches {
return dispatcher;
}
- @Inject(method = "onParticle", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/NetworkThreadUtils;forceMainThread(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/listener/PacketListener;Lnet/minecraft/util/thread/ThreadExecutor;)V", shift = At.Shift.AFTER), cancellable = true)
+ @Inject(method = "onParticle", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/NetworkThreadUtils;forceMainThread(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/listener/PacketListener;Lnet/minecraft/network/PacketApplyBatcher;)V", shift = At.Shift.AFTER), cancellable = true)
public void onParticleSpawn(ParticleS2CPacket packet, CallbackInfo ci) {
var event = new ParticleSpawnEvent(
packet.getParameters(),
diff --git a/src/main/java/moe/nea/firmament/mixins/MixinHandledScreen.java b/src/main/java/moe/nea/firmament/mixins/MixinHandledScreen.java
index 13f20ce..409fb6b 100644
--- a/src/main/java/moe/nea/firmament/mixins/MixinHandledScreen.java
+++ b/src/main/java/moe/nea/firmament/mixins/MixinHandledScreen.java
@@ -8,8 +8,10 @@ import moe.nea.firmament.events.*;
import moe.nea.firmament.events.HandledScreenClickEvent;
import moe.nea.firmament.keybindings.GenericInputAction;
import moe.nea.firmament.keybindings.InputModifiers;
+import net.minecraft.client.gui.Click;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
+import net.minecraft.client.input.KeyInput;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.screen.ScreenHandler;
@@ -47,29 +49,29 @@ public abstract class MixinHandledScreen<T extends ScreenHandler> {
this.playerInventory = inventory;
}
- @Inject(method = "keyPressed", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/ingame/HandledScreen;handleHotbarKeyPressed(II)Z", shift = At.Shift.BEFORE), cancellable = true)
- public void onKeyPressed(int keyCode, int scanCode, int modifiers, CallbackInfoReturnable<Boolean> cir) {
+ @Inject(method = "keyPressed", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;keyPressed(Lnet/minecraft/client/input/KeyInput;)Z", shift = At.Shift.BEFORE), cancellable = true)
+ public void onKeyPressed(KeyInput input, CallbackInfoReturnable<Boolean> cir) {
if (HandledScreenKeyPressedEvent.Companion.publish(new HandledScreenKeyPressedEvent(
(HandledScreen<?>) (Object) this,
- GenericInputAction.key(keyCode, scanCode),
- InputModifiers.of(modifiers))).getCancelled()) {
+ GenericInputAction.of(input),
+ InputModifiers.of(input))).getCancelled()) {
cir.setReturnValue(true);
}
}
@Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true)
- public void onMouseClicked(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
+ public void onMouseClicked(Click click, boolean doubled, CallbackInfoReturnable<Boolean> cir) {
if (HandledScreenKeyPressedEvent.Companion.publish(new HandledScreenKeyPressedEvent((HandledScreen<?>) (Object) this,
- GenericInputAction.mouse(button), InputModifiers.current())).getCancelled()) {
+ GenericInputAction.mouse(click), InputModifiers.current())).getCancelled()) {
cir.setReturnValue(true);
}
}
@Inject(method = "mouseReleased", at = @At("HEAD"), cancellable = true)
- private void onMouseReleased(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
+ private void onMouseReleased(Click click, CallbackInfoReturnable<Boolean> cir) {
var self = (HandledScreen<?>) (Object) this;
- var clickEvent = new HandledScreenClickEvent(self, mouseX, mouseY, button);
- var keyEvent = new HandledScreenKeyReleasedEvent(self, GenericInputAction.mouse(button), InputModifiers.current());
+ var clickEvent = new HandledScreenClickEvent(self, click.x(), click.y(), click.button());
+ var keyEvent = new HandledScreenKeyReleasedEvent(self, GenericInputAction.mouse(click), InputModifiers.current());
if (HandledScreenClickEvent.Companion.publish(clickEvent).getCancelled()
|| HandledScreenKeyReleasedEvent.Companion.publish(keyEvent).getCancelled()) {
cir.setReturnValue(true);
diff --git a/src/main/java/moe/nea/firmament/mixins/feature/devcosmetics/SaveCapeToPlayerEntityRenderState.java b/src/main/java/moe/nea/firmament/mixins/feature/devcosmetics/SaveCapeToPlayerEntityRenderState.java
deleted file mode 100644
index ae9c743..0000000
--- a/src/main/java/moe/nea/firmament/mixins/feature/devcosmetics/SaveCapeToPlayerEntityRenderState.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package moe.nea.firmament.mixins.feature.devcosmetics;
-
-import moe.nea.firmament.features.misc.CustomCapes;
-import net.minecraft.client.network.AbstractClientPlayerEntity;
-import net.minecraft.client.render.entity.PlayerEntityRenderer;
-import net.minecraft.client.render.entity.state.PlayerEntityRenderState;
-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;
-
-@Mixin(PlayerEntityRenderer.class)
-public class SaveCapeToPlayerEntityRenderState {
- @Inject(method = "updateRenderState(Lnet/minecraft/client/network/AbstractClientPlayerEntity;Lnet/minecraft/client/render/entity/state/PlayerEntityRenderState;F)V",
- at = @At("TAIL"))
- private void addCustomCape(AbstractClientPlayerEntity abstractClientPlayerEntity, PlayerEntityRenderState playerEntityRenderState, float f, CallbackInfo ci) {
- CustomCapes.addCapeData(abstractClientPlayerEntity, playerEntityRenderState);
- }
-}
diff --git a/src/main/java/moe/nea/firmament/mixins/render/entitytints/ChangeColorOfLivingEntities.java b/src/main/java/moe/nea/firmament/mixins/render/entitytints/ChangeColorOfLivingEntities.java
index 2b96e5c..79958c0 100644
--- a/src/main/java/moe/nea/firmament/mixins/render/entitytints/ChangeColorOfLivingEntities.java
+++ b/src/main/java/moe/nea/firmament/mixins/render/entitytints/ChangeColorOfLivingEntities.java
@@ -4,9 +4,11 @@ import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import com.llamalad7.mixinextras.sugar.Local;
import moe.nea.firmament.events.EntityRenderTintEvent;
import net.minecraft.client.render.VertexConsumerProvider;
+import net.minecraft.client.render.command.OrderedRenderCommandQueue;
import net.minecraft.client.render.entity.LivingEntityRenderer;
import net.minecraft.client.render.entity.model.EntityModel;
import net.minecraft.client.render.entity.state.LivingEntityRenderState;
+import net.minecraft.client.render.state.CameraRenderState;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity;
import org.spongepowered.asm.mixin.Mixin;
@@ -41,18 +43,19 @@ public class ChangeColorOfLivingEntities<T extends LivingEntity, S extends Livin
return originalWhiteOffset;
}
- @Inject(method = "render(Lnet/minecraft/client/render/entity/state/LivingEntityRenderState;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;pop()V"))
- private void afterRender(S livingEntityRenderState, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, CallbackInfo ci) {
- var tintState = EntityRenderTintEvent.HasTintRenderState.cast(livingEntityRenderState);
- var overlayTexture = tintState.getOverlayTexture_firmament();
- if (overlayTexture != null && vertexConsumerProvider instanceof VertexConsumerProvider.Immediate imm) {
- imm.drawCurrentLayer();
- }
- EntityRenderTintEvent.overlayOverride = null;
+ @Inject(method = "render(Lnet/minecraft/client/render/entity/state/LivingEntityRenderState;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/command/OrderedRenderCommandQueue;Lnet/minecraft/client/render/state/CameraRenderState;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;pop()V"))
+ private void afterRender(S livingEntityRenderState, MatrixStack matrixStack, OrderedRenderCommandQueue orderedRenderCommandQueue, CameraRenderState cameraRenderState, CallbackInfo ci) {
+// var tintState = EntityRenderTintEvent.HasTintRenderState.cast(livingEntityRenderState);
+// var overlayTexture = tintState.getOverlayTexture_firmament();
+// if (overlayTexture != null && vertexConsumerProvider instanceof VertexConsumerProvider.Immediate imm) {
+// imm.drawCurrentLayer();
+// }
+// EntityRenderTintEvent.overlayOverride = null;
+ // TODO: 1.21.10
}
- @Inject(method = "render(Lnet/minecraft/client/render/entity/state/LivingEntityRenderState;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;push()V"))
- private void beforeRender(S livingEntityRenderState, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, CallbackInfo ci) {
+ @Inject(method = "render(Lnet/minecraft/client/render/entity/state/LivingEntityRenderState;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/command/OrderedRenderCommandQueue;Lnet/minecraft/client/render/state/CameraRenderState;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;push()V"))
+ private void beforeRender(S livingEntityRenderState, MatrixStack matrixStack, OrderedRenderCommandQueue orderedRenderCommandQueue, CameraRenderState cameraRenderState, CallbackInfo ci) {
var tintState = EntityRenderTintEvent.HasTintRenderState.cast(livingEntityRenderState);
var overlayTexture = tintState.getOverlayTexture_firmament();
if (overlayTexture != null) {
diff --git a/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableEquipmentRenderer.java b/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableEquipmentRenderer.java
index d9c174c..8671bda 100644
--- a/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableEquipmentRenderer.java
+++ b/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableEquipmentRenderer.java
@@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.At;
*/
@Mixin(EquipmentRenderer.class)
public class UseOverlayableEquipmentRenderer {
- @WrapOperation(method = "render(Lnet/minecraft/client/render/entity/equipment/EquipmentModel$LayerType;Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/client/model/Model;Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/util/Identifier;)V",
+ @WrapOperation(method = "render(Lnet/minecraft/client/render/entity/equipment/EquipmentModel$LayerType;Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/client/model/Model;Ljava/lang/Object;Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/command/OrderedRenderCommandQueue;ILnet/minecraft/util/Identifier;II)V",
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/RenderLayer;getArmorCutoutNoCull(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/RenderLayer;"))
private RenderLayer replace(Identifier texture, Operation<RenderLayer> original) {
if (EntityRenderTintEvent.overlayOverride != null)
@@ -24,7 +24,7 @@ public class UseOverlayableEquipmentRenderer {
return original.call(texture);
}
- @ModifyExpressionValue(method = "render(Lnet/minecraft/client/render/entity/equipment/EquipmentModel$LayerType;Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/client/model/Model;Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/util/Identifier;)V",
+ @ModifyExpressionValue(method = "render(Lnet/minecraft/client/render/entity/equipment/EquipmentModel$LayerType;Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/client/model/Model;Ljava/lang/Object;Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/command/OrderedRenderCommandQueue;ILnet/minecraft/util/Identifier;II)V",
at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/OverlayTexture;DEFAULT_UV:I"))
private int replaceUvIndex(int original) {
if (EntityRenderTintEvent.overlayOverride != null)
diff --git a/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableHeadFeatureRenderer.java b/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableHeadFeatureRenderer.java
index 07bc5cf..0422a66 100644
--- a/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableHeadFeatureRenderer.java
+++ b/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableHeadFeatureRenderer.java
@@ -5,6 +5,7 @@ import moe.nea.firmament.events.EntityRenderTintEvent;
import net.minecraft.client.render.OverlayTexture;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.entity.feature.HeadFeatureRenderer;
+import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -15,8 +16,8 @@ import org.spongepowered.asm.mixin.injection.At;
@Mixin(HeadFeatureRenderer.class)
public class UseOverlayableHeadFeatureRenderer {
- @ModifyExpressionValue(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/render/entity/state/LivingEntityRenderState;FF)V",
- at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/OverlayTexture;DEFAULT_UV:I"))
+ @ModifyExpressionValue(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/command/OrderedRenderCommandQueue;ILnet/minecraft/client/render/entity/state/LivingEntityRenderState;FF)V",
+ at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/OverlayTexture;DEFAULT_UV:I", opcode = Opcodes.GETSTATIC))
private int replaceUvIndex(int original) {
if (EntityRenderTintEvent.overlayOverride != null)
return OverlayTexture.packUv(15, 10); // TODO: store this info in a global alongside overlayOverride
diff --git a/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableItemRenderer.java b/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableItemRenderer.java
index 620ab2c..739fc5f 100644
--- a/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableItemRenderer.java
+++ b/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableItemRenderer.java
@@ -6,6 +6,7 @@ import net.minecraft.client.render.OverlayTexture;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.RenderPhase;
import net.minecraft.client.render.item.ItemRenderState;
+import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -16,7 +17,7 @@ import org.spongepowered.asm.mixin.injection.At;
*/
@Mixin(ItemRenderState.LayerRenderState.class)
public class UseOverlayableItemRenderer {
- @ModifyExpressionValue(method = "render", at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/item/ItemRenderState$LayerRenderState;renderLayer:Lnet/minecraft/client/render/RenderLayer;"))
+ @ModifyExpressionValue(method = "render", at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/item/ItemRenderState$LayerRenderState;renderLayer:Lnet/minecraft/client/render/RenderLayer;", opcode = Opcodes.GETFIELD))
private RenderLayer replace(RenderLayer original) {
if (EntityRenderTintEvent.overlayOverride != null && original instanceof RenderLayer.MultiPhase multiPhase && multiPhase.phases.texture instanceof RenderPhase.Texture texture && texture.getId().isPresent())
return RenderLayer.getEntityTranslucent(texture.getId().get());
diff --git a/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableSkullBlockEntityRenderer.java b/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableSkullBlockEntityRenderer.java
index 9905af1..2a15e8c 100644
--- a/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableSkullBlockEntityRenderer.java
+++ b/src/main/java/moe/nea/firmament/mixins/render/entitytints/UseOverlayableSkullBlockEntityRenderer.java
@@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.At;
@Mixin(SkullBlockEntityRenderer.class)
public class UseOverlayableSkullBlockEntityRenderer {
- @ModifyExpressionValue(method = "renderSkull",
+ @ModifyExpressionValue(method = "render(Lnet/minecraft/util/math/Direction;FFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/command/OrderedRenderCommandQueue;ILnet/minecraft/client/render/block/entity/SkullBlockEntityModel;Lnet/minecraft/client/render/RenderLayer;ILnet/minecraft/client/render/command/ModelCommandRenderer$CrumblingOverlayCommand;)V",
at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/OverlayTexture;DEFAULT_UV:I"))
private static int replaceUvIndex(int original) {
if (EntityRenderTintEvent.overlayOverride != null)
diff --git a/src/main/kotlin/keybindings/GenericInputButton.kt b/src/main/kotlin/keybindings/GenericInputButton.kt
index 7a3d8d5..a352ce0 100644
--- a/src/main/kotlin/keybindings/GenericInputButton.kt
+++ b/src/main/kotlin/keybindings/GenericInputButton.kt
@@ -14,6 +14,7 @@ import kotlinx.serialization.json.buildJsonObject
import kotlinx.serialization.json.int
import kotlinx.serialization.json.put
import net.minecraft.client.MinecraftClient
+import net.minecraft.client.gui.Click
import net.minecraft.client.input.KeyInput
import net.minecraft.client.util.InputUtil
import net.minecraft.client.util.MacWindowUtil
@@ -191,6 +192,9 @@ sealed interface GenericInputAction {
fun mouse(mouseButton: Int): GenericInputAction = MouseInput(mouseButton)
@JvmStatic
+ fun mouse(click: Click): GenericInputAction = mouse(click.button())
+
+ @JvmStatic
fun of(input: KeyInput): GenericInputAction = key(input.keycode, input.scancode)
@JvmStatic
diff --git a/src/test/kotlin/MixinTest.kt b/src/test/kotlin/MixinTest.kt
index 37d79c6..66928ce 100644
--- a/src/test/kotlin/MixinTest.kt
+++ b/src/test/kotlin/MixinTest.kt
@@ -8,11 +8,6 @@ import moe.nea.firmament.init.MixinPlugin
class MixinTest {
@Test
- fun mixinAudit() {
- // Moved to GameTest
- }
-
- @Test
fun hasInstalledMixinTransformer() {
Assertions.assertInstanceOf(
IMixinTransformer::class.java,
diff --git a/src/texturePacks/java/moe/nea/firmament/mixins/custommodels/CustomSkullTexturePatch.java b/src/texturePacks/java/moe/nea/firmament/mixins/custommodels/CustomSkullTexturePatch.java
index cc59d99..5096c48 100644
--- a/src/texturePacks/java/moe/nea/firmament/mixins/custommodels/CustomSkullTexturePatch.java
+++ b/src/texturePacks/java/moe/nea/firmament/mixins/custommodels/CustomSkullTexturePatch.java
@@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(SkullBlockEntityRenderer.class)
public class CustomSkullTexturePatch {
@Inject(
- method = "getRenderLayer",
+ method = "getCutoutRenderLayer",
at = @At("HEAD"),
cancellable = true
)
diff --git a/src/texturePacks/java/moe/nea/firmament/mixins/custommodels/screenlayouts/ExpandScreenBoundaries.java b/src/texturePacks/java/moe/nea/firmament/mixins/custommodels/screenlayouts/ExpandScreenBoundaries.java
index e2cae45..d5b06ad 100644
--- a/src/texturePacks/java/moe/nea/firmament/mixins/custommodels/screenlayouts/ExpandScreenBoundaries.java
+++ b/src/texturePacks/java/moe/nea/firmament/mixins/custommodels/screenlayouts/ExpandScreenBoundaries.java
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin({HandledScreen.class, RecipeBookScreen.class})
public class ExpandScreenBoundaries {
@Inject(method = "isClickOutsideBounds", at = @At("HEAD"), cancellable = true)
- private void onClickOutsideBounds(double mouseX, double mouseY, int left, int top, int button, CallbackInfoReturnable<Boolean> cir) {
+ private void onClickOutsideBounds(double mouseX, double mouseY, int left, int top, CallbackInfoReturnable<Boolean> cir) {
var background = CustomScreenLayouts.getMover(CustomScreenLayouts.CustomScreenLayout::getBackground);
if (background == null) return;
var x = background.getX() + left;