mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-10-27 06:44:00 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
966e404218 | ||
|
|
b64d3a8be4 | ||
|
|
34b8af475d | ||
|
|
b298f3961a | ||
|
|
2804698e71 |
No files matched your search
@@ -10,3 +10,6 @@ run/*
|
||||
.gradle/
|
||||
|
||||
*.bat
|
||||
.classpath
|
||||
.project
|
||||
.settings/**
|
||||
+42
-30
@@ -1,20 +1,29 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
name = "gt"
|
||||
url = "https://gregtech.overminddl1.com/"
|
||||
}
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
name = "jitpack"
|
||||
url = "https://jitpack.io"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
classpath "com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("org.ajoberstar.grgit") version("3.1.1")
|
||||
}
|
||||
|
||||
//add dependency repositories
|
||||
repositories {
|
||||
maven {
|
||||
@@ -23,9 +32,24 @@ repositories {
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "idea"
|
||||
apply plugin: 'forge'
|
||||
|
||||
group = "codechicken" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
idea {
|
||||
module {
|
||||
inheritOutputDirs = true
|
||||
downloadJavadoc = true
|
||||
downloadSources = true
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
group = "codechicken"
|
||||
archivesBaseName = "NotEnoughItems"
|
||||
|
||||
// Define properties file
|
||||
@@ -37,18 +61,19 @@ configFile.withReader {
|
||||
prop.load(it)
|
||||
project.ext.config = new ConfigSlurper().parse prop
|
||||
}
|
||||
//
|
||||
//configurations.all {
|
||||
// resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
|
||||
// setTransitive(false)
|
||||
//}
|
||||
|
||||
dependencies {
|
||||
compile "codechicken:CodeChickenLib:${config.mc_version}-${config.ccl_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${config.mc_version}-${config.ccc_version}:dev"
|
||||
}
|
||||
|
||||
version = "${project.config.mod_version}"
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
version = "${project.config.mod_version}"
|
||||
|
||||
println config.mc_version + "-" + config.forge_version
|
||||
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
|
||||
@@ -81,6 +106,11 @@ processResources {
|
||||
|
||||
// Move access transformer to META-INF
|
||||
rename '(.+_at.cfg)', 'META-INF/$1'
|
||||
//
|
||||
// // copy everything else, that's not the mcmod.info
|
||||
// from(sourceSets.main.resources.srcDirs) {
|
||||
// exclude "mcmod.info"
|
||||
// }
|
||||
}
|
||||
|
||||
version = "${project.minecraft.version}-${project.version}"
|
||||
@@ -90,19 +120,19 @@ def commonManifest = {
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier = 'universal'
|
||||
getArchiveClassifier().set("universal")
|
||||
manifest commonManifest
|
||||
}
|
||||
|
||||
task sourceJar(type: Jar) {
|
||||
from sourceSets.main.java
|
||||
from new File(root, "dev")
|
||||
classifier = 'src'
|
||||
getArchiveClassifier().set("src")
|
||||
}
|
||||
|
||||
task devJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'dev'
|
||||
getArchiveClassifier().set("dev")
|
||||
manifest commonManifest
|
||||
}
|
||||
|
||||
@@ -110,21 +140,3 @@ task devJar(type: Jar) {
|
||||
artifacts {
|
||||
archives sourceJar, devJar
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main { output.resourcesDir = output.classesDir }
|
||||
}
|
||||
|
||||
// Configure an upload task.
|
||||
uploadArchives {
|
||||
dependsOn 'reobf'
|
||||
if (project.hasProperty("local_maven")) {
|
||||
repositories {
|
||||
logger.info('Publishing to local maven repo')
|
||||
|
||||
mavenDeployer {
|
||||
repository(url: "file://${local_maven}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,4 +2,4 @@ mc_version=1.7.10
|
||||
forge_version=10.13.4.1614-1.7.10
|
||||
ccl_version=1.1.3.138
|
||||
ccc_version=1.0.7.+
|
||||
mod_version=2.0.11-GTNH
|
||||
mod_version=2.1.0-GTNH-beta
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
|
||||
@@ -1,5 +1,21 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
@@ -109,8 +125,8 @@ if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
Vendored
+17
-1
@@ -1,3 +1,19 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
nei.load=Load
|
||||
nei.save=Save
|
||||
|
||||
# PC/Linux Control Key
|
||||
nei.key.ctrl=CTRL
|
||||
# Mac Command Key
|
||||
nei.key.ctrl.mac=CMD
|
||||
|
||||
nei.bookmark.toggle=Bookmarks
|
||||
nei.bookmark.toggle.tip=Toggle visibility of the Bookmark Panel
|
||||
|
||||
nei.enchant=Enchant
|
||||
nei.enchant.level=Level
|
||||
@@ -12,6 +19,11 @@ nei.potion.duration=Duration
|
||||
nei.potion.level=Level
|
||||
|
||||
nei.inventory.options=Options
|
||||
nei.inventory.options.tip=NEI Config
|
||||
nei.inventory.options.tip.cheatmode.0=Recipe Mode
|
||||
nei.inventory.options.tip.cheatmode.1=Utility Mode
|
||||
nei.inventory.options.tip.cheatmode.2=Cheat Mode
|
||||
nei.inventory.options.tip.cheatmode.disable=%s-click here to cycle between Recipe, Utility, and Cheat Mode.
|
||||
nei.inventory.prev=Prev
|
||||
nei.inventory.next=Next
|
||||
nei.inventory.item_subsets=Item Subsets
|
||||
@@ -36,10 +48,15 @@ nei.inventory.dusk.set=Set time to dusk
|
||||
nei.inventory.midnight.enable=Enable midnight-dawn
|
||||
nei.inventory.midnight.set=Set time to midnight
|
||||
nei.inventory.heal=Heal the player
|
||||
nei.inventory.gamemode.0=Set gamemode to survival
|
||||
nei.inventory.gamemode.1=Set gamemode to creative
|
||||
nei.inventory.gamemode.2=Set gamemode to creative+
|
||||
nei.inventory.gamemode.3=Set gamemode to adventure
|
||||
nei.inventory.current.gamemode.0=Current gamemode: survival
|
||||
nei.inventory.current.gamemode.1=Current gamemode: creative
|
||||
nei.inventory.current.gamemode.2=Current gamemode: creative+
|
||||
nei.inventory.current.gamemode.3=Current gamemode: adventure
|
||||
|
||||
nei.inventory.gamemode.0=Click: Set gamemode to survival
|
||||
nei.inventory.gamemode.1=Click: Set gamemode to creative
|
||||
nei.inventory.gamemode.2=Click: Set gamemode to creative+
|
||||
nei.inventory.gamemode.3=Click: Set gamemode to adventure
|
||||
|
||||
nei.chat.gamemode.0=You are now playing survival
|
||||
nei.chat.gamemode.1=You are now playing creative
|
||||
@@ -76,6 +93,7 @@ nei.options.keys.gui.next_machine=Next Machine
|
||||
nei.options.keys.gui.prev_machine=Prev Machine
|
||||
nei.options.keys.gui.search=Focus Search Bar
|
||||
nei.options.keys.gui.bookmark=Add Bookmark
|
||||
nei.options.keys.gui.hide_bookmarks=Toggle Bookmark Panel Visibility
|
||||
nei.options.keys.world=World
|
||||
nei.options.keys.world.chunkoverlay=Chunk Boundary Overlay
|
||||
nei.options.keys.world.moboverlay=Mob Spawn Overlay
|
||||
@@ -90,6 +108,12 @@ nei.options.keys.world.creative=Gamemode
|
||||
nei.options.keys.world.creative.tip=Cycle Gamemode
|
||||
|
||||
nei.options.inventory=Inventory
|
||||
nei.options.inventory.bookmarksEnabled=Bookmarks Panel Visibility
|
||||
nei.options.inventory.bookmarksEnabled.true=Visible
|
||||
nei.options.inventory.bookmarksEnabled.false=Hidden
|
||||
nei.options.inventory.jei_style_tabs=JEI Style Tabs
|
||||
nei.options.inventory.jei_style_tabs.true=Yes
|
||||
nei.options.inventory.jei_style_tabs.false=No [Weirdo]
|
||||
nei.options.inventory.widgetsenabled.true=NEI Enabled
|
||||
nei.options.inventory.widgetsenabled.false=NEI Disabled
|
||||
nei.options.inventory.cheatmode.0=Recipe Mode
|
||||
@@ -166,9 +190,10 @@ nei.options.tools.dump.itempanel.mode.2=Json
|
||||
nei.options.tools.dump.itempanel.mode.3=PNG
|
||||
nei.options.tools.dump.itempanel.icon.dumped=Item Panel icons were dumped to %s
|
||||
nei.options.tools.dump.itempanel.icon.cancelled=Dump cancelled
|
||||
|
||||
|
||||
|
||||
nei.options.tools.dump.handlers=NEI Handlers
|
||||
nei.options.tools.dump.handlers.dumped=handlers were dumped to %s
|
||||
nei.options.tools.dump.handlers.mode.0=CSV
|
||||
nei.options.tools.dump.handlers.mode.1=Json
|
||||
|
||||
nei.recipe.page=Page %s/%s
|
||||
nei.recipe.tooltip=Recipes
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 37 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
@@ -42,15 +42,20 @@ public abstract class Button extends Widget
|
||||
if (!contains(mx, my))
|
||||
return tooltip;
|
||||
|
||||
String tip = getButtonTip();
|
||||
final String tip = getButtonTip();
|
||||
if (tip != null)
|
||||
tooltip.add(tip);
|
||||
|
||||
addTooltips(tooltip);
|
||||
|
||||
return tooltip;
|
||||
}
|
||||
|
||||
public String getButtonTip() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void addTooltips(List<String> tooltip) {}
|
||||
|
||||
public String getRenderLabel() {
|
||||
return label;
|
||||
|
||||
@@ -2,6 +2,11 @@ package codechicken.nei;
|
||||
|
||||
public abstract class ButtonCycled extends Button
|
||||
{
|
||||
public ButtonCycled() {}
|
||||
|
||||
public ButtonCycled(int num) {
|
||||
icons = new Image[num];
|
||||
}
|
||||
@Override
|
||||
public Image getRenderIcon()
|
||||
{
|
||||
|
||||
@@ -22,6 +22,8 @@ import net.minecraft.client.renderer.InventoryEffectRenderer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -39,6 +41,7 @@ import static codechicken.nei.NEIClientConfig.getOptionList;
|
||||
import static codechicken.nei.NEIClientConfig.getSearchExpression;
|
||||
import static codechicken.nei.NEIClientConfig.hasSMPCounterPart;
|
||||
import static codechicken.nei.NEIClientConfig.invCreativeMode;
|
||||
import static codechicken.nei.NEIClientConfig.isBookmarkPanelHidden;
|
||||
import static codechicken.nei.NEIClientConfig.isEnabled;
|
||||
import static codechicken.nei.NEIClientConfig.isHidden;
|
||||
import static codechicken.nei.NEIClientConfig.showIDs;
|
||||
@@ -50,6 +53,7 @@ import static codechicken.nei.NEIClientUtils.decreaseSlotStack;
|
||||
import static codechicken.nei.NEIClientUtils.deleteEverything;
|
||||
import static codechicken.nei.NEIClientUtils.deleteHeldItem;
|
||||
import static codechicken.nei.NEIClientUtils.deleteItemsOfType;
|
||||
import static codechicken.nei.NEIClientUtils.getGamemode;
|
||||
import static codechicken.nei.NEIClientUtils.getGuiContainer;
|
||||
import static codechicken.nei.NEIClientUtils.getHeldItem;
|
||||
import static codechicken.nei.NEIClientUtils.getNextGamemode;
|
||||
@@ -81,8 +85,8 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
public static SubsetWidget dropDown;
|
||||
public static TextField searchField;
|
||||
|
||||
public static Button options;
|
||||
public static Button bookmarks;
|
||||
public static ButtonCycled options;
|
||||
public static ButtonCycled bookmarksButton;
|
||||
|
||||
public static Button more;
|
||||
public static Button less;
|
||||
@@ -136,7 +140,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
return gui.width - 3;
|
||||
}
|
||||
public static int getLeftSize(GuiContainer gui) {
|
||||
return getSideWidth(gui) - (ftbUtilsLoaded ? 18 : 0);
|
||||
return getSideWidth(gui) - ((ftbUtilsLoaded || getGamemode() == 2) ? 18 : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -198,6 +202,11 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
toggleBooleanSetting("inventory.hidden");
|
||||
return true;
|
||||
}
|
||||
if (keyID == getKeyBinding("gui.hide_bookmarks")) {
|
||||
toggleBooleanSetting("inventory.bookmarksEnabled");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isEnabled() && !isHidden()) {
|
||||
for (Widget widget : controlWidgets)
|
||||
if (inputFocused == null)
|
||||
@@ -242,6 +251,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
widget.draw(mousex, mousey);
|
||||
} else {
|
||||
options.draw(mousex, mousey);
|
||||
bookmarksButton.draw(mousex, mousey);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
@@ -293,8 +303,13 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
VisiblityData visiblity = new VisiblityData();
|
||||
if (isHidden())
|
||||
visiblity.showNEI = false;
|
||||
|
||||
if (isBookmarkPanelHidden())
|
||||
visiblity.showBookmarkPanel = false;
|
||||
|
||||
if (gui.height - gui.ySize <= 40)
|
||||
visiblity.showSearchSection = false;
|
||||
|
||||
if (gui.guiLeft - 4 < 76)
|
||||
visiblity.showWidgets = false;
|
||||
|
||||
@@ -318,28 +333,52 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
dropDown = new SubsetWidget();
|
||||
searchField = new SearchField("search");
|
||||
|
||||
options = new Button("Options")
|
||||
options = new ButtonCycled(3)
|
||||
{
|
||||
@Override
|
||||
public boolean onButtonPress(boolean rightclick) {
|
||||
if (!rightclick) {
|
||||
getOptionList().openGui(getGuiContainer(), false);
|
||||
if (Keyboard.getEventKeyState() && (Keyboard.getEventKey() == Keyboard.KEY_LCONTROL || Keyboard.getEventKey() == Keyboard.KEY_RCONTROL)) {
|
||||
NEIClientConfig.cycleSetting("inventory.cheatmode", 3);
|
||||
} else {
|
||||
getOptionList().openGui(getGuiContainer(), false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTooltips(List<String> tooltip) {
|
||||
tooltip.add(translate("inventory.options.tip"));
|
||||
String modeColor = "";
|
||||
final int cheatMode = NEIClientConfig.getCheatMode();
|
||||
if (cheatMode == 1)
|
||||
modeColor = EnumChatFormatting.GOLD.toString();
|
||||
else if (cheatMode == 2)
|
||||
modeColor = EnumChatFormatting.RED.toString();
|
||||
String controlKeyLocalization = translate(Minecraft.isRunningOnMac ? "key.ctrl.mac" : "key.ctrl");
|
||||
tooltip.add(modeColor + translate("inventory.options.tip.cheatmode." + cheatMode));
|
||||
tooltip.add(modeColor + translate("inventory.options.tip.cheatmode.disable", controlKeyLocalization));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRenderLabel() {
|
||||
return translate("inventory.options");
|
||||
}
|
||||
};
|
||||
|
||||
bookmarks = new Button("Bookmarks")
|
||||
bookmarksButton = new ButtonCycled(2)
|
||||
{
|
||||
@Override
|
||||
public boolean onButtonPress(boolean rightclick) {
|
||||
return false;
|
||||
NEIClientConfig.toggleBooleanSetting("bookmarksEnabled");
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getButtonTip() {
|
||||
return translate("bookmark.toggle.tip");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -424,7 +463,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
GuiDraw.drawTip(mousex + 9, mousey, translate("inventory.delete." + (shiftKey() ? "all" : "one"), GuiContainerManager.itemDisplayNameShort(getHeldItem())));
|
||||
}
|
||||
};
|
||||
gamemode = new ButtonCycled()
|
||||
gamemode = new ButtonCycled(3)
|
||||
{
|
||||
@Override
|
||||
public boolean onButtonPress(boolean rightclick) {
|
||||
@@ -434,12 +473,12 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getButtonTip() {
|
||||
return translate("inventory.gamemode." + getNextGamemode());
|
||||
public void addTooltips(List<String> tooltip) {
|
||||
tooltip.add(translate("inventory.current.gamemode." + getGamemode()));
|
||||
tooltip.add(EnumChatFormatting.GRAY + translate("inventory.gamemode." + getNextGamemode()));
|
||||
}
|
||||
|
||||
};
|
||||
gamemode.icons = new Image[3];
|
||||
rain = new Button()
|
||||
{
|
||||
@Override
|
||||
@@ -605,6 +644,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
|
||||
|
||||
addWidget(options);
|
||||
addWidget(bookmarksButton);
|
||||
if (visiblity.showItemPanel) {
|
||||
addWidget(itemPanel);
|
||||
itemPanel.setVisible();
|
||||
@@ -737,39 +777,39 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
}
|
||||
|
||||
public static void drawButtonBackground(int x, int y, int w, int h, boolean edges, int type) {
|
||||
int wtiles = 0;
|
||||
int wTiles = 0;
|
||||
int ew = w;//end width
|
||||
if (w / 2 > 100) {
|
||||
wtiles = (w - 200) / 50 + 1;
|
||||
wTiles = (w - 200) / 50 + 1;
|
||||
ew = 200;
|
||||
}
|
||||
|
||||
int w1 = ew / 2;
|
||||
int h1 = h / 2;
|
||||
int w2 = (ew + 1) / 2;
|
||||
int h2 = (h + 1) / 2;
|
||||
final int w1 = ew / 2;
|
||||
final int h1 = h / 2;
|
||||
final int w2 = (ew + 1) / 2;
|
||||
final int h2 = (h + 1) / 2;
|
||||
|
||||
int x2 = x + w - w2;
|
||||
int y2 = y + h - h2;
|
||||
final int x2 = x + w - w2;
|
||||
final int y2 = y + h - h2;
|
||||
|
||||
int ty = 46 + type * 20;
|
||||
int te = (edges ? 0 : 1);//tex edges
|
||||
final int ty = 46 + type * 20;
|
||||
final int te = (edges ? 0 : 1);//tex edges
|
||||
|
||||
int ty1 = ty + te;
|
||||
int tx1 = te;
|
||||
int tx3 = 75;
|
||||
final int ty1 = ty + te;
|
||||
final int tx1 = te;
|
||||
final int tx3 = 75;
|
||||
//halfway the 1 is for odd number adjustment
|
||||
int ty2 = ty + 20 - h2 - te;
|
||||
int tx2 = 200 - w2 - te;
|
||||
final int ty2 = ty + 20 - h2 - te;
|
||||
final int tx2 = 200 - w2 - te;
|
||||
|
||||
changeTexture("textures/gui/widgets.png");
|
||||
drawTexturedModalRect(x, y, tx1, ty1, w1, h1);//top left
|
||||
drawTexturedModalRect(x, y2, tx1, ty2, w1, h2);//bottom left
|
||||
|
||||
for (int tile = 0; tile < wtiles; tile++) {
|
||||
int tilex = x + w1 + 50 * tile;
|
||||
drawTexturedModalRect(tilex, y, tx3, ty1, 50, h1);//top
|
||||
drawTexturedModalRect(tilex, y2, tx3, ty2, 50, h2);//bottom
|
||||
for (int tile = 0; tile < wTiles; tile++) {
|
||||
final int tileX = x + w1 + 50 * tile;
|
||||
drawTexturedModalRect(tileX, y, tx3, ty1, 50, h1);//top
|
||||
drawTexturedModalRect(tileX, y2, tx3, ty2, 50, h2);//bottom
|
||||
}
|
||||
|
||||
drawTexturedModalRect(x2, y, tx2, ty1, w2, h1);//top right
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import static codechicken.lib.gui.GuiDraw.drawStringC;
|
||||
import static codechicken.nei.LayoutManager.bookmarkPanel;
|
||||
import static codechicken.nei.LayoutManager.bookmarksButton;
|
||||
import static codechicken.nei.LayoutManager.delete;
|
||||
import static codechicken.nei.LayoutManager.dropDown;
|
||||
import static codechicken.nei.LayoutManager.gamemode;
|
||||
@@ -48,6 +49,11 @@ public class LayoutStyleMinecraft extends LayoutStyle
|
||||
timeButtons[2].icon = new Image(144, 24, 12, 12);
|
||||
timeButtons[3].icon = new Image(156, 24, 12, 12);
|
||||
heal.icon = new Image(168, 24, 12, 12);
|
||||
bookmarksButton.icons[0] = new Image(0, 36, 16, 16);
|
||||
bookmarksButton.icons[1] = new Image(16, 36, 16, 16);
|
||||
options.icons[0] = new Image(32, 36, 16, 16);
|
||||
options.icons[1] = new Image(48, 36, 16, 16);
|
||||
options.icons[2] = new Image(64, 36, 16, 16);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -59,7 +65,6 @@ public class LayoutStyleMinecraft extends LayoutStyle
|
||||
public void layout(GuiContainer gui, VisiblityData visiblity) {
|
||||
reset();
|
||||
|
||||
//leftSize = ((gui.width - gui.xSize) / 2) - 3;
|
||||
leftSize = ItemPanels.bookmarkPanel.getWidth(gui);
|
||||
numButtons = Math.max(leftSize / 18, 1);
|
||||
|
||||
@@ -87,6 +92,8 @@ public class LayoutStyleMinecraft extends LayoutStyle
|
||||
else if (NEIClientUtils.isValidGamemode("adventure"))
|
||||
gamemode.index = 2;
|
||||
}
|
||||
bookmarksButton.index = NEIClientConfig.isBookmarkPanelHidden() ? 0 : 1;
|
||||
options.index = NEIClientConfig.getCheatMode();
|
||||
|
||||
magnet.state = 0x4 | (getMagnetMode() ? 1 : 0);
|
||||
|
||||
@@ -124,9 +131,14 @@ public class LayoutStyleMinecraft extends LayoutStyle
|
||||
|
||||
options.x = isEnabled() ? 0 : 6;
|
||||
options.y = isEnabled() ? gui.height - 22 : gui.height - 28;
|
||||
options.w = 80;
|
||||
options.w = 22;
|
||||
options.h = 22;
|
||||
|
||||
bookmarksButton.x = 24 + (isEnabled() ? 0 : 6);
|
||||
bookmarksButton.y = isEnabled() ? gui.height - 22 : gui.height - 28;
|
||||
bookmarksButton.w = 22;
|
||||
bookmarksButton.h = 22;
|
||||
|
||||
searchField.y = gui.height - searchField.h - 2;
|
||||
|
||||
dropDown.x = itemPanel.x - 150;
|
||||
@@ -169,16 +181,15 @@ public class LayoutStyleMinecraft extends LayoutStyle
|
||||
|
||||
Image icon = b.getRenderIcon();
|
||||
if (icon == null) {
|
||||
int colour = tex == 2 ? 0xffffa0 :
|
||||
tex == 0 ? 0x601010 : 0xe0e0e0;
|
||||
int colour = tex == 2 ? 0xffffa0 : tex == 0 ? 0x601010 : 0xe0e0e0;
|
||||
|
||||
drawStringC(b.getRenderLabel(), b.x + b.w / 2, b.y + (b.h - 8) / 2, colour);
|
||||
} else {
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
|
||||
int iconx = b.x + (b.w - icon.width) / 2;
|
||||
int icony = b.y + (b.h - icon.height) / 2;
|
||||
LayoutManager.drawIcon(iconx, icony, icon);
|
||||
final int iconX = b.x + (b.w - icon.width) / 2;
|
||||
final int iconY = b.y + (b.h - icon.height) / 2;
|
||||
LayoutManager.drawIcon(iconX, iconY, icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import codechicken.nei.config.OptionList;
|
||||
import codechicken.nei.config.OptionOpenGui;
|
||||
import codechicken.nei.config.OptionTextField;
|
||||
import codechicken.nei.config.OptionToggleButton;
|
||||
import codechicken.nei.config.OptionToggleButtonBoubs;
|
||||
import codechicken.nei.config.OptionUtilities;
|
||||
import codechicken.nei.recipe.RecipeInfo;
|
||||
import codechicken.obfuscator.ObfuscationRun;
|
||||
@@ -123,7 +124,12 @@ public class NEIClientConfig
|
||||
API.addOption(new OptionTextField("command.rain"));
|
||||
tag.getTag("command.heal").setDefaultValue("");
|
||||
API.addOption(new OptionTextField("command.heal"));
|
||||
|
||||
|
||||
tag.getTag("inventory.bookmarksEnabled").setComment("Enable/disable bookmarks").getBooleanValue(true);
|
||||
API.addOption(new OptionToggleButton("inventory.bookmarksEnabled", true));
|
||||
tag.getTag("inventory.jei_style_tabs").setComment("Enable/disable JEI Style Tabs").getBooleanValue(true);
|
||||
API.addOption(new OptionToggleButtonBoubs("inventory.jei_style_tabs", true));
|
||||
|
||||
setDefaultKeyBindings();
|
||||
}
|
||||
|
||||
@@ -167,6 +173,7 @@ public class NEIClientConfig
|
||||
API.addKeyBind("gui.hide", Keyboard.KEY_O);
|
||||
API.addKeyBind("gui.search", Keyboard.KEY_F);
|
||||
API.addKeyBind("gui.bookmark", Keyboard.KEY_A);
|
||||
API.addKeyBind("gui.hide_bookmarks", Keyboard.KEY_B);
|
||||
API.addKeyBind("world.chunkoverlay", Keyboard.KEY_F9);
|
||||
API.addKeyBind("world.moboverlay", Keyboard.KEY_F7);
|
||||
API.addKeyBind("world.highlight_tips", Keyboard.KEY_NUMPAD0);
|
||||
@@ -281,7 +288,12 @@ public class NEIClientConfig
|
||||
public static boolean isHidden() {
|
||||
return !enabledOverride || getBooleanSetting("inventory.hidden");
|
||||
}
|
||||
|
||||
public static boolean isBookmarkPanelHidden() {
|
||||
return !getBooleanSetting("inventory.bookmarksEnabled");
|
||||
}
|
||||
public static boolean areJEIStyleTabsVisible() {
|
||||
return getBooleanSetting("inventory.jei_style_tabs");
|
||||
}
|
||||
public static boolean isEnabled() {
|
||||
return enabledOverride && getBooleanSetting("inventory.widgetsenabled");
|
||||
}
|
||||
@@ -433,4 +445,5 @@ public class NEIClientConfig
|
||||
if (file.isDirectory() && !saveFileNames.contains(file.getName()))
|
||||
ObfuscationRun.deleteDir(file, true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import codechicken.core.CommonUtils;
|
||||
import codechicken.core.launch.CodeChickenCorePlugin;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
import codechicken.nei.asm.NEICorePlugin;
|
||||
import codechicken.nei.recipe.GuiRecipeTab;
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import cpw.mods.fml.client.FMLFileResourcePack;
|
||||
@@ -14,6 +15,7 @@ import cpw.mods.fml.common.MetadataCollection;
|
||||
import cpw.mods.fml.common.ModMetadata;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.versioning.ArtifactVersion;
|
||||
import cpw.mods.fml.common.versioning.VersionParser;
|
||||
import cpw.mods.fml.common.versioning.VersionRange;
|
||||
@@ -91,7 +93,11 @@ public class NEIModContainer extends DummyModContainer
|
||||
|
||||
ServerHandler.load();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
if (CommonUtils.isClient())
|
||||
GuiRecipeTab.initStackMap();
|
||||
}
|
||||
@Override
|
||||
public VersionRange acceptableMinecraftVersionRange() {
|
||||
return VersionParser.parseRange(CodeChickenCorePlugin.mcVersion);
|
||||
|
||||
@@ -10,6 +10,7 @@ import codechicken.nei.ItemStackSet;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.PopupInputHandler;
|
||||
import codechicken.nei.config.ArrayDumper;
|
||||
import codechicken.nei.config.HandlerDumper;
|
||||
import codechicken.nei.config.ItemPanelDumper;
|
||||
import codechicken.nei.config.RegistryDumper;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
@@ -261,6 +262,7 @@ public class ItemInfo
|
||||
}
|
||||
});
|
||||
API.addOption(new ItemPanelDumper("tools.dump.itempanel"));
|
||||
API.addOption(new HandlerDumper("tools.dump.handlers"));
|
||||
}
|
||||
|
||||
private static void parseModItems() {
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
package codechicken.nei.config;
|
||||
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.recipe.GuiRecipeTab;
|
||||
import codechicken.nei.recipe.GuiUsageRecipe;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import codechicken.nei.util.NBTJson;
|
||||
import com.google.common.base.Objects;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.JsonToNBT;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.LinkedList;
|
||||
|
||||
public class HandlerDumper extends DataDumper
|
||||
{
|
||||
public HandlerDumper(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] header() {
|
||||
return new String[]{"Handler Recipe Name", "Handler Class", "Overlay Identifier", "Mod DisplayName", "ItemStack"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<String[]> dump(int mode) {
|
||||
LinkedList<String[]> list = new LinkedList<>();
|
||||
for (IRecipeHandler handler : GuiUsageRecipe.usagehandlers) {
|
||||
final String handlerName = handler.toString().split("@")[0];
|
||||
final String handlerId = Objects.firstNonNull(handler instanceof TemplateRecipeHandler ? ((TemplateRecipeHandler)handler).getOverlayIdentifier() : null, "null");
|
||||
Pair<String, ItemStack> stackMapEntry = GuiRecipeTab.lookupStackMap(handlerName, handlerId);
|
||||
|
||||
list.add(new String[] {
|
||||
handler.getRecipeName(),
|
||||
handlerName,
|
||||
handlerId,
|
||||
stackMapEntry != null ? stackMapEntry.getLeft() : "Unknown",
|
||||
stackMapEntry != null ? stackMapEntry.getRight().toString() : "Unknown"
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String renderName() {
|
||||
return translateN(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileExtension() {
|
||||
switch(getMode()) {
|
||||
case 0: return ".csv";
|
||||
case 1: return ".json";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChatComponentTranslation dumpMessage(File file) {
|
||||
return new ChatComponentTranslation(namespaced(name + ".dumped"), "dumps/" + file.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modeButtonText() {
|
||||
return translateN(name + ".mode." + getMode());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void dumpTo(File file) throws IOException {
|
||||
if (getMode() == 0)
|
||||
super.dumpTo(file);
|
||||
else
|
||||
dumpJson(file);
|
||||
}
|
||||
|
||||
public void dumpJson(File file) throws IOException {
|
||||
final String[] header = header();
|
||||
final FileWriter writer;
|
||||
try {
|
||||
writer = new FileWriter(file);
|
||||
for (String[] list : dump(getMode())) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
for (int i = 0; i < header.length; i++) {
|
||||
tag.setString(header[i], list[i]);
|
||||
}
|
||||
IOUtils.write(NBTJson.toJson(tag) + "\n", writer);
|
||||
}
|
||||
writer.close();
|
||||
} catch (IOException e) {
|
||||
NEIClientConfig.logger.error("Filed to save dump handler list to file {}", file, e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int modeCount() {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package codechicken.nei.config;
|
||||
|
||||
import codechicken.lib.render.CCRenderState;
|
||||
import codechicken.nei.Image;
|
||||
import codechicken.nei.LayoutManager;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import static codechicken.lib.gui.GuiDraw.changeTexture;
|
||||
import static codechicken.lib.gui.GuiDraw.drawStringC;
|
||||
import static codechicken.lib.gui.GuiDraw.drawTexturedModalRect;
|
||||
|
||||
public class OptionToggleButtonBoubs extends OptionButton
|
||||
{
|
||||
public final boolean prefixed;
|
||||
|
||||
public OptionToggleButtonBoubs(String name, boolean prefixed) {
|
||||
super(name);
|
||||
this.prefixed = prefixed;
|
||||
}
|
||||
|
||||
public OptionToggleButtonBoubs(String name) {
|
||||
this(name, false);
|
||||
}
|
||||
|
||||
public boolean state() {
|
||||
return renderTag().getBooleanValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton(int mx, int my) {
|
||||
Rectangle b = buttonSize();
|
||||
LayoutManager.drawButtonBackground(b.x, b.y, b.width, b.height, true, getButtonTex(mx, my));
|
||||
if(state()) {
|
||||
changeTexture("nei:textures/nei_sprites.png");
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
Image image = new Image(48, 52, 24, 24);
|
||||
// drawTexturedModalRect(x, y, image.x, image.y, image.width, image.height);
|
||||
drawTexturedModalRect(b.x + (b.width/2) - (image.width/2), b.y, image.x, image.y, image.width, image.height);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
}else {
|
||||
drawStringC(getButtonText(), b.x, b.y, b.width, b.height, getTextColour(mx, my));
|
||||
}
|
||||
}
|
||||
|
||||
public String getButtonText() {
|
||||
return translateN(name + (state() ? ".true" : ".false"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefix() {
|
||||
return prefixed ? translateN(name) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClick(int button) {
|
||||
getTag().setBooleanValue(!state());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,12 @@ import codechicken.nei.LayoutManager;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.NEIClientUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.VisiblityData;
|
||||
import codechicken.nei.api.IGuiContainerOverlay;
|
||||
import codechicken.nei.api.INEIGuiHandler;
|
||||
import codechicken.nei.api.IOverlayHandler;
|
||||
import codechicken.nei.api.IRecipeOverlayRenderer;
|
||||
import codechicken.nei.api.TaggedInventoryArea;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import codechicken.nei.guihook.IContainerTooltipHandler;
|
||||
import codechicken.nei.guihook.IGuiClientSide;
|
||||
@@ -17,6 +20,8 @@ import codechicken.nei.guihook.IGuiHandleMouseWheel;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@@ -25,9 +30,11 @@ import org.lwjgl.opengl.GL11;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOverlay, IGuiClientSide, IGuiHandleMouseWheel, IContainerTooltipHandler
|
||||
public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOverlay, IGuiClientSide, IGuiHandleMouseWheel, IContainerTooltipHandler, INEIGuiHandler
|
||||
{
|
||||
public ArrayList<? extends IRecipeHandler> currenthandlers = new ArrayList<>();
|
||||
|
||||
@@ -40,9 +47,12 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
public GuiButton prevpage;
|
||||
public GuiButton overlay1;
|
||||
public GuiButton overlay2;
|
||||
private final Rectangle area = new Rectangle();
|
||||
private final GuiRecipeTabs recipeTabs;
|
||||
|
||||
protected GuiRecipe(GuiScreen prevgui) {
|
||||
super(new ContainerRecipe());
|
||||
recipeTabs = new GuiRecipeTabs(this);
|
||||
slotcontainer = (ContainerRecipe) inventorySlots;
|
||||
|
||||
this.prevGui = prevgui;
|
||||
@@ -51,33 +61,32 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
|
||||
if (prevgui instanceof IGuiContainerOverlay)
|
||||
this.firstGui = ((IGuiContainerOverlay) prevgui).getFirstScreen();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
currenthandlers = getCurrentRecipeHandlers();
|
||||
currenthandlers = getCurrentRecipeHandlers(); // Probably don't comment me out
|
||||
GuiButton nexttype = new GuiNEIButton(0, width / 2 - 70, (height - ySize) / 2 + 3, 13, 12, "<");
|
||||
GuiButton prevtype = new GuiNEIButton(1, width / 2 + 57, (height - ySize) / 2 + 3, 13, 12, ">");
|
||||
nextpage = new GuiNEIButton(2, width / 2 - 70, (height + ySize) / 2 - 18, 13, 12, "<");
|
||||
prevpage = new GuiNEIButton(3, width / 2 + 57, (height + ySize) / 2 - 18, 13, 12, ">");
|
||||
overlay1 = new GuiNEIButton(4, width / 2 + 65, (height - ySize) / 2 + 63, 13, 12, "?");
|
||||
overlay2 = new GuiNEIButton(5, width / 2 + 65, (height - ySize) / 2 + 128, 13, 12, "?");
|
||||
buttonList.add(nexttype);
|
||||
buttonList.add(prevtype);
|
||||
buttonList.add(nextpage);
|
||||
buttonList.add(prevpage);
|
||||
buttonList.add(overlay1);
|
||||
buttonList.add(overlay2);
|
||||
|
||||
buttonList.addAll(Arrays.asList(nexttype, prevtype, nextpage, prevpage, overlay1, overlay2));
|
||||
|
||||
if (currenthandlers.size() == 1) {
|
||||
nexttype.visible = false;
|
||||
prevtype.visible = false;
|
||||
}
|
||||
recipeTabs.initLayout();
|
||||
refreshPage();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void keyTyped(char c, int i) {
|
||||
if (i == Keyboard.KEY_ESCAPE) //esc
|
||||
@@ -109,13 +118,14 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int par1, int par2, int par3) {
|
||||
protected void mouseClicked(int x, int y, int button) {
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
for (int recipe = page * recipehandler.recipiesPerPage(); recipe < recipehandler.numRecipes() && recipe < (page + 1) * recipehandler.recipiesPerPage(); recipe++)
|
||||
if (recipehandler.mouseClicked(this, par3, recipe))
|
||||
if (recipehandler.mouseClicked(this, button, recipe))
|
||||
return;
|
||||
|
||||
super.mouseClicked(par1, par2, par3);
|
||||
if (recipeTabs.mouseClicked(x, y, button))
|
||||
return;
|
||||
super.mouseClicked(x, y, button);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -155,7 +165,7 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
for (int i = page * recipehandler.recipiesPerPage(); i < recipehandler.numRecipes() && i < (page + 1) * recipehandler.recipiesPerPage(); i++)
|
||||
currenttip = recipehandler.handleTooltip(this, currenttip, i);
|
||||
|
||||
recipeTabs.handleTooltip(mousex, mousey, currenttip);
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@@ -190,6 +200,7 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
if (recipetype >= currenthandlers.size())
|
||||
recipetype = 0;
|
||||
page = 0;
|
||||
recipeTabs.calcPageNumber();
|
||||
}
|
||||
|
||||
private void prevType() {
|
||||
@@ -197,6 +208,7 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
if (recipetype < 0)
|
||||
recipetype = currenthandlers.size() - 1;
|
||||
page = 0;
|
||||
recipeTabs.calcPageNumber();
|
||||
}
|
||||
|
||||
private void overlayRecipe(int recipe) {
|
||||
@@ -215,8 +227,19 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
|
||||
public void refreshPage() {
|
||||
refreshSlots();
|
||||
|
||||
IRecipeHandler handler = currenthandlers.get(recipetype);
|
||||
area.width = xSize;
|
||||
area.height = ySize;
|
||||
area.x = guiLeft - 2;
|
||||
area.y = guiTop - 4;
|
||||
|
||||
final boolean avarita = handler.getClass().toString().contains("fox.spiteful.avaritia.compat.nei.");
|
||||
if (avarita) {
|
||||
area.width = 256;
|
||||
area.height = 208;
|
||||
}
|
||||
|
||||
|
||||
boolean multiplepages = handler.numRecipes() > handler.recipiesPerPage();
|
||||
nextpage.visible = multiplepages;
|
||||
prevpage.visible = multiplepages;
|
||||
@@ -229,6 +252,8 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
} else {
|
||||
overlay1.visible = overlay2.visible = false;
|
||||
}
|
||||
|
||||
recipeTabs.refreshPage();
|
||||
}
|
||||
|
||||
private void refreshSlots() {
|
||||
@@ -252,7 +277,7 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
GuiContainerManager.enable2DRender();
|
||||
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
@@ -271,13 +296,20 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int mx, int my) {
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
CCRenderState.changeTexture("nei:textures/gui/recipebg.png");
|
||||
int j = (width - xSize) / 2;
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
|
||||
|
||||
if (NEIClientConfig.areJEIStyleTabsVisible()) {
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240f, 240f);
|
||||
recipeTabs.draw(mouseX, mouseY);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(j + 5, k + 16, 0);
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
@@ -308,12 +340,41 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
@Override
|
||||
public void mouseScrolled(int i) {
|
||||
if (new Rectangle(guiLeft, guiTop, xSize, ySize).contains(GuiDraw.getMousePosition())) {
|
||||
if (i > 0)
|
||||
prevPage();
|
||||
else
|
||||
nextPage();
|
||||
if (i > 0) prevPage();
|
||||
else nextPage();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract ArrayList<? extends IRecipeHandler> getCurrentRecipeHandlers();
|
||||
|
||||
@Override
|
||||
public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility)
|
||||
{
|
||||
return currentVisibility;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Integer> getItemSpawnSlots(GuiContainer gui, ItemStack item) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<TaggedInventoryArea> getInventoryAreas(GuiContainer gui) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
|
||||
// Because some of the handlers *cough avaritia* are oversized
|
||||
Rectangle rect = new Rectangle(area);
|
||||
|
||||
return rect.contains(x, y, w, h);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,563 @@
|
||||
package codechicken.nei.recipe;
|
||||
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.Button;
|
||||
import codechicken.nei.Image;
|
||||
import codechicken.nei.LayoutManager;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class GuiRecipeTab extends Button {
|
||||
public static HashMap<String, ImmutablePair<String, Image>> iconMap = new HashMap<>();
|
||||
public static HashMap<String, ImmutablePair<String, ItemStack>> stackMap = new HashMap<>();
|
||||
|
||||
public static final int TAB_WIDTH = 24;
|
||||
public static final int TAB_HEIGHT = 24;
|
||||
private static final Image selectedIcon = new Image(0, 52, 24, 24);
|
||||
private static final Image unselectedIcon = new Image(24, 52, 24, 24);
|
||||
|
||||
private final GuiRecipe guiRecipe;
|
||||
private final IRecipeHandler handler;
|
||||
private final String handlerName;
|
||||
private final String handlerID;
|
||||
|
||||
public GuiRecipeTab(GuiRecipe guiRecipe, IRecipeHandler handler, int x, int y) {
|
||||
super();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.w = TAB_WIDTH;
|
||||
this.h = TAB_HEIGHT;
|
||||
this.handler = handler;
|
||||
this.handlerName = handler.toString().split("@")[0];
|
||||
this.guiRecipe = guiRecipe;
|
||||
|
||||
if(handler instanceof TemplateRecipeHandler) {
|
||||
handlerID = (((TemplateRecipeHandler)handler).getOverlayIdentifier());
|
||||
} else {
|
||||
handlerID = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void draw(boolean selected, int mouseX, int mouseY) {
|
||||
drawTab(selected, mouseX, mouseY);
|
||||
drawTabIcon(selected, mouseX, mouseY);
|
||||
}
|
||||
|
||||
public void drawTab(boolean selected, int mouseX, int mouseY) {
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
|
||||
if (selected) icon = selectedIcon;
|
||||
else icon = unselectedIcon;
|
||||
|
||||
final int iconX = x + (w - icon.width) / 2;
|
||||
final int iconY = y + (h - icon.height) / 2;
|
||||
LayoutManager.drawIcon(iconX, iconY, icon);
|
||||
|
||||
}
|
||||
|
||||
public void drawTabIcon(boolean selected, int mouseX, int mouseY) {
|
||||
final int iconX = x + 4;
|
||||
final int iconY = y + 4;
|
||||
|
||||
final FontRenderer fontRenderer = GuiDraw.fontRenderer;
|
||||
final Image icon = getIcon(handlerName);
|
||||
|
||||
final ItemStack itemStack = getItemStack(handlerName, handlerID);
|
||||
|
||||
|
||||
if (icon != null) {
|
||||
LayoutManager.drawIcon(iconX + 1, iconY + 1, icon);
|
||||
} else if (itemStack != null) {
|
||||
GuiContainerManager.drawItems.zLevel += 100;
|
||||
GuiContainerManager.drawItem(iconX, iconY, itemStack);
|
||||
GuiContainerManager.drawItems.zLevel -= 100;
|
||||
} else {
|
||||
// Text fallback
|
||||
String text = handler.getRecipeName().substring(0, 2);
|
||||
int textCenterX = x + (int) (TAB_WIDTH / 2f);
|
||||
int textCenterY = y + (int) (TAB_HEIGHT / 2f) - 3;
|
||||
int color = selected ? 16777120 : 14737632;
|
||||
fontRenderer.drawStringWithShadow(text, textCenterX - (int) (fontRenderer.getStringWidth(text) / 2f), textCenterY, color);
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTooltips(List<String> tooltip) {
|
||||
tooltip.add(handler.getRecipeName().trim());
|
||||
|
||||
String handlerMod = getHandlerMod(handlerName, handlerID);
|
||||
tooltip.add(EnumChatFormatting.BLUE + handlerMod);
|
||||
|
||||
if (handlerMod.equals("Unknown")) {
|
||||
tooltip.add("");
|
||||
tooltip.add("HandlerName: " + handlerName);
|
||||
tooltip.add("HandlerID: " + handlerID);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onButtonPress(boolean rightclick) {
|
||||
int newIdx = guiRecipe.currenthandlers.indexOf(handler);
|
||||
if (newIdx == -1)
|
||||
return false;
|
||||
|
||||
guiRecipe.recipetype = newIdx;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isSelected(IRecipeHandler current) {
|
||||
return handler == current;
|
||||
}
|
||||
|
||||
public static Pair<String, ItemStack> lookupStackMap(String name, String name2) {
|
||||
Pair<String, ItemStack> res = stackMap.get(name);
|
||||
if (res == null) res = stackMap.get(name2);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public static String getHandlerMod(String name, String name2) {
|
||||
Pair<String, ItemStack> stackRes = lookupStackMap(name, name2);
|
||||
if (stackRes != null)
|
||||
return stackRes.getLeft();
|
||||
|
||||
Pair<String, Image> iconRes = iconMap.get(name);
|
||||
if (iconRes != null)
|
||||
return iconRes.getLeft();
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
private ItemStack getItemStack(String handlerName, String handlerID) {
|
||||
Pair<String, ItemStack> lookup = lookupStackMap(handlerName, handlerID);
|
||||
if (lookup != null)
|
||||
return lookup.getRight();
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Image getIcon(String id) {
|
||||
Pair<String, Image> res = iconMap.get(id);
|
||||
if (res != null)
|
||||
return res.getRight();
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void initStackMap() {
|
||||
System.out.println("InitStackMap() --------");
|
||||
// Vanilla
|
||||
addToStackMap("codechicken.nei.recipe.BrewingRecipeHandler", "minecraft", "minecraft:brewing_stand");
|
||||
addToStackMap("codechicken.nei.recipe.FireworkRecipeHandler", "minecraft", "minecraft:fireworks");
|
||||
addToStackMap("codechicken.nei.recipe.FurnaceRecipeHandler", "minecraft", "minecraft:furnace");
|
||||
addToStackMap("codechicken.nei.recipe.ShapedRecipeHandler", "minecraft", "minecraft:crafting_table");
|
||||
addToStackMap("codechicken.nei.recipe.ShapelessRecipeHandler", "minecraft", "minecraft:crafting_table");
|
||||
addToIconMap("codechicken.nei.recipe.FuelRecipeHandler", "minecraft", new Image(80, 36, 14, 14));
|
||||
|
||||
// IC2
|
||||
if (Loader.isModLoaded("IC2")) {
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.AdvRecipeHandler", "IC2", "IC2:blockreactorvessel");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.AdvShapelessRecipeHandler", "IC2", "IC2:blockreactorvessel");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.BlastFurnaceRecipeHandler", "IC2", "IC2:blockMachine3:1");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.BlockCutterRecipeHandler", "IC2", "IC2:blockMachine3:2");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.CentrifugeRecipeHandler", "IC2", "IC2:blockMachine2:3");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.CompressorRecipeHandler", "IC2", "IC2:blockMachine:5");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.ExtractorRecipeHandler", "IC2", "IC2:blockMachine:4");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.FluidCannerRecipeHandler", "IC2", "IC2:blockMachine:6");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.LatheRecipeHandler", "IC2", "IC2:blockMachine3:8");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.MaceratorRecipeHandler", "IC2", "IC2:blockMachine:3");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.MetalFormerRecipeHandlerCutting", "IC2", "IC2:blockMachine2:4");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.MetalFormerRecipeHandlerExtruding", "IC2", "IC2:blockMachine2:4");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.MetalFormerRecipeHandlerRolling", "IC2", "IC2:blockMachine2:4");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.OreWashingRecipeHandler", "IC2", "IC2:blockMachine2:5");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.ScrapboxRecipeHandler", "IC2", "IC2:itemScrapbox");
|
||||
addToStackMap("ic2.neiIntegration.core.recipehandler.SolidCannerRecipeHandler", "IC2", "IC2:blockMachine2:9");
|
||||
}
|
||||
|
||||
// Gregtech 5u
|
||||
if (!Loader.isModLoaded("gregapi_post") && Loader.isModLoaded("gregtech")) {
|
||||
addToStackMap("gt.recipe.alloyblastsmelter", "gregtech", "gregtech:gt.blockmachines:810"); // gt.blockmachines.industrialsalloyamelter.controller.tier.single
|
||||
addToStackMap("gt.recipe.alloysmelter", "gregtech", "gregtech:gt.blockmachines:201"); // gt.blockmachines.basicmachine.alloysmelter.tier.01
|
||||
addToStackMap("gt.recipe.arcfurnace", "gregtech", "gregtech:gt.blockmachines:651"); // gt.blockmachines.basicmachine.arcfurnace.tier.01
|
||||
addToStackMap("gt.recipe.assembler", "gregtech", "gregtech:gt.blockmachines:211"); // gt.blockmachines.basicmachine.assembler.tier.01
|
||||
addToStackMap("gt.recipe.autoclave", "gregtech", "gregtech:gt.blockmachines:571"); // gt.blockmachines.basicmachine.autoclave.tier.01
|
||||
addToStackMap("gt.recipe.blastfurnace", "gregtech", "gregtech:gt.blockmachines:1000"); // gt.blockmachines.multimachine.blastfurnace
|
||||
addToStackMap("gt.recipe.brewer", "gregtech", "gregtech:gt.blockmachines:491"); // gt.blockmachines.basicmachine.brewery.tier.01
|
||||
addToStackMap("gt.recipe.canner", "gregtech", "gregtech:gt.blockmachines:231"); // gt.blockmachines.basicmachine.canner.tier.01
|
||||
addToStackMap("gt.recipe.centrifuge", "gregtech", "gregtech:gt.blockmachines:361"); // gt.blockmachines.basicmachine.centrifuge.tier.01
|
||||
addToStackMap("gt.recipe.chemicalbath", "gregtech", "gregtech:gt.blockmachines:541"); // gt.blockmachines.basicmachine.chemicalbath.tier.01
|
||||
addToStackMap("gt.recipe.chemicaldehydrator", "gregtech", "gregtech:gt.blockmachines:912"); // gt.blockmachines.machine.dehydrator.tier.01
|
||||
addToStackMap("gt.recipe.chemicalreactor", "gregtech", "gregtech:gt.blockmachines:421"); // gt.blockmachines.basicmachine.chemicalreactor.tier.01
|
||||
addToStackMap("gt.recipe.circuitassembler", "gregtech", "gregtech:gt.blockmachines:1180"); // gt.blockmachines.basicmachine.circuitassembler.tier.01
|
||||
addToStackMap("gt.recipe.cokeoven", "gregtech", "gregtech:gt.blockmachines:791"); // gt.blockmachines.industrialcokeoven.controller.tier.single
|
||||
addToStackMap("gt.recipe.compressor", "gregtech", "gregtech:gt.blockmachines:241"); // gt.blockmachines.basicmachine.compressor.tier.01
|
||||
addToStackMap("gt.recipe.craker", "gregtech", "gregtech:gt.blockmachines:1160"); // gt.blockmachines.multimachine.cracker
|
||||
addToStackMap("gt.recipe.cuttingsaw", "gregtech", "gregtech:gt.blockmachines:251"); // gt.blockmachines.basicmachine.cutter.tier.01
|
||||
addToStackMap("gt.recipe.cyclotron", "gregtech", "gregtech:gt.blockmachines:828"); // gt.blockmachines.cyclotron.tier.single
|
||||
addToStackMap("gt.recipe.dieselgeneratorfuel", "gregtech", "gregtech:gt.blockmachines:793"); // gt.blockmachines.advancedgenerator.rocketfuel.tier.01
|
||||
addToStackMap("gt.recipe.distillationtower", "gregtech", "gregtech:gt.blockmachines:1126"); // gt.blockmachines.multimachine.distillationtower
|
||||
addToStackMap("gt.recipe.distillery", "gregtech", "gregtech:gt.blockmachines:531"); // gt.blockmachines.basicmachine.distillery.tier.01
|
||||
addToStackMap("gt.recipe.electricimplosioncompressor", "gregtech", "gregtech:gt.blockmachines:12734"); // gt.blockmachines.electricimplosioncompressor
|
||||
addToStackMap("gt.recipe.electrolyzer", "gregtech", "gregtech:gt.blockmachines:371"); // gt.blockmachines.basicmachine.electrolyzer.tier.01
|
||||
addToStackMap("gt.recipe.electromagneticseparator", "gregtech", "gregtech:gt.blockmachines:561"); // gt.blockmachines.basicmachine.electromagneticseparator.tier.01
|
||||
addToStackMap("gt.recipe.extractor", "gregtech", "gregtech:gt.blockmachines:271"); // gt.blockmachines.basicmachine.extractor.tier.01
|
||||
addToStackMap("gt.recipe.extruder", "gregtech", "gregtech:gt.blockmachines:281"); // gt.blockmachines.basicmachine.extruder.tier.01
|
||||
addToStackMap("gt.recipe.fakeAssemblylineProcess", "gregtech", "gregtech:gt.blockmachines:1170"); // gt.blockmachines.multimachine.assemblyline
|
||||
addToStackMap("gt.recipe.fermenter", "gregtech", "gregtech:gt.blockmachines:501"); // gt.blockmachines.basicmachine.fermenter.tier.01
|
||||
addToStackMap("gt.recipe.fishpond", "gregtech", "gregtech:gt.blockmachines:829"); // gt.blockmachines.industrial.fishpond.controller.tier.single
|
||||
addToStackMap("gt.recipe.fluidcanner", "gregtech", "gregtech:gt.blockmachines:431"); // gt.blockmachines.basicmachine.fluidcanner.tier.01
|
||||
addToStackMap("gt.recipe.fluidextractor", "gregtech", "gregtech:gt.blockmachines:511"); // gt.blockmachines.basicmachine.fluidextractor.tier.01
|
||||
addToStackMap("gt.recipe.fluidheater", "gregtech", "gregtech:gt.blockmachines:621"); // gt.blockmachines.basicmachine.fluidheater.tier.01
|
||||
addToStackMap("gt.recipe.fluidsolidifier", "gregtech", "gregtech:gt.blockmachines:521"); // gt.blockmachines.basicmachine.fluidsolidifier.tier.01
|
||||
addToStackMap("gt.recipe.fusionreactor", "gregtech", "gregtech:gt.blockmachines:1193"); // gt.blockmachines.fusioncomputer.tier.06
|
||||
addToStackMap("gt.recipe.gasturbinefuel", "gregtech", "gregtech:gt.blockmachines:961"); // gt.blockmachines.basicgenerator.gas.tier.00
|
||||
addToStackMap("gt.recipe.geothermalfuel", "gregtech", "gregtech:gt.blockmachines:830"); // gt.blockmachines.advancedgenerator.geothermalfuel.tier.01
|
||||
addToStackMap("gt.recipe.hammer", "gregtech", "gregtech:gt.blockmachines:611"); // gt.blockmachines.basicmachine.hammer.tier.01
|
||||
addToStackMap("gt.recipe.implosioncompressor", "gregtech", "gregtech:gt.blockmachines:12734"); // gt.blockmachines.electricimplosioncompressor
|
||||
addToStackMap("gt.recipe.largeboilerfakefuels", "gregtech", "gregtech:gt.blockmachines:1020"); // gt.blockmachines.multimachine.boiler.bronze
|
||||
addToStackMap("gt.recipe.largechemicalreactor", "gregtech", "gregtech:gt.blockmachines:1169"); // gt.blockmachines.multimachine.chemicalreactor
|
||||
addToStackMap("gt.recipe.laserengraver", "gregtech", "gregtech:gt.blockmachines:591"); // gt.blockmachines.basicmachine.laserengraver.tier.01
|
||||
addToStackMap("gt.recipe.lathe", "gregtech", "gregtech:gt.blockmachines:291"); // gt.blockmachines.basicmachine.lathe.tier.01
|
||||
addToStackMap("gt.recipe.macerator", "gregtech", "gregtech:gt.blockmachines:301"); // gt.blockmachines.basicmachine.macerator.tier.01
|
||||
addToStackMap("gt.recipe.magicfuels", "gregtech", "gregtech:gt.blockmachines:1123"); // gt.blockmachines.basicgenerator.magicenergyconverter.tier.01
|
||||
addToStackMap("gt.recipe.massfab", "gregtech", "gregtech:gt.blockmachines:461"); // gt.blockmachines.basicmachine.massfab.tier.01
|
||||
addToStackMap("gt.recipe.metalbender", "gregtech", "gregtech:gt.blockmachines:221"); // gt.blockmachines.basicmachine.bender.tier.01
|
||||
addToStackMap("gt.recipe.microwave", "gregtech", "gregtech:gt.blockmachines:311"); // gt.blockmachines.basicmachine.microwave.tier.01
|
||||
addToStackMap("gt.recipe.mixer", "gregtech", "gregtech:gt.blockmachines:581"); // gt.blockmachines.basicmachine.mixer.tier.01
|
||||
addToStackMap("gt.recipe.orewasher", "gregtech", "gregtech:gt.blockmachines:391"); // gt.blockmachines.basicmachine.orewasher.tier.01
|
||||
addToStackMap("gt.recipe.packager", "gregtech", "gregtech:gt.blockmachines:401"); // gt.blockmachines.basicmachine.boxinator.tier.01
|
||||
addToStackMap("gt.recipe.plasmaarcfurnace", "gregtech", "gregtech:gt.blockmachines:661"); // gt.blockmachines.basicmachine.plasmaarcfurnace.tier.01
|
||||
addToStackMap("gt.recipe.plasmageneratorfuels", "gregtech", "gregtech:gt.blockmachines:1196"); // gt.blockmachines.basicgenerator.plasmagenerator.tier.05
|
||||
addToStackMap("gt.recipe.polarizer", "gregtech", "gregtech:gt.blockmachines:551"); // gt.blockmachines.basicmachine.polarizer.tier.01
|
||||
addToStackMap("gt.recipe.press", "gregtech", "gregtech:gt.blockmachines:601"); // gt.blockmachines.basicmachine.press.tier.01
|
||||
addToStackMap("gt.recipe.primitiveblastfurnace", "gregtech", "gregtech:gt.blockmachines:140"); // gt.blockmachines.multimachine.brickedblastfurnace
|
||||
addToStackMap("gt.recipe.printer", "gregtech", "gregtech:gt.blockmachines:321"); // gt.blockmachines.basicmachine.printer.tier.01
|
||||
addToStackMap("gt.recipe.pyro", "gregtech", "gregtech:gt.blockmachines:1159"); // gt.blockmachines.multimachine.pyro
|
||||
addToStackMap("gt.recipe.replicator", "gregtech", "gregtech:gt.blockmachines:481"); // gt.blockmachines.basicmachine.replicator.tier.01
|
||||
addToStackMap("gt.recipe.rockbreaker", "gregtech", "gregtech:gt.blockmachines:441"); // gt.blockmachines.basicmachine.rockbreaker.tier.01
|
||||
addToStackMap("gt.recipe.scanner", "gregtech", "gregtech:gt.blockmachines:341"); // gt.blockmachines.basicmachine.scanner.tier.01
|
||||
addToStackMap("gt.recipe.semifluidboilerfuels", "gregtech", "gregtech:gt.blockmachines:837"); // gt.blockmachines.basicgenerator.semifluid.tier.01
|
||||
addToStackMap("gt.recipe.semifluidgeneratorfuels", "gregtech", "gregtech:gt.blockmachines:837"); // gt.blockmachines.basicgenerator.semifluid.tier.01
|
||||
addToStackMap("gt.recipe.sifter", "gregtech", "gregtech:gt.blockmachines:641"); // gt.blockmachines.basicmachine.sifter.tier.01
|
||||
addToStackMap("gt.recipe.slicer", "gregtech", "gregtech:gt.blockmachines:631"); // gt.blockmachines.basicmachine.slicer.tier.01
|
||||
addToStackMap("gt.recipe.slowfusionreactor", "gregtech", "gregtech:gt.blockmachines:31015"); // gt.blockmachines.gtplusplus.fusion.single
|
||||
addToStackMap("gt.recipe.smallnaquadahreactor", "gregtech", "gregtech:gt.blockmachines:1188"); // gt.blockmachines.basicgenerator.naquadah.tier.07
|
||||
addToStackMap("gt.recipe.thermalcentrifuge", "gregtech", "gregtech:gt.blockmachines:381"); // gt.blockmachines.basicmachine.thermalcentrifuge.tier.01
|
||||
addToStackMap("gt.recipe.thermalgeneratorfuel", "gregtech", "gregtech:gt.blockmachines:830"); // gt.blockmachines.advancedgenerator.geothermalfuel.tier.01
|
||||
addToStackMap("gt.recipe.unpackager", "gregtech", "gregtech:gt.blockmachines:411"); // gt.blockmachines.basicmachine.unboxinator.tier.01
|
||||
addToStackMap("gt.recipe.vacuumfreezer", "gregtech", "gregtech:gt.blockmachines:1002"); // gt.blockmachines.multimachine.vacuumfreezer
|
||||
addToStackMap("gt.recipe.wiremill", "gregtech", "gregtech:gt.blockmachines:351"); // gt.blockmachines.basicmachine.wiremill.tier.01
|
||||
addToStackMap("ic.recipe.recycler", "gregtech", "gregtech:gt.blockmachines:331"); // gt.blockmachines.basicmachine.recycler.tier.01
|
||||
|
||||
// // Maybe acid generator
|
||||
// //tabItemIcon.put("null", stackDB("gt.blockmachines.acidgeneratormv"));
|
||||
//
|
||||
// // Maybe not release
|
||||
// tabItemIcon.put("gt.recipe.largenaquadahreactor", stackDB("gt.blockmachines.1nr.controller.single"));
|
||||
// tabItemIcon.put("gt.recipe.fluidnaquadahreactor", stackDB("gt.blockmachines.1nr.controller.single"));
|
||||
// tabItemIcon.put("gt.recipe.hugenaquadahreactor", stackDB("gt.blockmachines.1nr.controller.single"));
|
||||
// tabItemIcon.put("gt.recipe.extrahugenaquadahreactor", stackDB("gt.blockmachines.1nr.controller.single"));
|
||||
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("appliedenergistics2")) {
|
||||
|
||||
addToStackMap("appeng.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler", "AppliedEnergistics2","appliedenergistics2:item.ItemMultiPart:380");
|
||||
addToStackMap("appeng.integration.modules.NEIHelpers.NEIAEShapelessRecipeHandler","AppliedEnergistics2", "appliedenergistics2:item.ItemMultiPart:380");
|
||||
addToStackMap("appeng.integration.modules.NEIHelpers.NEIFacadeRecipeHandler", "AppliedEnergistics2", "appliedenergistics2:item.ItemFacade:192");
|
||||
addToStackMap("appeng.integration.modules.NEIHelpers.NEIInscriberRecipeHandler", "AppliedEnergistics2", "appliedenergistics2:tile.BlockInscriber");
|
||||
addToStackMap("appeng.integration.modules.NEIHelpers.NEIWorldCraftingHandler", "AppliedEnergistics2", "appliedenergistics2:item.ItemMultiMaterial:9");
|
||||
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("AdvancedSolarPanel")) {
|
||||
addToStackMap("advsolar.client.nei.MTRecipeHandler", "AdvancedSolarPanel", "AdvancedSolarPanel:BlockMolecularTransformer");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("WitcheryExtras")) {
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_Cauldron", "witchery", "witchery:cauldron");
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_Distillery", "witchery", "witchery:distilleryidle");
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_Kettle", "witchery", "witchery:kettle");
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_Oven", "witchery", "witchery:witchesovenidle");
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_SpinningWheel", "witchery", "witchery:spinningwheel");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("BuildCraft|Silicon")) {
|
||||
addToStackMap("buildcraft.compat.nei.RecipeHandlerAssemblyTable", "BuildCraft", "BuildCraft|Silicon:laserTableBlock");
|
||||
addToStackMap("buildcraft.compat.nei.RecipeHandlerIntegrationTable", "BuildCraft", "BuildCraft|Silicon:laserTableBlock:2");
|
||||
}
|
||||
if (Loader.isModLoaded("BuildCraft|Factory")) {
|
||||
addToStackMap("buildcraft.compat.nei.RecipeHandlerRefinery", "BuildCraft", "BuildCraft|Factory:refineryBlock");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Thaumcraft")) {
|
||||
addToStackMap("com.djgiannuzz.thaumcraftneiplugin.nei.recipehandler.ArcaneShapelessRecipeHandler", "Thaumcraft", "Thaumcraft:blockTable:15");
|
||||
addToStackMap("com.djgiannuzz.thaumcraftneiplugin.nei.recipehandler.CrucibleRecipeHandler", "Thaumcraft", "Thaumcraft:blockMetalDevice");
|
||||
addToStackMap("com.djgiannuzz.thaumcraftneiplugin.nei.recipehandler.InfusionRecipeHandler", "Thaumcraft", "Thaumcraft:blockStoneDevice:2");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("bartworks")) {
|
||||
addToStackMap("com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_BioLabHandler", "BartWorks", "gregtech:gt.blockmachines:12699");
|
||||
addToStackMap("com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_BioVatHandler", "BartWorks", "gregtech:gt.blockmachines:12712");
|
||||
addToStackMap("com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_OreHandler", "BartWorks", "bartworks:bw.blockores.01:89");
|
||||
}
|
||||
if (Loader.isModLoaded("tectech")) {
|
||||
addToStackMap("com.github.technus.tectech.nei.TT_NEI_ResearchHandler", "TecTech", "gregtech:gt.blockmachines:15331");
|
||||
addToStackMap("com.github.technus.tectech.nei.TT_NEI_ScannerHandler", "TecTech", "tectech:item.em.definitionScanStorage");
|
||||
}
|
||||
if (Loader.isModLoaded("ExtraUtilities")) {
|
||||
addToStackMap("com.rwtema.extrautils.nei.EnderConstructorHandler", "ExtraUtilities", "ExtraUtilities:endConstructor");
|
||||
addToStackMap("com.rwtema.extrautils.nei.FMPMicroBlocksHandler", "ExtraUtilities", "ForgeMicroblock:sawIron");
|
||||
addToStackMap("com.rwtema.extrautils.nei.InfoHandler", "ExtraUtilities", "ExtraUtilities:chandelier");
|
||||
addToStackMap("com.rwtema.extrautils.nei.MicroBlocksHandler", "ExtraUtilities", "ExtraUtilities:microblocks:1");
|
||||
addToStackMap("com.rwtema.extrautils.nei.SoulHandler", "ExtraUtilities", "ExtraUtilities:mini-soul");
|
||||
}
|
||||
if (Loader.isModLoaded("EnderIO")) {
|
||||
addToStackMap("crazypants.enderio.nei.AlloySmelterRecipeHandler", "EnderIO", "EnderIO:blockAlloySmelter");
|
||||
addToStackMap("crazypants.enderio.nei.EnchanterRecipeHandler", "EnderIO", "EnderIO:blockEnchanter");
|
||||
addToStackMap("crazypants.enderio.nei.SagMillRecipeHandler", "EnderIO", "EnderIO:blockSagMill");
|
||||
addToStackMap("crazypants.enderio.nei.SliceAndSpliceRecipeHandler", "EnderIO", "EnderIO:blockSliceAndSplice");
|
||||
addToStackMap("crazypants.enderio.nei.SoulBinderRecipeHandler", "EnderIO", "EnderIO:blockSoulBinder");
|
||||
addToStackMap("crazypants.enderio.nei.VatRecipeHandler", "EnderIO", "EnderIO:blockVat");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("extracells")) {
|
||||
addToStackMap("extracells.integration.nei.UniversalTerminalRecipe", "ExtraCells", "extracells:part.base:9");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Forestry")) {
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerBottler", "Forestry", "Forestry:factory");
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerCarpenter", "Forestry", "Forestry:factory:1");
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerCentrifuge", "Forestry", "Forestry:factory:2");
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerFabricator", "Forestry", "Forestry:factory2");
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerFermenter", "Forestry", "Forestry:factory:3");
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerMoistener", "Forestry", "Forestry:factory:4");
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerSqueezer", "Forestry", "Forestry:factory:5");
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerStill", "Forestry", "Forestry:factory:6");
|
||||
}
|
||||
if (Loader.isModLoaded("Avaritia")) {
|
||||
addToStackMap("fox.spiteful.avaritia.compat.nei.CompressionHandler", "Avaritia", "Avaritia:Neutronium_Compressor");
|
||||
addToStackMap("fox.spiteful.avaritia.compat.nei.ExtremeShapedRecipeHandler", "Avaritia", "Avaritia:Dire_Crafting");
|
||||
addToStackMap("fox.spiteful.avaritia.compat.nei.ExtremeShapelessRecipeHandler", "Avaritia", "Avaritia:Dire_Crafting");
|
||||
}
|
||||
|
||||
|
||||
if (Loader.isModLoaded("GalacticraftCore")) {
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT1RecipeHandler", "Galacticraft", "GalacticraftCore:item.spaceship");
|
||||
}
|
||||
if (Loader.isModLoaded("GalacticraftMars")) {
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT2RecipeHandler", "Galacticraft", "GalacticraftMars:item.spaceshipTier2:1");
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT3RecipeHandler", "Galacticraft", "GalacticraftMars:item.itemTier3Rocket");
|
||||
}
|
||||
if (Loader.isModLoaded("GalaxySpace")) {
|
||||
addToStackMap("galaxyspace.core.nei.AssemblyMachineRecipeHandler", "GalaxySpace", "GalaxySpace:assemblymachine");
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT4RecipeHandler", "GalaxySpace", "GalaxySpace:item.Tier4Rocket");
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT5RecipeHandler", "GalaxySpace", "GalaxySpace:item.Tier5Rocket");
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT6RecipeHandler", "GalaxySpace", "GalaxySpace:item.Tier6Rocket");
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT7RecipeHandler", "GalaxySpace", "GalaxySpace:item.Tier7Rocket");
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT8RecipeHandler", "GalaxySpace", "GalaxySpace:item.Tier8Rocket");
|
||||
}
|
||||
if (Loader.isModLoaded("ProjectBlue")) {
|
||||
addToStackMap("gcewing.projectblue.nei.NEIRecipeHandler", "ProjectBlue", "ProjectBlue:sprayCan");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("miscutils")) {
|
||||
addToStackMap("gtPlusPlus.nei.DecayableRecipeHandler", "GT++", "miscutils:dustRadium226");
|
||||
addToStackMap("gtPlusPlus.nei.GT_NEI_FlotationCell", "GT++", "gregtech:gt.blockmachines:31028");
|
||||
addToStackMap("gtPlusPlus.nei.GT_NEI_FluidReactor", "GT++", "gregtech:gt.blockmachines:998");
|
||||
addToStackMap("gtPlusPlus.nei.GT_NEI_MillingMachine", "GT++", "gregtech:gt.blockmachines:31027");
|
||||
addToStackMap("gt.recipe.cryogenicfreezer", "GT++", "gregtech:gt.blockmachines:910");
|
||||
addToStackMap("gt.recipe.multicentrifuge", "GT++", "gregtech:gt.blockmachines:790");
|
||||
addToStackMap("gt.recipe.multielectro", "GT++", "gregtech:gt.blockmachines:796");
|
||||
|
||||
addToStackMap("gt.recipe.fissionfuel", "GT++", "gregtech:gt.blockmachines:835");
|
||||
addToStackMap("gt.recipe.vacfurnace", "GT++", "gregtech:gt.blockmachines:995");
|
||||
addToStackMap("gt.recipe.lftr", "GT++", "gregtech:gt.blockmachines:751");
|
||||
addToStackMap("gt.recipe.advanced.mixer", "GT++", "gregtech:gt.blockmachines:811");
|
||||
addToStackMap("gt.recipe.lftr.2", "GT++", "gregtech:gt.blockmachines:751");
|
||||
addToStackMap("gt.recipe.alloyblastsmelter", "GT++", "gregtech:gt.blockmachines:810");
|
||||
|
||||
addToStackMap("gt.recipe.geothermalfuel", "GT++", "gregtech:gt.blockmachines:830");
|
||||
|
||||
addToStackMap("gt.recipe.cyclotron", "GT++", "gregtech:gt.blockmachines:828");
|
||||
addToStackMap("gt.recipe.simplewasher", "GT++", "gregtech:gt.blockmachines:767");
|
||||
addToStackMap("gt.recipe.matterfab2", "GT++", "gregtech:gt.blockmachines:799");
|
||||
addToStackMap("gt.recipe.chemicaldehydrator", "GT++", "gregtech:gt.blockmachines:813");
|
||||
addToStackMap("gt.recipe.slowfusionreactor", "GT++", "gregtech:gt.blockmachines:31015");
|
||||
addToStackMap("gt.recipe.fishpond", "GT++", "gregtech:gt.blockmachines:829");
|
||||
addToStackMap("gt.recipe.geothermalfuel", "GT++", "gregtech:gt.blockmachines:830");
|
||||
addToStackMap("gt.recipe.cokeoven", "GT++", "gregtech:gt.blockmachines:791");
|
||||
}
|
||||
if (Loader.isModLoaded("Forestry")) {
|
||||
addToStackMap("hellfirepvp.beebetteratbees.client.gui.BBABGuiRecipeTreeHandler", "Bees", "Forestry:beeQueenGE");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("RandomThings")) {
|
||||
addToStackMap("lumien.randomthings.Handler.ModCompability.NEI.ImbuingStationRecipeHandler", "RandomThings", "RandomThings:imbuingStation");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("GalacticraftCore")) {
|
||||
addToStackMap("micdoodle8.mods.galacticraft.core.nei.BuggyRecipeHandler", "Galacticraft", "GalacticraftCore:tile.rocketWorkbench");
|
||||
addToStackMap("micdoodle8.mods.galacticraft.core.nei.CircuitFabricatorRecipeHandler", "Galacticraft", "GalacticraftCore:tile.machine2:4");
|
||||
addToStackMap("micdoodle8.mods.galacticraft.core.nei.ElectricIngotCompressorRecipeHandler", "Galacticraft", "GalacticraftCore:tile.machine2");
|
||||
addToStackMap("micdoodle8.mods.galacticraft.core.nei.IngotCompressorRecipeHandler", "Galacticraft", "GalacticraftCore:tile.machine:12");
|
||||
addToStackMap("micdoodle8.mods.galacticraft.core.nei.RefineryRecipeHandler", "Galacticraft", "GalacticraftCore:tile.refinery");
|
||||
addToStackMap("micdoodle8.mods.galacticraft.planets.asteroids.nei.AstroMinerRecipeHandler", "Galacticraft", "GalacticraftCore:tile.rocketWorkbench");
|
||||
addToStackMap("micdoodle8.mods.galacticraft.planets.mars.nei.CargoRocketRecipeHandler", "Galacticraft", "GalacticraftCore:tile.rocketWorkbench");
|
||||
addToStackMap("micdoodle8.mods.galacticraft.planets.mars.nei.GasLiquefierRecipeHandler", "Galacticraft", "GalacticraftMars:tile.marsMachineT2");
|
||||
addToStackMap("micdoodle8.mods.galacticraft.planets.mars.nei.MethaneSynthesizerRecipeHandler", "Galacticraft", "GalacticraftMars:tile.marsMachineT2:4");
|
||||
}
|
||||
if (Loader.isModLoaded("ProjRed|Transmission")) {
|
||||
addToStackMap("mrtjp.projectred.core.libmc.recipe.PRShapedRecipeHandler", "ProjectRed", "ProjRed|Transmission:projectred.transmission.wire:7");
|
||||
addToStackMap("mrtjp.projectred.core.libmc.recipe.PRShapelessRecipeHandler", "ProjectRed", "ProjRed|Transmission:projectred.transmission.wire:7");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("gendustry")) {
|
||||
addToStackMap("net.bdew.gendustry.nei.ExtractorHandler", "Gendustry", "gendustry:Extractor");
|
||||
addToStackMap("net.bdew.gendustry.nei.ImprinterHandler", "Gendustry", "gendustry:Imprinter");
|
||||
addToStackMap("net.bdew.gendustry.nei.LiquifierHandler", "Gendustry", "gendustry:Liquifier");
|
||||
addToStackMap("net.bdew.gendustry.nei.MutagenProducerHandler", "Gendustry", "gendustry:MutagenProducer");
|
||||
addToStackMap("net.bdew.gendustry.nei.MutatronHandler", "Gendustry", "gendustry:Mutatron");
|
||||
addToStackMap("net.bdew.gendustry.nei.ReplicatorHandler", "Gendustry", "gendustry:Replicator");
|
||||
addToStackMap("net.bdew.gendustry.nei.SamplerHandler", "Gendustry", "gendustry:Sampler");
|
||||
addToStackMap("net.bdew.gendustry.nei.TemplateCraftingHandler", "Gendustry", "gendustry:GeneTemplate");
|
||||
addToStackMap("net.bdew.gendustry.nei.TransposerHandler", "Gendustry", "gendustry:Transposer");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Botany")) {
|
||||
addToStackMap("net.bdew.neiaddons.botany.flowers.FlowerBreedingHandler", "Botany", "Botany:flower");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Forestry")) {
|
||||
addToStackMap("net.bdew.neiaddons.forestry.bees.BeeBreedingHandler", "Forestry", "Forestry:beeQueenGE");
|
||||
addToStackMap("net.bdew.neiaddons.forestry.bees.BeeProduceHandler", "Forestry", "Forestry:beeQueenGE");
|
||||
addToStackMap("net.bdew.neiaddons.forestry.butterflies.ButterflyBreedingHandler", "Forestry", "Forestry:butterflyGE");
|
||||
addToStackMap("net.bdew.neiaddons.forestry.trees.TreeBreedingHandler", "Forestry", "Forestry:saplingGE");
|
||||
addToStackMap("net.bdew.neiaddons.forestry.trees.TreeProduceHandler", "Forestry", "Forestry:saplingGE");
|
||||
|
||||
}
|
||||
if (Loader.isModLoaded("ae2wct")) {
|
||||
addToStackMap("net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler", "WirelessCraftingTerminal", "ae2wct:wirelessCraftingTerminal");
|
||||
}
|
||||
if (Loader.isModLoaded("gregtech")) {
|
||||
addToStackMap("pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5SmallOreStat", "Gregtech", "gregtech:gt.blockores:85");
|
||||
addToStackMap("pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5VeinStat", "Gregtech", "gregtech:gt.blockores:386");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Thaumcraft")) {
|
||||
addToStackMap("ru.timeconqueror.tcneiadditions.nei.arcaneworkbench.ArcaneCraftingShapedHandler", "Thaumcraft", "Thaumcraft:blockTable:15");
|
||||
addToStackMap("ru.timeconqueror.tcneiadditions.nei.AspectCombinationHandler", "Thaumcraft", "Thaumcraft:ItemResearchNotes");
|
||||
addToStackMap("ru.timeconqueror.tcneiadditions.nei.AspectFromItemStackHandler", "Thaumcraft", "Thaumcraft:ItemResearchNotes");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("TConstruct")) {
|
||||
addToStackMap("tconstruct.plugins.nei.RecipeHandlerAlloying", "Tinker's Construct", "TConstruct:Smeltery");
|
||||
addToStackMap("tconstruct.plugins.nei.RecipeHandlerCastingBasin", "Tinker's Construct", "TConstruct:SearedBlock:2");
|
||||
addToStackMap("tconstruct.plugins.nei.RecipeHandlerCastingTable", "Tinker's Construct", "TConstruct:SearedBlock");
|
||||
addToStackMap("tconstruct.plugins.nei.RecipeHandlerDryingRack", "Tinker's Construct", "TConstruct:Armor.DryingRack");
|
||||
addToStackMap("tconstruct.plugins.nei.RecipeHandlerMelting", "Tinker's Construct", "TConstruct:LavaTank:2");
|
||||
addToStackMap("tconstruct.plugins.nei.RecipeHandlerToolMaterials", "Tinker's Construct", "TConstruct:pickaxe");
|
||||
}
|
||||
if (Loader.isModLoaded("chisel")) {
|
||||
addToStackMap("team.chisel.compat.nei.RecipeHandlerChisel", "Chisel", "chisel:chisel");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("harvestcraft")) {
|
||||
addToStackMap("tonius.neiintegration.mods.harvestcraft.RecipeHandlerApiary", "Pam's Harvestcraft", "harvestcraft:apiary");
|
||||
addToStackMap("tonius.neiintegration.mods.harvestcraft.RecipeHandlerChurn", "Pam's Harvestcraft", "harvestcraft:churn");
|
||||
addToStackMap("tonius.neiintegration.mods.harvestcraft.RecipeHandlerOven", "Pam's Harvestcraft", "harvestcraft:oven");
|
||||
addToStackMap("tonius.neiintegration.mods.harvestcraft.RecipeHandlerPresser", "Pam's Harvestcraft", "harvestcraft:presser");
|
||||
addToStackMap("tonius.neiintegration.mods.harvestcraft.RecipeHandlerQuern", "Pam's Harvestcraft", "harvestcraft:quern");
|
||||
}
|
||||
if (Loader.isModLoaded("harvestcraft")) {
|
||||
addToStackMap("tonius.neiintegration.mods.mcforge.RecipeHandlerFluidRegistry", "Minecraft", "minecraft:water");
|
||||
addToStackMap("tonius.neiintegration.mods.mcforge.RecipeHandlerOreDictionary", "Minecraft", "minecraft:iron_ore");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("GalacticraftCoRailcraftre")) {
|
||||
addToStackMap("tonius.neiintegration.mods.railcraft.RecipeHandlerBlastFurnace", "Railcraft", "Railcraft:machine.alpha:12");
|
||||
addToStackMap("tonius.neiintegration.mods.railcraft.RecipeHandlerCokeOven", "Railcraft", "Railcraft:machine.alpha:7");
|
||||
addToStackMap("tonius.neiintegration.mods.railcraft.RecipeHandlerRockCrusher", "Railcraft", "Railcraft:machine.alpha:15");
|
||||
addToStackMap("tonius.neiintegration.mods.railcraft.RecipeHandlerRollingMachineShaped", "Railcraft", "Railcraft:machine.alpha:8");
|
||||
addToStackMap("tonius.neiintegration.mods.railcraft.RecipeHandlerRollingMachineShapeless", "Railcraft", "Railcraft:machine.alpha:8");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("AWWayofTime")) {
|
||||
addToStackMap("WayofTime.alchemicalWizardry.client.nei.NEIAlchemyRecipeHandler", "BloodMagic", "AWWayofTime:blockWritingTable");
|
||||
addToStackMap("WayofTime.alchemicalWizardry.client.nei.NEIAltarRecipeHandler", "BloodMagic", "AWWayofTime:Altar");
|
||||
addToStackMap("WayofTime.alchemicalWizardry.client.nei.NEIBindingRitualHandler", "BloodMagic", "AWWayofTime:sacrificialKnife");
|
||||
addToStackMap("WayofTime.alchemicalWizardry.client.nei.NEIBloodOrbShapedHandler", "BloodMagic", "AWWayofTime:AlchemicalWizardrybloodRune:3");
|
||||
addToStackMap("WayofTime.alchemicalWizardry.client.nei.NEIBloodOrbShapelessHandler", "BloodMagic", "AWWayofTime:AlchemicalWizardrybloodRune:4");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("WitchingGadgets")) {
|
||||
addToStackMap("witchinggadgets.client.nei.NEIInfernalBlastfurnaceHandler", "WitchingGadgets", "WitchingGadgets:WG_StoneDevice:2");
|
||||
addToStackMap("witchinggadgets.client.nei.NEISpinningWheelHandler", "WitchingGadgets", "WitchingGadgets:WG_WoodenDevice");
|
||||
}
|
||||
/* Witchery */
|
||||
{
|
||||
addToStackMap("com.emoniph.witchery.integration.NEICauldronRecipeHandler", "witchery", "witchery:cauldron");
|
||||
addToStackMap("com.emoniph.witchery.integration.NEISpinningWheelRecipeHandler", "witchery", "witchery:spinningwheel");
|
||||
addToStackMap("com.emoniph.witchery.integration.NEIWitchesOvenRecipeHandler", "witchery", "witchery:witchesovenidle");
|
||||
addToStackMap("com.emoniph.witchery.integration.NEIDistilleryRecipeHandler", "witchery", "witchery:distilleryidle");
|
||||
addToStackMap("com.emoniph.witchery.integration.NEIKettleRecipeHandler", "witchery", "witchery:kettle");
|
||||
}
|
||||
/* Witchery Extras */
|
||||
if (Loader.isModLoaded("WitcheryExtras")) {
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_Cauldron ", "witchery", "witchery:cauldron");
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_Distillery ", "witchery", "witchery:spinningwheel");
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_Kettle ", "witchery", "witchery:witchesovenidle");
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_Oven", "witchery", "witchery:distilleryidle");
|
||||
addToStackMap("alkalus.main.nei.NEI_Handler_SpinningWheel ", "witchery", "witchery:kettle");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static void addToStackMap(String handler, String modname, String item_id) {
|
||||
final ItemStack itemStack;
|
||||
int meta = -1;
|
||||
if (!item_id.contains(":")) {
|
||||
throw new IllegalArgumentException("Item ID missing colon");
|
||||
}
|
||||
final String[] split = item_id.split(":");
|
||||
item_id = split[0] + ":" + split[1];
|
||||
|
||||
if(split.length >= 3) {
|
||||
int mIdx = -1;
|
||||
if (split[2].matches("\\d+")) {
|
||||
mIdx = 2;
|
||||
} else {
|
||||
item_id += ":" + split[2];
|
||||
if (split.length >= 4) mIdx = 3;
|
||||
}
|
||||
if (mIdx != -1) meta = Integer.parseInt(split[mIdx]);
|
||||
}
|
||||
|
||||
if (meta != -1) {
|
||||
itemStack = GameRegistry.makeItemStack(item_id, meta, 1, "");
|
||||
} else {
|
||||
itemStack = GameRegistry.findItemStack(split[0], split[1], 1);
|
||||
}
|
||||
if (itemStack != null)
|
||||
stackMap.put(handler, new ImmutablePair<>(modname, itemStack));
|
||||
else
|
||||
System.out.println("Couldn't find " + modname + " - " + item_id);
|
||||
}
|
||||
private static void addToIconMap(String handler, String modid, Image image) {
|
||||
iconMap.put(handler, new ImmutablePair<>(modid, image));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
package codechicken.nei.recipe;
|
||||
|
||||
import codechicken.nei.Button;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GuiRecipeTabs {
|
||||
private final GuiRecipe guiRecipe;
|
||||
private final List<GuiRecipeTab> tabs = new ArrayList<>();
|
||||
private final List<Button> buttons = new ArrayList<>();
|
||||
|
||||
private final Rectangle area = new Rectangle();
|
||||
|
||||
private int pageCount = 1;
|
||||
private int pageNumber = 0;
|
||||
private int categoriesPerPage = 1;
|
||||
private int numHandlers = 1;
|
||||
|
||||
public GuiRecipeTabs(GuiRecipe guiRecipe) {
|
||||
this.guiRecipe = guiRecipe;
|
||||
}
|
||||
|
||||
public void initLayout() {
|
||||
int totalWidth = 0;
|
||||
categoriesPerPage = 0;
|
||||
numHandlers = guiRecipe.currenthandlers.size();
|
||||
for (IRecipeHandler handler : guiRecipe.currenthandlers) {
|
||||
if (totalWidth + GuiRecipeTab.TAB_WIDTH < (guiRecipe.xSize - 4)) {
|
||||
totalWidth += GuiRecipeTab.TAB_WIDTH;
|
||||
categoriesPerPage++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
area.width = totalWidth;
|
||||
area.height = GuiRecipeTab.TAB_HEIGHT;
|
||||
area.x = guiRecipe.guiLeft + 2;
|
||||
area.y = guiRecipe.guiTop - GuiRecipeTab.TAB_HEIGHT + 3;
|
||||
|
||||
pageCount = (int) Math.ceil((float) numHandlers / categoriesPerPage);
|
||||
calcPageNumber();
|
||||
Rectangle navigationArea = new Rectangle(area);
|
||||
navigationArea.height = 20;
|
||||
navigationArea.translate(0, -(2 + navigationArea.height));
|
||||
}
|
||||
|
||||
public void calcPageNumber() {
|
||||
pageNumber = guiRecipe.recipetype / Math.max(categoriesPerPage, 1);
|
||||
}
|
||||
|
||||
public void refreshPage() {
|
||||
tabs.clear();
|
||||
buttons.clear();
|
||||
|
||||
int tabX = area.x;
|
||||
|
||||
final int startIndex = pageNumber * categoriesPerPage;
|
||||
for (int i = 0 ; i < categoriesPerPage ; i++) {
|
||||
final int index = i + startIndex;
|
||||
if (index >= numHandlers) break;
|
||||
IRecipeHandler handler = guiRecipe.currenthandlers.get(index);
|
||||
tabs.add(new GuiRecipeTab(guiRecipe, handler, tabX, area.y));
|
||||
tabX += GuiRecipeTab.TAB_WIDTH;
|
||||
}
|
||||
|
||||
// Maybe add buttons
|
||||
if (numHandlers > categoriesPerPage) {
|
||||
Button prevTab = new Button("prevTab") {
|
||||
@Override
|
||||
public boolean onButtonPress(boolean rightclick) {
|
||||
if (!rightclick) return previousPage();
|
||||
else return false;
|
||||
}
|
||||
@Override
|
||||
public String getRenderLabel() {
|
||||
return "<";
|
||||
}
|
||||
};
|
||||
prevTab.x = area.x - 7;
|
||||
prevTab.y = area.y + 2;
|
||||
prevTab.h = 20;
|
||||
prevTab.w = 8;
|
||||
buttons.add(prevTab);
|
||||
|
||||
Button nextTab = new Button("nextTab") {
|
||||
@Override
|
||||
public boolean onButtonPress(boolean rightclick) {
|
||||
if(!rightclick) return nextPage();
|
||||
else return false;
|
||||
}
|
||||
@Override
|
||||
public String getRenderLabel() {
|
||||
return ">";
|
||||
}
|
||||
};
|
||||
nextTab.x = area.x + area.width;
|
||||
nextTab.y = area.y + 2;
|
||||
nextTab.h = 20;
|
||||
nextTab.w = 8;
|
||||
buttons.add(nextTab);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean nextPage() {
|
||||
if (hasNext()) pageNumber++;
|
||||
else pageNumber = 0;
|
||||
|
||||
refreshPage();
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean hasNext() {
|
||||
return pageNumber + 1 < pageCount;
|
||||
}
|
||||
|
||||
public boolean previousPage() {
|
||||
if (hasPrevious()) pageNumber--;
|
||||
else pageNumber = pageCount - 1;
|
||||
|
||||
refreshPage();
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean hasPrevious() {
|
||||
return pageNumber > 0;
|
||||
}
|
||||
|
||||
|
||||
public void draw(int mouseX, int mouseY) {
|
||||
IRecipeHandler current = guiRecipe.currenthandlers.get(guiRecipe.recipetype);
|
||||
for (GuiRecipeTab tab : tabs) {
|
||||
boolean selected = tab.isSelected(current);
|
||||
tab.draw(selected, mouseX, mouseY);
|
||||
}
|
||||
for (Button button : buttons) {
|
||||
button.draw(mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
||||
public void handleTooltip(int mousex, int mousey, List<String> tooltips) {
|
||||
if (!NEIClientConfig.areJEIStyleTabsVisible()) return;
|
||||
|
||||
for (GuiRecipeTab tab : tabs) {
|
||||
if (tab.contains(mousex, mousey)) {
|
||||
tab.addTooltips(tooltips);
|
||||
}
|
||||
}
|
||||
for (Button button : buttons) {
|
||||
if (button.contains(mousex, mousey)){
|
||||
button.addTooltips(tooltips);
|
||||
}
|
||||
}
|
||||
}
|
||||
protected boolean mouseClicked(int x, int y, int mouseButton) {
|
||||
if (!NEIClientConfig.areJEIStyleTabsVisible()) return false;
|
||||
|
||||
for (Button button : buttons) {
|
||||
if (button.contains(x, y)) {
|
||||
return button.onButtonPress(mouseButton == 1);
|
||||
}
|
||||
}
|
||||
for (GuiRecipeTab tab : tabs) {
|
||||
if (tab.contains(x, y)) {
|
||||
return tab.onButtonPress(mouseButton == 1);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user