File tree 1 file changed +25
-0
lines changed
src/main/java/com/recursive_pineapple/matter_manipulator/common/utils
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
import net .minecraftforge .common .util .ForgeDirection ;
12
12
13
+ import gregtech .api .interfaces .metatileentity .IMetaTileEntity ;
14
+ import gregtech .api .interfaces .tileentity .IGregTechTileEntity ;
13
15
import gregtech .api .interfaces .tileentity .IHasInventory ;
14
16
15
17
import com .google .common .collect .ImmutableList ;
16
18
import com .recursive_pineapple .matter_manipulator .MMMod ;
17
19
import com .recursive_pineapple .matter_manipulator .asm .Optional ;
18
20
import com .recursive_pineapple .matter_manipulator .common .utils .Mods .Names ;
21
+ import gregtech .common .tileentities .machines .MTEHatchOutputBusME ;
22
+ import gregtech .common .tileentities .machines .MTEHatchOutputME ;
23
+ import tectech .thing .metaTileEntity .hatch .MTEHatchRack ;
19
24
20
25
public enum InventoryAdapter {
21
26
27
+ GTUnrestricted {
28
+ @ Override
29
+ public boolean canHandle (IInventory inv ) {
30
+ return GregTech .isModLoaded () && canHandleImpl (inv );
31
+ }
32
+
33
+ @ Optional (Names .GREG_TECH )
34
+ private boolean canHandleImpl (IInventory inv ) {
35
+ if (inv instanceof IGregTechTileEntity igte ) {
36
+ IMetaTileEntity imte = igte .getMetaTileEntity ();
37
+
38
+ if (imte instanceof MTEHatchOutputBusME ) return true ;
39
+ if (imte instanceof MTEHatchOutputME ) return true ;
40
+ if (imte instanceof MTEHatchRack ) return true ;
41
+ }
42
+
43
+ return false ;
44
+ }
45
+ },
46
+
22
47
GT {
23
48
24
49
@ Override
You can’t perform that action at this time.
0 commit comments