Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/

configurations.create('gtnhlibEmbed') {
canBeConsumed = false
canBeResolved = true
}

dependencies {
api("com.github.GTNewHorizons:NotEnoughItems:2.8.91-GTNH:dev")
devOnlyNonPublishable("com.github.GTNewHorizons:EnderIO:2.10.23:dev")
Expand Down Expand Up @@ -71,4 +76,12 @@ dependencies {
compileOnly(rfg.deobf("curse.maven:reliquary-reincarnations-241319:2323453"))
compileOnly(deobf("https://github.com/Roadhog360/Et-Futurum-Requiem/releases/download/2.5.1/Et_Futurum_Requiem-2.5.1+nomixin.jar", "Et Futurum Requiem"))
compileOnly(deobf("https://dl.dropboxusercontent.com/s/c35c42xm0y6pq83/%5B1.7.10%5DDQRmod%20ver0.9.4.8a_%239-i.jar", "DQRespect"))
compileOnly("com.github.GTNewHorizons:GTNHLib:0.11.14:dev") { transitive = false }
gtnhlibEmbed("com.github.GTNewHorizons:GTNHLib:0.11.14:dev") { transitive = false }
}

tasks.jar {
from({ project.configurations.getByName('gtnhlibEmbed').collect { zipTree(it) } }) {
include 'com/gtnewhorizon/gtnhlib/color/ColorResource*.class'
}
}
Comment thread
kuba6000 marked this conversation as resolved.
16 changes: 16 additions & 0 deletions src/main/java/com/kuba6000/mobsinfo/nei/ColorUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.kuba6000.mobsinfo.nei;

import com.gtnewhorizon.gtnhlib.color.ColorResource;

public class ColorUtils {

private static final ColorResource.Factory color = new ColorResource.Factory("mobsinfo");

public static final ColorResource
// spotless:off
textDefault = color.argb("textDefault", "0xFF555555"),
textDanger = color.argb("textDanger", "0xFFFF0000"),
textBoss = color.argb("textBoss", "0xFFD68F00"),
textPositive = color.argb("textPositive", "0xFF005500");
// spotless:on
}
82 changes: 0 additions & 82 deletions src/main/java/com/kuba6000/mobsinfo/nei/EnumColors.java

This file was deleted.

57 changes: 24 additions & 33 deletions src/main/java/com/kuba6000/mobsinfo/nei/MobHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public void drawBackground(int recipe) {

GL11.glTranslatef(20.f, 20.f, 0.f);
GL11.glScalef(4.f, 4.f, 0.f);
GuiDraw.drawString("?", 0, 0, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString("?", 0, 0, ColorUtils.textDefault.getColor(), false);

GL11.glPopMatrix();
return;
Expand Down Expand Up @@ -446,38 +446,34 @@ public void drawForeground(int recipe) {
y,
yshift,
168 - x,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false) - yshift;
if (Minecraft.getMinecraft().gameSettings.advancedItemTooltips && NEIClientUtils.shiftKey())
GuiDraw.drawString(currentrecipe.mobname, x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(currentrecipe.mobname, x, y += yshift, ColorUtils.textDefault.getColor(), false);
GuiDraw.drawString(
Translations.MOD.get() + currentrecipe.mod,
x,
y += yshift,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
if (!currentrecipe.isUnlocked()) {
x = 6;
y = 83;
GuiDraw.drawStringC(
Translations.LOCKED.get(),
168 / 2,
y += yshift,
EnumColors.TEXT_DEFAULT.getColor(),
false);
GuiDraw
.drawStringC(Translations.LOCKED.get(), 168 / 2, y += yshift, ColorUtils.textDefault.getColor(), false);
GuiDraw.drawStringC(
Translations.LOCKED_1.get(),
168 / 2,
y += yshift,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
return;
}
GuiDraw.drawString(
Translations.MAX_HEALTH.get() + currentrecipe.maxHealth,
x,
y += yshift,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
switch (currentrecipe.infernaltype) {
case -1:
Expand All @@ -487,23 +483,23 @@ public void drawForeground(int recipe) {
Translations.INFERNAL_CANNOT.get(),
x,
y += yshift,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
break;
case 1:
GuiDraw.drawString(
Translations.INFERNAL_CAN.get(),
x,
y += yshift,
EnumColors.TEXT_DANGER.getColor(),
ColorUtils.textDanger.getColor(),
false);
break;
case 2:
GuiDraw.drawString(
Translations.INFERNAL_ALWAYS.get(),
x,
y += yshift,
EnumColors.TEXT_DANGER.getColor(),
ColorUtils.textDanger.getColor(),
false);
break;
}
Expand All @@ -512,31 +508,27 @@ public void drawForeground(int recipe) {
EnumChatFormatting.BOLD + "" + BOSS.get(),
x,
y += yshift,
EnumColors.TEXT_BOSS.getColor(),
ColorUtils.textBoss.getColor(),
false);

if (currentrecipe.isPeacefulAllowed) GuiDraw.drawString(
Translations.PEACEFUL_ALLOWED.get(),
x,
y += yshift,
EnumColors.TEXT_POSITIVE.getColor(),
false);
if (currentrecipe.isPeacefulAllowed) GuiDraw
.drawString(Translations.PEACEFUL_ALLOWED.get(), x, y += yshift, ColorUtils.textPositive.getColor(), false);

if (!currentrecipe.isUsableInVial) GuiDraw
.drawString(Translations.CANNOT_USE_VIAL.get(), x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
.drawString(Translations.CANNOT_USE_VIAL.get(), x, y += yshift, ColorUtils.textDefault.getColor(), false);

if (currentrecipe.spawnList != null && !currentrecipe.spawnList.isEmpty()) {
int possiblePlaces = SpawnInfo.getAllKnownInfos()
.size();
if (currentrecipe.spawnList.size() >= possiblePlaces && !NEIClientUtils.shiftKey()) {
GuiDraw.drawString(SPAWNS_EVERYWHERE.get(), x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(SPAWNS_EVERYWHERE.get(), x, y += yshift, ColorUtils.textDefault.getColor(), false);
setBiomeSpawnTooltip(false, 0, 0, 0, 0, false, null);
} else if (currentrecipe.spawnList.size() < possiblePlaces / 2 || NEIClientUtils.shiftKey()) {
GuiDraw.drawString(
EnumChatFormatting.UNDERLINE + SPAWNS_IN.get(currentrecipe.spawnList.size()),
x,
y += yshift,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
setBiomeSpawnTooltip(
true,
Expand All @@ -553,18 +545,18 @@ public void drawForeground(int recipe) {
y + yshift,
yshift,
168 - x,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
setBiomeSpawnTooltip(true, x, y - yshift, 168 - x, 18, true, currentrecipe.spawnList);
}
} else {
// GuiDraw.drawString("Doesn't spawn naturally", x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
// GuiDraw.drawString("Doesn't spawn naturally", x, y += yshift, ColorUtils.textDefault.getColor(), false);
setBiomeSpawnTooltip(false, 0, 0, 0, 0, false, null);
}

if (!currentrecipe.additionalInformation.isEmpty()) {
for (String s : currentrecipe.additionalInformation) {
GuiDraw.drawString(s, x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(s, x, y += yshift, ColorUtils.textDefault.getColor(), false);
}
}

Expand All @@ -580,20 +572,19 @@ public void drawForeground(int recipe) {
y = itemsYStart;
yshift = nextRowYShift;
if (currentrecipe.normalOutputsCount > 0) {
GuiDraw.drawString(Translations.NORMAL_DROPS.get(), x, y, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.NORMAL_DROPS.get(), x, y, ColorUtils.textDefault.getColor(), false);
y += yshift + ((currentrecipe.normalOutputsCount - 1) / itemsPerRow) * 18;
}
if (currentrecipe.rareOutputsCount > 0) {
GuiDraw.drawString(Translations.RARE_DROPS.get(), x, y, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.RARE_DROPS.get(), x, y, ColorUtils.textDefault.getColor(), false);
y += yshift + ((currentrecipe.rareOutputsCount - 1) / itemsPerRow) * 18;
}
if (currentrecipe.additionalOutputsCount > 0) {
GuiDraw
.drawString(Translations.ADDITIONAL_DROPS.get(), x, y, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.ADDITIONAL_DROPS.get(), x, y, ColorUtils.textDefault.getColor(), false);
y += yshift + ((currentrecipe.additionalOutputsCount - 1) / itemsPerRow) * 18;
}
if (currentrecipe.infernalOutputsCount > 0) {
GuiDraw.drawString(Translations.INFERNAL_DROPS.get(), x, y, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.INFERNAL_DROPS.get(), x, y, ColorUtils.textDefault.getColor(), false);
y += yshift + ((currentrecipe.additionalOutputsCount - 1) / itemsPerRow) * 18;
}
yshift = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,12 @@ public void drawBackground(int recipeID) {
public void drawForeground(int recipeID) {
int y = 0, yshift = 10, x = 7;

GuiDraw.drawString(Translations.TITLE.get(), x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.FORMAT.get(), x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.FORMAT_1.get(), x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.FORMAT_2.get(), x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.FORMAT_3.get(), x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.FORMAT_4.get(), x + 20, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(Translations.TITLE.get(), x, y += yshift, ColorUtils.textDefault.getColor(), false);
GuiDraw.drawString(Translations.FORMAT.get(), x, y += yshift, ColorUtils.textDefault.getColor(), false);
GuiDraw.drawString(Translations.FORMAT_1.get(), x, y += yshift, ColorUtils.textDefault.getColor(), false);
GuiDraw.drawString(Translations.FORMAT_2.get(), x, y += yshift, ColorUtils.textDefault.getColor(), false);
GuiDraw.drawString(Translations.FORMAT_3.get(), x, y += yshift, ColorUtils.textDefault.getColor(), false);
GuiDraw.drawString(Translations.FORMAT_4.get(), x + 20, y += yshift, ColorUtils.textDefault.getColor(), false);

{
x = 6;
Expand All @@ -223,7 +223,7 @@ public void drawForeground(int recipeID) {
Translations.ELITE.get(recipe.eliteChance * 100d, 100d),
x,
y,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
y += yshift + ((recipe.eliteCount - 1) / itemsPerRow) * 18;
}
Expand All @@ -232,7 +232,7 @@ public void drawForeground(int recipeID) {
Translations.ULTRA.get(recipe.ultraChance * recipe.eliteChance * 100d, recipe.ultraChance * 100d),
x,
y,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
y += yshift + ((recipe.ultraCount - 1) / itemsPerRow) * 18;
}
Expand All @@ -243,7 +243,7 @@ public void drawForeground(int recipeID) {
recipe.infernoChance * recipe.ultraChance * 100d),
x,
y,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,11 @@ public void drawForeground(int recipe) {
NAME.get() + currentRecipe.profession,
x,
y += yshift,
EnumColors.TEXT_DEFAULT.getColor(),
ColorUtils.textDefault.getColor(),
false);
if (Minecraft.getMinecraft().gameSettings.advancedItemTooltips && NEIClientUtils.shiftKey()) GuiDraw
.drawString("ID: " + currentRecipe.professionID, x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
GuiDraw.drawString(MOD.get() + currentRecipe.mod, x, y += yshift, EnumColors.TEXT_DEFAULT.getColor(), false);
.drawString("ID: " + currentRecipe.professionID, x, y += yshift, ColorUtils.textDefault.getColor(), false);
GuiDraw.drawString(MOD.get() + currentRecipe.mod, x, y += yshift, ColorUtils.textDefault.getColor(), false);

}

Expand Down
Loading