Compare commits

..
8 Commits
Author SHA1 Message Date
Connor-ColensoandConnor Colenso ba59445a58 Format number migration (#112)
Co-authored-by: Connor Colenso <colen@CONNORSPC>
2026-01-24 01:46:28 +00:00
Connor Colenso e2da675b0d Revert "Update bs"
This reverts commit ebe7bcf718.
2026-01-24 01:35:01 +00:00
Connor Colenso fceabea560 Revert "Bump GT5u dep"
This reverts commit 002deef14e.
2026-01-24 01:35:00 +00:00
Connor Colenso e2ffd4b11b Revert "Switch to GTNHLib"
This reverts commit 303a815ba4.
2026-01-24 01:35:00 +00:00
Connor Colenso 303a815ba4 Switch to GTNHLib 2026-01-24 01:30:56 +00:00
Connor Colenso 002deef14e Bump GT5u dep 2026-01-24 01:29:52 +00:00
Connor Colenso ebe7bcf718 Update bs 2026-01-24 01:19:00 +00:00
WanderingHeroandMartin Robertz 572b1eff97 Rework The One Ring (#110)
Co-authored-by: Martin Robertz <[email protected]>
2026-01-14 08:06:02 +01:00
7 changed files with 151 additions and 114 deletions

No files matched your search

+1 -1
View File
@@ -11,5 +11,5 @@ dependencies {
api('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.190:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.223:dev')
}
+23 -3
View File
@@ -39,14 +39,34 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
developmentEnvironmentUserName = Developer
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = true
# Enables modern Java syntax support. Valid values:
# - false: No modern syntax, Java 8 only
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
# - modern: Native modern Java bytecode, no downgrading
enableModernJavaSyntax = jabel
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
# and should *not* be used in most situations. -1 disables this.
# forceToolchainVersion = -1
# Target JVM version for JVM Downgrader bytecode downgrading.
# Only used when enableModernJavaSyntax = jvmDowngrader
# downgradeTargetVersion = 8
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
# Classes will be available in META-INF/versions/N/ for each version N in this list.
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
# jvmDowngraderMultiReleaseVersions = 21,25
# Specifies how JVM Downgrader API stubs are provided. Options:
# - shade: Shade minimized stubs into the jar
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
# - external: Another dependency provides stubs (no constraint, no warning)
# - (empty): Warning reminding you to configure stubs
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
# jvmDowngraderStubsProvider =
# Enables injecting missing generics into the decompiled source code for a better coding experience.
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
enableGenericInjection = true
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.10'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.18'
}
+66 -38
View File
@@ -124,10 +124,6 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
@Override
public void onWornTick(ItemStack stack, EntityLivingBase player) {
if (!player.isInvisible()) {
player.setInvisible(true);
((EntityPlayer) player).capabilities.disableDamage = true;
}
// Stop doing this 20 times per second...
if (random.nextInt(20) > 0) return;
@@ -151,11 +147,27 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
if (!player.worldObj.isRemote) {
// EMT.LOGGER.info( String.format( "Total Corruption: %d ItemWarpLevel: %d", corruption, getItemWarpLevel(
// stack, false ) ));
if (random.nextInt(55) == 0) {
player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 2000, 4, false));
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2000, 4, false));
player.addPotionEffect(new PotionEffect(Potion.hunger.id, 2000, 0, false));
if (corruption > 3000) {
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2000, 1, false));
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2000, 1, false));
}
if (corruption > 1000) {
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2000, 1, false));
}
if (corruption > 6000) {
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2000, 1, false));
}
}
if (corruption == 0) {
player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 2000, 4, false));
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2000, 4, false));
((EntityPlayer) player).addChatMessage(
new ChatComponentText(
EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever "
EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been temporarily "
+ EMTTextHelper.PURPLE
+ "tainted. "
+ EMTTextHelper.RED
@@ -165,48 +177,62 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
+ EMTTextHelper.ITALIC
+ "increase, and strange things will start happening."));
}
// First effect should become active after ~5 Minutes
else if (corruption > 300 && corruption < 1400 && random.nextInt(100) == 0) {
// First effect should become active after ~1 Minute
if (corruption > 60 && corruption < 400 && random.nextInt(100) == 0) {
((EntityPlayer) player)
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring somehow feels heavy"));
if (random.nextBoolean()) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false));
else player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
} else if (corruption >= 1400 && corruption < 3800 && random.nextInt(100) == 0) {
((EntityPlayer) player).capabilities.disableDamage = false;
player.addPotionEffect(new PotionEffect(Potion.poison.id, 500, 2, false));
} else if (corruption >= 3800 && corruption < 6500 && random.nextInt(100) == 0) {
((EntityPlayer) player).capabilities.disableDamage = false;
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 3, false));
if (random.nextBoolean()) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 4, false));
else player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 4, false));
}
if (corruption > 30 && random.nextInt(80) == 0) {
((EntityPlayer) player)
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring falters"));
player.removePotionEffect(14);
player.removePotionEffect(11);
player.removePotionEffect(5);
player.removePotionEffect(1);
player.removePotionEffect(8);
player.removePotionEffect(3);
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 400, 3, false));
/*
* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt! ((EntityPlayer)
* player).writeToNBT(tag); tag.removeTag( NBT_TAG_FORGE_DATA ); ((EntityPlayer)
* player).readFromNBT(tag);
*/
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 1, false));
}
if (corruption >= 150 && corruption < 8000 && random.nextInt(150) == 0) {
((EntityPlayer) player)
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "Your arms feel heavy"));
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 600, 4, false));
player.addPotionEffect(new PotionEffect(Potion.weakness.id, 600, 4, false));
}
if (corruption >= 700 && corruption < 8000 && random.nextInt(150) == 0) {
player.removePotionEffect(11);
player.motionY += 2d;
} else if (corruption >= 6500 && random.nextInt(10000) == 0) {
((EntityPlayer) player).capabilities.disableDamage = false;
} else if (corruption >= 1000 && random.nextInt(500) == 0) {
player.removePotionEffect(11);
player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false));
}
if (corruption >= 300) { // worn more than 5 minutes
if (corruption >= 60) { // worn more than 1 minute
if (random.nextInt(100) == 0) { // every 100 seconds
getItemWarpLevel(stack, true);
((EntityPlayer) player).addChatMessage(
new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple"));
}
if (random.nextInt(300) == 0) { // randomly every 5 minutes
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 1, false); // adds 1 perm warp
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, random.nextInt(1)); // adds 0-1
// sticky warp
if (random.nextInt(300) == 2) { // randomly every 5 minutes
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 15, true); // adds 15 temp warp
((EntityPlayer) player).addChatMessage(
new ChatComponentText(EMTTextHelper.PURPLE + "Your body suddenly starts to glow purple"));
}
if (corruption >= 3600) { // if you wear it for more than an hour total
if (random.nextInt(300) == 0) {
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5), false); // adds
// 5-10
// perm
// warp
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5)); // adds
// 5-10
// sticky
// warp
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 10 + random.nextInt(40), true); // adds
// 10-50
if (corruption >= 180) { // if you wear it for 3 minutes
if (random.nextInt(290) == 1) {
((EntityPlayer) player)
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring corrupts"));
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 10 + random.nextInt(20), true); // adds
// 10-30
// temp
// warp,
// but
@@ -240,10 +266,12 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
@Override
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
player.setInvisible(false);
if (!((EntityPlayer) player).capabilities.isCreativeMode)
((EntityPlayer) player).capabilities.disableDamage = false;
player.removePotionEffect(14);
player.removePotionEffect(11);
player.removePotionEffect(5);
player.removePotionEffect(1);
player.removePotionEffect(8);
player.removePotionEffect(3);
/*
* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt! ((EntityPlayer)
* player).writeToNBT(tag); tag.removeTag( NBT_TAG_FORGE_DATA ); ((EntityPlayer) player).readFromNBT(tag);
@@ -1,7 +1,7 @@
package emt.item.block;
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
import static emt.util.EMTTextHelper.localize;
import static gregtech.api.util.GTUtility.formatNumbers;
import java.io.StringReader;
import java.util.List;
@@ -59,19 +59,19 @@ public class ItemBlockSolars extends ItemBlock {
switch (itemstack.getItemDamage()) {
case 0: {
list.add(
formatNumbers(EMTConfigHandler.compressedSolarOutput)
formatNumber(EMTConfigHandler.compressedSolarOutput)
+ localize("tooltip.EMT.euPerTick"));
break;
}
case 1: {
list.add(
formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ localize("tooltip.EMT.euPerTick"));
break;
}
case 2: {
list.add(
formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ localize("tooltip.EMT.euPerTick"));
break;
}
@@ -80,14 +80,14 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.compressedSolarOutput)
+ formatNumber(EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.compressedSolarOutput)
+ formatNumber(2F * EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -96,7 +96,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(3F * EMTConfigHandler.compressedSolarOutput)
+ formatNumber(3F * EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -105,7 +105,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(6F * EMTConfigHandler.compressedSolarOutput)
+ formatNumber(6F * EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -117,14 +117,14 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(2F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -133,7 +133,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(3F * EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(3F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -142,7 +142,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(6F * EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(6F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -154,14 +154,14 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(2F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -170,7 +170,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(3F * EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(3F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -179,7 +179,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(6F * EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(6F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -192,7 +192,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.compressedSolarOutput)
+ formatNumber(0.75F * EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -201,7 +201,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.compressedSolarOutput)
+ formatNumber(2F * EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -213,7 +213,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -222,7 +222,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(2F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -234,7 +234,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -243,7 +243,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(2F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -255,7 +255,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.compressedSolarOutput)
+ formatNumber(2F * EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -264,7 +264,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.compressedSolarOutput)
+ formatNumber(0.75F * EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -276,7 +276,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(2F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -285,7 +285,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -298,7 +298,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(2F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -307,7 +307,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -319,7 +319,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.compressedSolarOutput)
+ formatNumber(EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -343,7 +343,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -367,7 +367,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -391,7 +391,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.compressedSolarOutput)
+ formatNumber(EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -413,7 +413,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -428,7 +428,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -443,7 +443,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.compressedSolarOutput)
+ formatNumber(EMTConfigHandler.compressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -458,7 +458,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
+ formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -473,7 +473,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
+ formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -495,7 +495,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * te.output)
+ formatNumber(2F * te.output)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -504,7 +504,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * te.output)
+ formatNumber(0.75F * te.output)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -515,7 +515,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * te.output)
+ formatNumber(0.75F * te.output)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -524,7 +524,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * te.output)
+ formatNumber(2F * te.output)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -535,7 +535,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output)
+ formatNumber(te.output)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -549,7 +549,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output)
+ formatNumber(te.output)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -563,14 +563,14 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output)
+ formatNumber(te.output)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * te.output)
+ formatNumber(2F * te.output)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -579,7 +579,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(3F * te.output)
+ formatNumber(3F * te.output)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -588,7 +588,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(6F * te.output)
+ formatNumber(6F * te.output)
+ " "
+ localize("tooltip.EMT.euPerTick")
+ " "
@@ -599,7 +599,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output)
+ formatNumber(te.output)
+ " "
+ localize("tooltip.EMT.euPerTick"));
list.add(
@@ -622,7 +622,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output)
+ formatNumber(te.output)
+ " "
+ localize("tooltip.EMT.euPerTick"));
break;
@@ -632,9 +632,9 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.OutputMax")
+ " "
+ EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.calculateMaxVoltAmp()[0])
+ formatNumber(te.calculateMaxVoltAmp()[0])
+ "EU/t @ "
+ formatNumbers(te.calculateMaxVoltAmp()[1])
+ formatNumber(te.calculateMaxVoltAmp()[1])
+ "A");
} else list.add(StatCollector.translateToLocal("emt.PressShift"));
}
@@ -17,5 +17,13 @@ public class EMTDungeonChestGenerator {
1,
EMTConfigHandler.chanceTaintedMjolnir));
}
if (!EMTConfigHandler.oneRingSpawn) {
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(
new WeightedRandomChestContent(
new ItemStack(EMTItems.onering),
0,
1,
EMTConfigHandler.chanceOneRing));
}
}
}
+1 -20
View File
@@ -1,18 +1,14 @@
package emt.util;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import baubles.api.BaublesApi;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
@@ -29,7 +25,7 @@ public class EMTEventHandler {
/**
* Intercept the onLivingHurt event so that we can mitigate fall damage with feather wings
*
*
* @param e Entity that is being damaged
*/
@SubscribeEvent
@@ -82,21 +78,6 @@ public class EMTEventHandler {
}
}
@SubscribeEvent
public void onSetEntityAttack(LivingSetAttackTargetEvent e) {
if (e.entityLiving instanceof EntityLiving && e.target instanceof EntityPlayer) {
IInventory inventory = BaublesApi.getBaubles((EntityPlayer) e.target);
for (int i = 0; i < inventory.getSizeInventory(); i++) {
ItemStack stack = inventory.getStackInSlot(i);
if (stack != null && stack.getItem() == EMTItems.onering) {
((EntityLiving) e.entityLiving).setAttackTarget(null);
}
}
}
}
@SubscribeEvent
public void createCloud(PlayerInteractEvent e) {
if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK || e.world.isRemote) {