Skip to content

Commit fa8380b

Browse files
committed
rename and fix scroll sync
1 parent ef437b8 commit fa8380b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/gregtech/mixins/mui2/ItemSlotSHMixin.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,16 @@ public void readOnServer(int id, PacketBuffer buf) throws IOException {
7575
}
7676
}
7777

78-
@Inject(method = "readOnClient",
79-
at = @At(value = "INVOKE",
80-
target = "Lcom/cleanroommc/modularui/widgets/slot/ModularSlot;onSlotChangedReal(Lnet/minecraft/item/ItemStack;ZZZ)V"))
81-
protected void asdf(int id, PacketBuffer buf, CallbackInfo ci) {
78+
@Inject(method = "readOnClient", at = @At("HEAD"))
79+
protected void handlePhantomScroll(int id, PacketBuffer buf, CallbackInfo ci) {
8280
if (id == 3) {
8381
this.lastStoredPhantomItem = NetworkUtils.readItemStack(buf);
8482
getSlot().putStack(this.lastStoredPhantomItem.copy());
8583
}
8684
}
8785

8886
@Inject(method = "phantomScroll", at = @At("TAIL"))
89-
protected void asdf(MouseData mouseData, CallbackInfo ci) {
87+
protected void syncPhantomScroll(MouseData mouseData, CallbackInfo ci) {
9088
syncToClient(3, buffer -> NetworkUtils.writeItemStack(buffer, this.lastStoredPhantomItem));
9189
}
9290

0 commit comments

Comments
 (0)