diff options
Diffstat (limited to 'src')
8 files changed, 12 insertions, 12 deletions
diff --git a/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/EnforceToolDisplayForCustomBlocksInHarvestToolProvider.java b/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/EnforceToolDisplayForCustomBlocksInHarvestToolProvider.java index 27e3fa8..5fabba8 100644 --- a/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/EnforceToolDisplayForCustomBlocksInHarvestToolProvider.java +++ b/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/EnforceToolDisplayForCustomBlocksInHarvestToolProvider.java @@ -14,7 +14,7 @@ import java.util.List; @Mixin(HarvestToolProvider.class) public class EnforceToolDisplayForCustomBlocksInHarvestToolProvider { - @ModifyExpressionValue(method = "getText", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;isToolRequired()Z")) + @ModifyExpressionValue(method = "getText", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;requiresCorrectToolForDrops()Z")) private boolean overwriteRequiresTool(boolean original, @Local(argsOnly = true) BlockAccessor accessor) { if (CustomFakeBlockProvider.hasCustomBlock(accessor)) return true; diff --git a/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/PatchBreakingBarSpeedJade.java b/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/PatchBreakingBarSpeedJade.java index a8d39a8..898923a 100644 --- a/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/PatchBreakingBarSpeedJade.java +++ b/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/PatchBreakingBarSpeedJade.java @@ -18,7 +18,7 @@ public class PatchBreakingBarSpeedJade { } @ModifyExpressionValue(method = "drawBreakingProgress", - at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;calcBlockBreakingDelta(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)F")) + at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;getDestroyProgress(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)F")) private static float replacePlayerSpecificBreakingProgress(float original) { return CustomMiningHardnessProvider.replaceBlockBreakSpeed(original); } diff --git a/src/compat/wildfireGender/java/moe/nea/firmament/mixins/compat/wildfiregender/PatchArmorTexturesInGenderMod.java b/src/compat/wildfireGender/java/moe/nea/firmament/mixins/compat/wildfiregender/PatchArmorTexturesInGenderMod.java index c3c206f..f8999da 100644 --- a/src/compat/wildfireGender/java/moe/nea/firmament/mixins/compat/wildfiregender/PatchArmorTexturesInGenderMod.java +++ b/src/compat/wildfireGender/java/moe/nea/firmament/mixins/compat/wildfiregender/PatchArmorTexturesInGenderMod.java @@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.At; @Mixin(GenderArmorLayer.class) @Pseudo public class PatchArmorTexturesInGenderMod { - @ModifyExpressionValue(method = "submit(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/SubmitNodeCollector;ILnet/minecraft/client/renderer/entity/state/HumanoidRenderState;FF)V", + @ModifyExpressionValue(method = "render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/SubmitNodeCollector;ILnet/minecraft/client/renderer/entity/state/HumanoidRenderState;FF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;get(Lnet/minecraft/core/component/DataComponentType;)Ljava/lang/Object;")) private Object replaceArmorMaterial(Object original, @Local ItemStack chestplate) { var overrides = CustomGlobalArmorOverrides.overrideArmor(chestplate, EquipmentSlot.CHEST); diff --git a/src/main/java/moe/nea/firmament/mixins/DispatchMouseInputEventsPatch.java b/src/main/java/moe/nea/firmament/mixins/DispatchMouseInputEventsPatch.java index 8b9a28c..ecd361d 100644 --- a/src/main/java/moe/nea/firmament/mixins/DispatchMouseInputEventsPatch.java +++ b/src/main/java/moe/nea/firmament/mixins/DispatchMouseInputEventsPatch.java @@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.At; @Mixin(MouseHandler.class) public class DispatchMouseInputEventsPatch { - @WrapWithCondition(method = "turnPlayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;changeLookDirection(DD)V")) + @WrapWithCondition(method = "turnPlayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;turn(DD)V")) public boolean onRotatePlayer(LocalPlayer instance, double deltaX, double deltaY) { var event = WorldMouseMoveEvent.Companion.publish(new WorldMouseMoveEvent(deltaX, deltaY)); return !event.getCancelled(); diff --git a/src/main/java/moe/nea/firmament/mixins/SlotClickEventPatch.java b/src/main/java/moe/nea/firmament/mixins/SlotClickEventPatch.java index 71cb05a..db87f37 100644 --- a/src/main/java/moe/nea/firmament/mixins/SlotClickEventPatch.java +++ b/src/main/java/moe/nea/firmament/mixins/SlotClickEventPatch.java @@ -20,14 +20,15 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(MultiPlayerGameMode.class) public class SlotClickEventPatch { - @Inject(method = "handleInventoryMouseClick", at = @At(value = "FIELD", target = "Lnet/minecraft/world/inventory/AbstractContainerMenu;slots:Lnet/minecraft/core/NonNullList;", opcode = Opcodes.GETFIELD)) - private void onSlotClickSaveSlot(int syncId, int slotId, int button, ClickType actionType, Player player, CallbackInfo ci, @Local AbstractContainerMenu handler, @Share("slotContent") LocalRef<ItemStack> slotContent) { + @Inject(method = "handleInventoryMouseClick", at = @At(value = "FIELD", target = + "Lnet/minecraft/world/inventory/AbstractContainerMenu;slots:Lnet/minecraft/core/NonNullList;", opcode = Opcodes.GETFIELD)) + private void onSlotClickSaveSlot(int containerId, int slotId, int mouseButton, ClickType clickType, Player player, CallbackInfo ci, @Local AbstractContainerMenu handler, @Share("slotContent") LocalRef<ItemStack> slotContent) { if (0 <= slotId && slotId < handler.slots.size()) { slotContent.set(handler.getSlot(slotId).getItem().copy()); } } - @Inject(method = "handleInventoryMouseClick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/ClientPacketListener;sendPacket(Lnet/minecraft/network/protocol/Packet;)V")) + @Inject(method = "handleInventoryMouseClick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/ClientPacketListener;send(Lnet/minecraft/network/protocol/Packet;)V")) private void onSlotClick(int syncId, int slotId, int button, ClickType actionType, Player player, CallbackInfo ci, @Local AbstractContainerMenu handler, @Share("slotContent") LocalRef<ItemStack> slotContent) { if (0 <= slotId && slotId < handler.slots.size()) { SlotClickEvent.Companion.publish(new SlotClickEvent( diff --git a/src/main/java/moe/nea/firmament/mixins/SoundReceiveEventPatch.java b/src/main/java/moe/nea/firmament/mixins/SoundReceiveEventPatch.java index af80325..e685b0c 100644 --- a/src/main/java/moe/nea/firmament/mixins/SoundReceiveEventPatch.java +++ b/src/main/java/moe/nea/firmament/mixins/SoundReceiveEventPatch.java @@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.At; @Mixin(ClientPacketListener.class) public class SoundReceiveEventPatch { - @WrapWithCondition(method = "handleSoundEvent", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/ClientLevel;playSound(Lnet/minecraft/world/entity/Entity;DDDLnet/minecraft/core/Holder;Lnet/minecraft/sounds/SoundSource;FFJ)V")) + @WrapWithCondition(method = "handleSoundEvent", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/ClientLevel;playSeededSound(Lnet/minecraft/world/entity/Entity;DDDLnet/minecraft/core/Holder;Lnet/minecraft/sounds/SoundSource;FFJ)V")) private boolean postEventWhenSoundIsPlayed(ClientLevel instance, @Nullable Entity source, double x, double y, double z, Holder<SoundEvent> sound, SoundSource category, float volume, float pitch, long seed) { var event = new SoundReceiveEvent( sound, diff --git a/src/main/java/moe/nea/firmament/mixins/customgui/PatchHandledScreen.java b/src/main/java/moe/nea/firmament/mixins/customgui/PatchHandledScreen.java index 41787e4..b0fbbe1 100644 --- a/src/main/java/moe/nea/firmament/mixins/customgui/PatchHandledScreen.java +++ b/src/main/java/moe/nea/firmament/mixins/customgui/PatchHandledScreen.java @@ -129,14 +129,14 @@ public class PatchHandledScreen<T extends AbstractContainerMenu> extends Screen } } - @Inject(method = "isHovering", at = @At("HEAD"), cancellable = true) + @Inject(method = "isHovering(IIIIDD)Z", at = @At("HEAD"), cancellable = true) public void onIsPointWithinBounds(int x, int y, int width, int height, double pointX, double pointY, CallbackInfoReturnable<Boolean> cir) { if (override != null) { cir.setReturnValue(override.isPointWithinBounds(x + this.leftPos, y + this.topPos, width, height, pointX, pointY)); } } - @Inject(method = "isHovering", at = @At("HEAD"), cancellable = true) + @Inject(method = "isHovering(Lnet/minecraft/world/inventory/Slot;DD)Z", at = @At("HEAD"), cancellable = true) public void onIsPointOverSlot(Slot slot, double pointX, double pointY, CallbackInfoReturnable<Boolean> cir) { if (override != null) { cir.setReturnValue(override.isPointOverSlot(slot, this.leftPos, this.topPos, pointX, pointY)); diff --git a/src/main/java/moe/nea/firmament/mixins/devenv/MixinScoreboard.java b/src/main/java/moe/nea/firmament/mixins/devenv/MixinScoreboard.java index d96cac9..e39fe35 100644 --- a/src/main/java/moe/nea/firmament/mixins/devenv/MixinScoreboard.java +++ b/src/main/java/moe/nea/firmament/mixins/devenv/MixinScoreboard.java @@ -10,8 +10,7 @@ import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(Scoreboard.class) public class MixinScoreboard { - // TODO(Ravel): target method addTeam is ambiguous - @Redirect(method = "addTeam", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", remap = false)) + @Redirect(method = {"addPlayerTeam", "addPlayerToTeam"}, at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", remap = false)) public void onExistingteam(Logger instance, String s, Object o) { // Ignore creations of existing teams } |
