File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/gregtech/api/mui Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 99
1010import com .cleanroommc .modularui .network .NetworkUtils ;
1111import com .cleanroommc .modularui .screen .ModularContainer ;
12+ import com .cleanroommc .modularui .value .sync .ModularSyncManager ;
1213import com .cleanroommc .modularui .value .sync .PanelSyncManager ;
1314import mezz .jei .api .gui .IRecipeLayout ;
1415import mezz .jei .api .recipe .transfer .IRecipeTransferError ;
@@ -34,8 +35,12 @@ public GregTechGuiTransferHandler(IRecipeTransferHandlerHelper handlerHelper) {
3435 @ Override
3536 public @ Nullable IRecipeTransferError transferRecipe (ModularContainer container , IRecipeLayout recipeLayout ,
3637 EntityPlayer player , boolean maxTransfer , boolean doTransfer ) {
38+ ModularSyncManager syncManager = container .getSyncManager ();
39+ if (!syncManager .isOpen ("workbench" )) {
40+ return null ;
41+ }
3742 String key = PanelSyncManager .makeSyncKey ("recipe_logic" , 0 );
38- CraftingRecipeLogic recipeLogic = (CraftingRecipeLogic ) container . getSyncManager ()
43+ var recipeLogic = (CraftingRecipeLogic ) syncManager
3944 .getSyncHandler ("workbench" , key );
4045
4146 if (!doTransfer ) {
You can’t perform that action at this time.
0 commit comments