File tree Expand file tree Collapse file tree
src/main/java/com/gregtechceu/gtceu/api/pattern Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,11 +67,13 @@ public static TraceabilityPredicate blocks(IMachineBlock... blocks) {
6767 }
6868
6969 public static TraceabilityPredicate machines (MachineDefinition ... definitions ) {
70- IMachineBlock [] machineBlocks = new IMachineBlock [definitions .length ];
71- for (int i = 0 ; i < machineBlocks .length ; i ++) {
72- machineBlocks [i ] = definitions [i ].get ();
70+ ArrayList <IMachineBlock > machineBlocks = new ArrayList <>(definitions .length );
71+ for (var definition : definitions ) {
72+ if (definition != null ) {
73+ machineBlocks .add (definition .get ());
74+ }
7375 }
74- return blocks (machineBlocks );
76+ return blocks (machineBlocks . toArray ( IMachineBlock []:: new ) );
7577 }
7678
7779 public static TraceabilityPredicate blockTag (TagKey <Block > tag ) {
You can’t perform that action at this time.
0 commit comments