Skip to content

Commit afcfbec

Browse files
committed
fix: remapping artifacts p.1
1 parent c93a04a commit afcfbec

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/EnforceToolDisplayForCustomBlocksInHarvestToolProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
@Mixin(HarvestToolProvider.class)
1616
public class EnforceToolDisplayForCustomBlocksInHarvestToolProvider {
17-
@ModifyExpressionValue(method = "getText", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;isToolRequired()Z"))
17+
@ModifyExpressionValue(method = "getText", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;requiresCorrectToolForDrops()Z"))
1818
private boolean overwriteRequiresTool(boolean original, @Local(argsOnly = true) BlockAccessor accessor) {
1919
if (CustomFakeBlockProvider.hasCustomBlock(accessor))
2020
return true;

src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/PatchBreakingBarSpeedJade.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ private static float replaceBlockBreakingProgress(float original) {
1818
}
1919

2020
@ModifyExpressionValue(method = "drawBreakingProgress",
21-
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"))
21+
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"))
2222
private static float replacePlayerSpecificBreakingProgress(float original) {
2323
return CustomMiningHardnessProvider.replaceBlockBreakSpeed(original);
2424
}

src/compat/wildfireGender/java/moe/nea/firmament/mixins/compat/wildfiregender/PatchArmorTexturesInGenderMod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@Mixin(GenderArmorLayer.class)
1515
@Pseudo
1616
public class PatchArmorTexturesInGenderMod {
17-
@ModifyExpressionValue(method = "submit(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/SubmitNodeCollector;ILnet/minecraft/client/renderer/entity/state/HumanoidRenderState;FF)V",
17+
@ModifyExpressionValue(method = "render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/SubmitNodeCollector;ILnet/minecraft/client/renderer/entity/state/HumanoidRenderState;FF)V",
1818
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;get(Lnet/minecraft/core/component/DataComponentType;)Ljava/lang/Object;"))
1919
private Object replaceArmorMaterial(Object original, @Local ItemStack chestplate) {
2020
var overrides = CustomGlobalArmorOverrides.overrideArmor(chestplate, EquipmentSlot.CHEST);

src/main/java/moe/nea/firmament/mixins/DispatchMouseInputEventsPatch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
@Mixin(MouseHandler.class)
1111
public class DispatchMouseInputEventsPatch {
12-
@WrapWithCondition(method = "turnPlayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;changeLookDirection(DD)V"))
12+
@WrapWithCondition(method = "turnPlayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;turn(DD)V"))
1313
public boolean onRotatePlayer(LocalPlayer instance, double deltaX, double deltaY) {
1414
var event = WorldMouseMoveEvent.Companion.publish(new WorldMouseMoveEvent(deltaX, deltaY));
1515
return !event.getCancelled();

src/main/java/moe/nea/firmament/mixins/SlotClickEventPatch.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020
@Mixin(MultiPlayerGameMode.class)
2121
public class SlotClickEventPatch {
2222

23-
@Inject(method = "handleInventoryMouseClick", at = @At(value = "FIELD", target = "Lnet/minecraft/world/inventory/AbstractContainerMenu;slots:Lnet/minecraft/core/NonNullList;", opcode = Opcodes.GETFIELD))
24-
private void onSlotClickSaveSlot(int syncId, int slotId, int button, ClickType actionType, Player player, CallbackInfo ci, @Local AbstractContainerMenu handler, @Share("slotContent") LocalRef<ItemStack> slotContent) {
23+
@Inject(method = "handleInventoryMouseClick", at = @At(value = "FIELD", target =
24+
"Lnet/minecraft/world/inventory/AbstractContainerMenu;slots:Lnet/minecraft/core/NonNullList;", opcode = Opcodes.GETFIELD))
25+
private void onSlotClickSaveSlot(int containerId, int slotId, int mouseButton, ClickType clickType, Player player, CallbackInfo ci, @Local AbstractContainerMenu handler, @Share("slotContent") LocalRef<ItemStack> slotContent) {
2526
if (0 <= slotId && slotId < handler.slots.size()) {
2627
slotContent.set(handler.getSlot(slotId).getItem().copy());
2728
}
2829
}
2930

30-
@Inject(method = "handleInventoryMouseClick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/ClientPacketListener;sendPacket(Lnet/minecraft/network/protocol/Packet;)V"))
31+
@Inject(method = "handleInventoryMouseClick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/ClientPacketListener;send(Lnet/minecraft/network/protocol/Packet;)V"))
3132
private void onSlotClick(int syncId, int slotId, int button, ClickType actionType, Player player, CallbackInfo ci, @Local AbstractContainerMenu handler, @Share("slotContent") LocalRef<ItemStack> slotContent) {
3233
if (0 <= slotId && slotId < handler.slots.size()) {
3334
SlotClickEvent.Companion.publish(new SlotClickEvent(

src/main/java/moe/nea/firmament/mixins/SoundReceiveEventPatch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
@Mixin(ClientPacketListener.class)
1818
public class SoundReceiveEventPatch {
19-
@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"))
19+
@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"))
2020
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) {
2121
var event = new SoundReceiveEvent(
2222
sound,

src/main/java/moe/nea/firmament/mixins/customgui/PatchHandledScreen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ public void onIsClickOutsideBounds(
129129
}
130130
}
131131

132-
@Inject(method = "isHovering", at = @At("HEAD"), cancellable = true)
132+
@Inject(method = "isHovering(IIIIDD)Z", at = @At("HEAD"), cancellable = true)
133133
public void onIsPointWithinBounds(int x, int y, int width, int height, double pointX, double pointY, CallbackInfoReturnable<Boolean> cir) {
134134
if (override != null) {
135135
cir.setReturnValue(override.isPointWithinBounds(x + this.leftPos, y + this.topPos, width, height, pointX, pointY));
136136
}
137137
}
138138

139-
@Inject(method = "isHovering", at = @At("HEAD"), cancellable = true)
139+
@Inject(method = "isHovering(Lnet/minecraft/world/inventory/Slot;DD)Z", at = @At("HEAD"), cancellable = true)
140140
public void onIsPointOverSlot(Slot slot, double pointX, double pointY, CallbackInfoReturnable<Boolean> cir) {
141141
if (override != null) {
142142
cir.setReturnValue(override.isPointOverSlot(slot, this.leftPos, this.topPos, pointX, pointY));

src/main/java/moe/nea/firmament/mixins/devenv/MixinScoreboard.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
@Mixin(Scoreboard.class)
1212
public class MixinScoreboard {
13-
// TODO(Ravel): target method addTeam is ambiguous
14-
@Redirect(method = "addTeam", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", remap = false))
13+
@Redirect(method = {"addPlayerTeam", "addPlayerToTeam"}, at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", remap = false))
1514
public void onExistingteam(Logger instance, String s, Object o) {
1615
// Ignore creations of existing teams
1716
}

0 commit comments

Comments
 (0)