Skip to content

Commit 66d0ce9

Browse files
committed
Remove armor storage as it seems to have been patched
closes #4911 closes #5058
1 parent a03f7c6 commit 66d0ce9

4 files changed

Lines changed: 0 additions & 84 deletions

File tree

src/main/java/meteordevelopment/meteorclient/mixin/ClientPlayerInteractionManagerMixin.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import meteordevelopment.meteorclient.events.entity.player.*;
1212
import meteordevelopment.meteorclient.mixininterface.IClientPlayerInteractionManager;
1313
import meteordevelopment.meteorclient.systems.modules.Modules;
14-
import meteordevelopment.meteorclient.systems.modules.misc.InventoryTweaks;
1514
import meteordevelopment.meteorclient.systems.modules.player.BreakDelay;
1615
import meteordevelopment.meteorclient.systems.modules.player.SpeedMine;
1716
import meteordevelopment.meteorclient.utils.world.BlockUtils;
@@ -23,8 +22,6 @@
2322
import net.minecraft.entity.player.PlayerEntity;
2423
import net.minecraft.item.ItemStack;
2524
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
26-
import net.minecraft.screen.PlayerScreenHandler;
27-
import net.minecraft.screen.ScreenHandler;
2825
import net.minecraft.screen.slot.SlotActionType;
2926
import net.minecraft.util.ActionResult;
3027
import net.minecraft.util.Hand;
@@ -49,9 +46,6 @@ public abstract class ClientPlayerInteractionManagerMixin implements IClientPlay
4946

5047
@Shadow protected abstract void syncSelectedSlot();
5148

52-
@Shadow
53-
public abstract void clickSlot(int syncId, int slotId, int button, SlotActionType actionType, PlayerEntity player);
54-
5549
@Shadow
5650
@Final
5751
private ClientPlayNetworkHandler networkHandler;
@@ -70,33 +64,6 @@ else if (slotId == -999) {
7064
}
7165
}
7266

73-
@Inject(method = "clickSlot", at = @At("HEAD"), cancellable = true)
74-
public void onClickArmorSlot(int syncId, int slotId, int button, SlotActionType actionType, PlayerEntity player, CallbackInfo ci) {
75-
if (!Modules.get().get(InventoryTweaks.class).armorStorage()) return;
76-
77-
ScreenHandler screenHandler = player.currentScreenHandler;
78-
79-
if (screenHandler instanceof PlayerScreenHandler) {
80-
if (slotId >= 5 && slotId <= 8) {
81-
int armorSlot = (8 - slotId) + 36;
82-
if (actionType == SlotActionType.PICKUP && !screenHandler.getCursorStack().isEmpty()) {
83-
clickSlot(syncId, 17, armorSlot, SlotActionType.SWAP, player); //armor slot <-> inv slot
84-
clickSlot(syncId, 17, button, SlotActionType.PICKUP, player); //inv slot <-> cursor slot
85-
clickSlot(syncId, 17, armorSlot, SlotActionType.SWAP, player); //armor slot <-> inv slot
86-
ci.cancel();
87-
} else if (actionType == SlotActionType.SWAP) {
88-
if (button >= 10) {
89-
clickSlot(syncId, 45, armorSlot, SlotActionType.SWAP, player);
90-
ci.cancel();
91-
} else {
92-
clickSlot(syncId, 36 + button, armorSlot, SlotActionType.SWAP, player); //invert swap
93-
ci.cancel();
94-
}
95-
}
96-
}
97-
}
98-
}
99-
10067
@Inject(method = "attackBlock", at = @At("HEAD"), cancellable = true)
10168
private void onAttackBlock(BlockPos blockPos, Direction direction, CallbackInfoReturnable<Boolean> info) {
10269
if (MeteorClient.EVENT_BUS.post(StartBreakingBlockEvent.get(blockPos, direction)).isCancelled()) info.cancel();

src/main/java/meteordevelopment/meteorclient/mixin/PlayerArmorSlotMixin.java

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/main/java/meteordevelopment/meteorclient/systems/modules/misc/InventoryTweaks.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,6 @@ public class InventoryTweaks extends Module {
6969
.build()
7070
);
7171

72-
private final Setting<Boolean> armorStorage = sgGeneral.add(new BoolSetting.Builder()
73-
.name("armor-storage")
74-
.description("Allows you to put normal items in your armor slots.")
75-
.defaultValue(true)
76-
.build()
77-
);
78-
7972
// Sorting
8073

8174
private final Setting<Boolean> sortingEnabled = sgSorting.add(new BoolSetting.Builder()
@@ -414,10 +407,6 @@ public boolean mouseDragItemMove() {
414407
return isActive() && mouseDragItemMove.get();
415408
}
416409

417-
public boolean armorStorage() {
418-
return isActive() && armorStorage.get();
419-
}
420-
421410
public boolean canSteal(ScreenHandler handler) {
422411
try {
423412
return (stealScreens.get().contains(handler.getType()));

src/main/resources/meteor-client.mixins.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@
135135
"MutableTextMixin",
136136
"PacketByteBufMixin",
137137
"ParticleManagerMixin",
138-
"PlayerArmorSlotMixin",
139138
"PlayerEntityAccessor",
140139
"PlayerEntityMixin",
141140
"PlayerEntityRendererMixin",

0 commit comments

Comments
 (0)