MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / stopBuffering

Method stopBuffering

src/main/java/gregapi/util/CR.java:110–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108 public static final List<IRecipe> BUFFER = new ArrayListNoNulls<>(1000);
109
110 public static void stopBuffering() {
111 BUFFERING = F;
112 List<IRecipe> tList = list();
113 for (int i = 0; i < tList.size(); i++) {
114 IRecipe tRecipe = tList.get(i);
115 if (tRecipe != null) {
116 if (tRecipe instanceof ICraftingRecipeGT && !((ICraftingRecipeGT)tRecipe).isRemovableByGT()) continue;
117 if (CLASSES_SPECIAL.contains(tRecipe.getClass().getName())) continue;
118 if (RECIPES_TO_DELATE.contains(tRecipe.getRecipeOutput(), T)) tList.set(i, null);
119 }
120 }
121 tList.removeAll(Arrays.asList((IRecipe)null));
122 // This setting is not meant to speed up load times, its meant to just make Crafting Recipes less visible in NEI
123 if (!DISABLE_GT6_CRAFTING_RECIPES) for (IRecipe tRecipe : BUFFER) GameRegistry.addRecipe(tRecipe);
124 BUFFER.clear();
125 }
126
127 public static final String DELATE = "gt:delate";
128

Callers 1

onModPostInitMethod · 0.95

Calls 10

listMethod · 0.95
addRecipeMethod · 0.80
getMethod · 0.65
isRemovableByGTMethod · 0.65
containsMethod · 0.65
setMethod · 0.65
sizeMethod · 0.45
getNameMethod · 0.45
getRecipeOutputMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected