11package gregtech .api .mui .factory ;
22
3- import com .cleanroommc .modularui .factory .inventory .InventoryTypes ;
4-
5- import com .cleanroommc .modularui .utils .Platform ;
6-
73import gregtech .api .items .metaitem .MetaItem ;
84
95import net .minecraft .entity .player .EntityPlayer ;
10- import net .minecraft .entity .player .EntityPlayerMP ;
116import net .minecraft .item .ItemStack ;
127import net .minecraft .network .PacketBuffer ;
138import net .minecraft .util .EnumHand ;
1611import com .cleanroommc .modularui .factory .AbstractUIFactory ;
1712import com .cleanroommc .modularui .factory .GuiManager ;
1813import com .cleanroommc .modularui .factory .PlayerInventoryGuiData ;
14+ import com .cleanroommc .modularui .factory .inventory .InventoryTypes ;
1915import org .jetbrains .annotations .NotNull ;
2016
2117import java .util .Objects ;
@@ -31,7 +27,7 @@ private MetaItemGuiFactory() {
3127 public static void open (EntityPlayer player , EnumHand hand ) {
3228 Objects .requireNonNull (player );
3329 Objects .requireNonNull (hand );
34- int index = hand == EnumHand .OFF_HAND ? 40 : Platform . getClientPlayer () .inventory .currentItem ;
30+ int index = hand == EnumHand .OFF_HAND ? 40 : player .inventory .currentItem ;
3531 PlayerInventoryGuiData guiData = new PlayerInventoryGuiData (player , InventoryTypes .PLAYER , index );
3632 GuiManager .open (INSTANCE , guiData , verifyServerSide (player ));
3733 }
0 commit comments