Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c71c62daf0 | ||
|
|
9900cdb1db | ||
|
|
2655f15c31 | ||
|
|
28f4def938 | ||
|
|
5e12defde0 | ||
|
|
e4c8acdd4f |
No files matched your search
@@ -1,27 +1,28 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.21-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.25-GTNH:dev')
|
||||
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive=false}
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-994-GTNH:api')
|
||||
api('com.github.GTNewHorizons:ThaumicBoots:1.5.12:dev') {transitive=false}
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-999-GTNH:api')
|
||||
api('com.github.GTNewHorizons:ThaumicBoots:1.5.13:dev') {transitive=false}
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:Botania:1.13.25-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderCore:0.5.14:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.31:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderStorage:1.8.3:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.19.30:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.14.93-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.7.10:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:CodeChickenCore:1.4.16:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.47-GTNH:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:Botania:1.13.39-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderCore:0.5.15:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.49:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderStorage:1.8.9:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.19.34:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.14.120-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.7.18:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:CodeChickenCore:1.4.22:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.64-GTNH:api') {transitive=false}
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:api') {transitive=false}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.54.01:dev") {exclude group: 'com.github.GTNewHorizons', module: 'ThaumicTinkerer'}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.54.242:dev") {exclude group: 'com.github.GTNewHorizons', module: 'ThaumicTinkerer'}
|
||||
compileOnly('curse.maven:computercraft-67504:2269339')
|
||||
compileOnly('curse.maven:cofh-core-69162:2388751')
|
||||
compileOnly('com.github.GTNewHorizons:Dashboard:1.0.11:api')
|
||||
|
||||
// For testing purposes
|
||||
//runtimeOnlyNonPublishable("com.github.GTNewHorizons:Electro-Magic-Tools:1.7.24:dev")
|
||||
//runtimeOnlyNonPublishable("com.github.GTNewHorizons:Electro-Magic-Tools:1.7.25:dev")
|
||||
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:AspectRecipeIndex:1.1.3:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:AspectRecipeIndex:1.1.5:dev')
|
||||
}
|
||||
@@ -186,6 +186,11 @@ modrinthRelations =
|
||||
# Leave this empty if you don't want to publish on CurseForge.
|
||||
curseForgeProjectId =
|
||||
|
||||
# Comma-separated supported CurseForge environments: client, server (case-insensitive).
|
||||
# Use client or server for mods that only support one environment. Defaults to client,server.
|
||||
# These tags describe where the mod can run, not whether installation is required on both sides.
|
||||
curseForgeEnvironments = client,server
|
||||
|
||||
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
|
||||
# Syntax: type1:name1;type2:name2;...
|
||||
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7b3c4877c0749019e6805bb61e421497/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d76df094a9cbbabd3b08251f9e61444a/redirect
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/9064f22734b42ac03e85df04b632e167/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/4d0277c49991306ac78048580fe34bcf/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a9fa3b809e484a1e1ac4308a5dda661a/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/aa99913fa6d767d899ffc96082da01ca/redirect
|
||||
toolchainVersion=25
|
||||
@@ -1,7 +1,9 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
# ksh gradlew
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/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/.
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem gradlew startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -51,7 +51,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -65,29 +65,18 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
@rem Execute gradlew
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.gtnewhorizons.gtnhsettingsconvention") version "2.0.26"
|
||||
id("com.gtnewhorizons.gtnhsettingsconvention") version "2.0.34"
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
package thaumic.tinkerer.client.core.handler;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.gtnewhorizons.dashboard.api.HudBounds;
|
||||
import com.gtnewhorizons.dashboard.api.HudElement;
|
||||
import com.gtnewhorizons.dashboard.api.HudRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumic.tinkerer.client.core.handler.kami.SoulHeartClientHandler;
|
||||
import thaumic.tinkerer.client.core.handler.kami.ToolModeHUDHandler;
|
||||
import thaumic.tinkerer.common.core.handler.ConfigHandler;
|
||||
|
||||
/**
|
||||
* Lets players move, resize and hide the Dislocation focus box, the Kami tool mode text and the soul hearts in
|
||||
* Dashboard's HUD editor. The only class using Dashboard, so only call it while Dashboard is loaded.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public final class DashboardHud {
|
||||
|
||||
private static final int ITEM_SIZE = 18;
|
||||
private static final int TEXT_PADDING = 4;
|
||||
private static final int TOOL_MODE_OFFSET = 72;
|
||||
private static final int SOUL_HEARTS_WIDTH = 81;
|
||||
private static final int SOUL_HEARTS_HEIGHT = 9;
|
||||
private static final int SAMPLE_SOUL_HP = 20;
|
||||
private static final int BOX_COLOR = 0x66000000;
|
||||
private static final int TEXT_COLOR = 0xFFAA00;
|
||||
|
||||
private static final HudElement DISLOCATION_FOCUS = new HudElement(
|
||||
"thaumictinkerer:dislocation_focus",
|
||||
DashboardHud::getDislocationBounds);
|
||||
|
||||
private static final HudElement TOOL_MODE = new HudElement(
|
||||
"thaumictinkerer:tool_mode",
|
||||
DashboardHud::getToolModeBounds);
|
||||
|
||||
private static final HudElement SOUL_HEARTS = new HudElement(
|
||||
"thaumictinkerer:soul_hearts",
|
||||
DashboardHud::getSoulHeartsBounds);
|
||||
|
||||
private static final RenderItem RENDER_ITEM = new RenderItem();
|
||||
|
||||
private DashboardHud() {}
|
||||
|
||||
/** The tool mode text and soul hearts only exist with Kami turned on. */
|
||||
public static void register(boolean kami) {
|
||||
DISLOCATION_FOCUS.setPreview(
|
||||
(screenWidth, screenHeight) -> HudRegistry
|
||||
.render(DISLOCATION_FOCUS, () -> drawDislocationPreview(screenWidth, screenHeight)));
|
||||
HudRegistry.register(DISLOCATION_FOCUS);
|
||||
if (!kami) {
|
||||
return;
|
||||
}
|
||||
TOOL_MODE.setPreview(
|
||||
(screenWidth, screenHeight) -> HudRegistry
|
||||
.render(TOOL_MODE, () -> drawToolModePreview(screenWidth, screenHeight)));
|
||||
SOUL_HEARTS.setPreview(
|
||||
(screenWidth, screenHeight) -> HudRegistry.render(SOUL_HEARTS, DashboardHud::drawSoulHeartsPreview));
|
||||
HudRegistry.register(TOOL_MODE);
|
||||
HudRegistry.register(SOUL_HEARTS);
|
||||
}
|
||||
|
||||
// False means the player hid the element, so skip drawing it and do not call endRender()
|
||||
|
||||
public static boolean beginDislocationFocus(ScaledResolution resolution) {
|
||||
return HudRegistry.beginRender(DISLOCATION_FOCUS, resolution);
|
||||
}
|
||||
|
||||
public static boolean beginToolMode(ScaledResolution resolution) {
|
||||
return HudRegistry.beginRender(TOOL_MODE, resolution);
|
||||
}
|
||||
|
||||
public static boolean beginSoulHearts(ScaledResolution resolution) {
|
||||
return HudRegistry.beginRender(SOUL_HEARTS, resolution);
|
||||
}
|
||||
|
||||
public static void endRender() {
|
||||
HudRegistry.endRender();
|
||||
}
|
||||
|
||||
/** Next to Thaumcraft's wand dial: the block's icon, with the text in the small font beside it. */
|
||||
private static HudBounds getDislocationBounds(int screenWidth, int screenHeight) {
|
||||
int y = Config.dialBottom ? screenHeight - 70 : 50;
|
||||
int textWidth = getSmallTextWidth(StatCollector.translateToLocal("ttmisc.focusDislocation.tooltip"));
|
||||
return new HudBounds(TEXT_PADDING - 1, y - 1, ITEM_SIZE + 1 + textWidth + TEXT_PADDING, ITEM_SIZE + 1);
|
||||
}
|
||||
|
||||
/** Centered above the hotbar, a little above the held item's name. */
|
||||
private static HudBounds getToolModeBounds(int screenWidth, int screenHeight) {
|
||||
int width = Minecraft.getMinecraft().fontRenderer.getStringWidth(getToolModeText());
|
||||
return new HudBounds((screenWidth - width) / 2, screenHeight - TOOL_MODE_OFFSET, width, 9);
|
||||
}
|
||||
|
||||
/** Above the food bar, at soulHeart.height, higher while the air bubbles show. */
|
||||
private static HudBounds getSoulHeartsBounds(int screenWidth, int screenHeight) {
|
||||
int y = screenHeight - ConfigHandler.soulHeartHeight;
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (player != null && player.getAir() < 300) {
|
||||
y -= 10;
|
||||
}
|
||||
return new HudBounds(screenWidth / 2 + 10, y, SOUL_HEARTS_WIDTH, SOUL_HEARTS_HEIGHT);
|
||||
}
|
||||
|
||||
private static String getToolModeText() {
|
||||
String text = ToolModeHUDHandler.getTooltip();
|
||||
return text == null || text.isEmpty() ? StatCollector.translateToLocal("ttmisc.mode.pick.1") : text;
|
||||
}
|
||||
|
||||
private static int getSmallTextWidth(String text) {
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
boolean unicode = font.getUnicodeFlag();
|
||||
font.setUnicodeFlag(true);
|
||||
int width = font.getStringWidth(text);
|
||||
font.setUnicodeFlag(unicode);
|
||||
return width;
|
||||
}
|
||||
|
||||
/** Like the real one: a chest in the box, the text in the small font beside it. */
|
||||
private static void drawDislocationPreview(int screenWidth, int screenHeight) {
|
||||
HudBounds bounds = getDislocationBounds(screenWidth, screenHeight);
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
FontRenderer font = mc.fontRenderer;
|
||||
String text = StatCollector.translateToLocal("ttmisc.focusDislocation.tooltip");
|
||||
int x = bounds.x + 1;
|
||||
int y = bounds.y + 1;
|
||||
Gui.drawRect(bounds.x, bounds.y, x + ITEM_SIZE, y + ITEM_SIZE, BOX_COLOR);
|
||||
Gui.drawRect(x + ITEM_SIZE, y, bounds.getRight(), y + 9, BOX_COLOR);
|
||||
boolean unicode = font.getUnicodeFlag();
|
||||
font.setUnicodeFlag(true);
|
||||
font.drawStringWithShadow(text, x + ITEM_SIZE + 2, y, TEXT_COLOR);
|
||||
font.setUnicodeFlag(unicode);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
RENDER_ITEM.renderItemIntoGUI(font, mc.renderEngine, new ItemStack(Blocks.chest), x, y);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
}
|
||||
|
||||
private static void drawToolModePreview(int screenWidth, int screenHeight) {
|
||||
HudBounds bounds = getToolModeBounds(screenWidth, screenHeight);
|
||||
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(getToolModeText(), bounds.x, bounds.y, TEXT_COLOR);
|
||||
}
|
||||
|
||||
/** The real drawing, with sample soul hearts for the moment. */
|
||||
private static void drawSoulHeartsPreview() {
|
||||
int realHp = SoulHeartClientHandler.clientPlayerHP;
|
||||
SoulHeartClientHandler.clientPlayerHP = SAMPLE_SOUL_HP;
|
||||
try {
|
||||
SoulHeartClientHandler.renderHUD(HudRegistry.getResolution(), Minecraft.getMinecraft().thePlayer, null);
|
||||
} finally {
|
||||
SoulHeartClientHandler.clientPlayerHP = realHp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumic.tinkerer.client.core.helper.ClientHelper;
|
||||
import thaumic.tinkerer.common.compat.LoadedMods;
|
||||
import thaumic.tinkerer.common.item.foci.ItemFocusDislocation;
|
||||
|
||||
public final class HUDHandler {
|
||||
@@ -49,7 +50,8 @@ public final class HUDHandler {
|
||||
|
||||
if (focus != null && focus instanceof ItemFocusDislocation) {
|
||||
ItemStack pickedBlock = ((ItemFocusDislocation) focus).getPickedBlock(item);
|
||||
if (pickedBlock != null) {
|
||||
if (pickedBlock != null
|
||||
&& (!LoadedMods.dashboardLoaded || DashboardHud.beginDislocationFocus(event.resolution))) {
|
||||
Gui.drawRect(xpos - 1, ypos - 1, xpos + 18, ypos + 18, 0x66000000);
|
||||
|
||||
FontRenderer font = ClientHelper.fontRenderer();
|
||||
@@ -87,6 +89,7 @@ public final class HUDHandler {
|
||||
ypos);
|
||||
}
|
||||
font.setUnicodeFlag(unicode);
|
||||
if (LoadedMods.dashboardLoaded) DashboardHud.endRender();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@ import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumic.tinkerer.client.core.handler.DashboardHud;
|
||||
import thaumic.tinkerer.client.lib.LibResources;
|
||||
import thaumic.tinkerer.common.compat.LoadedMods;
|
||||
import thaumic.tinkerer.common.core.handler.ConfigHandler;
|
||||
|
||||
public final class SoulHeartClientHandler {
|
||||
@@ -69,11 +71,25 @@ public final class SoulHeartClientHandler {
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void onDrawScreenPre(RenderGameOverlayEvent.Pre event) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
if (event.type == RenderGameOverlayEvent.ElementType.HEALTH) {
|
||||
if (event.type == RenderGameOverlayEvent.ElementType.HEALTH && !LoadedMods.dashboardLoaded) {
|
||||
renderHUD(event.resolution, mc.thePlayer, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* With Dashboard, the soul hearts are drawn here instead of with the health bar, so they do not move or hide with
|
||||
* it.
|
||||
*/
|
||||
@SubscribeEvent
|
||||
public void onDrawScreenPost(RenderGameOverlayEvent.Post event) {
|
||||
if (event.type == RenderGameOverlayEvent.ElementType.ALL && LoadedMods.dashboardLoaded
|
||||
&& clientPlayerHP > 0
|
||||
&& DashboardHud.beginSoulHearts(event.resolution)) {
|
||||
renderHUD(event.resolution, Minecraft.getMinecraft().thePlayer, null);
|
||||
DashboardHud.endRender();
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void renderHUD(ScaledResolution resolution, EntityPlayer player, ItemStack stack) {
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumic.tinkerer.client.core.handler.ClientTickHandler;
|
||||
import thaumic.tinkerer.client.core.handler.DashboardHud;
|
||||
import thaumic.tinkerer.common.compat.LoadedMods;
|
||||
|
||||
public final class ToolModeHUDHandler {
|
||||
|
||||
@@ -39,6 +41,10 @@ public final class ToolModeHUDHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public static String getTooltip() {
|
||||
return currentTooltip;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void clientTick() {
|
||||
if (tooltipDisplayTicks > 0) --tooltipDisplayTicks;
|
||||
@@ -62,7 +68,7 @@ public final class ToolModeHUDHandler {
|
||||
|
||||
if (opacity > 160) opacity = 160;
|
||||
|
||||
if (opacity > 0) {
|
||||
if (opacity > 0 && (!LoadedMods.dashboardLoaded || DashboardHud.beginToolMode(var5))) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
@@ -71,6 +77,7 @@ public final class ToolModeHUDHandler {
|
||||
var8.drawStringWithShadow(currentTooltip, tooltipStartX, tooltipStartY, color + (opacity << 24));
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
if (LoadedMods.dashboardLoaded) DashboardHud.endRender();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import cpw.mods.fml.common.network.FMLNetworkEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumic.tinkerer.client.core.handler.ClientTickHandler;
|
||||
import thaumic.tinkerer.client.core.handler.DashboardHud;
|
||||
import thaumic.tinkerer.client.core.handler.GemArmorKeyHandler;
|
||||
import thaumic.tinkerer.client.core.handler.HUDHandler;
|
||||
import thaumic.tinkerer.client.core.handler.kami.KamiArmorClientHandler;
|
||||
@@ -114,6 +115,8 @@ public final class TTClientProxy extends TTCommonProxy {
|
||||
if (ConfigHandler.showPlacementMirrorBlocks)
|
||||
MinecraftForge.EVENT_BUS.register(new PlacementMirrorPredictionRenderer());
|
||||
}
|
||||
|
||||
if (LoadedMods.dashboardLoaded) DashboardHud.register(ConfigHandler.enableKami);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -26,7 +26,10 @@ import thaumic.tinkerer.common.item.ItemInfusedSeeds;
|
||||
|
||||
public class NEIInfusedSeedRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public static final String OVERLAY = "thaumictinkerer.infusedseeds";
|
||||
private static final int SLOT_NUM_X = 9;
|
||||
private static final int SLOT_TEXTURE_U = 7;
|
||||
private static final int SLOT_TEXTURE_V = 17;
|
||||
private static final DecimalFormat CHANCE_FORMAT = new DecimalFormat("#.##");
|
||||
|
||||
public static class DropInfo {
|
||||
@@ -184,18 +187,22 @@ public class NEIInfusedSeedRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
GuiDraw.changeTexture(getGuiTexture());
|
||||
|
||||
GuiDraw.drawTexturedModalRect(74, 3, 7, 83, 18, 18);
|
||||
GuiDraw.drawTexturedModalRect(74, 3, SLOT_TEXTURE_U, SLOT_TEXTURE_V, 18, 18);
|
||||
|
||||
CachedSeedRecipe recipe = (CachedSeedRecipe) this.arecipes.get(recipeIndex);
|
||||
int totalDrops = recipe.outputs.size();
|
||||
|
||||
for (int i = 0; i < totalDrops; i++) {
|
||||
int rows = Math.max(1, (totalDrops + SLOT_NUM_X - 1) / SLOT_NUM_X);
|
||||
|
||||
int totalSlotsToDraw = rows * SLOT_NUM_X;
|
||||
|
||||
for (int i = 0; i < totalSlotsToDraw; i++) {
|
||||
int col = i % SLOT_NUM_X;
|
||||
int row = i / SLOT_NUM_X;
|
||||
int xPos = 2 + 18 * col;
|
||||
int yPos = 35 + 18 * row;
|
||||
|
||||
GuiDraw.drawTexturedModalRect(xPos, yPos, 7, 83, 18, 18);
|
||||
GuiDraw.drawTexturedModalRect(xPos, yPos, SLOT_TEXTURE_U, SLOT_TEXTURE_V, 18, 18);
|
||||
}
|
||||
|
||||
GuiDraw.changeTexture(NEI_RECIPE_ARROW);
|
||||
@@ -224,17 +231,17 @@ public class NEIInfusedSeedRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "minecraft:textures/gui/container/inventory.png";
|
||||
return "minecraft:textures/gui/container/generic_54.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "tt_infused_seeds_drops";
|
||||
return OVERLAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHandlerId() {
|
||||
return "tt_infused_seeds_drops";
|
||||
return NEIInfusedSeedRecipeHandler.class.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,6 +13,7 @@ public class LoadedMods {
|
||||
public static final boolean bloodMagicLoaded = Loader.isModLoaded("BloodMagic");
|
||||
public static final boolean botaniaLoaded = Loader.isModLoaded("Botania");
|
||||
public static final boolean computerCraftLoaded = Loader.isModLoaded("ComputerCraft");
|
||||
public static final boolean dashboardLoaded = Loader.isModLoaded("dashboard");
|
||||
public static final boolean enderIOLoaded = Loader.isModLoaded("EnderIO");
|
||||
public static final boolean enderStorageLoaded = Loader.isModLoaded("EnderStorage");
|
||||
public static final boolean forgeMultipartLoaded = Loader.isModLoaded("ForgeMultipart");
|
||||
|
||||
@@ -78,8 +78,9 @@ public class AspectCropLootManager {
|
||||
}
|
||||
|
||||
public static void addAspectLoot(Aspect aspect, String target, int count) {
|
||||
String capitalized = WordUtils.capitalizeFully(target);
|
||||
for (String ore : OreDictionary.getOreNames()) {
|
||||
if (ore.contains(WordUtils.capitalizeFully(target)) || ore.contains(target)) {
|
||||
if (ore.contains(capitalized) || ore.contains(target)) {
|
||||
for (ItemStack stack : OreDictionary.getOres(ore)) {
|
||||
ItemStack newStack = stack.copy();
|
||||
if (newStack.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
||||
|
||||
@@ -57,6 +57,7 @@ import thaumcraft.common.tiles.TileNode;
|
||||
import thaumcraft.common.tiles.TileSensor;
|
||||
import thaumcraft.common.tiles.TileTubeFilter;
|
||||
import thaumcraft.common.tiles.TileWandPedestal;
|
||||
import thaumic.tinkerer.client.nei.NEIInfusedSeedRecipeHandler;
|
||||
import thaumic.tinkerer.client.nei.NEINecromancyHandler;
|
||||
import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
import thaumic.tinkerer.common.block.BlockSummon;
|
||||
@@ -293,7 +294,7 @@ public class TTCommonProxy {
|
||||
necromancyTablet));
|
||||
|
||||
event.registerHandlerInfo(
|
||||
new HandlerInfo.Builder("tt_infused_seeds_drops", LibMisc.MOD_NAME, LibMisc.MOD_ID)
|
||||
new HandlerInfo.Builder(NEIInfusedSeedRecipeHandler.class, LibMisc.MOD_NAME, LibMisc.MOD_ID)
|
||||
.setDisplayStack(ItemInfusedSeeds.getStackFromAspect(Aspect.AIR))
|
||||
.setShowFavoritesButton(false).setShowOverlayButton(false).build());
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public final class LibMisc {
|
||||
|
||||
public static final String NETWORK_CHANNEL = MOD_ID;
|
||||
|
||||
public static final String DEPENDENCIES = "required-after:Forge@[10.12.1.1112,);required-after:Thaumcraft;before:advthaum;after:IC2;after:Waila;after:ForgeMultipart;after:ComputerCraft";
|
||||
public static final String DEPENDENCIES = "required-after:Forge@[10.12.1.1112,);required-after:Thaumcraft;before:advthaum;after:IC2;after:Waila;after:ForgeMultipart;after:ComputerCraft;after:dashboard@[1.0.11,)";
|
||||
|
||||
public static final String COMMON_PROXY = "thaumic.tinkerer.common.core.proxy.TTCommonProxy";
|
||||
public static final String CLIENT_PROXY = "thaumic.tinkerer.client.core.proxy.TTClientProxy";
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 3.0 KiB |