66import com .gregtechceu .gtceu .integration .ae2 .gui .widget .slot .AEPatternViewSlotWidget ;
77import com .gregtechceu .gtceu .integration .ae2 .machine .MEPatternBufferPartMachine ;
88import com .gregtechceu .gtceu .integration .ae2 .machine .trait .InternalSlotRecipeHandler ;
9-
109import com .lowdragmc .lowdraglib .gui .widget .LabelWidget ;
1110import com .lowdragmc .lowdraglib .gui .widget .Widget ;
1211import com .lowdragmc .lowdraglib .gui .widget .WidgetGroup ;
13-
1412import net .minecraft .MethodsReturnNonnullByDefault ;
1513import net .minecraft .network .chat .Component ;
1614import net .minecraft .world .item .ItemStack ;
17- import net .neganote .gtutilities .GregTechModernUtilities ;
18-
1915import appeng .crafting .pattern .EncodedPatternItem ;
20-
2116import java .lang .reflect .Field ;
2217import java .lang .reflect .Method ;
23-
2418import javax .annotation .ParametersAreNonnullByDefault ;
2519
2620@ ParametersAreNonnullByDefault
@@ -48,8 +42,7 @@ public ExpandedPatternBufferPartMachine(IMachineBlockEntity info) {
4842 recipeHandlerField .set (this , new InternalSlotRecipeHandler (this , newInternalInv ));
4943
5044 } catch (Exception e ) {
51- GregTechModernUtilities .LOGGER
52- .error ("Failed to initialize Expanded Pattern Buffer inventories via reflection" , e );
45+ throw new RuntimeException ("FATAL: Failed to initialize Expanded Pattern Buffer via reflection." , e );
5346 }
5447 }
5548
@@ -59,7 +52,7 @@ private void callPrivatePatternChange(int index) {
5952 method .setAccessible (true );
6053 method .invoke (this , index );
6154 } catch (Exception e ) {
62- GregTechModernUtilities . LOGGER . error ("Failed to invoke onPatternChange for index {}" , index , e );
55+ throw new RuntimeException ("Failed to invoke onPatternChange for index " + index , e );
6356 }
6457 }
6558
@@ -69,9 +62,7 @@ private String getCustomNameExpanded() {
6962 field .setAccessible (true );
7063 return (String ) field .get (this );
7164 } catch (Exception e ) {
72- GregTechModernUtilities .LOGGER
73- .warn ("Failed to retrieve customName via reflection, falling back to empty string" );
74- return "" ;
65+ throw new RuntimeException ("Failed to retrieve customName via reflection" , e );
7566 }
7667 }
7768
@@ -110,4 +101,4 @@ public Widget createUIWidget() {
110101
111102 return group ;
112103 }
113- }
104+ }
0 commit comments