mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-15 17:44:46 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddb5c0f58d | ||
|
|
49c648c689 | ||
|
|
792952fbbd | ||
|
|
4750486375 | ||
|
|
0f9710a9f9 | ||
|
|
0c0ac4fcfa | ||
|
|
a189446cac | ||
|
|
6279ef2b09 | ||
|
|
6cf6dafb53 |
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
implementation('com.github.GTNewHorizons:NotEnoughItems:2.5.25-GTNH:dev')
|
||||
implementation('com.github.GTNewHorizons:NotEnoughItems:2.7.30-GTNH:dev')
|
||||
|
||||
shadowImplementation('au.com.bytecode:opencsv:2.4')
|
||||
}
|
||||
+12
-1
@@ -85,6 +85,11 @@ accessTransformersFile =
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
|
||||
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
|
||||
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
|
||||
# Mixin classes will have access to "main" classes, but not the other way around.
|
||||
separateMixinSourceSet =
|
||||
|
||||
# Adds some debug arguments like verbose output and class export.
|
||||
usesMixinDebug = false
|
||||
|
||||
@@ -117,9 +122,15 @@ minimizeShadowedDependencies = true
|
||||
# If disabled, won't rename the shadowed classes.
|
||||
relocateShadowedDependencies = true
|
||||
|
||||
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
includeWellKnownRepositories = true
|
||||
|
||||
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
|
||||
# list of strings, with the acceptable keys being(case does not matter):
|
||||
# cursemaven
|
||||
# modrinth
|
||||
excludeWellKnownRepositories =
|
||||
|
||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
||||
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -84,7 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -203,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
Vendored
+2
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.21'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.37'
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package mcp.mobius.waila.addons.projectred;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import mcp.mobius.waila.api.ITaggedList;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaFMPAccessor;
|
||||
import mcp.mobius.waila.api.IWailaFMPProvider;
|
||||
import mcp.mobius.waila.cbcore.LangUtil;
|
||||
import mcp.mobius.waila.utils.NBTUtil;
|
||||
|
||||
public class HUDFMPWires implements IWailaFMPProvider {
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaFMPAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaFMPAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
if (!config.getConfig("pr.showsignal")) return currenttip;
|
||||
|
||||
ITaggedList<String, String> tagList = (ITaggedList<String, String>) currenttip;
|
||||
int signal = ((NBTUtil.getNBTInteger(accessor.getNBTData(), "signal") & 0xff) + 16) / 17;
|
||||
if (tagList.getEntries("signal").isEmpty()) {
|
||||
tagList.add(String.format("%s : %s", LangUtil.translateG("hud.msg.power"), signal), "signal");
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaFMPAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ public class ProjectRedModule {
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("Project:Red", "pr.showio");
|
||||
ModuleRegistrar.instance().addConfigRemote("Project:Red", "pr.showdata");
|
||||
ModuleRegistrar.instance().addConfigRemote("Project:Red", "pr.showsignal");
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_sgate");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_igate");
|
||||
@@ -25,6 +26,10 @@ public class ProjectRedModule {
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_bgate");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_agate");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_rgate");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPWires(), "pr_redwire");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPWires(), "pr_insulated");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPWires(), "pr_fredwire");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPWires(), "pr_finsulated");
|
||||
|
||||
ModuleRegistrar.instance().registerDecorator(new HUDDecoratorRsGateLogic(), "pr_sgate");
|
||||
ModuleRegistrar.instance().registerDecorator(new HUDDecoratorRsGateLogic(), "pr_igate");
|
||||
|
||||
@@ -112,7 +112,7 @@ public class HUDHandlerIAspectContainer implements IWailaDataProvider {
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
} catch (ReflectiveOperationException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import mcp.mobius.waila.gui.screens.config.ScreenConfig;
|
||||
import mcp.mobius.waila.handlers.nei.NEIHandler;
|
||||
import mcp.mobius.waila.utils.Constants;
|
||||
|
||||
public class KeyEvent {
|
||||
@@ -37,43 +38,36 @@ public class KeyEvent {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onKeyEvent(KeyInputEvent event) {
|
||||
boolean showKey = key_show.isPressed();
|
||||
if (key_cfg.isPressed()) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
if (mc.currentScreen == null) {
|
||||
mc.displayGuiScreen(new ScreenConfig(null));
|
||||
}
|
||||
} else if (key_show.isPressed() && ConfigHandler.instance()
|
||||
return;
|
||||
}
|
||||
if (showKey && ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)) {
|
||||
boolean status = ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
|
||||
ConfigHandler.instance()
|
||||
.setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, !status);
|
||||
boolean status = ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
|
||||
ConfigHandler.instance().setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, !status);
|
||||
} else if (showKey && !ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)) {
|
||||
ConfigHandler.instance().setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
|
||||
} else
|
||||
if (key_show.isPressed() && !ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)) {
|
||||
ConfigHandler.instance()
|
||||
.setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
|
||||
} else
|
||||
if (key_liquid.isPressed()) {
|
||||
boolean status = ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_LIQUID, true);
|
||||
ConfigHandler.instance()
|
||||
.setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_LIQUID, !status);
|
||||
} else if (key_recipe.isPressed()) {
|
||||
if (Loader.isModLoaded("NotEnoughItems")) {
|
||||
try {
|
||||
Class.forName("mcp.mobius.waila.handlers.nei.NEIHandler")
|
||||
.getDeclaredMethod("openRecipeGUI", boolean.class).invoke(null, true);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
} else if (key_usage.isPressed()) {
|
||||
if (Loader.isModLoaded("NotEnoughItems")) {
|
||||
try {
|
||||
Class.forName("mcp.mobius.waila.handlers.nei.NEIHandler")
|
||||
.getDeclaredMethod("openRecipeGUI", boolean.class).invoke(null, false);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
if (key_liquid.isPressed()) {
|
||||
boolean status = ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_LIQUID, true);
|
||||
ConfigHandler.instance().setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_LIQUID, !status);
|
||||
} else if (key_recipe.isPressed()) {
|
||||
if (Loader.isModLoaded("NotEnoughItems")) {
|
||||
NEIHandler.openRecipeGUI(true);
|
||||
}
|
||||
} else if (key_usage.isPressed()) {
|
||||
if (Loader.isModLoaded("NotEnoughItems")) {
|
||||
NEIHandler.openRecipeGUI(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import net.minecraftforge.event.world.WorldEvent;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.DataAccessorCommon;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
import mcp.mobius.waila.cbcore.LangUtil;
|
||||
@@ -17,6 +16,7 @@ import mcp.mobius.waila.gui.truetyper.TrueTypeFont;
|
||||
import mcp.mobius.waila.handlers.HUDHandlerBlocks;
|
||||
import mcp.mobius.waila.handlers.HUDHandlerEntities;
|
||||
import mcp.mobius.waila.handlers.VanillaTooltipHandler;
|
||||
import mcp.mobius.waila.handlers.nei.NEIHandler;
|
||||
import mcp.mobius.waila.overlay.tooltiprenderers.TTRenderHealth;
|
||||
import mcp.mobius.waila.overlay.tooltiprenderers.TTRenderProgressBar;
|
||||
import mcp.mobius.waila.overlay.tooltiprenderers.TTRenderStack;
|
||||
@@ -34,12 +34,7 @@ public class ProxyClient extends ProxyServer {
|
||||
LangUtil.loadLangDir("waila");
|
||||
|
||||
if (Loader.isModLoaded("NotEnoughItems")) {
|
||||
try {
|
||||
Class.forName("mcp.mobius.waila.handlers.nei.NEIHandler").getDeclaredMethod("register").invoke(null);
|
||||
} catch (Exception e) {
|
||||
Waila.log.error("Failed to hook into NEI properly. Reverting to Vanilla tooltip handler");
|
||||
MinecraftForge.EVENT_BUS.register(new VanillaTooltipHandler());
|
||||
}
|
||||
NEIHandler.register();
|
||||
} else {
|
||||
MinecraftForge.EVENT_BUS.register(new VanillaTooltipHandler());
|
||||
}
|
||||
|
||||
@@ -17,11 +17,20 @@ public class WailaExceptionHandler {
|
||||
if (!errs.contains(className)) {
|
||||
errs.add(className);
|
||||
|
||||
for (StackTraceElement elem : e.getStackTrace()) {
|
||||
Waila.log.log(
|
||||
Level.WARN,
|
||||
String.format("%s.%s:%s", elem.getClassName(), elem.getMethodName(), elem.getLineNumber()));
|
||||
if (elem.getClassName().contains("waila")) break;
|
||||
Throwable working = e;
|
||||
|
||||
while (working != null) {
|
||||
if (working != e) {
|
||||
Waila.log.log(Level.WARN, String.format("Caused by: %s", working));
|
||||
}
|
||||
for (StackTraceElement elem : working.getStackTrace()) {
|
||||
Waila.log.log(
|
||||
Level.WARN,
|
||||
String.format("%s.%s:%s", elem.getClassName(), elem.getMethodName(), elem.getLineNumber()));
|
||||
if (working == e && elem.getClassName().contains("waila")) break;
|
||||
}
|
||||
|
||||
working = working.getCause();
|
||||
}
|
||||
|
||||
Waila.log.log(Level.WARN, String.format("Catched unhandled exception : [%s] %s", className, e));
|
||||
|
||||
@@ -135,6 +135,7 @@ option.bcapi.consump=Show maximum power
|
||||
option.bcapi.trigger=Show triggering energy
|
||||
option.pr.showio=Show gates IO
|
||||
option.pr.showdata=Show gates data
|
||||
option.pr.showsignal=Show wire signal strength
|
||||
option.extrautilities.fluidamount=Show fluid amount
|
||||
option.openblocks.fluidamount=Show fluid amount
|
||||
option.railcraft.fluidamount=Show fluid amount
|
||||
|
||||
Reference in new issue
Block a user