mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-20 20:12:09 +00:00
Simplify some code
This commit is contained in:
1 parent
9963789272
commit
7ccf1b0767
28 files changed
+395
-326
No files matched your search
@@ -50,9 +50,10 @@ public class NEINeeConfig implements IConfigureNEI {
|
||||
);
|
||||
Set<String> identifiers = new HashSet<>(defaultIdentifiers);
|
||||
|
||||
for (IRecipeProcessor processor : RecipeProcessor.recipeProcessors) {
|
||||
identifiers.addAll(processor.getAllOverlayIdentifier());
|
||||
}
|
||||
RecipeProcessor.recipeProcessors
|
||||
.stream()
|
||||
.map(IRecipeProcessor::getAllOverlayIdentifier)
|
||||
.forEach(identifiers::addAll);
|
||||
|
||||
for (String ident : identifiers) {
|
||||
API.registerGuiOverlay(GuiPatternTerm.class, ident);
|
||||
@@ -103,15 +104,16 @@ public class NEINeeConfig implements IConfigureNEI {
|
||||
}
|
||||
if (controllerIndex > 0) {
|
||||
GuiContainerManager.inputHandlers.remove(controllerIndex);
|
||||
GuiContainerManager.inputHandlers.add(controllerIndex, new NEIController() {
|
||||
@Override
|
||||
public boolean mouseScrolled(GuiContainer gui, int mouseX, int mouseY, int scrolled) {
|
||||
if (transferBlacklist.contains(gui.getClass())) {
|
||||
return false;
|
||||
}
|
||||
return super.mouseScrolled(gui, mouseX, mouseY, scrolled);
|
||||
}
|
||||
});
|
||||
GuiContainerManager.inputHandlers.add(controllerIndex,
|
||||
new NEIController() {
|
||||
@Override
|
||||
public boolean mouseScrolled(GuiContainer gui, int mouseX, int mouseY, int scrolled) {
|
||||
if (transferBlacklist.contains(gui.getClass())) {
|
||||
return false;
|
||||
}
|
||||
return super.mouseScrolled(gui, mouseX, mouseY, scrolled);
|
||||
}
|
||||
});
|
||||
NotEnoughEnergistics.logger.info("NEIController replaced success");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user