From d44f8e30530dd50f342cf7be962229f36213b9fb Mon Sep 17 00:00:00 2001
From: Alastors <78517796+Alastors@users.noreply.github.com>
Date: Fri, 10 Nov 2023 07:57:41 -0500
Subject: [PATCH] Total rewrite of the codebase (#13)
---
build.gradle | 78 ++-
dependencies.gradle | 3 +-
gradle.properties | 1 +
repositories.gradle | 8 -
src/main/java/thaumicboots/IGrief.java | 56 ++
src/main/java/thaumicboots/api/IComet.java | 39 ++
.../thaumicboots/api/ICometMeteorMix.java | 96 +++
src/main/java/thaumicboots/api/IGrief.java | 56 ++
src/main/java/thaumicboots/api/IMeteor.java | 108 ++++
.../java/thaumicboots/api/ISpecialEffect.java | 9 +
.../java/thaumicboots/api/ITBootJumpable.java | 6 +
.../java/thaumicboots/api/ITBootSpeed.java | 6 +
src/main/java/thaumicboots/api/ItemBoots.java | 271 ++++++++
.../thaumicboots/api/ItemElectricBoots.java | 159 +++++
.../java/thaumicboots/api/ItemVoidBoots.java | 140 +++++
.../api/serverfiles/PacketHandler.java | 21 +
.../api/serverfiles/PacketJumpToggle.java | 35 ++
.../api/serverfiles/PacketJumpToggleAck.java | 42 ++
.../api/serverfiles/PacketSpeedToggle.java | 35 ++
.../api/serverfiles/PacketSpeedToggleAck.java | 42 ++
.../events/BootsEventHandler.java | 341 +---------
.../boots/comet/ItemElectricCometBoots.java | 229 +------
.../item/boots/comet/ItemNanoCometBoots.java | 22 +-
.../boots/comet/ItemQuantumCometBoots.java | 22 +-
.../boots/meteor/ItemElectricMeteorBoots.java | 217 +------
.../boots/meteor/ItemNanoMeteorBoots.java | 197 +-----
.../boots/meteor/ItemQuantumMeteorBoots.java | 194 +-----
.../ItemPurpleVoidwalkerBoots.java | 189 +-----
.../boots/unique/ItemCometMeteorBoots.java | 107 +---
.../boots/unique/ItemMeteoricCometBoots.java | 95 +--
.../voidwalker/ItemCometVoidwalkerBoots.java | 174 +-----
.../ItemElectricVoidwalkerBoots.java | 180 +-----
.../voidwalker/ItemMeteorVoidwalkerBoots.java | 174 +-----
.../voidwalker/ItemNanoVoidwalkerBoots.java | 233 +------
.../ItemQuantumVoidwalkerBoots.java | 233 +------
.../item/tools/ItemThaumicInterfacer.java | 2 +
.../java/thaumicboots/main/ClientProxy.java | 7 +
.../java/thaumicboots/main/CommonProxy.java | 8 +-
src/main/java/thaumicboots/main/Config.java | 101 +--
.../thaumicboots/main/utils/BootKeys.java | 55 ++
.../main/utils/TabThaumicBoots.java | 6 +-
.../main/utils/compat/EMTHelper.java | 455 ++++++++++++++
.../main/utils/compat/ExplorationsHelper.java | 62 ++
.../main/utils/compat/GTNHLibHelper.java | 27 +
.../main/utils/compat/ModHelperManager.java | 4 +
.../main/utils/compat/TaintedHelper.java | 27 +
.../main/utils/compat/ThaumcraftHelper.java | 580 ++++++------------
.../assets/thaumicboots/lang/en_US.lang | 12 +-
.../model/boots_tainted_model.png | Bin 0 -> 1373 bytes
.../textures/items/bootsArcanium.png | Bin 0 -> 1525 bytes
.../textures/items/bootsTainted.png | Bin 0 -> 1480 bytes
.../textures/items/bootstraveler copy.png | Bin 0 -> 1293 bytes
.../textures/items/bootstraveler.png | Bin 0 -> 1508 bytes
53 files changed, 2252 insertions(+), 2912 deletions(-)
create mode 100644 src/main/java/thaumicboots/IGrief.java
create mode 100644 src/main/java/thaumicboots/api/IComet.java
create mode 100644 src/main/java/thaumicboots/api/ICometMeteorMix.java
create mode 100644 src/main/java/thaumicboots/api/IGrief.java
create mode 100644 src/main/java/thaumicboots/api/IMeteor.java
create mode 100644 src/main/java/thaumicboots/api/ISpecialEffect.java
create mode 100644 src/main/java/thaumicboots/api/ITBootJumpable.java
create mode 100644 src/main/java/thaumicboots/api/ITBootSpeed.java
create mode 100644 src/main/java/thaumicboots/api/ItemBoots.java
create mode 100644 src/main/java/thaumicboots/api/ItemElectricBoots.java
create mode 100644 src/main/java/thaumicboots/api/ItemVoidBoots.java
create mode 100644 src/main/java/thaumicboots/api/serverfiles/PacketHandler.java
create mode 100644 src/main/java/thaumicboots/api/serverfiles/PacketJumpToggle.java
create mode 100644 src/main/java/thaumicboots/api/serverfiles/PacketJumpToggleAck.java
create mode 100644 src/main/java/thaumicboots/api/serverfiles/PacketSpeedToggle.java
create mode 100644 src/main/java/thaumicboots/api/serverfiles/PacketSpeedToggleAck.java
create mode 100644 src/main/java/thaumicboots/main/utils/BootKeys.java
create mode 100644 src/main/java/thaumicboots/main/utils/compat/EMTHelper.java
create mode 100644 src/main/java/thaumicboots/main/utils/compat/ExplorationsHelper.java
create mode 100644 src/main/java/thaumicboots/main/utils/compat/GTNHLibHelper.java
create mode 100644 src/main/java/thaumicboots/main/utils/compat/TaintedHelper.java
create mode 100644 src/main/resources/assets/thaumicboots/model/boots_tainted_model.png
create mode 100644 src/main/resources/assets/thaumicboots/textures/items/bootsArcanium.png
create mode 100644 src/main/resources/assets/thaumicboots/textures/items/bootsTainted.png
create mode 100644 src/main/resources/assets/thaumicboots/textures/items/bootstraveler copy.png
create mode 100644 src/main/resources/assets/thaumicboots/textures/items/bootstraveler.png
diff --git a/build.gradle b/build.gradle
index b894d64..f3a7fa2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,4 +1,4 @@
-//version: 1692122114
+//version: 1699290261
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -89,6 +89,23 @@ def out = services.get(StyledTextOutputFactory).create('an-output')
def projectJavaVersion = JavaLanguageVersion.of(8)
boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false
+boolean disableCheckstyle = project.hasProperty("disableCheckstyle") ? project.disableCheckstyle.toBoolean() : false
+
+final String CHECKSTYLE_CONFIG = """
+
+
+
+
+
+
+
+
+
+
+
+"""
checkPropertyExists("modName")
checkPropertyExists("modId")
@@ -140,6 +157,17 @@ if (!disableSpotless) {
apply from: Blowdryer.file('spotless.gradle')
}
+if (!disableCheckstyle) {
+ apply plugin: 'checkstyle'
+ tasks.named("checkstylePatchedMc") { enabled = false }
+ tasks.named("checkstyleMcLauncher") { enabled = false }
+ tasks.named("checkstyleIdeVirtualMain") { enabled = false }
+ tasks.named("checkstyleInjectedTags") { enabled = false }
+ checkstyle {
+ config = resources.text.fromString(CHECKSTYLE_CONFIG)
+ }
+}
+
String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/"
String kotlinSourceDir = "src/main/kotlin/"
@@ -600,15 +628,10 @@ repositories {
}
maven {
name = "ic2"
- url = "https://maven.ic2.player.to/"
- metadataSources {
- mavenPom()
- artifact()
+ url = getURL("https://maven.ic2.player.to/", "https://maven2.ic2.player.to/")
+ content {
+ includeGroup "net.industrial-craft"
}
- }
- maven {
- name = "ic2-mirror"
- url = "https://maven2.ic2.player.to/"
metadataSources {
mavenPom()
artifact()
@@ -623,7 +646,7 @@ repositories {
def mixinProviderGroup = "io.github.legacymoddingmc"
def mixinProviderModule = "unimixins"
-def mixinProviderVersion = "0.1.7.1"
+def mixinProviderVersion = "0.1.13"
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
ext.mixinProviderSpec = mixinProviderSpec
@@ -770,23 +793,14 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
}
dependencies {
- def lwjgl3ifyVersion = '1.4.0'
- def asmVersion = '9.4'
+ def lwjgl3ifyVersion = '1.5.1'
if (modId != 'lwjgl3ify') {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
- java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.26')
+ java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.17')
}
- java17PatchDependencies('net.minecraft:launchwrapper:1.17.2') {transitive = false}
- java17PatchDependencies("org.ow2.asm:asm:${asmVersion}")
- java17PatchDependencies("org.ow2.asm:asm-commons:${asmVersion}")
- java17PatchDependencies("org.ow2.asm:asm-tree:${asmVersion}")
- java17PatchDependencies("org.ow2.asm:asm-analysis:${asmVersion}")
- java17PatchDependencies("org.ow2.asm:asm-util:${asmVersion}")
- java17PatchDependencies('org.ow2.asm:asm-deprecated:7.1')
- java17PatchDependencies("org.apache.commons:commons-lang3:3.12.0")
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
}
@@ -1173,9 +1187,8 @@ publishing {
version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
}
}
-
repositories {
- if (usesMavenPublishing.toBoolean()) {
+ if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) {
maven {
url = mavenPublishUrl
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
@@ -1576,6 +1589,25 @@ def getSecondaryArtifacts() {
return secondaryArtifacts
}
+def getURL(String main, String fallback) {
+ return pingURL(main, 10000) ? main : fallback
+}
+
+// credit: https://stackoverflow.com/a/3584332
+def pingURL(String url, int timeout) {
+ url = url.replaceFirst("^https", "http") // Otherwise an exception may be thrown on invalid SSL certificates.
+ try {
+ HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection()
+ connection.setConnectTimeout(timeout)
+ connection.setReadTimeout(timeout)
+ connection.setRequestMethod("HEAD")
+ int responseCode = connection.getResponseCode()
+ return 200 <= responseCode && responseCode <= 399
+ } catch (IOException ignored) {
+ return false
+ }
+}
+
// For easier scripting of things that require variables defined earlier in the buildscript
if (file('addon.late.gradle.kts').exists()) {
apply from: 'addon.late.gradle.kts'
diff --git a/dependencies.gradle b/dependencies.gradle
index c867053..d1ece27 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -4,8 +4,9 @@ dependencies {
compile('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compile('com.github.GTNewHorizons:Baubles:1.0.1.16:dev')
compile('com.github.GTNewHorizons:Thaumic_Exploration:1.1.94-GTNH:dev')
- compile('com.github.GTNewHorizons:Electro-Magic-Tools:1.3.3:dev')
+ compile('com.github.GTNewHorizons:Electro-Magic-Tools:1.3.6:dev')
compile('com.github.GTNewHorizons:Tainted-Magic:7.6.3-GTNH')
+ compile('com.github.GTNewHorizons:GTNHLib:0.0.13')
runtimeOnly('com.github.GTNewHorizons:TCNEIAdditions:1.2.2:dev')
}
diff --git a/gradle.properties b/gradle.properties
index bb97384..ad7cdb5 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -77,3 +77,4 @@ usesShadowedDependencies = false
# Optional parameter to prevent the source code from being published
# noPublishedSources =
+enableModernJavaSyntax = true
diff --git a/repositories.gradle b/repositories.gradle
index 0280a6d..ea23bf2 100644
--- a/repositories.gradle
+++ b/repositories.gradle
@@ -6,14 +6,6 @@ repositories {
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
allowInsecureProtocol
}
- maven {
- name 'ic2'
- url 'https://maven.ic2.player.to/'
- metadataSources {
- mavenPom()
- artifact()
- }
- }
maven {
url 'https://jitpack.io'
}
diff --git a/src/main/java/thaumicboots/IGrief.java b/src/main/java/thaumicboots/IGrief.java
new file mode 100644
index 0000000..5429c4e
--- /dev/null
+++ b/src/main/java/thaumicboots/IGrief.java
@@ -0,0 +1,56 @@
+package thaumicboots;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+
+import flaxbeard.thaumicexploration.ThaumicExploration;
+import flaxbeard.thaumicexploration.common.ConfigTX;
+import thaumicboots.main.utils.compat.ExplorationsHelper;
+
+public interface IGrief {
+
+ public default void grief(EntityPlayer player) {
+ // anti-griefing config
+ if (ExplorationsHelper.isActive()) {
+ if (!ConfigTX.allowBootsIce) {
+ return;
+ }
+ for (int x = -5; x < 6; x++) {
+ for (int z = -5; z < 6; z++) {
+ int X = (int) (player.posX + x);
+ int Y = (int) (player.posY - 1);
+ int Z = (int) (player.posZ + z);
+
+ // if the block isn't water
+ if (player.worldObj.getBlock(X, Y, Z) != Blocks.water) {
+ continue;
+ }
+
+ // if the block hasn't some water properties
+ if (player.worldObj.getBlock(X, Y, Z).getMaterial() != Material.water) {
+ continue;
+ }
+
+ // if the metadata of the block isn't 0
+ if (player.worldObj.getBlockMetadata(X, Y, Z) != 0) {
+ continue;
+ }
+
+ // if the player is in water
+ if (player.isInWater()) {
+ continue;
+ }
+
+ // ???, someone needs to figure out what this does.
+ if ((Math.abs(x) + Math.abs(z) >= 8)) {
+ continue;
+ }
+
+ player.worldObj.setBlock(X, Y, Z, ThaumicExploration.meltyIce);
+ player.worldObj.spawnParticle("snowballpoof", X, Y + 1, Z, 0.0D, 0.025D, 0.0D);
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/thaumicboots/api/IComet.java b/src/main/java/thaumicboots/api/IComet.java
new file mode 100644
index 0000000..bdca0c7
--- /dev/null
+++ b/src/main/java/thaumicboots/api/IComet.java
@@ -0,0 +1,39 @@
+package thaumicboots.api;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
+public interface IComet extends ISpecialEffect, IGrief {
+
+ public default void specialEffect(Item item, EntityPlayer player) {
+ ItemStack itemStack = player.inventory.armorItemInSlot(0);
+ if (!itemStack.hasTagCompound()) {
+ NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
+ itemStack.setTagCompound(par1NBTTagCompound);
+ itemStack.stackTagCompound.setInteger("runTicks", 0);
+ }
+ grief(player);
+ int ticks = itemStack.stackTagCompound.getInteger("runTicks");
+ double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(player.motionY);
+ if (motion > 0.1F || !player.onGround || player.isOnLadder()) {
+ if (ticks < 100) ticks++;
+ } else {
+ ticks = 0;
+ }
+ if (!player.isWet() && motion > 0.1F) {
+ player.worldObj.spawnParticle(
+ "fireworksSpark",
+ player.posX + Math.random() - 0.5F,
+ player.boundingBox.minY + 0.25F + ((Math.random() - 0.5) * 0.25F),
+ player.posZ + Math.random() - 0.5F,
+ 0.0D,
+ 0.025D,
+ 0.0D);
+ }
+ itemStack.stackTagCompound.setInteger("runTicks", ticks);
+ return;
+ }
+
+}
diff --git a/src/main/java/thaumicboots/api/ICometMeteorMix.java b/src/main/java/thaumicboots/api/ICometMeteorMix.java
new file mode 100644
index 0000000..4b5965d
--- /dev/null
+++ b/src/main/java/thaumicboots/api/ICometMeteorMix.java
@@ -0,0 +1,96 @@
+package thaumicboots.api;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
+public interface ICometMeteorMix extends IMeteor, IComet {
+
+ public default void specialEffect(Item item, EntityPlayer player) {
+ ItemStack itemStack = player.inventory.armorItemInSlot(0);
+ if (!itemStack.hasTagCompound()) {
+ NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
+ itemStack.setTagCompound(par1NBTTagCompound);
+ itemStack.stackTagCompound.setBoolean("IsSmashingMix", false);
+ itemStack.stackTagCompound.setInteger("smashTicksMix", 0);
+ itemStack.stackTagCompound.setInteger("airTicksMix", 0);
+ itemStack.stackTagCompound.setInteger("runTicksMix", 0);
+ }
+ grief(player);
+
+ boolean smashing = itemStack.stackTagCompound.getBoolean("IsSmashingMix");
+ int ticksSmash = itemStack.stackTagCompound.getInteger("smashTicksMix");
+ int ticksAir = itemStack.stackTagCompound.getInteger("airTicksMix");
+ int ticksRun = itemStack.stackTagCompound.getInteger("runTicksMix");
+ double motionRun = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(player.motionY);
+ if (motionRun > 0.1F || !player.onGround || player.isOnLadder()) {
+ if (ticksRun < 100) ticksRun++;
+ } else {
+ ticksRun = 0;
+ }
+ if (player.onGround || player.isOnLadder()) {
+ int size = 0;
+ if (ticksSmash > 5) size = 1;
+ if (ticksSmash > 10) size = 2;
+ if (ticksSmash > 15) size = 3;
+ smashing = false;
+ ticksSmash = 0;
+ ticksAir = 0;
+ if (size > 0) {
+ player.worldObj.createExplosion(player, player.posX, player.posY, player.posZ, size, false);
+ }
+ }
+
+ // COME ON AND SLAM
+ if (!player.onGround && !player.isOnLadder() && !player.isInWater()) {
+ if (!player.isSneaking()) {
+ ticksAir++;
+ }
+
+ if (player.isSneaking() && ticksAir > 5) {
+ smashing = true;
+ }
+ }
+
+ if (player.capabilities.isFlying) {
+ smashing = false;
+ ticksSmash = 0;
+ ticksAir = 0;
+ }
+ if (smashing) {
+
+ for (String particleName : new String[] { "flame", "smoke", "flame" }) {
+ player.worldObj.spawnParticle(
+ particleName,
+ player.posX + Math.random() - 0.5F,
+ player.posY + Math.random() - 0.5F,
+ player.posZ + Math.random() - 0.5F,
+ 0.0D,
+ 0.0D,
+ 0.0D);
+ }
+
+ player.motionY -= 0.1F;
+ ticksSmash++;
+ }
+
+ if (!player.isWet() && motionRun > 0.1F) {
+ for (String particleName : new String[] { "fireworksSpark", "flame", "flame" }) {
+ player.worldObj.spawnParticle(
+ particleName,
+ player.posX + Math.random() - 0.5F,
+ player.boundingBox.minY + 0.25F + ((Math.random() - 0.5) * 0.25F),
+ player.posZ + Math.random() - 0.5F,
+ 0.0D,
+ 0.025D,
+ 0.0D);
+ }
+ }
+
+ itemStack.stackTagCompound.setInteger("runTicksMix", ticksRun);
+ itemStack.stackTagCompound.setBoolean("IsSmashingMix", smashing);
+ itemStack.stackTagCompound.setInteger("smashTicksMix", ticksSmash);
+ itemStack.stackTagCompound.setInteger("airTicksMix", ticksAir);
+ }
+}
diff --git a/src/main/java/thaumicboots/api/IGrief.java b/src/main/java/thaumicboots/api/IGrief.java
new file mode 100644
index 0000000..0333c52
--- /dev/null
+++ b/src/main/java/thaumicboots/api/IGrief.java
@@ -0,0 +1,56 @@
+package thaumicboots.api;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+
+import flaxbeard.thaumicexploration.ThaumicExploration;
+import flaxbeard.thaumicexploration.common.ConfigTX;
+import thaumicboots.main.utils.compat.ExplorationsHelper;
+
+public interface IGrief {
+
+ public default void grief(EntityPlayer player) {
+ // anti-griefing config
+ if (ExplorationsHelper.isActive()) {
+ if (!ConfigTX.allowBootsIce) {
+ return;
+ }
+ for (int x = -5; x < 6; x++) {
+ for (int z = -5; z < 6; z++) {
+ int X = (int) (player.posX + x);
+ int Y = (int) (player.posY - 1);
+ int Z = (int) (player.posZ + z);
+
+ // if the block isn't water
+ if (player.worldObj.getBlock(X, Y, Z) != Blocks.water) {
+ continue;
+ }
+
+ // if the block hasn't some water properties
+ if (player.worldObj.getBlock(X, Y, Z).getMaterial() != Material.water) {
+ continue;
+ }
+
+ // if the metadata of the block isn't 0
+ if (player.worldObj.getBlockMetadata(X, Y, Z) != 0) {
+ continue;
+ }
+
+ // if the player is in water
+ if (player.isInWater()) {
+ continue;
+ }
+
+ // Just the radius of the effect.
+ if ((Math.abs(x) + Math.abs(z) >= 8)) {
+ continue;
+ }
+
+ player.worldObj.setBlock(X, Y, Z, ThaumicExploration.meltyIce);
+ player.worldObj.spawnParticle("snowballpoof", X, Y + 1, Z, 0.0D, 0.025D, 0.0D);
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/thaumicboots/api/IMeteor.java b/src/main/java/thaumicboots/api/IMeteor.java
new file mode 100644
index 0000000..80aded8
--- /dev/null
+++ b/src/main/java/thaumicboots/api/IMeteor.java
@@ -0,0 +1,108 @@
+package thaumicboots.api;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.Vec3;
+import net.minecraftforge.event.entity.living.LivingEvent;
+
+import cpw.mods.fml.common.Loader;
+import flaxbeard.thaumicexploration.integration.TTIntegration;
+
+public interface IMeteor extends ISpecialEffect {
+
+ public default void specialEffect(Item item, EntityPlayer player) {
+ ItemStack itemStack = player.inventory.armorItemInSlot(0);
+ if (!itemStack.hasTagCompound()) {
+ NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
+ itemStack.setTagCompound(par1NBTTagCompound);
+ itemStack.stackTagCompound.setBoolean("IsSmashing", false);
+ itemStack.stackTagCompound.setInteger("smashTicks", 0);
+ itemStack.stackTagCompound.setInteger("airTicks", 0);
+ }
+ boolean smashing = itemStack.stackTagCompound.getBoolean("IsSmashing");
+ int ticks = itemStack.stackTagCompound.getInteger("smashTicks");
+ int ticksAir = itemStack.stackTagCompound.getInteger("airTicks");
+
+ if (player.onGround || player.isOnLadder()) {
+ int size = 0;
+ if (ticks > 5) size = 1;
+ if (ticks > 10) size = 2;
+ if (ticks > 15) size = 3;
+ smashing = false;
+ ticks = 0;
+ ticksAir = 0;
+ if (size > 0) {
+ player.worldObj.createExplosion(player, player.posX, player.posY, player.posZ, size, false);
+ }
+ }
+
+ // COME ON AND SLAM
+ if (!player.onGround && !player.isOnLadder() && !player.isInWater()) {
+ if (!player.isSneaking()) {
+ ticksAir++;
+ }
+
+ if (player.isSneaking() && ticksAir > 5) {
+ smashing = true;
+ }
+ }
+
+ if (player.capabilities.isFlying) {
+ smashing = false;
+ ticks = 0;
+ ticksAir = 0;
+ }
+ if (smashing) {
+ for (String particleName : new String[] { "flame", "smoke", "flame" }) {
+ player.worldObj.spawnParticle(
+ particleName,
+ player.posX + Math.random() - 0.5F,
+ player.posY + Math.random() - 0.5F,
+ player.posZ + Math.random() - 0.5F,
+ 0.0D,
+ 0.0D,
+ 0.0D);
+ }
+
+ player.motionY -= 0.1F;
+ ticks++;
+ } else {
+ double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(0.5 * player.motionY);
+ if (!player.isWet() && motion > 0.1F) {
+ player.worldObj.spawnParticle(
+ "flame",
+ player.posX + Math.random() - 0.5F,
+ player.boundingBox.minY + 0.25F + ((Math.random() - 0.5) * 0.25F),
+ player.posZ + Math.random() - 0.5F,
+ 0.0D,
+ 0.025D,
+ 0.0D);
+ }
+ }
+
+ itemStack.stackTagCompound.setBoolean("IsSmashing", smashing);
+ itemStack.stackTagCompound.setInteger("smashTicks", ticks);
+ itemStack.stackTagCompound.setInteger("airTicks", ticksAir);
+ }
+
+ public default void specialEffect2(LivingEvent.LivingJumpEvent event) {
+
+ Vec3 vector = event.entityLiving.getLook(0.5F);
+ double total = Math.abs(vector.zCoord + vector.xCoord);
+ double jump = 0;
+ if (Loader.isModLoaded("ThaumicTinkerer")) {
+ jump = TTIntegration.getAscentLevel((EntityPlayer) event.entity);
+ }
+ if (jump >= 1) {
+ jump = (jump + 2D) / 4D;
+ }
+
+ if (vector.yCoord < total) vector.yCoord = total;
+
+ event.entityLiving.motionY += ((jump + 1) * vector.yCoord) / 1.5F;
+ event.entityLiving.motionZ += (jump + 1) * vector.zCoord * 4;
+ event.entityLiving.motionX += (jump + 1) * vector.xCoord * 4;
+ }
+}
diff --git a/src/main/java/thaumicboots/api/ISpecialEffect.java b/src/main/java/thaumicboots/api/ISpecialEffect.java
new file mode 100644
index 0000000..04225a3
--- /dev/null
+++ b/src/main/java/thaumicboots/api/ISpecialEffect.java
@@ -0,0 +1,9 @@
+package thaumicboots.api;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+
+public interface ISpecialEffect {
+
+ public void specialEffect(Item item, EntityPlayer player);
+}
diff --git a/src/main/java/thaumicboots/api/ITBootJumpable.java b/src/main/java/thaumicboots/api/ITBootJumpable.java
new file mode 100644
index 0000000..c92cdb2
--- /dev/null
+++ b/src/main/java/thaumicboots/api/ITBootJumpable.java
@@ -0,0 +1,6 @@
+package thaumicboots.api;
+
+public interface ITBootJumpable {
+
+ double getJumpModifier();
+}
diff --git a/src/main/java/thaumicboots/api/ITBootSpeed.java b/src/main/java/thaumicboots/api/ITBootSpeed.java
new file mode 100644
index 0000000..a24f6a9
--- /dev/null
+++ b/src/main/java/thaumicboots/api/ITBootSpeed.java
@@ -0,0 +1,6 @@
+package thaumicboots.api;
+
+public interface ITBootSpeed {
+
+ float getSpeedModifier();
+}
diff --git a/src/main/java/thaumicboots/api/ItemBoots.java b/src/main/java/thaumicboots/api/ItemBoots.java
new file mode 100644
index 0000000..a713f92
--- /dev/null
+++ b/src/main/java/thaumicboots/api/ItemBoots.java
@@ -0,0 +1,271 @@
+package thaumicboots.api;
+
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.EnumRarity;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+
+import com.gtnewhorizon.gtnhlib.GTNHLib;
+
+import cpw.mods.fml.common.Optional;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import thaumcraft.api.IRepairable;
+import thaumcraft.api.IRunicArmor;
+import thaumcraft.api.IVisDiscountGear;
+import thaumcraft.api.aspects.Aspect;
+import thaumcraft.common.Thaumcraft;
+import thaumcraft.common.items.armor.Hover;
+
+public class ItemBoots extends ItemArmor
+ implements ITBootJumpable, ITBootSpeed, IVisDiscountGear, IRunicArmor, IRepairable {
+
+ public IIcon icon;
+
+ public float runBonus;
+ public float longrunningbonus;
+ public int visDiscount;
+ public int runicCharge;
+ public int tier;
+ public boolean steadyBonus;
+ public boolean negateFall;
+ public boolean waterEffects;
+ public String iconResPath;
+ public String armorResPath;
+ public String unlocalisedName;
+
+ public double jumpBonus;
+
+ public static final String TAG_MODE_JUMP = "jump";
+ public static final String TAG_MODE_SPEED = "speed";
+
+ public ItemBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
+ super(par2EnumArmorMaterial, par3, par4);
+ setBootsData();
+ }
+
+ protected void setBootsData() {
+ runicCharge = 0;
+ visDiscount = 0;
+ runBonus = 0.165F;
+ jumpBonus = 0.0D;
+ tier = 0;
+ steadyBonus = false; // this is the toggle for the longrunningbonus.
+ negateFall = true; // certain boots don't have fall damage in base.
+ waterEffects = false; // certain boots aren't hindered by being in the water.
+ longrunningbonus = 0.0F; // this is only for the comet boots, though it could be used for other boots.
+ iconResPath = "thaumicboots:electricVoid_16x";
+ armorResPath = "thaumicboots:model/electricbootsVoidwalker.png";
+ unlocalisedName = "ItemElectricVoid";
+ }
+
+ public double getJumpModifier() {
+ return jumpBonus;
+ }
+
+ public static double changeJump(double prevJump) {
+ double newJump = prevJump + 0.25;
+ if (newJump > 1) {
+ newJump = 0;
+ }
+ return newJump;
+ }
+
+ public static double isJumpEnabled(final ItemStack stack) {
+ return stack.stackTagCompound.getDouble(TAG_MODE_JUMP);
+ }
+
+ public static void setModeJump(ItemStack stack, double state) {
+ stack.stackTagCompound.setDouble(TAG_MODE_JUMP, state);
+ }
+
+ public float getSpeedModifier() {
+ return runBonus;
+ }
+
+ public static double changeSpeed(double prevSpeed) {
+ double newSpeed = prevSpeed + 0.25;
+ if (newSpeed > 1) {
+ newSpeed = 0;
+ }
+ return newSpeed;
+ }
+
+ public static double isSpeedEnabled(final ItemStack stack) {
+ return stack.stackTagCompound.getDouble(TAG_MODE_SPEED);
+ }
+
+ public static void setModeSpeed(ItemStack stack, double state) {
+ stack.stackTagCompound.setDouble(TAG_MODE_SPEED, state);
+ }
+
+ // TODO: the part not from interfaces
+
+ @SideOnly(Side.CLIENT) // this method is important, it's what initializes the texture
+ public IIcon func_77617_a(int par1) {
+ return this.icon;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister ir) {
+ this.icon = ir.registerIcon(iconResPath);
+ }
+
+ @Override
+ public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
+ if (visDiscount > 0) {
+ list.add(
+ EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
+ + ": "
+ + visDiscount
+ + "%");
+ }
+ }
+
+ @Override
+ public String getArmorTexture(final ItemStack stack, final Entity entity, final int slot, final String type) {
+ return armorResPath;
+ }
+
+ @Override
+ public EnumRarity getRarity(final ItemStack stack) {
+ return EnumRarity.rare;
+ }
+
+ public int getRunicCharge(ItemStack arg0) {
+ return runicCharge;
+ }
+
+ public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
+ return visDiscount;
+ }
+
+ public int getTier(ItemStack itemStack) {
+ return tier;
+ }
+
+ public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
+ return par2ItemStack.isItemEqual(new ItemStack(Items.leather))
+ || super.getIsRepairable(par1ItemStack, par2ItemStack);
+ }
+
+ protected float computeBonus(ItemStack itemStack, EntityPlayer player) {
+ int ticks = player.inventory.armorItemInSlot(0).stackTagCompound.getInteger("runTicks");
+ float bonus = runBonus + ((ticks * 0.2F) * longrunningbonus);
+ return bonus;
+ }
+
+ @Override
+ public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
+ if (negateFall && player.fallDistance > 0.0F) {
+ player.fallDistance = 0.0F;
+ }
+
+ if (player.moveForward <= 0F) {
+ return;
+ }
+
+ float bonus = getSpeedModifier();
+ stepHeight(player);
+ if (steadyBonus) {
+ runningTicks(player);
+ bonus = computeBonus(itemStack, player);
+ }
+
+ applyFinalBonus(bonus, player, itemStack);
+ }
+
+ public void applyFinalBonus(float bonus, EntityPlayer player, ItemStack itemStack) {
+ bonus *= itemStack.stackTagCompound.getDouble(TAG_MODE_SPEED);
+ applyBonus(player, bonus);
+ }
+
+ public void stepHeight(EntityPlayer player) {
+ if (!player.worldObj.isRemote) {
+ return;
+ }
+ if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) {
+ Thaumcraft.instance.entityEventHandler.prevStep
+ .put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
+ }
+ player.stepHeight = 1.0F;
+ }
+
+ public void runningTicks(EntityPlayer player) {
+ if (!player.inventory.armorItemInSlot(0).hasTagCompound()) {
+ NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
+ player.inventory.armorItemInSlot(0).setTagCompound(par1NBTTagCompound);
+ player.inventory.armorItemInSlot(0).stackTagCompound.setInteger("runTicks", 0);
+ }
+ }
+
+ public void applyBonus(EntityPlayer player, float bonus) {
+ if (waterEffects && player.isInWater()) {
+ bonus *= 0.25F;
+ }
+ if (player.onGround || player.isOnLadder() || player.capabilities.isFlying) {
+ player.moveFlying(0.0F, 1.0F, bonus);
+ } else if (Hover.getHover(player.getEntityId())) {
+ player.jumpMovementFactor = 0.03F;
+ } else {
+ player.jumpMovementFactor = 0.05F;
+ }
+ }
+
+ // taken from Vazkii
+ public static ItemStack getBoots(EntityPlayer player) {
+ ItemStack stack1 = player.getCurrentArmor(0);
+ return isBoot(stack1) ? stack1 : null;
+ }
+
+ private static boolean isBoot(ItemStack stack) {
+ return stack != null && (stack.getItem() instanceof ItemBoots);
+ }
+
+ @Optional.Method(modid = "gtnhlib")
+ @SideOnly(Side.CLIENT)
+ public static void renderHUDJumpNotification() {
+ Minecraft mc = Minecraft.getMinecraft();
+ String text = getModeText(
+ "thaumicboots.jumpEffect",
+ getBoots(mc.thePlayer).stackTagCompound.getDouble(TAG_MODE_JUMP) * 100);
+ GTNHLib.proxy.printMessageAboveHotbar(text, 60, true, true);
+ }
+
+ @Optional.Method(modid = "gtnhlib")
+ @SideOnly(Side.CLIENT)
+ public static void renderHUDSpeedNotification() {
+ Minecraft mc = Minecraft.getMinecraft();
+ String text = getModeText(
+ "thaumicboots.speedEffect",
+ getBoots(mc.thePlayer).stackTagCompound.getDouble(TAG_MODE_SPEED) * 100);
+ GTNHLib.proxy.printMessageAboveHotbar(text, 60, true, true);
+ }
+
+ @Optional.Method(modid = "gtnhlib")
+ public static String getModeText(String effect, double val) {
+ String endResult = (int) val + "%";
+ String result = switch ((int) val) {
+ case 0 -> EnumChatFormatting.DARK_RED + StatCollector.translateToLocal(endResult);
+ case 25 -> EnumChatFormatting.RED + StatCollector.translateToLocal(endResult);
+ case 50 -> EnumChatFormatting.DARK_GREEN + StatCollector.translateToLocal(endResult);
+ case 75 -> EnumChatFormatting.GREEN + StatCollector.translateToLocal(endResult);
+ case 100 -> EnumChatFormatting.AQUA + StatCollector.translateToLocal(endResult);
+ default -> EnumChatFormatting.DARK_GRAY + StatCollector.translateToLocal(endResult);
+ };
+
+ return EnumChatFormatting.GOLD + StatCollector.translateToLocal(effect) + " " + result;
+
+ }
+}
diff --git a/src/main/java/thaumicboots/api/ItemElectricBoots.java b/src/main/java/thaumicboots/api/ItemElectricBoots.java
new file mode 100644
index 0000000..bdfeccb
--- /dev/null
+++ b/src/main/java/thaumicboots/api/ItemElectricBoots.java
@@ -0,0 +1,159 @@
+package thaumicboots.api;
+
+import java.util.List;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.DamageSource;
+import net.minecraftforge.common.ISpecialArmor;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import ic2.api.item.ElectricItem;
+import ic2.api.item.IElectricItem;
+import thaumicboots.main.utils.TabThaumicBoots;
+
+public class ItemElectricBoots extends ItemBoots implements IElectricItem, ISpecialArmor {
+
+ public int maxCharge;
+ public int energyPerDamage;
+ public double transferLimit;
+ public boolean provideEnergy;
+
+ public double damageAbsorptionRatio;
+
+ public ItemElectricBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
+ super(par2EnumArmorMaterial, par3, par4);
+ setCreativeTab(TabThaumicBoots.tabThaumicBoots);
+ setUnlocalizedName(unlocalisedName);
+ }
+
+ protected void setBootsData() {
+ super.setBootsData();
+ maxCharge = 0;
+ energyPerDamage = 0;
+ provideEnergy = false; // doesn't need to exist, but someone could make boots that function like a battery
+ transferLimit = 0;
+ damageAbsorptionRatio = 0.5D;
+ }
+
+ public int getEnergyPerDamage() {
+ return energyPerDamage;
+ }
+
+ @Override
+ public boolean canProvideEnergy(ItemStack itemStack) {
+ return provideEnergy;
+ }
+
+ @Override
+ public double getMaxCharge(ItemStack itemStack) {
+ return maxCharge;
+ }
+
+ @Override
+ public double getTransferLimit(ItemStack itemStack) {
+ return transferLimit;
+ }
+
+ // For some reason, sometimes the EMTConfigHandler returns this as 0,
+ // but only when it's called outside of EMT,
+ // this ensures this never happens internally.
+ public float getEMTNanoSpeed() {
+ return 0.275F;
+ // return (float) EMTConfigHandler.nanoBootsSpeed;
+ // I commented the ConfigHandler because it's not compatible with the non GTNH version of EMT
+ // I may reimplement it eventually once I remove GT from EMT as a hard dep.
+ }
+
+ public float getEMTQuantumSpeed() {
+ return 0.51F;
+ // return (float) EMTConfigHandler.quantumBootsSpeed;
+ }
+
+ public double getDamageAbsorptionRatio() {
+ return damageAbsorptionRatio;
+ }
+
+ public double getBaseAbsorptionRatio() {
+ return 0.15D;
+ }
+
+ // TODO: non-variable related methods
+
+ @Override
+ protected float computeBonus(ItemStack itemStack, EntityPlayer player) {
+ int ticks = player.inventory.armorItemInSlot(0).stackTagCompound.getInteger("runTicks");
+
+ float bonus = runBonus + ((ticks / 5) * 0.003F);
+ if (ElectricItem.manager.getCharge(itemStack) == 0) {
+ bonus = 0;
+ } else if (player.isInWater()) {
+ bonus /= 4.0F;
+ }
+
+ return bonus;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
+ ItemStack itemStack = new ItemStack(this, 1);
+ if (getChargedItem(itemStack) == this) {
+ ItemStack charged = new ItemStack(this, 1);
+ ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
+ itemList.add(charged);
+ }
+ if (getEmptyItem(itemStack) == this) {
+ itemList.add(new ItemStack(this, 1, getMaxDamage()));
+ }
+ }
+
+ @Override
+ public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source,
+ double damage, int slot) {
+ if (source.isUnblockable()) {
+ return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
+ } else {
+ double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
+ int energyPerDamage = getEnergyPerDamage();
+ double damageLimit = energyPerDamage <= 0 ? 0
+ : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
+ return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
+ }
+ }
+
+ @Override
+ public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
+ if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
+ return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
+ } else {
+ return 0;
+ }
+ }
+
+ @Override
+ public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
+ ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
+ }
+
+ public Item getChargedItem(ItemStack itemStack) {
+ return this;
+ }
+
+ public Item getEmptyItem(ItemStack itemStack) {
+ return this;
+ }
+
+ // necessary for the electric functionality
+ @Override
+ public void applyFinalBonus(float bonus, EntityPlayer player, ItemStack itemStack) {
+ if (ElectricItem.manager.getCharge(itemStack) == 0) {
+ bonus *= 0;
+ }
+ bonus *= itemStack.stackTagCompound.getDouble(TAG_MODE_SPEED);
+ applyBonus(player, bonus);
+ }
+}
diff --git a/src/main/java/thaumicboots/api/ItemVoidBoots.java b/src/main/java/thaumicboots/api/ItemVoidBoots.java
new file mode 100644
index 0000000..7055a5b
--- /dev/null
+++ b/src/main/java/thaumicboots/api/ItemVoidBoots.java
@@ -0,0 +1,140 @@
+package thaumicboots.api;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumRarity;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+import net.minecraftforge.common.ISpecialArmor;
+
+import baubles.common.lib.PlayerHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import taintedmagic.common.registry.ItemRegistry;
+import thaumcraft.api.IWarpingGear;
+import thaumcraft.client.fx.ParticleEngine;
+import thaumcraft.client.fx.particles.FXWispEG;
+import thaumicboots.main.utils.TabThaumicBoots;
+
+public class ItemVoidBoots extends ItemBoots implements IWarpingGear, ISpecialArmor {
+
+ public ItemVoidBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
+ super(par2EnumArmorMaterial, par3, par4);
+ setCreativeTab(TabThaumicBoots.tabThaumicBoots);
+ setUnlocalizedName(unlocalisedName);
+ }
+
+ protected void setBootsData() {
+ visDiscount = 5;
+ jumpBonus = 0.450D;
+ tier = 3;
+ iconResPath = "thaumicboots:voidComet_16x";
+ armorResPath = "thaumicboots:model/VoidwalkerBootsComet_-_Purple.png";
+ unlocalisedName = "ItemVoidComet";
+ }
+
+ @Override
+ public EnumRarity getRarity(final ItemStack stack) {
+ return EnumRarity.epic;
+ }
+
+ @Override
+ public int getWarp(final ItemStack stack, final EntityPlayer player) {
+ return 5;
+ }
+
+ @Override
+ public ArmorProperties getProperties(final EntityLivingBase entity, final ItemStack stack,
+ final DamageSource source, final double dmg, final int slot) {
+ int priority = 0;
+ double ratio = damageReduceAmount / 90.0D;
+
+ if (source.isMagicDamage() || source.isFireDamage() || source.isExplosion()) {
+ priority = 1;
+ ratio = damageReduceAmount / 80.0D;
+ } else if (source.isUnblockable()) {
+ priority = 0;
+ ratio = 0.0D;
+ }
+ return new ArmorProperties(priority, ratio, stack.getMaxDamage() + 1 - stack.getItemDamage());
+ }
+
+ @Override
+ public int getArmorDisplay(final EntityPlayer player, final ItemStack stack, final int slot) {
+ return damageReduceAmount;
+ }
+
+ @Override
+ public void damageArmor(final EntityLivingBase entity, final ItemStack stack, final DamageSource source,
+ final int dmg, final int slot) {
+ if (source != DamageSource.fall) {
+ stack.damageItem(dmg, entity);
+ }
+ }
+
+ @Override
+ public void onUpdate(final ItemStack stack, final World world, final Entity entity, final int j, final boolean k) {
+ super.onUpdate(stack, world, entity, j, k);
+ if (!world.isRemote && stack.isItemDamaged()
+ && entity.ticksExisted % 20 == 0
+ && entity instanceof EntityLivingBase) {
+ stack.damageItem(-1, (EntityLivingBase) entity);
+ }
+ }
+
+ // necessary for void functionality
+ @Override
+ public void onArmorTick(final World world, final EntityPlayer player, final ItemStack stack) {
+ super.onArmorTick(world, player, stack);
+ // repair
+ if (!world.isRemote && stack.isItemDamaged() && player.ticksExisted % 20 == 0) {
+ stack.damageItem(-1, player);
+ }
+
+ // negate fall damage
+ if (player.fallDistance > 3.0F) {
+ player.fallDistance = 1.0F;
+ }
+
+ // particles
+ final double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(0.5 * player.motionY);
+ if (world.isRemote && (motion > 0.1D || !player.onGround) && world.rand.nextInt(3) == 0) {
+ particles(world, player);
+ }
+
+ if (player.moveForward <= 0F) {
+ return;
+ }
+
+ if (!player.isSneaking()) {
+ stepHeight(player);
+ }
+
+ // speed boost
+ float bonus = getSpeedModifier() * sashEquiped(player);
+ bonus *= stack.stackTagCompound.getDouble(TAG_MODE_SPEED);
+ applyBonus(player, bonus);
+ }
+
+ public float sashEquiped(final EntityPlayer player) {
+ final ItemStack sash = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
+ if (sash != null && sash.getItem() == ItemRegistry.ItemVoidwalkerSash) {
+ return 3.0F;
+ }
+ return 1.0F;
+ }
+
+ // particle effect from Tainted Magic
+ @SideOnly(Side.CLIENT)
+ public void particles(final World world, final EntityPlayer player) {
+ final FXWispEG fx = new FXWispEG(
+ world,
+ player.posX + (Math.random() - Math.random()) * 0.5D,
+ player.boundingBox.minY + 0.05D + (Math.random() - Math.random()) * 0.1D,
+ player.posZ + (Math.random() - Math.random()) * 0.5D,
+ player);
+ ParticleEngine.instance.addEffect(world, fx);
+ }
+}
diff --git a/src/main/java/thaumicboots/api/serverfiles/PacketHandler.java b/src/main/java/thaumicboots/api/serverfiles/PacketHandler.java
new file mode 100644
index 0000000..86d6e18
--- /dev/null
+++ b/src/main/java/thaumicboots/api/serverfiles/PacketHandler.java
@@ -0,0 +1,21 @@
+package thaumicboots.api.serverfiles;
+
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.relauncher.Side;
+import thaumicboots.main.utils.VersionInfo;
+
+public class PacketHandler {
+
+ private PacketHandler() {}
+
+ public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE
+ .newSimpleChannel(VersionInfo.ModID.toLowerCase());
+
+ public static void initPackets() {
+ INSTANCE.registerMessage(PacketJumpToggle.class, PacketJumpToggle.class, 1, Side.SERVER);
+ INSTANCE.registerMessage(PacketJumpToggleAck.class, PacketJumpToggleAck.class, 2, Side.CLIENT);
+ INSTANCE.registerMessage(PacketSpeedToggle.class, PacketSpeedToggle.class, 3, Side.SERVER);
+ INSTANCE.registerMessage(PacketSpeedToggleAck.class, PacketSpeedToggleAck.class, 4, Side.CLIENT);
+ }
+}
diff --git a/src/main/java/thaumicboots/api/serverfiles/PacketJumpToggle.java b/src/main/java/thaumicboots/api/serverfiles/PacketJumpToggle.java
new file mode 100644
index 0000000..25f35cf
--- /dev/null
+++ b/src/main/java/thaumicboots/api/serverfiles/PacketJumpToggle.java
@@ -0,0 +1,35 @@
+package thaumicboots.api.serverfiles;
+
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+
+import cpw.mods.fml.common.network.simpleimpl.IMessage;
+import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
+import cpw.mods.fml.common.network.simpleimpl.MessageContext;
+import io.netty.buffer.ByteBuf;
+import thaumicboots.api.ItemBoots;
+
+public class PacketJumpToggle implements IMessage, IMessageHandler {
+
+ public void fromBytes(ByteBuf byteBuf) {
+ // not needed
+ }
+
+ public void toBytes(ByteBuf byteBuf) {
+ // not needed
+ }
+
+ @Override
+ public IMessage onMessage(PacketJumpToggle message, MessageContext ctx) {
+ EntityPlayerMP player = ctx.getServerHandler().playerEntity;
+ final ItemStack boots = ItemBoots.getBoots(player);
+ if (boots != null) {
+ double jumpState = ItemBoots.changeJump(ItemBoots.isJumpEnabled(boots));
+ ItemBoots.setModeJump(boots, jumpState);
+ PacketJumpToggleAck ackMessage = new PacketJumpToggleAck();
+ ackMessage.state = jumpState;
+ PacketHandler.INSTANCE.sendTo(ackMessage, player);
+ }
+ return null;
+ }
+}
diff --git a/src/main/java/thaumicboots/api/serverfiles/PacketJumpToggleAck.java b/src/main/java/thaumicboots/api/serverfiles/PacketJumpToggleAck.java
new file mode 100644
index 0000000..737f040
--- /dev/null
+++ b/src/main/java/thaumicboots/api/serverfiles/PacketJumpToggleAck.java
@@ -0,0 +1,42 @@
+package thaumicboots.api.serverfiles;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.item.ItemStack;
+
+import cpw.mods.fml.common.network.simpleimpl.IMessage;
+import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
+import cpw.mods.fml.common.network.simpleimpl.MessageContext;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import io.netty.buffer.ByteBuf;
+import thaumicboots.api.ItemBoots;
+import thaumicboots.main.utils.compat.GTNHLibHelper;
+
+public class PacketJumpToggleAck implements IMessage, IMessageHandler {
+
+ public double state;
+
+ @Override
+ public void fromBytes(ByteBuf byteBuf) {
+ state = byteBuf.readDouble();
+ }
+
+ @Override
+ public void toBytes(ByteBuf byteBuf) {
+ byteBuf.writeDouble(state);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public IMessage onMessage(PacketJumpToggleAck message, MessageContext ctx) {
+ Minecraft mc = Minecraft.getMinecraft();
+ final ItemStack boots = ItemBoots.getBoots(mc.thePlayer);
+ if (boots != null) {
+ ItemBoots.setModeJump(boots, message.state);
+ if (GTNHLibHelper.isActive()) {
+ ItemBoots.renderHUDJumpNotification();
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/src/main/java/thaumicboots/api/serverfiles/PacketSpeedToggle.java b/src/main/java/thaumicboots/api/serverfiles/PacketSpeedToggle.java
new file mode 100644
index 0000000..d9d03fa
--- /dev/null
+++ b/src/main/java/thaumicboots/api/serverfiles/PacketSpeedToggle.java
@@ -0,0 +1,35 @@
+package thaumicboots.api.serverfiles;
+
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+
+import cpw.mods.fml.common.network.simpleimpl.IMessage;
+import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
+import cpw.mods.fml.common.network.simpleimpl.MessageContext;
+import io.netty.buffer.ByteBuf;
+import thaumicboots.api.ItemBoots;
+
+public class PacketSpeedToggle implements IMessage, IMessageHandler {
+
+ public void fromBytes(ByteBuf byteBuf) {
+ // not needed
+ }
+
+ public void toBytes(ByteBuf byteBuf) {
+ // not needed
+ }
+
+ @Override
+ public IMessage onMessage(PacketSpeedToggle message, MessageContext ctx) {
+ EntityPlayerMP player = ctx.getServerHandler().playerEntity;
+ final ItemStack boots = ItemBoots.getBoots(player);
+ if (boots != null) {
+ double jumpState = ItemBoots.changeSpeed(ItemBoots.isSpeedEnabled(boots));
+ ItemBoots.setModeSpeed(boots, jumpState);
+ PacketSpeedToggleAck ackMessage = new PacketSpeedToggleAck();
+ ackMessage.state = jumpState;
+ PacketHandler.INSTANCE.sendTo(ackMessage, player);
+ }
+ return null;
+ }
+}
diff --git a/src/main/java/thaumicboots/api/serverfiles/PacketSpeedToggleAck.java b/src/main/java/thaumicboots/api/serverfiles/PacketSpeedToggleAck.java
new file mode 100644
index 0000000..fa125c9
--- /dev/null
+++ b/src/main/java/thaumicboots/api/serverfiles/PacketSpeedToggleAck.java
@@ -0,0 +1,42 @@
+package thaumicboots.api.serverfiles;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.item.ItemStack;
+
+import cpw.mods.fml.common.network.simpleimpl.IMessage;
+import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
+import cpw.mods.fml.common.network.simpleimpl.MessageContext;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import io.netty.buffer.ByteBuf;
+import thaumicboots.api.ItemBoots;
+import thaumicboots.main.utils.compat.GTNHLibHelper;
+
+public class PacketSpeedToggleAck implements IMessage, IMessageHandler {
+
+ public double state;
+
+ @Override
+ public void fromBytes(ByteBuf byteBuf) {
+ state = byteBuf.readDouble();
+ }
+
+ @Override
+ public void toBytes(ByteBuf byteBuf) {
+ byteBuf.writeDouble(state);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public IMessage onMessage(PacketSpeedToggleAck message, MessageContext ctx) {
+ Minecraft mc = Minecraft.getMinecraft();
+ final ItemStack boots = ItemBoots.getBoots(mc.thePlayer);
+ if (boots != null) {
+ ItemBoots.setModeSpeed(boots, message.state);
+ if (GTNHLibHelper.isActive()) {
+ ItemBoots.renderHUDSpeedNotification();
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/src/main/java/thaumicboots/events/BootsEventHandler.java b/src/main/java/thaumicboots/events/BootsEventHandler.java
index 77a4df5..c76a3d4 100644
--- a/src/main/java/thaumicboots/events/BootsEventHandler.java
+++ b/src/main/java/thaumicboots/events/BootsEventHandler.java
@@ -2,35 +2,24 @@
import java.util.HashMap;
-import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerCapabilities;
-import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.Vec3;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import net.minecraftforge.event.entity.living.LivingFallEvent;
-import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import emt.EMT;
-import flaxbeard.thaumicexploration.ThaumicExploration;
-import flaxbeard.thaumicexploration.common.ConfigTX;
-import flaxbeard.thaumicexploration.integration.TTIntegration;
import ic2.api.item.ElectricItem;
+import thaumicboots.api.IMeteor;
+import thaumicboots.api.ISpecialEffect;
+import thaumicboots.api.ItemBoots;
+import thaumicboots.api.ItemElectricBoots;
import thaumicboots.item.boots.comet.ItemElectricCometBoots;
-import thaumicboots.item.boots.comet.ItemNanoCometBoots;
-import thaumicboots.item.boots.comet.ItemQuantumCometBoots;
import thaumicboots.item.boots.meteor.ItemElectricMeteorBoots;
-import thaumicboots.item.boots.meteor.ItemNanoMeteorBoots;
-import thaumicboots.item.boots.meteor.ItemQuantumMeteorBoots;
-import thaumicboots.item.boots.unique.ItemCometMeteorBoots;
-import thaumicboots.item.boots.unique.ItemMeteoricCometBoots;
-import thaumicboots.item.boots.voidwalker.*;
+import thaumicboots.main.utils.compat.EMTHelper;
public class BootsEventHandler {
@@ -85,73 +74,25 @@ public void playerJumps(LivingEvent.LivingJumpEvent event) {
Item item = player.inventory.armorItemInSlot(0).getItem();
- if ((item instanceof ItemElectricMeteorBoots) || (item instanceof ItemCometMeteorBoots)
- || (item instanceof ItemMeteoricCometBoots)
- || (item instanceof ItemMeteorVoidwalkerBoots)) {
-
- if (player.isSneaking()) {
- Vec3 vector = event.entityLiving.getLook(0.5F);
- double total = Math.abs(vector.zCoord + vector.xCoord);
- double jump = 0;
- if (Loader.isModLoaded("ThaumicTinkerer")) {
- jump = TTIntegration.getAscentLevel((EntityPlayer) event.entity);
- }
- if (jump >= 1) {
- jump = (jump + 2D) / 4D;
- }
-
- if (vector.yCoord < total) vector.yCoord = total;
-
- event.entityLiving.motionY += ((jump + 1) * vector.yCoord) / 1.5F;
- event.entityLiving.motionZ += (jump + 1) * vector.zCoord * 4;
- event.entityLiving.motionX += (jump + 1) * vector.xCoord * 4;
-
- } else {
- // 0.275D is approx 3 blocks, 0.265D will get you to just 3 blocks,
- if (item instanceof ItemQuantumMeteorBoots) {
- event.entityLiving.motionY += 0.275D * 4; // 12 blocks
- } else if (item instanceof ItemNanoMeteorBoots) {
- event.entityLiving.motionY += 0.275D * 2.9; // 8 blocks
- } else if (item instanceof ItemMeteorVoidwalkerBoots) {
- event.entityLiving.motionY += 0.275D * 3.2; // 3 blocks
- } else {
- event.entityLiving.motionY += 0.275D * 1.9; // 5 blocks
- }
+ // Is there some way I could make this better?
+ if (EMTHelper.isActive() && item instanceof ItemElectricBoots) {
+ if (ElectricItem.manager.getCharge(player.inventory.armorItemInSlot(0)) == 0) {
+ return;
}
}
- else if ((item instanceof ItemElectricCometBoots) || (item instanceof ItemCometVoidwalkerBoots)) {
- // 0.55D is approx 5.5 blocks, so 0.275 is around 2.25 additional blocks
- if (item instanceof ItemNanoCometBoots) {
- event.entityLiving.motionY += 0.275D * 2.3; // 5.5 blocks
- } else if (item instanceof ItemQuantumCometBoots) {
- event.entityLiving.motionY += 0.275D * 3.3; // 12 blocks
- } else if (item instanceof ItemCometVoidwalkerBoots) {
- event.entityLiving.motionY += 0.450D; // 3.5 blocks
- } else {
- event.entityLiving.motionY += 0.275D; // 3 blocks
- }
+ if (item instanceof IMeteor meteor && (player.isSneaking())) {
+ meteor.specialEffect2(event);
+ } else if (item instanceof ItemBoots boots) {
+ event.entityLiving.motionY += (boots.getJumpModifier()
+ * ItemBoots.isJumpEnabled(player.inventory.armorItemInSlot(0)));
}
-
- else if ((item instanceof ItemElectricVoidwalkerBoots) || (item instanceof ItemNanoVoidwalkerBoots)
- || (item instanceof ItemQuantumVoidwalkerBoots)) {
-
- if (item instanceof ItemElectricVoidwalkerBoots) {
- event.entityLiving.motionY += 0.275D * 1.7;
- } else if (item instanceof ItemNanoVoidwalkerBoots) {
- event.entityLiving.motionY += 0.275D * 2.7;
- } else { // ItemQuantumVoidwalkerBoots
- event.entityLiving.motionY += 0.275D * 3.7;
- }
- }
+ // 0.275D is approx 3 blocks, 0.265D will get you to just 3 blocks,
+ // 0.55D is approx 5.5 blocks, so 0.275 is around 2.25 additional blocks
}
@SubscribeEvent
public void onLivingFall(LivingFallEvent event) {
- if (!EMT.instance.isSimulating()) {
- return;
- }
-
// if entity isn't a player
if (!(event.entity instanceof EntityPlayer)) {
return;
@@ -179,53 +120,13 @@ public void onLivingFall(LivingFallEvent event) {
return;
}
- double energyDemand = bootItem.getPowerConsumption(event.distance);
-
- // if boots can be discharged nullifying the fall damages
- if (energyDemand <= ElectricItem.manager.getCharge(itemStack)) {
- ElectricItem.manager.discharge(itemStack, energyDemand, Integer.MAX_VALUE, true, false, false);
- event.setCanceled(true);
- }
- }
+ if (EMTHelper.isActive()) {
+ double energyDemand = bootItem.getPowerConsumption(event.distance);
- public void grief(EntityPlayer player) {
- // anti-griefing config
- if (!ConfigTX.allowBootsIce) {
- return;
- }
- for (int x = -5; x < 6; x++) {
- for (int z = -5; z < 6; z++) {
- int X = (int) (player.posX + x);
- int Y = (int) (player.posY - 1);
- int Z = (int) (player.posZ + z);
-
- // if the block isn't water
- if (player.worldObj.getBlock(X, Y, Z) != Blocks.water) {
- continue;
- }
-
- // if the block hasn't some water properties
- if (player.worldObj.getBlock(X, Y, Z).getMaterial() != Material.water) {
- continue;
- }
-
- // if the metadata of the block isn't 0
- if (player.worldObj.getBlockMetadata(X, Y, Z) != 0) {
- continue;
- }
-
- // if the player is in water
- if (player.isInWater()) {
- continue;
- }
-
- // ???
- if ((Math.abs(x) + Math.abs(z) >= 8)) {
- continue;
- }
-
- player.worldObj.setBlock(X, Y, Z, ThaumicExploration.meltyIce);
- player.worldObj.spawnParticle("snowballpoof", X, Y + 1, Z, 0.0D, 0.025D, 0.0D);
+ // if boots can be discharged nullifying the fall damages
+ if (energyDemand <= ElectricItem.manager.getCharge(itemStack)) {
+ ElectricItem.manager.discharge(itemStack, energyDemand, Integer.MAX_VALUE, true, false, false);
+ event.setCanceled(true);
}
}
}
@@ -240,201 +141,9 @@ public void checkAir(EntityPlayer player) {
Item item = player.inventory.armorItemInSlot(0).getItem();
- // meteor boots
- if ((item instanceof ItemElectricMeteorBoots) || (item instanceof ItemMeteorVoidwalkerBoots)) {
- ItemStack itemStack = player.inventory.armorItemInSlot(0);
- if (!itemStack.hasTagCompound()) {
- NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
- itemStack.setTagCompound(par1NBTTagCompound);
- itemStack.stackTagCompound.setBoolean("IsSmashing", false);
- itemStack.stackTagCompound.setInteger("smashTicks", 0);
- itemStack.stackTagCompound.setInteger("airTicks", 0);
- }
- boolean smashing = itemStack.stackTagCompound.getBoolean("IsSmashing");
- int ticks = itemStack.stackTagCompound.getInteger("smashTicks");
- int ticksAir = itemStack.stackTagCompound.getInteger("airTicks");
-
- if (player.onGround || player.isOnLadder()) {
- int size = 0;
- if (ticks > 5) size = 1;
- if (ticks > 10) size = 2;
- if (ticks > 15) size = 3;
- smashing = false;
- ticks = 0;
- ticksAir = 0;
- if (size > 0) {
- player.worldObj.createExplosion(player, player.posX, player.posY, player.posZ, size, false);
- }
- }
-
- // COME ON AND SLAM
- if (!player.onGround && !player.isOnLadder() && !player.isInWater()) {
- if (!player.isSneaking()) {
- ticksAir++;
- }
-
- if (player.isSneaking() && ticksAir > 5) {
- smashing = true;
- }
- }
-
- if (player.capabilities.isFlying) {
- smashing = false;
- ticks = 0;
- ticksAir = 0;
- }
- if (smashing) {
- for (String particleName : new String[] { "flame", "smoke", "flame" }) {
- player.worldObj.spawnParticle(
- particleName,
- player.posX + Math.random() - 0.5F,
- player.posY + Math.random() - 0.5F,
- player.posZ + Math.random() - 0.5F,
- 0.0D,
- 0.0D,
- 0.0D);
- }
-
- player.motionY -= 0.1F;
- ticks++;
- } else {
- double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(0.5 * player.motionY);
- if (!player.isWet() && motion > 0.1F) {
- player.worldObj.spawnParticle(
- "flame",
- player.posX + Math.random() - 0.5F,
- player.boundingBox.minY + 0.25F + ((Math.random() - 0.5) * 0.25F),
- player.posZ + Math.random() - 0.5F,
- 0.0D,
- 0.025D,
- 0.0D);
- }
- }
-
- itemStack.stackTagCompound.setBoolean("IsSmashing", smashing);
- itemStack.stackTagCompound.setInteger("smashTicks", ticks);
- itemStack.stackTagCompound.setInteger("airTicks", ticksAir);
- }
-
- // comet boots
- else if ((item instanceof ItemElectricCometBoots) || (item instanceof ItemCometVoidwalkerBoots)) {
- ItemStack itemStack = player.inventory.armorItemInSlot(0);
- if (!itemStack.hasTagCompound()) {
- NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
- itemStack.setTagCompound(par1NBTTagCompound);
- itemStack.stackTagCompound.setInteger("runTicks", 0);
- }
-
- grief(player);
-
- int ticks = itemStack.stackTagCompound.getInteger("runTicks");
-
- double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(player.motionY);
- if (motion > 0.1F || !player.onGround || player.isOnLadder()) {
- if (ticks < 100) ticks++;
- } else {
- ticks = 0;
- }
-
- if (!player.isWet() && motion > 0.1F) {
- player.worldObj.spawnParticle(
- "fireworksSpark",
- player.posX + Math.random() - 0.5F,
- player.boundingBox.minY + 0.25F + ((Math.random() - 0.5) * 0.25F),
- player.posZ + Math.random() - 0.5F,
- 0.0D,
- 0.025D,
- 0.0D);
- }
-
- itemStack.stackTagCompound.setInteger("runTicks", ticks);
- }
-
- else if ((item instanceof ItemMeteoricCometBoots || (item instanceof ItemCometMeteorBoots))) {
- ItemStack itemStack = player.inventory.armorItemInSlot(0);
- if (!itemStack.hasTagCompound()) {
- NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
- itemStack.setTagCompound(par1NBTTagCompound);
- itemStack.stackTagCompound.setBoolean("IsSmashingMix", false);
- itemStack.stackTagCompound.setInteger("smashTicksMix", 0);
- itemStack.stackTagCompound.setInteger("airTicksMix", 0);
- itemStack.stackTagCompound.setInteger("runTicksMix", 0);
- }
- grief(player);
-
- boolean smashing = itemStack.stackTagCompound.getBoolean("IsSmashingMix");
- int ticksSmash = itemStack.stackTagCompound.getInteger("smashTicksMix");
- int ticksAir = itemStack.stackTagCompound.getInteger("airTicksMix");
- int ticksRun = itemStack.stackTagCompound.getInteger("runTicksMix");
- double motionRun = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(player.motionY);
- if (motionRun > 0.1F || !player.onGround || player.isOnLadder()) {
- if (ticksRun < 100) ticksRun++;
- } else {
- ticksRun = 0;
- }
- if (player.onGround || player.isOnLadder()) {
- int size = 0;
- if (ticksSmash > 5) size = 1;
- if (ticksSmash > 10) size = 2;
- if (ticksSmash > 15) size = 3;
- smashing = false;
- ticksSmash = 0;
- ticksAir = 0;
- if (size > 0) {
- player.worldObj.createExplosion(player, player.posX, player.posY, player.posZ, size, false);
- }
- }
-
- // COME ON AND SLAM
- if (!player.onGround && !player.isOnLadder() && !player.isInWater()) {
- if (!player.isSneaking()) {
- ticksAir++;
- }
-
- if (player.isSneaking() && ticksAir > 5) {
- smashing = true;
- }
- }
-
- if (player.capabilities.isFlying) {
- smashing = false;
- ticksSmash = 0;
- ticksAir = 0;
- }
- if (smashing) {
-
- for (String particleName : new String[] { "flame", "smoke", "flame" }) {
- player.worldObj.spawnParticle(
- particleName,
- player.posX + Math.random() - 0.5F,
- player.posY + Math.random() - 0.5F,
- player.posZ + Math.random() - 0.5F,
- 0.0D,
- 0.0D,
- 0.0D);
- }
-
- player.motionY -= 0.1F;
- ticksSmash++;
- }
-
- if (!player.isWet() && motionRun > 0.1F) {
- for (String particleName : new String[] { "fireworksSpark", "flame", "flame" }) {
- player.worldObj.spawnParticle(
- particleName,
- player.posX + Math.random() - 0.5F,
- player.boundingBox.minY + 0.25F + ((Math.random() - 0.5) * 0.25F),
- player.posZ + Math.random() - 0.5F,
- 0.0D,
- 0.025D,
- 0.0D);
- }
- }
-
- itemStack.stackTagCompound.setInteger("runTicksMix", ticksRun);
- itemStack.stackTagCompound.setBoolean("IsSmashingMix", smashing);
- itemStack.stackTagCompound.setInteger("smashTicksMix", ticksSmash);
- itemStack.stackTagCompound.setInteger("airTicksMix", ticksAir);
+ if (item instanceof ISpecialEffect boot) {
+ boot.specialEffect(item, player);
}
}
+
}
diff --git a/src/main/java/thaumicboots/item/boots/comet/ItemElectricCometBoots.java b/src/main/java/thaumicboots/item/boots/comet/ItemElectricCometBoots.java
index 31b39d9..aef2a3a 100644
--- a/src/main/java/thaumicboots/item/boots/comet/ItemElectricCometBoots.java
+++ b/src/main/java/thaumicboots/item/boots/comet/ItemElectricCometBoots.java
@@ -1,120 +1,36 @@
package thaumicboots.item.boots.comet;
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import emt.util.EMTTextHelper;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.IVisDiscountGear;
-import thaumcraft.api.aspects.Aspect;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.items.armor.Hover;
+import thaumicboots.api.IComet;
+import thaumicboots.api.ItemElectricBoots;
import thaumicboots.main.utils.TabThaumicBoots;
-public class ItemElectricCometBoots extends ItemArmor
- implements IRepairable, IRunicArmor, IElectricItem, IVisDiscountGear, ISpecialArmor {
+public class ItemElectricCometBoots extends ItemElectricBoots implements IComet {
- public IIcon icon;
- public float baseBonus;
public float minimumHeight;
- public int maxCharge;
- public int energyPerDamage;
- public int visDiscount;
- public int runicCharge;
- public int tier;
public double minimumDistance;
- public double damageAbsorptionRatio;
- public double baseAbsorptionRatio;
- public double transferLimit;
- public boolean provideEnergy;
- public String iconResPath;
- public String armorResPath;
- public String unlocalisedName;
- public EnumRarity rarity;
public ItemElectricCometBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par2EnumArmorMaterial, par3, par4);
- setBootsData();
setCreativeTab(TabThaumicBoots.tabThaumicBoots);
setUnlocalizedName(unlocalisedName);
-
}
protected void setBootsData() {
maxCharge = 100_000;
- energyPerDamage = 1_000;
- runicCharge = 0;
+ energyPerDamage = 100; // 1k hits
visDiscount = 2;
- provideEnergy = false;
- baseAbsorptionRatio = 0.15D;
- damageAbsorptionRatio = 1.5D;
transferLimit = 100;
- baseBonus = 0.165F;
+ runBonus = 0.165F; // electric + comet
+ jumpBonus = 0.275D; // 3 blocks
+ longrunningbonus = 0.003F;
minimumHeight = 4F;
minimumDistance = 20d;
tier = 2;
+ damageAbsorptionRatio = 0.5D;
+ negateFall = false;
iconResPath = "thaumicboots:electricComet_16x";
armorResPath = "thaumicboots:model/electricbootsComet.png";
unlocalisedName = "ItemElectricComet";
- rarity = EnumRarity.rare;
- }
-
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
- ItemStack itemStack = new ItemStack(this, 1);
- if (getChargedItem(itemStack) == this) {
- ItemStack charged = new ItemStack(this, 1);
- ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
- itemList.add(charged);
- }
- if (getEmptyItem(itemStack) == this) {
- itemList.add(new ItemStack(this, 1, getMaxDamage()));
- }
- }
-
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister ir) {
- this.icon = ir.registerIcon(iconResPath);
- }
-
- @SideOnly(Side.CLIENT)
- public IIcon func_77617_a(int par1) {
- return this.icon;
- }
-
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
- return armorResPath;
- }
-
- @Override
- public EnumRarity getRarity(ItemStack par1ItemStack) {
- return EnumRarity.rare;
- }
-
- public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
- return par2ItemStack.isItemEqual(new ItemStack(Items.leather))
- || super.getIsRepairable(par1ItemStack, par2ItemStack);
}
public float getPowerConsumptionMultiplier(float distance) {
@@ -129,131 +45,4 @@ public float getMinimumHeight() {
return minimumHeight;
}
- protected float computeBonus(ItemStack itemStack, EntityPlayer player) {
- int ticks = player.inventory.armorItemInSlot(0).stackTagCompound.getInteger("runTicks");
-
- float bonus = baseBonus + ((ticks / 5) * 0.003F);
- if (ElectricItem.manager.getCharge(itemStack) == 0) {
- bonus = 0;
- } else if (player.isInWater()) {
- bonus /= 4.0F;
- }
-
- return bonus;
- }
-
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
-
- if (player.capabilities.isFlying || player.moveForward <= 0F) {
- return;
- }
-
- if (player.worldObj.isRemote) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) {
- Thaumcraft.instance.entityEventHandler.prevStep
- .put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
- }
- player.stepHeight = 1.0F;
- }
- if (!player.inventory.armorItemInSlot(0).hasTagCompound()) {
- NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
- player.inventory.armorItemInSlot(0).setTagCompound(par1NBTTagCompound);
- player.inventory.armorItemInSlot(0).stackTagCompound.setInteger("runTicks", 0);
- }
-
- float bonus = computeBonus(itemStack, player);
-
- if (player.onGround || player.isOnLadder()) {
- player.moveFlying(0.0F, 1.0F, bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = 0.05F;
- }
- }
-
- public int getRunicCharge(ItemStack arg0) {
- return runicCharge;
- }
-
- @Override
- public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source,
- double damage, int slot) {
- if (source.isUnblockable()) {
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
- } else {
- double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
- int energyPerDamage = getEnergyPerDamage();
- double damageLimit = energyPerDamage <= 0 ? 0
- : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
- }
- }
-
- @Override
- public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
- if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
- return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
- } else {
- return 0;
- }
- }
-
- @Override
- public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
- ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
- }
-
- public double getDamageAbsorptionRatio() {
- return damageAbsorptionRatio;
- }
-
- protected double getBaseAbsorptionRatio() {
- return baseAbsorptionRatio;
- }
-
- @Override
- public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
- list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
- }
-
- public int getEnergyPerDamage() {
- return energyPerDamage;
- }
-
- @Override
- public boolean canProvideEnergy(ItemStack itemStack) {
- return provideEnergy;
- }
-
- @Override
- public double getMaxCharge(ItemStack itemStack) {
- return maxCharge;
- }
-
- @Override
- public int getTier(ItemStack itemStack) {
- return 2;
- }
-
- @Override
- public double getTransferLimit(ItemStack itemStack) {
- return transferLimit;
- }
-
- @Override
- public Item getChargedItem(ItemStack itemStack) {
- return this;
- }
-
- @Override
- public Item getEmptyItem(ItemStack itemStack) {
- return this;
- }
-
- @Override
- public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
- return visDiscount;
- }
}
diff --git a/src/main/java/thaumicboots/item/boots/comet/ItemNanoCometBoots.java b/src/main/java/thaumicboots/item/boots/comet/ItemNanoCometBoots.java
index a49d479..6227937 100644
--- a/src/main/java/thaumicboots/item/boots/comet/ItemNanoCometBoots.java
+++ b/src/main/java/thaumicboots/item/boots/comet/ItemNanoCometBoots.java
@@ -1,9 +1,5 @@
package thaumicboots.item.boots.comet;
-import net.minecraft.item.EnumRarity;
-
-import emt.util.EMTConfigHandler;
-
public class ItemNanoCometBoots extends ItemElectricCometBoots {
public ItemNanoCometBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
@@ -12,21 +8,19 @@ public ItemNanoCometBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par
@Override
protected void setBootsData() {
+ super.setBootsData();
maxCharge = 1_000_000;
- energyPerDamage = 5_000;
+ energyPerDamage = 500; // 2k hits, 2x prev
visDiscount = 4;
transferLimit = 1_600;
- iconResPath = "thaumicboots:nanoComet_16x";
- armorResPath = "thaumicboots:model/nanobootsComet.png";
- unlocalisedName = "ItemNanoComet";
- rarity = EnumRarity.rare;
- baseBonus = (float) EMTConfigHandler.nanoBootsSpeed + 0.110F;
+ runBonus = getEMTNanoSpeed() + 0.110F; // nano + comet * 2
+ jumpBonus = 0.6325D; // 6 blocks
minimumHeight = 6F;
- minimumDistance = EMTConfigHandler.nanoBootsMaxDrop;
- runicCharge = 0;
+ minimumDistance = 35.0F;
damageAbsorptionRatio = 1.5D;
- baseAbsorptionRatio = 0.15D;
- provideEnergy = false;
tier = 3;
+ iconResPath = "thaumicboots:nanoComet_16x";
+ armorResPath = "thaumicboots:model/nanobootsComet.png";
+ unlocalisedName = "ItemNanoComet";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/comet/ItemQuantumCometBoots.java b/src/main/java/thaumicboots/item/boots/comet/ItemQuantumCometBoots.java
index c500366..d0be7f4 100644
--- a/src/main/java/thaumicboots/item/boots/comet/ItemQuantumCometBoots.java
+++ b/src/main/java/thaumicboots/item/boots/comet/ItemQuantumCometBoots.java
@@ -1,9 +1,5 @@
package thaumicboots.item.boots.comet;
-import net.minecraft.item.EnumRarity;
-
-import emt.util.EMTConfigHandler;
-
public class ItemQuantumCometBoots extends ItemElectricCometBoots {
public ItemQuantumCometBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
@@ -12,21 +8,19 @@ public ItemQuantumCometBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int
@Override
protected void setBootsData() {
+ super.setBootsData();
maxCharge = 10_000_000;
- energyPerDamage = 20_000;
+ energyPerDamage = 2_500; // 4k hits, 2x prev
visDiscount = 5;
transferLimit = 12_000;
- unlocalisedName = "ItemQuantumComet";
- iconResPath = "thaumicboots:quantumComet_16x";
- armorResPath = "thaumicboots:model/quantumbootsComet.png";
- rarity = EnumRarity.rare;
- baseBonus = (float) EMTConfigHandler.quantumBootsSpeed + 0.220F;
- minimumDistance = EMTConfigHandler.quantumBootsMaxDrop;
+ runBonus = getEMTQuantumSpeed() + 0.220F; // quantum + comet * 4
+ jumpBonus = 0.9075D; // 9.5 blocks
+ minimumDistance = 100.0F;
minimumHeight = 10F;
- runicCharge = 0;
damageAbsorptionRatio = 2D;
- baseAbsorptionRatio = 0.15D;
- provideEnergy = false;
tier = 4;
+ unlocalisedName = "ItemQuantumComet";
+ iconResPath = "thaumicboots:quantumComet_16x";
+ armorResPath = "thaumicboots:model/quantumbootsComet.png";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/meteor/ItemElectricMeteorBoots.java b/src/main/java/thaumicboots/item/boots/meteor/ItemElectricMeteorBoots.java
index 17255e8..077acfa 100644
--- a/src/main/java/thaumicboots/item/boots/meteor/ItemElectricMeteorBoots.java
+++ b/src/main/java/thaumicboots/item/boots/meteor/ItemElectricMeteorBoots.java
@@ -1,211 +1,28 @@
package thaumicboots.item.boots.meteor;
-import java.util.List;
+import thaumicboots.api.IMeteor;
+import thaumicboots.api.ItemElectricBoots;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import emt.util.EMTTextHelper;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.IVisDiscountGear;
-import thaumcraft.api.aspects.Aspect;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.config.Config;
-import thaumcraft.common.items.armor.Hover;
-import thaumicboots.main.utils.TabThaumicBoots;
-
-public class ItemElectricMeteorBoots extends ItemArmor
- implements IRepairable, IRunicArmor, IElectricItem, IVisDiscountGear, ISpecialArmor {
-
- public IIcon icon;
-
- public int maxCharge = 100000;
- public int energyPerDamage = 1000;
- public int visDiscount = 2;
-
- public double transferLimit = 100;
+public class ItemElectricMeteorBoots extends ItemElectricBoots implements IMeteor {
public ItemElectricMeteorBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par2EnumArmorMaterial, par3, par4);
- setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemElectricMeteor");
- }
-
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
- ItemStack itemStack = new ItemStack(this, 1);
- if (getChargedItem(itemStack) == this) {
- ItemStack charged = new ItemStack(this, 1);
- ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
- itemList.add(charged);
- }
- if (getEmptyItem(itemStack) == this) {
- itemList.add(new ItemStack(this, 1, getMaxDamage()));
- }
- }
-
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister ir) {
- this.icon = ir.registerIcon("thaumicboots:electricMeteor_16x");
- }
-
- @SideOnly(Side.CLIENT)
- public IIcon func_77617_a(int par1) {
- return this.icon;
- }
-
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
- return "thaumicboots:model/electricbootsMeteor.png";
- }
-
- @Override
- public EnumRarity getRarity(ItemStack par1ItemStack) {
- return EnumRarity.rare;
- }
-
- public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
- return par2ItemStack.isItemEqual(new ItemStack(Items.leather)) ? true
- : super.getIsRepairable(par1ItemStack, par2ItemStack);
- }
-
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
-
- if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
- int haste = EnchantmentHelper
- .getEnchantmentLevel(Config.enchHaste.effectId, player.inventory.armorItemInSlot(0));
- if (player.worldObj.isRemote) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep
- .containsKey(Integer.valueOf(player.getEntityId()))) {
- Thaumcraft.instance.entityEventHandler.prevStep
- .put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
- }
- player.stepHeight = 1.0F;
- }
- float bonus = 0.055F;
- if (ElectricItem.manager.getCharge(itemStack) == 0) {
- bonus *= 0;
- }
- if (player.isInWater()) {
- bonus /= 4.0F;
- }
- if (player.onGround) {
- player.moveFlying(0.0F, 1.0F, bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = 0.05F;
- }
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
- }
- }
-
- public int getRunicCharge(ItemStack arg0) {
- return 0;
- }
-
- @Override
- public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source,
- double damage, int slot) {
- if (source.isUnblockable()) {
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
- } else {
- double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
- int energyPerDamage = getEnergyPerDamage();
- double damageLimit = energyPerDamage <= 0 ? 0
- : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
- }
- }
-
- @Override
- public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
- if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
- return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
- } else {
- return 0;
- }
- }
-
- @Override
- public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
- ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
- }
-
- public double getDamageAbsorptionRatio() {
- return 1.25D;
- }
-
- private double getBaseAbsorptionRatio() {
- return 0.15D;
- }
-
- @Override
- public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
- list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
- }
-
- public int getEnergyPerDamage() {
- return energyPerDamage;
- }
-
- @Override
- public boolean canProvideEnergy(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public double getMaxCharge(ItemStack itemStack) {
- return maxCharge;
- }
-
- @Override
- public int getTier(ItemStack itemStack) {
- return 2;
- }
-
- @Override
- public double getTransferLimit(ItemStack itemStack) {
- return transferLimit;
- }
-
- @Override
- public Item getChargedItem(ItemStack itemStack) {
- return this;
- }
-
- @Override
- public Item getEmptyItem(ItemStack itemStack) {
- return this;
}
- @Override
- public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
- return visDiscount;
+ protected void setBootsData() {
+ super.setBootsData();
+ maxCharge = 100_000;
+ energyPerDamage = 100; // 1k hits
+ visDiscount = 2;
+ damageAbsorptionRatio = 1.25D;
+ transferLimit = 100;
+ jumpBonus = 0.5225D; // 5 blocks
+ runBonus = 0.055F; // base electric
+ tier = 2;
+ negateFall = true;
+ iconResPath = "thaumicboots:electricMeteor_16x";
+ armorResPath = "thaumicboots:model/electricbootsMeteor.png";
+ unlocalisedName = "ItemElectricMeteor";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/meteor/ItemNanoMeteorBoots.java b/src/main/java/thaumicboots/item/boots/meteor/ItemNanoMeteorBoots.java
index e25754e..f1d50ca 100644
--- a/src/main/java/thaumicboots/item/boots/meteor/ItemNanoMeteorBoots.java
+++ b/src/main/java/thaumicboots/item/boots/meteor/ItemNanoMeteorBoots.java
@@ -1,192 +1,23 @@
package thaumicboots.item.boots.meteor;
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import emt.util.EMTConfigHandler;
-import emt.util.EMTTextHelper;
-import ic2.api.item.ElectricItem;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.aspects.Aspect;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.config.Config;
-import thaumcraft.common.items.armor.Hover;
-import thaumicboots.main.utils.TabThaumicBoots;
-
-public class ItemNanoMeteorBoots extends ItemElectricMeteorBoots implements IRepairable, IRunicArmor {
-
- public IIcon icon;
- public int maxCharge = 1000000;
- public int energyPerDamage = 5000;
- public int visDiscount = 4;
-
- public double transferLimit = 1600;
+public class ItemNanoMeteorBoots extends ItemElectricMeteorBoots {
public ItemNanoMeteorBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par2EnumArmorMaterial, par3, par4);
- setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemNanoMeteor");
- }
-
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister ir) {
- this.icon = ir.registerIcon("thaumicboots:nanoMeteor_16x");
- }
-
- @SideOnly(Side.CLIENT)
- public IIcon func_77617_a(int par1) {
- return this.icon;
- }
-
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
- return "thaumicboots:model/nanobootsMeteor.png";
- }
-
- @Override
- public EnumRarity getRarity(ItemStack par1ItemStack) {
- return EnumRarity.rare;
- }
-
- public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
- return par2ItemStack.isItemEqual(new ItemStack(Items.leather)) ? true
- : super.getIsRepairable(par1ItemStack, par2ItemStack);
- }
-
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
-
- if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
- int haste = EnchantmentHelper
- .getEnchantmentLevel(Config.enchHaste.effectId, player.inventory.armorItemInSlot(0));
- if (player.worldObj.isRemote) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep
- .containsKey(Integer.valueOf(player.getEntityId()))) {
- Thaumcraft.instance.entityEventHandler.prevStep
- .put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
- }
- player.stepHeight = 1.0F;
- }
- float bonus = (float) EMTConfigHandler.nanoBootsSpeed;
- if (ElectricItem.manager.getCharge(itemStack) == 0) {
- bonus *= 0;
- }
- if (player.isInWater()) {
- bonus /= 4.0F;
- }
- if (player.onGround) {
- player.moveFlying(0.0F, 1.0F, bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = 0.05F;
- }
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
- }
- }
-
- public int getRunicCharge(ItemStack arg0) {
- return 0;
- }
-
- @Override
- public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source,
- double damage, int slot) {
- if (source.isUnblockable()) {
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
- } else {
- double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
- int energyPerDamage = getEnergyPerDamage();
- double damageLimit = energyPerDamage <= 0 ? 0
- : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
- }
- }
-
- @Override
- public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
- if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
- return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
- } else {
- return 0;
- }
- }
-
- @Override
- public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
- ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
- }
-
- public double getDamageAbsorptionRatio() {
- return 1.5D;
- }
-
- private double getBaseAbsorptionRatio() {
- return 0.15D;
- }
-
- @Override
- public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
- list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
- }
-
- public int getEnergyPerDamage() {
- return energyPerDamage;
- }
-
- @Override
- public boolean canProvideEnergy(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public double getMaxCharge(ItemStack itemStack) {
- return maxCharge;
- }
-
- @Override
- public int getTier(ItemStack itemStack) {
- return 3;
- }
-
- @Override
- public double getTransferLimit(ItemStack itemStack) {
- return transferLimit;
- }
-
- @Override
- public Item getChargedItem(ItemStack itemStack) {
- return this;
- }
-
- @Override
- public Item getEmptyItem(ItemStack itemStack) {
- return this;
}
- @Override
- public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
- return visDiscount;
+ protected void setBootsData() {
+ super.setBootsData();
+ maxCharge = 1_000_000;
+ energyPerDamage = 500; // 2k hits, 2x prev
+ visDiscount = 4;
+ damageAbsorptionRatio = 1.5D;
+ transferLimit = 1600;
+ jumpBonus = 0.7975D; // 8 Blocks
+ runBonus = getEMTNanoSpeed();
+ tier = 3;
+ iconResPath = "thaumicboots:nanoMeteor_16x";
+ armorResPath = "thaumicboots:model/nanobootsMeteor.png";
+ unlocalisedName = "ItemNanoMeteor";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/meteor/ItemQuantumMeteorBoots.java b/src/main/java/thaumicboots/item/boots/meteor/ItemQuantumMeteorBoots.java
index a2556a3..76401b4 100644
--- a/src/main/java/thaumicboots/item/boots/meteor/ItemQuantumMeteorBoots.java
+++ b/src/main/java/thaumicboots/item/boots/meteor/ItemQuantumMeteorBoots.java
@@ -1,192 +1,26 @@
package thaumicboots.item.boots.meteor;
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import emt.util.EMTConfigHandler;
-import emt.util.EMTTextHelper;
-import ic2.api.item.ElectricItem;
import thaumcraft.api.IRepairable;
import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.aspects.Aspect;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.config.Config;
-import thaumcraft.common.items.armor.Hover;
-import thaumicboots.main.utils.TabThaumicBoots;
-
-public class ItemQuantumMeteorBoots extends ItemNanoMeteorBoots implements IRepairable, IRunicArmor {
- public IIcon icon;
- public int maxCharge = 10000000;
- public int energyPerDamage = 20000;
- public int visDiscount = 5;
-
- public double transferLimit = 12000;
+public class ItemQuantumMeteorBoots extends ItemElectricMeteorBoots implements IRepairable, IRunicArmor {
public ItemQuantumMeteorBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par2EnumArmorMaterial, par3, par4);
- setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemQuantumMeteor");
- }
-
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister ir) {
- this.icon = ir.registerIcon("thaumicboots:quantumMeteor_16x");
- }
-
- @SideOnly(Side.CLIENT)
- public IIcon func_77617_a(int par1) {
- return this.icon;
- }
-
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
- return "thaumicboots:model/quantumbootsMeteor.png";
- }
-
- @Override
- public EnumRarity getRarity(ItemStack par1ItemStack) {
- return EnumRarity.rare;
- }
-
- public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
- return par2ItemStack.isItemEqual(new ItemStack(Items.leather)) ? true
- : super.getIsRepairable(par1ItemStack, par2ItemStack);
- }
-
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
-
- if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
- int haste = EnchantmentHelper
- .getEnchantmentLevel(Config.enchHaste.effectId, player.inventory.armorItemInSlot(0));
- if (player.worldObj.isRemote) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep
- .containsKey(Integer.valueOf(player.getEntityId()))) {
- Thaumcraft.instance.entityEventHandler.prevStep
- .put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
- }
- player.stepHeight = 1.0F;
- }
- float bonus = (float) EMTConfigHandler.quantumBootsSpeed;
- if (ElectricItem.manager.getCharge(itemStack) == 0) {
- bonus *= 0;
- }
- if (player.isInWater()) {
- bonus /= 4.0F;
- }
- if (player.onGround) {
- player.moveFlying(0.0F, 1.0F, bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = 0.05F;
- }
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
- }
- }
-
- public int getRunicCharge(ItemStack arg0) {
- return 0;
- }
-
- @Override
- public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source,
- double damage, int slot) {
- if (source.isUnblockable()) {
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
- } else {
- double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
- int energyPerDamage = getEnergyPerDamage();
- double damageLimit = energyPerDamage <= 0 ? 0
- : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
- }
- }
-
- @Override
- public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
- if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
- return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
- } else {
- return 0;
- }
- }
-
- @Override
- public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
- ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
- }
-
- public double getDamageAbsorptionRatio() {
- return 2D;
- }
-
- private double getBaseAbsorptionRatio() {
- return 0.15D;
- }
-
- @Override
- public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
- list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
- }
-
- public int getEnergyPerDamage() {
- return energyPerDamage;
- }
-
- @Override
- public boolean canProvideEnergy(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public double getMaxCharge(ItemStack itemStack) {
- return maxCharge;
- }
-
- @Override
- public int getTier(ItemStack itemStack) {
- return 4;
- }
-
- @Override
- public double getTransferLimit(ItemStack itemStack) {
- return transferLimit;
- }
-
- @Override
- public Item getChargedItem(ItemStack itemStack) {
- return this;
- }
-
- @Override
- public Item getEmptyItem(ItemStack itemStack) {
- return this;
}
- @Override
- public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
- return visDiscount;
+ protected void setBootsData() {
+ super.setBootsData();
+ maxCharge = 10_000_000;
+ energyPerDamage = 2_500; // 4k hits, 2x prev
+ visDiscount = 5;
+ damageAbsorptionRatio = 2D;
+ transferLimit = 12000;
+ jumpBonus = 1.1D; // 12 Blocks
+ runBonus = getEMTQuantumSpeed();
+ tier = 4;
+ iconResPath = "thaumicboots:quantumMeteor_16x";
+ armorResPath = "thaumicboots:model/quantumbootsMeteor.png";
+ unlocalisedName = "ItemQuantumMeteor";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/unimplemented/ItemPurpleVoidwalkerBoots.java b/src/main/java/thaumicboots/item/boots/unimplemented/ItemPurpleVoidwalkerBoots.java
index cc48a2a..3bb3eea 100644
--- a/src/main/java/thaumicboots/item/boots/unimplemented/ItemPurpleVoidwalkerBoots.java
+++ b/src/main/java/thaumicboots/item/boots/unimplemented/ItemPurpleVoidwalkerBoots.java
@@ -1,190 +1,19 @@
package thaumicboots.item.boots.unimplemented;
-import java.util.List;
+import thaumicboots.api.ItemVoidBoots;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.living.LivingEvent;
-
-import baubles.common.lib.PlayerHandler;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import taintedmagic.common.registry.ItemRegistry;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.IVisDiscountGear;
-import thaumcraft.api.IWarpingGear;
-import thaumcraft.api.aspects.Aspect;
-import thaumcraft.client.fx.ParticleEngine;
-import thaumcraft.client.fx.particles.FXWispEG;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.items.armor.Hover;
-import thaumicboots.main.utils.TabThaumicBoots;
-
-public class ItemPurpleVoidwalkerBoots extends ItemArmor
- implements IVisDiscountGear, IWarpingGear, IRunicArmor, IRepairable, ISpecialArmor {
+public class ItemPurpleVoidwalkerBoots extends ItemVoidBoots {
public ItemPurpleVoidwalkerBoots(final ArmorMaterial material, final int j, final int k) {
super(material, j, k);
- setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemPurpleVoidwalkerBoots");
- setTextureName("thaumicboots:purpleHaze_16x");
-
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @Override
- public String getArmorTexture(final ItemStack stack, final Entity entity, final int slot, final String type) {
- return "thaumicboots:model/VoidwalkerBootsMeteor_-_Purple.png";
- }
-
- @Override
- public EnumRarity getRarity(final ItemStack stack) {
- return EnumRarity.epic;
- }
-
- @Override
- public int getRunicCharge(final ItemStack stack) {
- return 0;
- }
-
- @Override
- public int getWarp(final ItemStack stack, final EntityPlayer player) {
- return 5;
- }
-
- @Override
- public int getVisDiscount(final ItemStack stack, final EntityPlayer player, final Aspect aspect) {
- return 5;
- }
-
- @Override
- public ISpecialArmor.ArmorProperties getProperties(final EntityLivingBase entity, final ItemStack stack,
- final DamageSource source, final double dmg, final int slot) {
- int priority = 0;
- double ratio = damageReduceAmount / 90.0D;
-
- if (source.isMagicDamage() || source.isFireDamage() || source.isExplosion()) {
- priority = 1;
- ratio = damageReduceAmount / 80.0D;
- } else if (source.isUnblockable()) {
- priority = 0;
- ratio = 0.0D;
- }
- return new ISpecialArmor.ArmorProperties(priority, ratio, stack.getMaxDamage() + 1 - stack.getItemDamage());
- }
-
- @Override
- public int getArmorDisplay(final EntityPlayer player, final ItemStack stack, final int slot) {
- return damageReduceAmount;
- }
-
- @Override
- public void damageArmor(final EntityLivingBase entity, final ItemStack stack, final DamageSource source,
- final int dmg, final int slot) {
- if (source != DamageSource.fall) {
- stack.damageItem(dmg, entity);
- }
- }
-
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean b) {
- list.add(
- EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
- + ": "
- + getVisDiscount(stack, player, null)
- + "%");
- }
-
- @Override
- public void onUpdate(final ItemStack stack, final World world, final Entity entity, final int j, final boolean k) {
- super.onUpdate(stack, world, entity, j, k);
- if (!world.isRemote && stack.isItemDamaged()
- && entity.ticksExisted % 20 == 0
- && entity instanceof EntityLivingBase) {
- stack.damageItem(-1, (EntityLivingBase) entity);
- }
- }
-
- @Override
- public void onArmorTick(final World world, final EntityPlayer player, final ItemStack stack) {
- super.onArmorTick(world, player, stack);
- // repair
- if (!world.isRemote && stack.isItemDamaged() && player.ticksExisted % 20 == 0) {
- stack.damageItem(-1, player);
- }
-
- // particles
- final double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(0.5 * player.motionY);
- if (world.isRemote && (motion > 0.1D || !player.onGround) && world.rand.nextInt(3) == 0) {
- particles(world, player);
- }
-
- if (player.moveForward > 0.0F) {
- // increased step height
- if (player.worldObj.isRemote && !player.isSneaking()) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
- Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
- }
- player.stepHeight = 1.0F;
- }
-
- // speed boost
- if (player.onGround || player.capabilities.isFlying) {
- float bonus = 0.12F;
- final ItemStack sash = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
- if (sash != null && sash.getItem() == ItemRegistry.ItemVoidwalkerSash) {
- bonus *= 2.0F;
- }
-
- player.moveFlying(0.0F, 1.0F, player.capabilities.isFlying ? bonus * 0.75F : bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = player.isSprinting() ? 0.045F : 0.04F;
- }
- }
- // negate fall damage
- if (player.fallDistance > 3.0F) {
- player.fallDistance = 1.0F;
- }
- }
-
- @SubscribeEvent
- public void playerJumps(final LivingEvent.LivingJumpEvent event) {
- if (event.entity instanceof EntityPlayer) {
- final EntityPlayer player = (EntityPlayer) event.entity;
- final ItemStack boots = player.inventory.armorItemInSlot(0);
- final ItemStack sash = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
-
- if (boots != null && boots.getItem() == ItemRegistry.ItemVoidwalkerBoots) {
- player.motionY *= 1.25D;
- }
- if (sash != null && sash.getItem() == ItemRegistry.ItemVoidwalkerSash) {
- player.motionY *= 1.05D;
- }
- }
}
- @SideOnly(Side.CLIENT)
- private void particles(final World world, final EntityPlayer player) {
- final FXWispEG fx = new FXWispEG(
- world,
- player.posX + (Math.random() - Math.random()) * 0.5D,
- player.boundingBox.minY + 0.05D + (Math.random() - Math.random()) * 0.1D,
- player.posZ + (Math.random() - Math.random()) * 0.5D,
- player);
- ParticleEngine.instance.addEffect(world, fx);
+ protected void setBootsData() {
+ visDiscount = 5;
+ jumpBonus = 0.450D;
+ tier = 3;
+ iconResPath = "thaumicboots:purpleHaze_16x";
+ armorResPath = "thaumicboots:model/VoidwalkerBootsMeteor_-_Purple.png";
+ unlocalisedName = "ItemPurpleVoidwalkerBoots";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/unique/ItemCometMeteorBoots.java b/src/main/java/thaumicboots/item/boots/unique/ItemCometMeteorBoots.java
index 2aa0d45..ea3fc3f 100644
--- a/src/main/java/thaumicboots/item/boots/unique/ItemCometMeteorBoots.java
+++ b/src/main/java/thaumicboots/item/boots/unique/ItemCometMeteorBoots.java
@@ -1,103 +1,32 @@
package thaumicboots.item.boots.unique;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.config.Config;
-import thaumcraft.common.items.armor.Hover;
+import thaumicboots.api.ICometMeteorMix;
+import thaumicboots.api.ItemBoots;
import thaumicboots.main.utils.TabThaumicBoots;
-public class ItemCometMeteorBoots extends ItemArmor implements IRepairable, IRunicArmor {
+public class ItemCometMeteorBoots extends ItemBoots implements ICometMeteorMix {
public IIcon icon;
public ItemCometMeteorBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par2EnumArmorMaterial, par3, par4);
setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemCometMeteor");
- }
-
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister ir) {
- this.icon = ir.registerIcon("thaumicboots:bootsCometMeteor");
- }
-
- @SideOnly(Side.CLIENT)
- public IIcon func_77617_a(int par1) {
- return this.icon;
- }
-
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
- return "thaumicboots:model/VoidwalkerBootsComet.png";
- }
-
- @Override
- public EnumRarity getRarity(ItemStack par1ItemStack) {
- return EnumRarity.rare;
- }
-
- public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
- return par2ItemStack.isItemEqual(new ItemStack(Items.leather)) ? true
- : super.getIsRepairable(par1ItemStack, par2ItemStack);
- }
-
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
- if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
- int haste = EnchantmentHelper
- .getEnchantmentLevel(Config.enchHaste.effectId, player.inventory.armorItemInSlot(0));
- if (player.worldObj.isRemote) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep
- .containsKey(Integer.valueOf(player.getEntityId()))) {
- Thaumcraft.instance.entityEventHandler.prevStep
- .put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
- }
- player.stepHeight = 1.0F;
- }
-
- float bonus = 0.165F;
- if (player.isInWater()) {
- bonus /= 4.0F;
- }
- if (player.onGround) {
- player.moveFlying(0.0F, 1.0F, bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = 0.05F;
- }
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
- if (!player.inventory.armorItemInSlot(0).hasTagCompound()) {
- NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
- player.inventory.armorItemInSlot(0).setTagCompound(par1NBTTagCompound);
- player.inventory.armorItemInSlot(0).stackTagCompound.setInteger("runTicks", 0);
- }
- int ticks = player.inventory.armorItemInSlot(0).stackTagCompound.getInteger("runTicks");
-
- }
- }
-
- public int getRunicCharge(ItemStack arg0) {
- return 0;
+ setUnlocalizedName(unlocalisedName);
+ }
+
+ protected void setBootsData() {
+ super.setBootsData();
+ jumpBonus = 0.35D; // 3.5 blocks
+ tier = 2;
+ runBonus = 0.165F;
+ longrunningbonus = 0.003F;
+ steadyBonus = true;
+ negateFall = true;
+ waterEffects = true;
+ iconResPath = "thaumicboots:bootsCometMeteor";
+ armorResPath = "thaumicboots:model/VoidwalkerBootsComet.png";
+ unlocalisedName = "ItemCometMeteor";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/unique/ItemMeteoricCometBoots.java b/src/main/java/thaumicboots/item/boots/unique/ItemMeteoricCometBoots.java
index abe7145..fecb47b 100644
--- a/src/main/java/thaumicboots/item/boots/unique/ItemMeteoricCometBoots.java
+++ b/src/main/java/thaumicboots/item/boots/unique/ItemMeteoricCometBoots.java
@@ -1,103 +1,20 @@
package thaumicboots.item.boots.unique;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.config.Config;
-import thaumcraft.common.items.armor.Hover;
-import thaumicboots.main.utils.TabThaumicBoots;
-
-public class ItemMeteoricCometBoots extends ItemArmor implements IRepairable, IRunicArmor {
+public class ItemMeteoricCometBoots extends ItemCometMeteorBoots {
public IIcon icon;
public ItemMeteoricCometBoots(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par2EnumArmorMaterial, par3, par4);
- setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemMeteoricComet");
- }
-
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister ir) {
- this.icon = ir.registerIcon("thaumicboots:bootsMeteorComet");
- }
-
- @SideOnly(Side.CLIENT)
- public IIcon func_77617_a(int par1) {
- return this.icon;
- }
-
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
- return "thaumicboots:model/VoidwalkerBootsMeteor.png";
}
- @Override
- public EnumRarity getRarity(ItemStack par1ItemStack) {
- return EnumRarity.rare;
+ protected void setBootsData() {
+ super.setBootsData();
+ iconResPath = "thaumicboots:bootsMeteorComet";
+ armorResPath = "thaumicboots:model/VoidwalkerBootsMeteor.png";
+ unlocalisedName = "ItemMeteoricComet";
}
- public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
- return par2ItemStack.isItemEqual(new ItemStack(Items.leather)) ? true
- : super.getIsRepairable(par1ItemStack, par2ItemStack);
- }
-
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
- if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
- int haste = EnchantmentHelper
- .getEnchantmentLevel(Config.enchHaste.effectId, player.inventory.armorItemInSlot(0));
- if (player.worldObj.isRemote) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep
- .containsKey(Integer.valueOf(player.getEntityId()))) {
- Thaumcraft.instance.entityEventHandler.prevStep
- .put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
- }
- player.stepHeight = 1.0F;
- }
-
- float bonus = 0.165F;
- if (player.isInWater()) {
- bonus /= 4.0F;
- }
- if (player.onGround) {
- player.moveFlying(0.0F, 1.0F, bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = 0.05F;
- }
- if (player.fallDistance > 0.0F) {
- player.fallDistance = 0.0F;
- }
- if (!player.inventory.armorItemInSlot(0).hasTagCompound()) {
- NBTTagCompound par1NBTTagCompound = new NBTTagCompound();
- player.inventory.armorItemInSlot(0).setTagCompound(par1NBTTagCompound);
- player.inventory.armorItemInSlot(0).stackTagCompound.setInteger("runTicks", 0);
- }
- int ticks = player.inventory.armorItemInSlot(0).stackTagCompound.getInteger("runTicks");
-
- }
- }
-
- public int getRunicCharge(ItemStack arg0) {
- return 0;
- }
}
diff --git a/src/main/java/thaumicboots/item/boots/voidwalker/ItemCometVoidwalkerBoots.java b/src/main/java/thaumicboots/item/boots/voidwalker/ItemCometVoidwalkerBoots.java
index 4f2a5fe..f125c1b 100644
--- a/src/main/java/thaumicboots/item/boots/voidwalker/ItemCometVoidwalkerBoots.java
+++ b/src/main/java/thaumicboots/item/boots/voidwalker/ItemCometVoidwalkerBoots.java
@@ -1,172 +1,22 @@
package thaumicboots.item.boots.voidwalker;
-import java.util.List;
+import thaumicboots.api.IComet;
+import thaumicboots.api.ItemVoidBoots;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-import net.minecraftforge.common.MinecraftForge;
-
-import baubles.common.lib.PlayerHandler;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import taintedmagic.common.registry.ItemRegistry;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.IVisDiscountGear;
-import thaumcraft.api.IWarpingGear;
-import thaumcraft.api.aspects.Aspect;
-import thaumcraft.client.fx.ParticleEngine;
-import thaumcraft.client.fx.particles.FXWispEG;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.items.armor.Hover;
-import thaumicboots.main.utils.TabThaumicBoots;
-
-public class ItemCometVoidwalkerBoots extends ItemArmor
- implements IVisDiscountGear, IWarpingGear, IRunicArmor, IRepairable, ISpecialArmor {
+public class ItemCometVoidwalkerBoots extends ItemVoidBoots implements IComet {
public ItemCometVoidwalkerBoots(final ArmorMaterial material, final int j, final int k) {
super(material, j, k);
- setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemVoidComet");
- setTextureName("thaumicboots:voidComet_16x");
-
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @Override
- public String getArmorTexture(final ItemStack stack, final Entity entity, final int slot, final String type) {
- return "thaumicboots:model/VoidwalkerBootsComet_-_Purple.png";
- }
-
- @Override
- public EnumRarity getRarity(final ItemStack stack) {
- return EnumRarity.epic;
- }
-
- @Override
- public int getRunicCharge(final ItemStack stack) {
- return 0;
- }
-
- @Override
- public int getWarp(final ItemStack stack, final EntityPlayer player) {
- return 5;
- }
-
- @Override
- public int getVisDiscount(final ItemStack stack, final EntityPlayer player, final Aspect aspect) {
- return 5;
- }
-
- @Override
- public ArmorProperties getProperties(final EntityLivingBase entity, final ItemStack stack,
- final DamageSource source, final double dmg, final int slot) {
- int priority = 0;
- double ratio = damageReduceAmount / 90.0D;
-
- if (source.isMagicDamage() || source.isFireDamage() || source.isExplosion()) {
- priority = 1;
- ratio = damageReduceAmount / 80.0D;
- } else if (source.isUnblockable()) {
- priority = 0;
- ratio = 0.0D;
- }
- return new ArmorProperties(priority, ratio, stack.getMaxDamage() + 1 - stack.getItemDamage());
- }
-
- @Override
- public int getArmorDisplay(final EntityPlayer player, final ItemStack stack, final int slot) {
- return damageReduceAmount;
- }
-
- @Override
- public void damageArmor(final EntityLivingBase entity, final ItemStack stack, final DamageSource source,
- final int dmg, final int slot) {
- if (source != DamageSource.fall) {
- stack.damageItem(dmg, entity);
- }
- }
-
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean b) {
- list.add(
- EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
- + ": "
- + getVisDiscount(stack, player, null)
- + "%");
- }
-
- @Override
- public void onUpdate(final ItemStack stack, final World world, final Entity entity, final int j, final boolean k) {
- super.onUpdate(stack, world, entity, j, k);
- if (!world.isRemote && stack.isItemDamaged()
- && entity.ticksExisted % 20 == 0
- && entity instanceof EntityLivingBase) {
- stack.damageItem(-1, (EntityLivingBase) entity);
- }
- }
-
- @Override
- public void onArmorTick(final World world, final EntityPlayer player, final ItemStack stack) {
- super.onArmorTick(world, player, stack);
- // repair
- if (!world.isRemote && stack.isItemDamaged() && player.ticksExisted % 20 == 0) {
- stack.damageItem(-1, player);
- }
-
- // particles
- final double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(0.5 * player.motionY);
- if (world.isRemote && (motion > 0.1D || !player.onGround) && world.rand.nextInt(3) == 0) {
- particles(world, player);
- }
-
- if (player.moveForward > 0.0F) {
- // increased step height
- if (player.worldObj.isRemote && !player.isSneaking()) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
- Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
- }
- player.stepHeight = 1.0F;
- }
-
- // speed boost
- if (player.onGround || player.capabilities.isFlying) {
- float bonus = 0.215F * 3;
- final ItemStack sash = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
- if (sash != null && sash.getItem() == ItemRegistry.ItemVoidwalkerSash) {
- bonus *= 3.0F;
- }
-
- player.moveFlying(0.0F, 1.0F, player.capabilities.isFlying ? bonus * 0.75F : bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = player.isSprinting() ? 0.045F : 0.04F;
- }
- }
- // negate fall damage
- if (player.fallDistance > 3.0F) {
- player.fallDistance = 1.0F;
- }
}
- @SideOnly(Side.CLIENT)
- private void particles(final World world, final EntityPlayer player) {
- final FXWispEG fx = new FXWispEG(
- world,
- player.posX + (Math.random() - Math.random()) * 0.5D,
- player.boundingBox.minY + 0.05D + (Math.random() - Math.random()) * 0.1D,
- player.posZ + (Math.random() - Math.random()) * 0.5D,
- player);
- ParticleEngine.instance.addEffect(world, fx);
+ protected void setBootsData() {
+ super.setBootsData();
+ visDiscount = 5;
+ jumpBonus = 0.450D; // 4.5 blocks
+ tier = 3;
+ runBonus = 0.215F * 3;
+ iconResPath = "thaumicboots:voidComet_16x";
+ armorResPath = "thaumicboots:model/VoidwalkerBootsComet_-_Purple.png";
+ unlocalisedName = "ItemVoidComet";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/voidwalker/ItemElectricVoidwalkerBoots.java b/src/main/java/thaumicboots/item/boots/voidwalker/ItemElectricVoidwalkerBoots.java
index 5ee82ed..dd5de70 100644
--- a/src/main/java/thaumicboots/item/boots/voidwalker/ItemElectricVoidwalkerBoots.java
+++ b/src/main/java/thaumicboots/item/boots/voidwalker/ItemElectricVoidwalkerBoots.java
@@ -1,18 +1,8 @@
package thaumicboots.item.boots.voidwalker;
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.ISpecialArmor;
import net.minecraftforge.common.MinecraftForge;
@@ -21,63 +11,41 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
import taintedmagic.common.registry.ItemRegistry;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.IVisDiscountGear;
import thaumcraft.api.IWarpingGear;
-import thaumcraft.api.aspects.Aspect;
import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.fx.particles.FXWispEG;
import thaumcraft.common.Thaumcraft;
import thaumcraft.common.items.armor.Hover;
+import thaumicboots.api.ItemElectricBoots;
import thaumicboots.main.utils.TabThaumicBoots;
-public class ItemElectricVoidwalkerBoots extends ItemArmor
- implements IVisDiscountGear, IWarpingGear, IRunicArmor, IRepairable, ISpecialArmor, IElectricItem {
-
- public int maxCharge = 1000000;
- public int energyPerDamage = 500;
- public int visDiscount = 5 + 2;
-
- public double transferLimit = 400;
+public class ItemElectricVoidwalkerBoots extends ItemElectricBoots implements IWarpingGear, ISpecialArmor {
public ItemElectricVoidwalkerBoots(final ArmorMaterial material, final int j, final int k) {
super(material, j, k);
setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemElectricVoid");
- setTextureName("thaumicboots:electricVoid_16x");
-
+ setUnlocalizedName(unlocalisedName);
+ setBootsData();
MinecraftForge.EVENT_BUS.register(this);
}
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
- ItemStack itemStack = new ItemStack(this, 1);
- if (getChargedItem(itemStack) == this) {
- ItemStack charged = new ItemStack(this, 1);
- ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
- itemList.add(charged);
- }
- if (getEmptyItem(itemStack) == this) {
- itemList.add(new ItemStack(this, 1, getMaxDamage()));
- }
- }
+ protected void setBootsData() {
+ super.setBootsData();
+ maxCharge = 1_000_000;
+ energyPerDamage = 500; // allows for 2k hits 2x more than base electric (for this mod)
+ runicCharge = 0;
+ visDiscount = 5 + 2; // voidwalker + electric discount
+ provideEnergy = false;
+ damageAbsorptionRatio = 2.25D;
+ transferLimit = 400;
+ jumpBonus = 0.4675D; // 4.5 blocks
+ runBonus = 0.200F;
- @Override
- public String getArmorTexture(final ItemStack stack, final Entity entity, final int slot, final String type) {
- return "thaumicboots:model/electricbootsVoidwalker.png";
- }
-
- @Override
- public EnumRarity getRarity(final ItemStack stack) {
- return EnumRarity.epic;
- }
-
- @Override
- public int getRunicCharge(final ItemStack stack) {
- return 0;
+ tier = 3;
+ iconResPath = "thaumicboots:electricVoid_16x";
+ armorResPath = "thaumicboots:model/electricbootsVoidwalker.png";
+ unlocalisedName = "ItemElectricVoid";
}
@Override
@@ -85,27 +53,21 @@ public int getWarp(final ItemStack stack, final EntityPlayer player) {
return 5;
}
- @Override
- public int getVisDiscount(final ItemStack stack, final EntityPlayer player, final Aspect aspect) {
- return visDiscount;
- }
-
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean b) {
- list.add(
- EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
- + ": "
- + getVisDiscount(stack, player, null)
- + "%");
+ @SideOnly(Side.CLIENT)
+ protected void particles(final World world, final EntityPlayer player) {
+ final FXWispEG fx = new FXWispEG(
+ world,
+ player.posX + (Math.random() - Math.random()) * 0.5D,
+ player.boundingBox.minY + 0.05D + (Math.random() - Math.random()) * 0.1D,
+ player.posZ + (Math.random() - Math.random()) * 0.5D,
+ player);
+ ParticleEngine.instance.addEffect(world, fx);
}
+ // necessary for void + electric function
@Override
public void onArmorTick(final World world, final EntityPlayer player, final ItemStack stack) {
super.onArmorTick(world, player, stack);
- // repair
- if (!world.isRemote && stack.isItemDamaged() && player.ticksExisted % 20 == 0) {
- // stack.damageItem(-1, player);
- }
// particles
final double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(0.5 * player.motionY);
@@ -133,7 +95,9 @@ public void onArmorTick(final World world, final EntityPlayer player, final Item
bonus *= 0;
}
- player.moveFlying(0.0F, 1.0F, player.capabilities.isFlying ? bonus * 0.75F : bonus);
+ bonus = player.capabilities.isFlying ? bonus * 0.75F : bonus;
+ bonus *= stack.stackTagCompound.getDouble(TAG_MODE_SPEED);
+ player.moveFlying(0.0F, 1.0F, bonus);
} else if (Hover.getHover(player.getEntityId())) {
player.jumpMovementFactor = 0.03F;
} else {
@@ -146,84 +110,8 @@ public void onArmorTick(final World world, final EntityPlayer player, final Item
}
}
- @SideOnly(Side.CLIENT)
- private void particles(final World world, final EntityPlayer player) {
- final FXWispEG fx = new FXWispEG(
- world,
- player.posX + (Math.random() - Math.random()) * 0.5D,
- player.boundingBox.minY + 0.05D + (Math.random() - Math.random()) * 0.1D,
- player.posZ + (Math.random() - Math.random()) * 0.5D,
- player);
- ParticleEngine.instance.addEffect(world, fx);
- }
-
- @Override
- public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source,
- double damage, int slot) {
- if (source.isUnblockable()) {
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
- } else {
- double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
- int energyPerDamage = getEnergyPerDamage();
- double damageLimit = energyPerDamage <= 0 ? 0
- : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
- }
- }
-
@Override
- public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
- if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
- return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
- } else {
- return 0;
- }
- }
-
- @Override
- public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
- ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
- }
-
- public double getDamageAbsorptionRatio() {
- return 2.25D;
- }
-
- private double getBaseAbsorptionRatio() {
- return 0.15D;
- }
-
- public int getEnergyPerDamage() {
- return energyPerDamage;
- }
-
- @Override
- public boolean canProvideEnergy(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public double getMaxCharge(ItemStack itemStack) {
- return maxCharge;
- }
-
- @Override
- public int getTier(ItemStack itemStack) {
- return 2;
- }
-
- @Override
- public double getTransferLimit(ItemStack itemStack) {
- return transferLimit;
- }
-
- @Override
- public Item getChargedItem(ItemStack itemStack) {
- return this;
- }
-
- @Override
- public Item getEmptyItem(ItemStack itemStack) {
- return this;
+ public EnumRarity getRarity(final ItemStack stack) {
+ return EnumRarity.epic;
}
}
diff --git a/src/main/java/thaumicboots/item/boots/voidwalker/ItemMeteorVoidwalkerBoots.java b/src/main/java/thaumicboots/item/boots/voidwalker/ItemMeteorVoidwalkerBoots.java
index ebea1ca..efcb19b 100644
--- a/src/main/java/thaumicboots/item/boots/voidwalker/ItemMeteorVoidwalkerBoots.java
+++ b/src/main/java/thaumicboots/item/boots/voidwalker/ItemMeteorVoidwalkerBoots.java
@@ -1,172 +1,22 @@
package thaumicboots.item.boots.voidwalker;
-import java.util.List;
+import thaumicboots.api.IMeteor;
+import thaumicboots.api.ItemVoidBoots;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-import net.minecraftforge.common.MinecraftForge;
-
-import baubles.common.lib.PlayerHandler;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import taintedmagic.common.registry.ItemRegistry;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.IVisDiscountGear;
-import thaumcraft.api.IWarpingGear;
-import thaumcraft.api.aspects.Aspect;
-import thaumcraft.client.fx.ParticleEngine;
-import thaumcraft.client.fx.particles.FXWispEG;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.items.armor.Hover;
-import thaumicboots.main.utils.TabThaumicBoots;
-
-public class ItemMeteorVoidwalkerBoots extends ItemArmor
- implements IVisDiscountGear, IWarpingGear, IRunicArmor, IRepairable, ISpecialArmor {
+public class ItemMeteorVoidwalkerBoots extends ItemVoidBoots implements IMeteor {
public ItemMeteorVoidwalkerBoots(final ArmorMaterial material, final int j, final int k) {
super(material, j, k);
- setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemVoidMeteor");
- setTextureName("thaumicboots:purpleHaze_16x");
-
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @Override
- public String getArmorTexture(final ItemStack stack, final Entity entity, final int slot, final String type) {
- return "thaumicboots:model/VoidwalkerBootsMeteor_-_Purple.png";
- }
-
- @Override
- public EnumRarity getRarity(final ItemStack stack) {
- return EnumRarity.epic;
- }
-
- @Override
- public int getRunicCharge(final ItemStack stack) {
- return 0;
- }
-
- @Override
- public int getWarp(final ItemStack stack, final EntityPlayer player) {
- return 5;
- }
-
- @Override
- public int getVisDiscount(final ItemStack stack, final EntityPlayer player, final Aspect aspect) {
- return 5;
- }
-
- @Override
- public ArmorProperties getProperties(final EntityLivingBase entity, final ItemStack stack,
- final DamageSource source, final double dmg, final int slot) {
- int priority = 0;
- double ratio = damageReduceAmount / 90.0D;
-
- if (source.isMagicDamage() || source.isFireDamage() || source.isExplosion()) {
- priority = 1;
- ratio = damageReduceAmount / 80.0D;
- } else if (source.isUnblockable()) {
- priority = 0;
- ratio = 0.0D;
- }
- return new ArmorProperties(priority, ratio, stack.getMaxDamage() + 1 - stack.getItemDamage());
- }
-
- @Override
- public int getArmorDisplay(final EntityPlayer player, final ItemStack stack, final int slot) {
- return damageReduceAmount;
- }
-
- @Override
- public void damageArmor(final EntityLivingBase entity, final ItemStack stack, final DamageSource source,
- final int dmg, final int slot) {
- if (source != DamageSource.fall) {
- stack.damageItem(dmg, entity);
- }
- }
-
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean b) {
- list.add(
- EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
- + ": "
- + getVisDiscount(stack, player, null)
- + "%");
- }
-
- @Override
- public void onUpdate(final ItemStack stack, final World world, final Entity entity, final int j, final boolean k) {
- super.onUpdate(stack, world, entity, j, k);
- if (!world.isRemote && stack.isItemDamaged()
- && entity.ticksExisted % 20 == 0
- && entity instanceof EntityLivingBase) {
- stack.damageItem(-1, (EntityLivingBase) entity);
- }
- }
-
- @Override
- public void onArmorTick(final World world, final EntityPlayer player, final ItemStack stack) {
- super.onArmorTick(world, player, stack);
- // repair
- if (!world.isRemote && stack.isItemDamaged() && player.ticksExisted % 20 == 0) {
- stack.damageItem(-1, player);
- }
-
- // particles
- final double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(0.5 * player.motionY);
- if (world.isRemote && (motion > 0.1D || !player.onGround) && world.rand.nextInt(3) == 0) {
- particles(world, player);
- }
-
- if (player.moveForward > 0.0F) {
- // increased step height
- if (player.worldObj.isRemote && !player.isSneaking()) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
- Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
- }
- player.stepHeight = 1.0F;
- }
-
- // speed boost
- if (player.onGround || player.capabilities.isFlying) {
- float bonus = 0.300F;
- final ItemStack sash = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
- if (sash != null && sash.getItem() == ItemRegistry.ItemVoidwalkerSash) {
- bonus *= 3.0F;
- }
-
- player.moveFlying(0.0F, 1.0F, player.capabilities.isFlying ? bonus * 0.75F : bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = player.isSprinting() ? 0.045F : 0.04F;
- }
- }
- // negate fall damage
- if (player.fallDistance > 3.0F) {
- player.fallDistance = 1.0F;
- }
}
- @SideOnly(Side.CLIENT)
- private void particles(final World world, final EntityPlayer player) {
- final FXWispEG fx = new FXWispEG(
- world,
- player.posX + (Math.random() - Math.random()) * 0.5D,
- player.boundingBox.minY + 0.05D + (Math.random() - Math.random()) * 0.1D,
- player.posZ + (Math.random() - Math.random()) * 0.5D,
- player);
- ParticleEngine.instance.addEffect(world, fx);
+ protected void setBootsData() {
+ super.setBootsData();
+ visDiscount = 5;
+ jumpBonus = 0.88D; // 9 blocks
+ tier = 3;
+ runBonus = 0.300F;
+ iconResPath = "thaumicboots:purpleHaze_16x";
+ armorResPath = "thaumicboots:model/VoidwalkerBootsMeteor_-_Purple.png";
+ unlocalisedName = "ItemVoidMeteor";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/voidwalker/ItemNanoVoidwalkerBoots.java b/src/main/java/thaumicboots/item/boots/voidwalker/ItemNanoVoidwalkerBoots.java
index 7743cfa..f118f6a 100644
--- a/src/main/java/thaumicboots/item/boots/voidwalker/ItemNanoVoidwalkerBoots.java
+++ b/src/main/java/thaumicboots/item/boots/voidwalker/ItemNanoVoidwalkerBoots.java
@@ -1,229 +1,22 @@
package thaumicboots.item.boots.voidwalker;
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-import net.minecraftforge.common.MinecraftForge;
-
-import baubles.common.lib.PlayerHandler;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
-import taintedmagic.common.registry.ItemRegistry;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.IVisDiscountGear;
-import thaumcraft.api.IWarpingGear;
-import thaumcraft.api.aspects.Aspect;
-import thaumcraft.client.fx.ParticleEngine;
-import thaumcraft.client.fx.particles.FXWispEG;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.items.armor.Hover;
-import thaumicboots.main.utils.TabThaumicBoots;
-
-public class ItemNanoVoidwalkerBoots extends ItemArmor
- implements IVisDiscountGear, IWarpingGear, IRunicArmor, IRepairable, ISpecialArmor, IElectricItem {
-
- public int maxCharge = 10000000;
- public int energyPerDamage = 2500;
- public int visDiscount = 5 + 4;
-
- public double transferLimit = 3200;
+public class ItemNanoVoidwalkerBoots extends ItemElectricVoidwalkerBoots {
public ItemNanoVoidwalkerBoots(final ArmorMaterial material, final int j, final int k) {
super(material, j, k);
- setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemNanoVoid");
- setTextureName("thaumicboots:nanoVoid_16x");
-
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
- ItemStack itemStack = new ItemStack(this, 1);
- if (getChargedItem(itemStack) == this) {
- ItemStack charged = new ItemStack(this, 1);
- ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
- itemList.add(charged);
- }
- if (getEmptyItem(itemStack) == this) {
- itemList.add(new ItemStack(this, 1, getMaxDamage()));
- }
- }
-
- @Override
- public String getArmorTexture(final ItemStack stack, final Entity entity, final int slot, final String type) {
- return "thaumicboots:model/nanobootsVoidwalker.png";
- }
-
- @Override
- public EnumRarity getRarity(final ItemStack stack) {
- return EnumRarity.epic;
- }
-
- @Override
- public int getRunicCharge(final ItemStack stack) {
- return 0;
- }
-
- @Override
- public int getWarp(final ItemStack stack, final EntityPlayer player) {
- return 5;
- }
-
- @Override
- public int getVisDiscount(final ItemStack stack, final EntityPlayer player, final Aspect aspect) {
- return visDiscount;
- }
-
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean b) {
- list.add(
- EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
- + ": "
- + getVisDiscount(stack, player, null)
- + "%");
- }
-
- @Override
- public void onArmorTick(final World world, final EntityPlayer player, final ItemStack stack) {
- super.onArmorTick(world, player, stack);
- // repair
- if (!world.isRemote && stack.isItemDamaged() && player.ticksExisted % 20 == 0) {
- // stack.damageItem(-1, player);
- }
-
- // particles
- final double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(0.5 * player.motionY);
- if (world.isRemote && (motion > 0.1D || !player.onGround) && world.rand.nextInt(3) == 0) {
- particles(world, player);
- }
-
- if (player.moveForward > 0.0F) {
- // increased step height
- if (player.worldObj.isRemote && !player.isSneaking()) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
- Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
- }
- player.stepHeight = 1.0F;
- }
-
- // speed boost
- if (player.onGround || player.capabilities.isFlying) {
- float bonus = 0.550F;
- final ItemStack sash = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
- if (sash != null && sash.getItem() == ItemRegistry.ItemVoidwalkerSash) {
- bonus *= 3.0F;
- }
- if (ElectricItem.manager.getCharge(stack) == 0) {
- bonus *= 0;
- }
-
- player.moveFlying(0.0F, 1.0F, player.capabilities.isFlying ? bonus * 0.75F : bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = player.isSprinting() ? 0.045F : 0.04F;
- }
- }
- // negate fall damage
- if (player.fallDistance > 3.0F) {
- player.fallDistance = 1.0F;
- }
- }
-
- @SideOnly(Side.CLIENT)
- private void particles(final World world, final EntityPlayer player) {
- final FXWispEG fx = new FXWispEG(
- world,
- player.posX + (Math.random() - Math.random()) * 0.5D,
- player.boundingBox.minY + 0.05D + (Math.random() - Math.random()) * 0.1D,
- player.posZ + (Math.random() - Math.random()) * 0.5D,
- player);
- ParticleEngine.instance.addEffect(world, fx);
- }
-
- @Override
- public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source,
- double damage, int slot) {
- if (source.isUnblockable()) {
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
- } else {
- double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
- int energyPerDamage = getEnergyPerDamage();
- double damageLimit = energyPerDamage <= 0 ? 0
- : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
- }
- }
-
- @Override
- public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
- if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
- return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
- } else {
- return 0;
- }
- }
-
- @Override
- public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
- ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
- }
-
- public double getDamageAbsorptionRatio() {
- return 2.75D;
- }
-
- private double getBaseAbsorptionRatio() {
- return 0.15D;
- }
-
- public int getEnergyPerDamage() {
- return energyPerDamage;
- }
-
- @Override
- public boolean canProvideEnergy(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public double getMaxCharge(ItemStack itemStack) {
- return maxCharge;
- }
-
- @Override
- public int getTier(ItemStack itemStack) {
- return 3;
- }
-
- @Override
- public double getTransferLimit(ItemStack itemStack) {
- return transferLimit;
- }
-
- @Override
- public Item getChargedItem(ItemStack itemStack) {
- return this;
}
- @Override
- public Item getEmptyItem(ItemStack itemStack) {
- return this;
+ protected void setBootsData() {
+ super.setBootsData();
+ maxCharge = 10_000_000;
+ energyPerDamage = 2_500; // allows for 4k hits 2x more than base nano, 2x more than prev (for this mod)
+ visDiscount = 5 + 4; // voidwalker + nano discount
+ damageAbsorptionRatio = 2.75D;
+ transferLimit = 2_400;
+ jumpBonus = 0.7425D; // 7.5 blocks
+ runBonus = 0.550F;
+ iconResPath = "thaumicboots:nanoVoid_16x";
+ armorResPath = "thaumicboots:model/nanobootsVoidwalker.png";
+ unlocalisedName = "ItemNanoVoid";
}
}
diff --git a/src/main/java/thaumicboots/item/boots/voidwalker/ItemQuantumVoidwalkerBoots.java b/src/main/java/thaumicboots/item/boots/voidwalker/ItemQuantumVoidwalkerBoots.java
index ed096be..692c5c3 100644
--- a/src/main/java/thaumicboots/item/boots/voidwalker/ItemQuantumVoidwalkerBoots.java
+++ b/src/main/java/thaumicboots/item/boots/voidwalker/ItemQuantumVoidwalkerBoots.java
@@ -1,229 +1,22 @@
package thaumicboots.item.boots.voidwalker;
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ISpecialArmor;
-import net.minecraftforge.common.MinecraftForge;
-
-import baubles.common.lib.PlayerHandler;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
-import taintedmagic.common.registry.ItemRegistry;
-import thaumcraft.api.IRepairable;
-import thaumcraft.api.IRunicArmor;
-import thaumcraft.api.IVisDiscountGear;
-import thaumcraft.api.IWarpingGear;
-import thaumcraft.api.aspects.Aspect;
-import thaumcraft.client.fx.ParticleEngine;
-import thaumcraft.client.fx.particles.FXWispEG;
-import thaumcraft.common.Thaumcraft;
-import thaumcraft.common.items.armor.Hover;
-import thaumicboots.main.utils.TabThaumicBoots;
-
-public class ItemQuantumVoidwalkerBoots extends ItemArmor
- implements IVisDiscountGear, IWarpingGear, IRunicArmor, IRepairable, ISpecialArmor, IElectricItem {
-
- public int maxCharge = 100000000;
- public int energyPerDamage = 10000;
- public int visDiscount = 5 + 5;
-
- public double transferLimit = 24000;
+public class ItemQuantumVoidwalkerBoots extends ItemElectricVoidwalkerBoots {
public ItemQuantumVoidwalkerBoots(final ArmorMaterial material, final int j, final int k) {
super(material, j, k);
- setCreativeTab(TabThaumicBoots.tabThaumicBoots);
- setUnlocalizedName("ItemQuantumVoid");
- setTextureName("thaumicboots:quantumVoid_16x");
-
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
- ItemStack itemStack = new ItemStack(this, 1);
- if (getChargedItem(itemStack) == this) {
- ItemStack charged = new ItemStack(this, 1);
- ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
- itemList.add(charged);
- }
- if (getEmptyItem(itemStack) == this) {
- itemList.add(new ItemStack(this, 1, getMaxDamage()));
- }
- }
-
- @Override
- public String getArmorTexture(final ItemStack stack, final Entity entity, final int slot, final String type) {
- return "thaumicboots:model/quantumbootsVoidwalker.png";
- }
-
- @Override
- public EnumRarity getRarity(final ItemStack stack) {
- return EnumRarity.epic;
- }
-
- @Override
- public int getRunicCharge(final ItemStack stack) {
- return 0;
- }
-
- @Override
- public int getWarp(final ItemStack stack, final EntityPlayer player) {
- return 5;
- }
-
- @Override
- public int getVisDiscount(final ItemStack stack, final EntityPlayer player, final Aspect aspect) {
- return visDiscount;
- }
-
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean b) {
- list.add(
- EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
- + ": "
- + getVisDiscount(stack, player, null)
- + "%");
- }
-
- @Override
- public void onArmorTick(final World world, final EntityPlayer player, final ItemStack stack) {
- super.onArmorTick(world, player, stack);
- // repair
- if (!world.isRemote && stack.isItemDamaged() && player.ticksExisted % 20 == 0) {
- // stack.damageItem(-1, player);
- }
-
- // particles
- final double motion = Math.abs(player.motionX) + Math.abs(player.motionZ) + Math.abs(0.5 * player.motionY);
- if (world.isRemote && (motion > 0.1D || !player.onGround) && world.rand.nextInt(3) == 0) {
- particles(world, player);
- }
-
- if (player.moveForward > 0.0F) {
- // increased step height
- if (player.worldObj.isRemote && !player.isSneaking()) {
- if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
- Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
- }
- player.stepHeight = 1.0F;
- }
-
- // speed boost
- if (player.onGround || player.capabilities.isFlying) {
- float bonus = 1.250F;
- final ItemStack sash = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
- if (sash != null && sash.getItem() == ItemRegistry.ItemVoidwalkerSash) {
- bonus *= 3.0F;
- }
- if (ElectricItem.manager.getCharge(stack) == 0) {
- bonus *= 0;
- }
-
- player.moveFlying(0.0F, 1.0F, player.capabilities.isFlying ? bonus * 0.75F : bonus);
- } else if (Hover.getHover(player.getEntityId())) {
- player.jumpMovementFactor = 0.03F;
- } else {
- player.jumpMovementFactor = player.isSprinting() ? 0.045F : 0.04F;
- }
- }
- // negate fall damage
- if (player.fallDistance > 3.0F) {
- player.fallDistance = 1.0F;
- }
- }
-
- @SideOnly(Side.CLIENT)
- private void particles(final World world, final EntityPlayer player) {
- final FXWispEG fx = new FXWispEG(
- world,
- player.posX + (Math.random() - Math.random()) * 0.5D,
- player.boundingBox.minY + 0.05D + (Math.random() - Math.random()) * 0.1D,
- player.posZ + (Math.random() - Math.random()) * 0.5D,
- player);
- ParticleEngine.instance.addEffect(world, fx);
- }
-
- @Override
- public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source,
- double damage, int slot) {
- if (source.isUnblockable()) {
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
- } else {
- double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
- int energyPerDamage = getEnergyPerDamage();
- double damageLimit = energyPerDamage <= 0 ? 0
- : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
- return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
- }
- }
-
- @Override
- public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
- if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
- return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
- } else {
- return 0;
- }
- }
-
- @Override
- public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
- ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
- }
-
- public double getDamageAbsorptionRatio() {
- return 3D;
- }
-
- private double getBaseAbsorptionRatio() {
- return 0.15D;
- }
-
- public int getEnergyPerDamage() {
- return energyPerDamage;
- }
-
- @Override
- public boolean canProvideEnergy(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public double getMaxCharge(ItemStack itemStack) {
- return maxCharge;
- }
-
- @Override
- public int getTier(ItemStack itemStack) {
- return 4;
- }
-
- @Override
- public double getTransferLimit(ItemStack itemStack) {
- return transferLimit;
- }
-
- @Override
- public Item getChargedItem(ItemStack itemStack) {
- return this;
}
- @Override
- public Item getEmptyItem(ItemStack itemStack) {
- return this;
+ protected void setBootsData() {
+ super.setBootsData();
+ maxCharge = 100_000_000;
+ energyPerDamage = 12_500; // allows for 8k hits 2x more than base quantum, 2x more than prev (for this mod)
+ visDiscount = 5 + 5; // voidwalker + quantum discount
+ damageAbsorptionRatio = 3.0D;
+ transferLimit = 24_000;
+ jumpBonus = 1.0175D; // 11 blocks
+ runBonus = 1.250F;
+ iconResPath = "thaumicboots:quantumVoid_16x";
+ armorResPath = "thaumicboots:model/quantumbootsVoidwalker.png";
+ unlocalisedName = "ItemQuantumVoid";
}
}
diff --git a/src/main/java/thaumicboots/item/tools/ItemThaumicInterfacer.java b/src/main/java/thaumicboots/item/tools/ItemThaumicInterfacer.java
index fd1b9be..22bf2ee 100644
--- a/src/main/java/thaumicboots/item/tools/ItemThaumicInterfacer.java
+++ b/src/main/java/thaumicboots/item/tools/ItemThaumicInterfacer.java
@@ -35,6 +35,8 @@ public ItemThaumicInterfacer() {
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int targetX, int targetY,
int targetZ, int side, float hitX, float hitY, float hitZ) {
+ // ItemStack stack1 = player.getCurrentArmor(0);
+ // player.addChatMessage(new ChatComponentText("seethe: " + stack1.getDisplayName()));
return false;
}
}
diff --git a/src/main/java/thaumicboots/main/ClientProxy.java b/src/main/java/thaumicboots/main/ClientProxy.java
index 035fd52..6e77526 100644
--- a/src/main/java/thaumicboots/main/ClientProxy.java
+++ b/src/main/java/thaumicboots/main/ClientProxy.java
@@ -2,6 +2,7 @@
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
@@ -11,11 +12,16 @@
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import thaumicboots.main.utils.BootKeys;
@SuppressWarnings("unused")
@SideOnly(Side.CLIENT)
public class ClientProxy extends CommonProxy {
+ public void load() {
+
+ }
+
@Override
public void preInit(FMLPreInitializationEvent event) {
super.preInit(event);
@@ -24,6 +30,7 @@ public void preInit(FMLPreInitializationEvent event) {
@Override
public void init(FMLInitializationEvent event) {
super.init(event);
+ MinecraftForge.EVENT_BUS.register(new BootKeys());
}
@Override
diff --git a/src/main/java/thaumicboots/main/CommonProxy.java b/src/main/java/thaumicboots/main/CommonProxy.java
index 0d40728..199c5ba 100644
--- a/src/main/java/thaumicboots/main/CommonProxy.java
+++ b/src/main/java/thaumicboots/main/CommonProxy.java
@@ -3,15 +3,14 @@
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import thaumicboots.api.serverfiles.PacketHandler;
import thaumicboots.main.utils.CraftingManager;
-import thaumicboots.main.utils.LogHelper;
import thaumicboots.main.utils.compat.ModHelperManager;
@SuppressWarnings("unused")
public class CommonProxy {
public void preInit(FMLPreInitializationEvent event) {
- LogHelper.info("Preinit started");
Config.Init(event.getSuggestedConfigurationFile());
Config.setupBlocks();
@@ -19,20 +18,17 @@ public void preInit(FMLPreInitializationEvent event) {
ModHelperManager.preInit();
- LogHelper.info("Preinit completed");
+ PacketHandler.initPackets();
}
public void init(FMLInitializationEvent event) {
ModHelperManager.init();
- LogHelper.info("Init completed");
}
public void postInit(FMLPostInitializationEvent event) {
ModHelperManager.postInit();
CraftingManager.setupCrafting();
-
- LogHelper.info("Postinit completed");
}
}
diff --git a/src/main/java/thaumicboots/main/Config.java b/src/main/java/thaumicboots/main/Config.java
index d840eb5..9046ab6 100644
--- a/src/main/java/thaumicboots/main/Config.java
+++ b/src/main/java/thaumicboots/main/Config.java
@@ -4,21 +4,12 @@
import net.minecraft.item.Item;
import net.minecraftforge.common.config.Configuration;
+import net.minecraftforge.common.config.Property;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.registry.GameRegistry;
-import thaumcraft.api.ThaumcraftApi;
-import thaumicboots.item.boots.comet.ItemElectricCometBoots;
-import thaumicboots.item.boots.comet.ItemNanoCometBoots;
-import thaumicboots.item.boots.comet.ItemQuantumCometBoots;
-import thaumicboots.item.boots.meteor.ItemElectricMeteorBoots;
-import thaumicboots.item.boots.meteor.ItemNanoMeteorBoots;
-import thaumicboots.item.boots.meteor.ItemQuantumMeteorBoots;
-import thaumicboots.item.boots.unique.ItemCometMeteorBoots;
-import thaumicboots.item.boots.unique.ItemMeteoricCometBoots;
-import thaumicboots.item.boots.voidwalker.*;
import thaumicboots.item.tools.ItemThaumicInterfacer;
import thaumicboots.main.utils.VersionInfo;
@@ -38,28 +29,6 @@ public class Config {
public static Item arcaniumLens;
- // Thaumic Explorations Compat
- public static Item bootsMeteoricComet;
- public static Item bootsCometMeteor;
-
- // Thaumic Explorations + EMT Compat
- public static Item bootsElectricMeteor;
- public static Item bootsNanoMeteor;
- public static Item bootsQuantumMeteor;
- public static Item bootsElectricComet;
-
- public static Item bootsNanoComet;
- public static Item bootsQuantumComet;
-
- // Tainted Magic + EMT compat
- public static Item bootsElectricVoid;
- public static Item bootsNanoVoid;
- public static Item bootsQuantumVoid;
-
- // Tainted Magic + Thaumic Exploration Compat
- public static Item bootsCometVoid;
- public static Item bootsMeteorVoid;
-
// Tainted Magic Compat
public static Item comaLasDrogas;
@@ -67,6 +36,11 @@ public class Config {
public static Configuration configuration;
private static Config instance = null;
+ public static boolean gtnhLibActive;
+ public static boolean taintedMagicActive;
+ public static boolean emtActive;
+ public static boolean explorationsActive;
+
public static void Init(File configFile) {
if (instance != null) return;
instance = new Config();
@@ -92,53 +66,11 @@ public static void saveConfigs() {
configuration.save();
}
- public static void setupBlocks() {
-
- setupInfusionFucker();
- }
+ public static void setupBlocks() {}
public static void setupItems() {
arcaniumLens = new ItemThaumicInterfacer();
GameRegistry.registerItem(arcaniumLens, arcaniumLens.getUnlocalizedName());
-
- bootsElectricMeteor = new ItemElectricMeteorBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsElectricMeteor, bootsElectricMeteor.getUnlocalizedName());
-
- bootsNanoMeteor = new ItemNanoMeteorBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsNanoMeteor, bootsNanoMeteor.getUnlocalizedName());
-
- bootsQuantumMeteor = new ItemQuantumMeteorBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsQuantumMeteor, bootsQuantumMeteor.getUnlocalizedName());
-
- bootsElectricComet = new ItemElectricCometBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsElectricComet, bootsElectricComet.getUnlocalizedName());
-
- bootsNanoComet = new ItemNanoCometBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsNanoComet, bootsNanoComet.getUnlocalizedName());
-
- bootsQuantumComet = new ItemQuantumCometBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsQuantumComet, bootsQuantumComet.getUnlocalizedName());
-
- bootsMeteoricComet = new ItemMeteoricCometBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsMeteoricComet, bootsMeteoricComet.getUnlocalizedName());
-
- bootsCometMeteor = new ItemCometMeteorBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsCometMeteor, bootsCometMeteor.getUnlocalizedName());
-
- bootsElectricVoid = new ItemElectricVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsElectricVoid, bootsElectricVoid.getUnlocalizedName());
-
- bootsNanoVoid = new ItemNanoVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsNanoVoid, bootsNanoVoid.getUnlocalizedName());
-
- bootsQuantumVoid = new ItemQuantumVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsQuantumVoid, bootsQuantumVoid.getUnlocalizedName());
-
- bootsCometVoid = new ItemCometVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsCometVoid, bootsCometVoid.getUnlocalizedName());
-
- bootsMeteorVoid = new ItemMeteorVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
- GameRegistry.registerItem(bootsMeteorVoid, bootsMeteorVoid.getUnlocalizedName());
}
private static void processConfigFile() {
@@ -150,14 +82,21 @@ private static void syncConfigs() {
}
private static void doModuleConfigs() {
+ Property p;
+ // Requirements
thaumcraftActive = configuration.get(CATEGORY_MODULES, "Thaumcraft", true).getBoolean();
- }
- public static void setupInfusionFucker() {}
+ // Optional Modules
+ p = configuration.get(CATEGORY_MODULES, "Electro-Magic-Tools", true);
+ gtnhLibActive = p.getBoolean();
+
+ p = configuration.get(CATEGORY_MODULES, "Tainted-Magic", true);
+ taintedMagicActive = p.getBoolean();
+
+ p = configuration.get(CATEGORY_MODULES, "Electro-Magic-Tools", true);
+ emtActive = p.getBoolean();
- static {
- blockStoneDeviceRI = -1;
- blockStoneDeviceTwoRI = -2;
- blockStoneDeviceThreeRI = -3;
+ p = configuration.get(CATEGORY_MODULES, "Thaumic_Exploration", true);
+ explorationsActive = p.getBoolean();
}
}
diff --git a/src/main/java/thaumicboots/main/utils/BootKeys.java b/src/main/java/thaumicboots/main/utils/BootKeys.java
new file mode 100644
index 0000000..5d3f9f8
--- /dev/null
+++ b/src/main/java/thaumicboots/main/utils/BootKeys.java
@@ -0,0 +1,55 @@
+package thaumicboots.main.utils;
+
+import net.minecraft.client.settings.KeyBinding;
+
+import org.lwjgl.input.Keyboard;
+
+import cpw.mods.fml.client.registry.ClientRegistry;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import cpw.mods.fml.common.gameevent.TickEvent;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import thaumicboots.api.serverfiles.PacketHandler;
+import thaumicboots.api.serverfiles.PacketJumpToggle;
+import thaumicboots.api.serverfiles.PacketSpeedToggle;
+
+public class BootKeys {
+
+ private static final KeyBinding keyJumpToggle = new KeyBinding(
+ "keybinding.jumptoggle",
+ Keyboard.KEY_NONE,
+ "Thaumic Boots");
+ private final KeyBinding keySpeedToggle = new KeyBinding(
+ "keybinding.speedtoggle",
+ Keyboard.KEY_NONE,
+ "Thaumic Boots");
+
+ public BootKeys() {
+ FMLCommonHandler.instance().bus().register(this);
+ ClientRegistry.registerKeyBinding(keyJumpToggle);
+ ClientRegistry.registerKeyBinding(keySpeedToggle);
+ }
+
+ @SideOnly(Side.CLIENT)
+ @SubscribeEvent
+ public void keyPressed(TickEvent.ClientTickEvent event) {
+ checkKeys();
+ }
+
+ private void checkKeys() {
+ if (keyJumpToggle.isPressed()) {
+ toggleJump();
+ } else if (keySpeedToggle.isPressed()) {
+ toggleSpeed();
+ }
+ }
+
+ private static void toggleJump() {
+ PacketHandler.INSTANCE.sendToServer(new PacketJumpToggle());
+ }
+
+ private static void toggleSpeed() {
+ PacketHandler.INSTANCE.sendToServer(new PacketSpeedToggle());
+ }
+}
diff --git a/src/main/java/thaumicboots/main/utils/TabThaumicBoots.java b/src/main/java/thaumicboots/main/utils/TabThaumicBoots.java
index b956af0..8a7a97a 100644
--- a/src/main/java/thaumicboots/main/utils/TabThaumicBoots.java
+++ b/src/main/java/thaumicboots/main/utils/TabThaumicBoots.java
@@ -4,6 +4,7 @@
import net.minecraft.item.Item;
import thaumicboots.main.Config;
+import thaumicboots.main.utils.compat.ExplorationsHelper;
public class TabThaumicBoots extends CreativeTabs {
@@ -14,6 +15,9 @@ public TabThaumicBoots() {
}
public Item getTabIconItem() {
- return Config.bootsCometMeteor;
+ if (ExplorationsHelper.isActive()) {
+ return ExplorationsHelper.bootsCometMeteor;
+ }
+ return Config.arcaniumLens;
}
}
diff --git a/src/main/java/thaumicboots/main/utils/compat/EMTHelper.java b/src/main/java/thaumicboots/main/utils/compat/EMTHelper.java
new file mode 100644
index 0000000..9a15a7b
--- /dev/null
+++ b/src/main/java/thaumicboots/main/utils/compat/EMTHelper.java
@@ -0,0 +1,455 @@
+package thaumicboots.main.utils.compat;
+
+import static thaumicboots.main.utils.compat.ExplorationsHelper.EXPLORATIONS;
+import static thaumicboots.main.utils.compat.TaintedHelper.TAINTED_MAGIC;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
+
+import cpw.mods.fml.common.Loader;
+import cpw.mods.fml.common.Optional;
+import cpw.mods.fml.common.registry.GameRegistry;
+import emt.init.EMTItems;
+import flaxbeard.thaumicexploration.ThaumicExploration;
+import taintedmagic.common.registry.ItemRegistry;
+import thaumcraft.api.ThaumcraftApi;
+import thaumcraft.api.aspects.Aspect;
+import thaumcraft.api.aspects.AspectList;
+import thaumcraft.api.crafting.InfusionRecipe;
+import thaumcraft.api.research.ResearchCategories;
+import thaumcraft.api.research.ResearchItem;
+import thaumcraft.api.research.ResearchPage;
+import thaumcraft.common.config.ConfigItems;
+import thaumicboots.api.TB_Aspect;
+import thaumicboots.item.boots.comet.ItemElectricCometBoots;
+import thaumicboots.item.boots.comet.ItemNanoCometBoots;
+import thaumicboots.item.boots.comet.ItemQuantumCometBoots;
+import thaumicboots.item.boots.meteor.ItemElectricMeteorBoots;
+import thaumicboots.item.boots.meteor.ItemNanoMeteorBoots;
+import thaumicboots.item.boots.meteor.ItemQuantumMeteorBoots;
+import thaumicboots.item.boots.voidwalker.ItemElectricVoidwalkerBoots;
+import thaumicboots.item.boots.voidwalker.ItemNanoVoidwalkerBoots;
+import thaumicboots.item.boots.voidwalker.ItemQuantumVoidwalkerBoots;
+import thaumicboots.main.Config;
+
+public class EMTHelper implements IModHelper {
+
+ private static boolean isEMTActive = false;
+ public static final String EMT = "EMT";
+
+ // Tainted Magic + EMT compat
+ public static Item bootsElectricVoid;
+ public static Item bootsNanoVoid;
+ public static Item bootsQuantumVoid;
+
+ // Thaumic Explorations + EMT Compat
+ public static Item bootsElectricMeteor;
+ public static Item bootsNanoMeteor;
+ public static Item bootsQuantumMeteor;
+ public static Item bootsElectricComet;
+
+ public static Item bootsNanoComet;
+ public static Item bootsQuantumComet;
+
+ public static boolean isActive() {
+ return isEMTActive;
+ }
+
+ @Override
+ public void preInit() {
+ if (Loader.isModLoaded(EMT) && Config.emtActive) {
+ isEMTActive = true;
+ getItems();
+ }
+ }
+
+ @Override
+ public void init() {}
+
+ @Override
+ public void postInit() {}
+
+ @Optional.Method(modid = "EMT")
+ public void getItems() {
+ if (Loader.isModLoaded(TAINTED_MAGIC) && Config.taintedMagicActive) {
+ bootsElectricVoid = new ItemElectricVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsElectricVoid, bootsElectricVoid.getUnlocalizedName());
+
+ bootsNanoVoid = new ItemNanoVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsNanoVoid, bootsNanoVoid.getUnlocalizedName());
+
+ bootsQuantumVoid = new ItemQuantumVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsQuantumVoid, bootsQuantumVoid.getUnlocalizedName());
+ }
+
+ if (Loader.isModLoaded(EXPLORATIONS) && Config.explorationsActive) {
+ bootsElectricMeteor = new ItemElectricMeteorBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsElectricMeteor, bootsElectricMeteor.getUnlocalizedName());
+
+ bootsNanoMeteor = new ItemNanoMeteorBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsNanoMeteor, bootsNanoMeteor.getUnlocalizedName());
+
+ bootsQuantumMeteor = new ItemQuantumMeteorBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsQuantumMeteor, bootsQuantumMeteor.getUnlocalizedName());
+
+ bootsElectricComet = new ItemElectricCometBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsElectricComet, bootsElectricComet.getUnlocalizedName());
+
+ bootsNanoComet = new ItemNanoCometBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsNanoComet, bootsNanoComet.getUnlocalizedName());
+
+ bootsQuantumComet = new ItemQuantumCometBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsQuantumComet, bootsQuantumComet.getUnlocalizedName());
+ }
+ }
+
+ public static InfusionRecipe electricVoid;
+ public static InfusionRecipe nanoVoid;
+ public static InfusionRecipe quantumVoid;
+
+ public static InfusionRecipe electricComet;
+ public static InfusionRecipe nanoComet;
+ public static InfusionRecipe quantumComet;
+
+ public static InfusionRecipe electricMeteor;
+ public static InfusionRecipe nanoMeteor;
+ public static InfusionRecipe quantumMeteor;
+
+ public static void setupCrafting() {
+ if (ExplorationsHelper.isActive()) {
+ electricComet = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_EMT_Compat",
+ new ItemStack(EMTHelper.bootsElectricComet, 1, OreDictionary.WILDCARD_VALUE),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ThaumicExploration.bootsComet),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()) });
+
+ nanoComet = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_EMT_Compat",
+ new ItemStack(EMTHelper.bootsNanoComet, 1, OreDictionary.WILDCARD_VALUE),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ThaumicExploration.bootsComet),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(EMTItems.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()) });
+
+ quantumComet = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_EMT_Compat",
+ new ItemStack(EMTHelper.bootsQuantumComet, 1, OreDictionary.WILDCARD_VALUE),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ThaumicExploration.bootsComet),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(EMTItems.quantumBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()) });
+
+ electricMeteor = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_EMT_Compat",
+ new ItemStack(EMTHelper.bootsElectricMeteor, 1, OreDictionary.WILDCARD_VALUE),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ThaumicExploration.bootsMeteor),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()) });
+
+ nanoMeteor = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_EMT_Compat",
+ new ItemStack(EMTHelper.bootsNanoMeteor, 1, OreDictionary.WILDCARD_VALUE),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ThaumicExploration.bootsMeteor),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(EMTItems.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()) });
+
+ quantumMeteor = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_EMT_Compat",
+ new ItemStack(EMTHelper.bootsQuantumMeteor, 1, OreDictionary.WILDCARD_VALUE),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ThaumicExploration.bootsMeteor),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(EMTItems.quantumBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()) });
+ }
+
+ if (TaintedHelper.isActive()) {
+ electricVoid = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_EMT_Tainted_Compat",
+ new ItemStack(EMTHelper.bootsElectricVoid, 1, OreDictionary.WILDCARD_VALUE),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()) });
+
+ nanoVoid = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_EMT_Tainted_Compat",
+ new ItemStack(EMTHelper.bootsNanoVoid, 1, OreDictionary.WILDCARD_VALUE),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(EMTItems.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()) });
+
+ quantumVoid = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_EMT_Tainted_Compat",
+ new ItemStack(EMTHelper.bootsQuantumVoid, 1, OreDictionary.WILDCARD_VALUE),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(EMTItems.quantumBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(
+ ThaumcraftHelper.miscResource,
+ 1,
+ ThaumcraftHelper.MiscResource.SALIS.ordinal()) });
+ }
+ }
+
+ public static void setupResearch() {
+ String category = "THAUMICBOOTS";
+ ResearchItem emtCore;
+ ResearchPage emtCore1, emtCore2;
+ ResearchPage explorationsEMT1, explorationsEMT2, explorationsEMT3, explorationsEMT4, explorationsEMT5,
+ explorationsEMT6, explorationsEMT7, emtTainted1, emtTainted2, emtTainted3, emtTainted4;
+ ResearchItem explorationsEmtCompat, emtTaintedCompat;
+
+ emtCore = new ResearchItem(
+ "TB_EMT_Core",
+ category,
+ new AspectList().add(TB_Aspect.BOOTS, 25).add(Aspect.ENERGY, 25).add(Aspect.EXCHANGE, 15),
+ -3,
+ 2,
+ 0,
+ new ItemStack(EMTItems.electricBootsTraveller));
+ emtCore1 = new ResearchPage("EMTCore.1");
+ emtCore2 = new ResearchPage("EMTCore.2");
+ emtCore.setPages(emtCore1, emtCore2);
+ emtCore.setConcealed().setParents("Electric Boots of the Traveller");
+ ResearchCategories.addResearch(emtCore);
+
+ if (TaintedHelper.isActive()) {
+ emtTaintedCompat = new ResearchItem(
+ "TB_EMT_Tainted_Compat",
+ category,
+ new AspectList().add(TB_Aspect.BOOTS, 25).add(Aspect.ELDRITCH, 25).add(Aspect.ENERGY, 25)
+ .add(Aspect.EXCHANGE, 15),
+ 0,
+ 3,
+ 0,
+ new ItemStack(EMTHelper.bootsElectricVoid));
+ emtTainted1 = new ResearchPage("EMTTainted.1");
+ emtTainted2 = new ResearchPage(electricVoid);
+ emtTainted3 = new ResearchPage(nanoVoid);
+ emtTainted4 = new ResearchPage(quantumVoid);
+ emtTaintedCompat.setPages(emtTainted1, emtTainted2, emtTainted3, emtTainted4);
+ emtTaintedCompat.setConcealed().setParents("TB_Tainted_Core", "TB_EMT_Core", "TB_Core_Research");
+ ResearchCategories.addResearch(emtTaintedCompat);
+ }
+ if (ExplorationsHelper.isActive()) {
+ explorationsEmtCompat = new ResearchItem(
+ "TB_Explorations_EMT_Compat",
+ category,
+ new AspectList().add(TB_Aspect.BOOTS, 25).add(TB_Aspect.SPACE, 25).add(Aspect.ENERGY, 15)
+ .add(Aspect.EXCHANGE, 15),
+ -3,
+ -2,
+ 0,
+ new ItemStack(EMTHelper.bootsElectricMeteor));
+
+ explorationsEMT1 = new ResearchPage("ExplorationsEMT.1");
+ explorationsEMT2 = new ResearchPage(electricComet);
+ explorationsEMT3 = new ResearchPage(nanoComet);
+ explorationsEMT4 = new ResearchPage(quantumComet);
+ explorationsEMT5 = new ResearchPage(electricComet);
+ explorationsEMT6 = new ResearchPage(nanoComet);
+ explorationsEMT7 = new ResearchPage(quantumComet);
+ explorationsEmtCompat.setPages(
+ explorationsEMT1,
+ explorationsEMT2,
+ explorationsEMT3,
+ explorationsEMT4,
+ explorationsEMT5,
+ explorationsEMT6,
+ explorationsEMT7);
+ explorationsEmtCompat.setConcealed().setParents("TB_Core_Research", "TB_Explorations_Core", "TB_EMT_Core");
+ ResearchCategories.addResearch(explorationsEmtCompat);
+ }
+ }
+
+ public static void setupItemAspects() {
+ ItemStack item;
+ AspectList list;
+ list = new AspectList(new ItemStack(EMTItems.electricBootsTraveller)).add(TB_Aspect.BOOTS, 12);
+ item = new ItemStack(EMTItems.electricBootsTraveller);
+ ThaumcraftApi.registerObjectTag(item, list);
+ }
+}
diff --git a/src/main/java/thaumicboots/main/utils/compat/ExplorationsHelper.java b/src/main/java/thaumicboots/main/utils/compat/ExplorationsHelper.java
new file mode 100644
index 0000000..0170f7f
--- /dev/null
+++ b/src/main/java/thaumicboots/main/utils/compat/ExplorationsHelper.java
@@ -0,0 +1,62 @@
+package thaumicboots.main.utils.compat;
+
+import static thaumicboots.main.utils.compat.TaintedHelper.TAINTED_MAGIC;
+
+import net.minecraft.item.Item;
+
+import cpw.mods.fml.common.Loader;
+import cpw.mods.fml.common.registry.GameRegistry;
+import thaumcraft.api.ThaumcraftApi;
+import thaumicboots.item.boots.unique.ItemCometMeteorBoots;
+import thaumicboots.item.boots.unique.ItemMeteoricCometBoots;
+import thaumicboots.item.boots.voidwalker.ItemCometVoidwalkerBoots;
+import thaumicboots.item.boots.voidwalker.ItemMeteorVoidwalkerBoots;
+import thaumicboots.main.Config;
+
+public class ExplorationsHelper implements IModHelper {
+
+ private static boolean isExplorationsActive = false;
+ public static final String EXPLORATIONS = "ThaumicExploration";
+
+ // Thaumic Explorations Compat
+ public static Item bootsMeteoricComet;
+ public static Item bootsCometMeteor;
+
+ // Tainted Magic + Thaumic Exploration Compat
+ public static Item bootsCometVoid;
+ public static Item bootsMeteorVoid;
+
+ public static boolean isActive() {
+ return isExplorationsActive;
+ }
+
+ @Override
+ public void preInit() {
+ if (Loader.isModLoaded(EXPLORATIONS) && Config.explorationsActive) {
+ isExplorationsActive = true;
+ getItems();
+ }
+ }
+
+ @Override
+ public void init() {}
+
+ @Override
+ public void postInit() {}
+
+ public void getItems() {
+ bootsMeteoricComet = new ItemMeteoricCometBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsMeteoricComet, bootsMeteoricComet.getUnlocalizedName());
+
+ bootsCometMeteor = new ItemCometMeteorBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsCometMeteor, bootsCometMeteor.getUnlocalizedName());
+
+ if (Loader.isModLoaded(TAINTED_MAGIC) && Config.taintedMagicActive) {
+ bootsCometVoid = new ItemCometVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsCometVoid, bootsCometVoid.getUnlocalizedName());
+
+ bootsMeteorVoid = new ItemMeteorVoidwalkerBoots(ThaumcraftApi.armorMatSpecial, 4, 3);
+ GameRegistry.registerItem(bootsMeteorVoid, bootsMeteorVoid.getUnlocalizedName());
+ }
+ }
+}
diff --git a/src/main/java/thaumicboots/main/utils/compat/GTNHLibHelper.java b/src/main/java/thaumicboots/main/utils/compat/GTNHLibHelper.java
new file mode 100644
index 0000000..e83bfc5
--- /dev/null
+++ b/src/main/java/thaumicboots/main/utils/compat/GTNHLibHelper.java
@@ -0,0 +1,27 @@
+package thaumicboots.main.utils.compat;
+
+import cpw.mods.fml.common.Loader;
+import thaumicboots.main.Config;
+
+public class GTNHLibHelper implements IModHelper {
+
+ private static boolean isGTNHLibActive = false;
+ public static final String GTNHLIB = "gtnhlib";
+
+ public static boolean isActive() {
+ return isGTNHLibActive;
+ }
+
+ @Override
+ public void preInit() {
+ if (Loader.isModLoaded(GTNHLIB) && Config.gtnhLibActive) {
+ isGTNHLibActive = true;
+ }
+ }
+
+ @Override
+ public void init() {}
+
+ @Override
+ public void postInit() {}
+}
diff --git a/src/main/java/thaumicboots/main/utils/compat/ModHelperManager.java b/src/main/java/thaumicboots/main/utils/compat/ModHelperManager.java
index 12158bd..c926dad 100644
--- a/src/main/java/thaumicboots/main/utils/compat/ModHelperManager.java
+++ b/src/main/java/thaumicboots/main/utils/compat/ModHelperManager.java
@@ -29,6 +29,10 @@ public static void postInit() {
private static void setupHelpers() {
helpers = new ArrayList<>();
+ helpers.add(new EMTHelper());
+ helpers.add(new TaintedHelper());
+ helpers.add(new ExplorationsHelper());
+ helpers.add(new GTNHLibHelper());
helpers.add(new ThaumcraftHelper());
}
}
diff --git a/src/main/java/thaumicboots/main/utils/compat/TaintedHelper.java b/src/main/java/thaumicboots/main/utils/compat/TaintedHelper.java
new file mode 100644
index 0000000..8ed4e05
--- /dev/null
+++ b/src/main/java/thaumicboots/main/utils/compat/TaintedHelper.java
@@ -0,0 +1,27 @@
+package thaumicboots.main.utils.compat;
+
+import cpw.mods.fml.common.Loader;
+import thaumicboots.main.Config;
+
+public class TaintedHelper implements IModHelper {
+
+ private static boolean isTaintedMagicActive = false;
+ public static final String TAINTED_MAGIC = "TaintedMagic";
+
+ public static boolean isActive() {
+ return isTaintedMagicActive;
+ }
+
+ @Override
+ public void preInit() {
+ if (Loader.isModLoaded(TAINTED_MAGIC) && Config.taintedMagicActive) {
+ isTaintedMagicActive = true;
+ }
+ }
+
+ @Override
+ public void init() {}
+
+ @Override
+ public void postInit() {}
+}
diff --git a/src/main/java/thaumicboots/main/utils/compat/ThaumcraftHelper.java b/src/main/java/thaumicboots/main/utils/compat/ThaumcraftHelper.java
index 928769e..1b12326 100644
--- a/src/main/java/thaumicboots/main/utils/compat/ThaumcraftHelper.java
+++ b/src/main/java/thaumicboots/main/utils/compat/ThaumcraftHelper.java
@@ -5,9 +5,7 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.oredict.OreDictionary;
-import emt.init.EMTItems;
import flaxbeard.thaumicexploration.ThaumicExploration;
import taintedmagic.common.registry.ItemRegistry;
import thaumcraft.api.ThaumcraftApi;
@@ -201,7 +199,7 @@ public enum TreeType {
public static Item nuggetPork;
public static Item zombieBrain;
- public static final String Name = "Thaumcraft";
+ public static final String THAUMCRAFT = "Thaumcraft";
public void preInit() {
TB_Aspect.addTB_Aspects();
@@ -216,51 +214,44 @@ public void postInit() {
setupItemAspects();
setupCrafting();
setupResearch();
+ if (EMTHelper.isActive()) {
+ EMTHelper.setupItemAspects();
+ EMTHelper.setupCrafting();
+ EMTHelper.setupResearch();
+ }
}
public static void getBlocks() {
- plant = BlockInterface.getBlock(Name, "blockCustomPlant");
- candle = BlockInterface.getBlock(Name, "blockCandle");
- crystal = BlockInterface.getBlock(Name, "blockCrystal");
- marker = BlockInterface.getBlock(Name, "blockMarker");
- jar = BlockInterface.getBlock(Name, "blockJar");
- log = BlockInterface.getBlock(Name, "blockMagicalLog");
- leaf = BlockInterface.getBlock(Name, "blockMagicalLeaves");
- warded = BlockInterface.getBlock(Name, "blockWarded");
- wooden = BlockInterface.getBlock(Name, "blockWoodenDevice");
- metal = BlockInterface.getBlock(Name, "blockMetalDevice");
- airy = BlockInterface.getBlock(Name, "blockAiry");
+ plant = BlockInterface.getBlock(THAUMCRAFT, "blockCustomPlant");
+ candle = BlockInterface.getBlock(THAUMCRAFT, "blockCandle");
+ crystal = BlockInterface.getBlock(THAUMCRAFT, "blockCrystal");
+ marker = BlockInterface.getBlock(THAUMCRAFT, "blockMarker");
+ jar = BlockInterface.getBlock(THAUMCRAFT, "blockJar");
+ log = BlockInterface.getBlock(THAUMCRAFT, "blockMagicalLog");
+ leaf = BlockInterface.getBlock(THAUMCRAFT, "blockMagicalLeaves");
+ warded = BlockInterface.getBlock(THAUMCRAFT, "blockWarded");
+ wooden = BlockInterface.getBlock(THAUMCRAFT, "blockWoodenDevice");
+ metal = BlockInterface.getBlock(THAUMCRAFT, "blockMetalDevice");
+ airy = BlockInterface.getBlock(THAUMCRAFT, "blockAiry");
}
public static void getItems() {
- filledJar = ItemInterface.getItem(Name, "BlockJarFilledItem");
- miscResource = ItemInterface.getItem(Name, "ItemResource");
- shard = ItemInterface.getItem(Name, "ItemShard");
- golem = ItemInterface.getItem(Name, "ItemGolemPlacer");
- nuggetMetal = ItemInterface.getItem(Name, "ItemNugget");
- shard = ItemInterface.getItem(Name, "ItemShard");
- nuggetChicken = ItemInterface.getItem(Name, "ItemNuggetChicken");
- nuggetBeef = ItemInterface.getItem(Name, "ItemNuggetBeef");
- nuggetPork = ItemInterface.getItem(Name, "ItemNuggetPork");
- zombieBrain = ItemInterface.getItem(Name, "ItemZombieBrain");
+ filledJar = ItemInterface.getItem(THAUMCRAFT, "BlockJarFilledItem");
+ miscResource = ItemInterface.getItem(THAUMCRAFT, "ItemResource");
+ shard = ItemInterface.getItem(THAUMCRAFT, "ItemShard");
+ golem = ItemInterface.getItem(THAUMCRAFT, "ItemGolemPlacer");
+ nuggetMetal = ItemInterface.getItem(THAUMCRAFT, "ItemNugget");
+ shard = ItemInterface.getItem(THAUMCRAFT, "ItemShard");
+ nuggetChicken = ItemInterface.getItem(THAUMCRAFT, "ItemNuggetChicken");
+ nuggetBeef = ItemInterface.getItem(THAUMCRAFT, "ItemNuggetBeef");
+ nuggetPork = ItemInterface.getItem(THAUMCRAFT, "ItemNuggetPork");
+ zombieBrain = ItemInterface.getItem(THAUMCRAFT, "ItemZombieBrain");
}
// Crucible Recipes
public static CrucibleRecipe thaumaturgicCombinator;
// Infusion Recipes
- public static InfusionRecipe electricVoid;
- public static InfusionRecipe nanoVoid;
- public static InfusionRecipe quantumVoid;
-
- public static InfusionRecipe electricComet;
- public static InfusionRecipe nanoComet;
- public static InfusionRecipe quantumComet;
-
- public static InfusionRecipe electricMeteor;
- public static InfusionRecipe nanoMeteor;
- public static InfusionRecipe quantumMeteor;
-
public static InfusionRecipe voidMeteor;
public static InfusionRecipe voidComet;
@@ -274,213 +265,77 @@ public static void setupCrafting() {
new ItemStack(miscResource, 1, MiscResource.THAUMIUM.ordinal()),
new AspectList().add(TB_Aspect.BOOTS, 25).add(Aspect.EXCHANGE, 25).add(TB_Aspect.SPACE, 25));
- electricComet = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_EMT_Compat",
- new ItemStack(Config.bootsElectricComet, 1, OreDictionary.WILDCARD_VALUE),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ThaumicExploration.bootsComet),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- nanoComet = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_EMT_Compat",
- new ItemStack(Config.bootsNanoComet, 1, OreDictionary.WILDCARD_VALUE),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ThaumicExploration.bootsComet),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(EMTItems.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- quantumComet = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_EMT_Compat",
- new ItemStack(Config.bootsQuantumComet, 1, OreDictionary.WILDCARD_VALUE),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ThaumicExploration.bootsComet),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(EMTItems.quantumBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- electricComet = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_EMT_Compat",
- new ItemStack(Config.bootsElectricMeteor, 1, OreDictionary.WILDCARD_VALUE),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ThaumicExploration.bootsMeteor),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- nanoComet = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_EMT_Compat",
- new ItemStack(Config.bootsNanoMeteor, 1, OreDictionary.WILDCARD_VALUE),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ThaumicExploration.bootsMeteor),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(EMTItems.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- quantumComet = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_EMT_Compat",
- new ItemStack(Config.bootsQuantumMeteor, 1, OreDictionary.WILDCARD_VALUE),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ThaumicExploration.bootsMeteor),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(EMTItems.quantumBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- electricVoid = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_EMT_Tainted_Compat",
- new ItemStack(Config.bootsElectricVoid, 1, OreDictionary.WILDCARD_VALUE),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(EMTItems.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- nanoVoid = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_EMT_Tainted_Compat",
- new ItemStack(Config.bootsNanoVoid, 1, OreDictionary.WILDCARD_VALUE),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(EMTItems.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- quantumVoid = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_EMT_Tainted_Compat",
- new ItemStack(Config.bootsQuantumVoid, 1, OreDictionary.WILDCARD_VALUE),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(EMTItems.quantumBootsTraveller, 1, OreDictionary.WILDCARD_VALUE),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- voidMeteor = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_Tainted_Compat",
- new ItemStack(Config.bootsMeteorVoid),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ThaumicExploration.bootsMeteor),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- voidComet = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_Tainted_Compat",
- new ItemStack(Config.bootsCometVoid),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ThaumicExploration.bootsComet),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- cometMeteor = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_Compat",
- new ItemStack(Config.bootsCometMeteor),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ThaumicExploration.bootsComet),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 2),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ThaumicExploration.bootsMeteor),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
-
- meteorComet = ThaumcraftApi.addInfusionCraftingRecipe(
- "TB_Explorations_Compat",
- new ItemStack(Config.bootsMeteoricComet),
- 0,
- new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
- .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
- new ItemStack(Config.arcaniumLens),
- new ItemStack[] { new ItemStack(ThaumicExploration.bootsMeteor),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 6),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ThaumicExploration.bootsComet),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
- new ItemStack(ConfigItems.itemShard, 1, 1),
- new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
+ if (!EMTHelper.isActive() && !ExplorationsHelper.isActive() && !TaintedHelper.isActive()) {
+ return;
+ }
+
+ if (ExplorationsHelper.isActive() && TaintedHelper.isActive()) {
+ voidMeteor = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_Tainted_Compat",
+ new ItemStack(ExplorationsHelper.bootsMeteorVoid),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ThaumicExploration.bootsMeteor),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
+
+ voidComet = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_Tainted_Compat",
+ new ItemStack(ExplorationsHelper.bootsCometVoid),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ItemRegistry.ItemVoidwalkerBoots),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ThaumicExploration.bootsComet),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
+ }
+
+ if (ExplorationsHelper.isActive()) {
+ cometMeteor = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_Compat",
+ new ItemStack(ExplorationsHelper.bootsCometMeteor),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ThaumicExploration.bootsComet),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 2),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ThaumicExploration.bootsMeteor),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
+
+ meteorComet = ThaumcraftApi.addInfusionCraftingRecipe(
+ "TB_Explorations_Compat",
+ new ItemStack(ExplorationsHelper.bootsMeteoricComet),
+ 0,
+ new AspectList().add(Aspect.EXCHANGE, 75).add(Aspect.MAGIC, 50).add(Aspect.CRAFT, 50)
+ .add(TB_Aspect.SPACE, 25).add(TB_Aspect.BOOTS, 25),
+ new ItemStack(Config.arcaniumLens),
+ new ItemStack[] { new ItemStack(ThaumicExploration.bootsMeteor),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 6),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ThaumicExploration.bootsComet),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()),
+ new ItemStack(ConfigItems.itemShard, 1, 1),
+ new ItemStack(miscResource, 1, MiscResource.SALIS.ordinal()) });
+ }
}
@@ -492,15 +347,13 @@ public static void setupResearch() {
new ResourceLocation(VersionInfo.ModID, "textures/gui/research_bg1_b.png"));
ResearchItem coreResearch;
- ResearchItem explorationsCore, emtCore, taintedCore, uniqueCore;
- ResearchPage core1, core2, explorationsCore1, explorationsCore2, emtCore1, emtCore2, taintedCore1, taintedCore2,
- uniqueCore1, uniqueCore2;
- ResearchPage explorationsEMT1, explorationsEMT2, explorationsEMT3, explorationsEMT4, explorationsEMT5,
- explorationsEMT6, explorationsEMT7, emtTainted1, emtTainted2, emtTainted3, emtTainted4,
- explorationsTainted1, explorationsTainted2, explorationsTainted3, explorationsCompat1,
+ ResearchItem explorationsCore, taintedCore, uniqueCore;
+ ResearchPage core1, core2, explorationsCore1, explorationsCore2, taintedCore1, taintedCore2, uniqueCore1,
+ uniqueCore2;
+ ResearchPage explorationsTainted1, explorationsTainted2, explorationsTainted3, explorationsCompat1,
explorationsCompat2, explorationsCompat3;
- ResearchItem explorationsEmtCompat, emtTaintedCompat, explorationsTaintedCompat, explorationsCompat;
+ ResearchItem explorationsTaintedCompat, explorationsCompat;
coreResearch = new ResearchItem(
"TB_Core_Research",
category,
@@ -510,141 +363,80 @@ public static void setupResearch() {
0,
new ItemStack(Config.arcaniumLens));
- explorationsCore = new ResearchItem(
- "TB_Explorations_Core",
- category,
- new AspectList().add(TB_Aspect.BOOTS, 25).add(TB_Aspect.SPACE, 25).add(Aspect.EXCHANGE, 15),
- 0,
- -3,
- 0,
- new ItemStack(ThaumicExploration.bootsMeteor));
-
- emtCore = new ResearchItem(
- "TB_EMT_Core",
- category,
- new AspectList().add(TB_Aspect.BOOTS, 25).add(Aspect.ENERGY, 25).add(Aspect.EXCHANGE, 15),
- -3,
- 2,
- 0,
- new ItemStack(EMTItems.electricBootsTraveller));
-
- taintedCore = new ResearchItem(
- "TB_Tainted_Core",
- category,
- new AspectList().add(TB_Aspect.BOOTS, 25).add(Aspect.ELDRITCH, 25).add(Aspect.EXCHANGE, 15),
- 3,
- 2,
- 0,
- new ItemStack(ItemRegistry.ItemVoidwalkerBoots));
-
- emtTaintedCompat = new ResearchItem(
- "TB_EMT_Tainted_Compat",
- category,
- new AspectList().add(TB_Aspect.BOOTS, 25).add(Aspect.ELDRITCH, 25).add(Aspect.ENERGY, 25)
- .add(Aspect.EXCHANGE, 15),
- 0,
- 3,
- 0,
- new ItemStack(Config.bootsElectricVoid));
-
- explorationsTaintedCompat = new ResearchItem(
- "TB_Explorations_Tainted_Compat",
- category,
- new AspectList().add(TB_Aspect.BOOTS, 25).add(TB_Aspect.SPACE, 25).add(Aspect.ELDRITCH, 25)
- .add(Aspect.EXCHANGE, 15),
- 3,
- -2,
- 0,
- new ItemStack(Config.bootsMeteorVoid));
-
- explorationsEmtCompat = new ResearchItem(
- "TB_Explorations_EMT_Compat",
- category,
- new AspectList().add(TB_Aspect.BOOTS, 25).add(TB_Aspect.SPACE, 25).add(Aspect.ENERGY, 15)
- .add(Aspect.EXCHANGE, 15),
- -3,
- -2,
- 0,
- new ItemStack(Config.bootsElectricMeteor));
-
- explorationsCompat = new ResearchItem(
- "TB_Explorations_Compat",
- category,
- new AspectList().add(TB_Aspect.BOOTS, 25).add(TB_Aspect.SPACE, 25).add(Aspect.EXCHANGE, 15),
- 0,
- -2,
- 0,
- new ItemStack(Config.bootsCometMeteor));
-
core1 = new ResearchPage("Core.1");
core2 = new ResearchPage(thaumaturgicCombinator);
coreResearch.setPages(core1, core2);
coreResearch.setParents("THAUMIUM");
+ ResearchCategories.addResearch(coreResearch);
- explorationsCore1 = new ResearchPage("ExplorationsCore.1");
- explorationsCore.setPages(explorationsCore1);
- explorationsCore.setConcealed().setParents("METEORBOOTS", "COMETBOOTS");
-
- taintedCore1 = new ResearchPage("TaintedCore.1");
- taintedCore.setPages(taintedCore1);
- taintedCore.setConcealed().setParents("VOIDWALKERBOOTS");
-
- emtCore1 = new ResearchPage("EMTCore.1");
- emtCore2 = new ResearchPage("EMTCore.2");
- emtCore.setPages(emtCore1, emtCore2);
- emtCore.setConcealed().setParents("Electric Boots of the Traveller");
-
- explorationsEMT1 = new ResearchPage("ExplorationsEMT.1");
- explorationsEMT2 = new ResearchPage(electricComet);
- explorationsEMT3 = new ResearchPage(nanoComet);
- explorationsEMT4 = new ResearchPage(quantumComet);
- explorationsEMT5 = new ResearchPage(electricComet);
- explorationsEMT6 = new ResearchPage(nanoComet);
- explorationsEMT7 = new ResearchPage(quantumComet);
- explorationsEmtCompat.setPages(
- explorationsEMT1,
- explorationsEMT2,
- explorationsEMT3,
- explorationsEMT4,
- explorationsEMT5,
- explorationsEMT6,
- explorationsEMT7);
- explorationsEmtCompat.setConcealed().setParents("TB_Core_Research", "TB_Explorations_Core", "TB_EMT_Core");
-
- explorationsTainted1 = new ResearchPage("ExplorationsTainted.1");
- explorationsTainted2 = new ResearchPage(voidMeteor);
- explorationsTainted3 = new ResearchPage(voidComet);
- explorationsTaintedCompat.setPages(explorationsTainted1, explorationsTainted2, explorationsTainted3);
- explorationsTaintedCompat.setConcealed()
- .setParents("TB_Explorations_Core", "TB_Tainted_Core", "TB_Core_Research");
-
- emtTainted1 = new ResearchPage("EMTTainted.1");
- emtTainted2 = new ResearchPage(electricVoid);
- emtTainted3 = new ResearchPage(nanoVoid);
- emtTainted4 = new ResearchPage(quantumVoid);
- emtTaintedCompat.setPages(emtTainted1, emtTainted2, emtTainted3, emtTainted4);
- emtTaintedCompat.setConcealed().setParents("TB_Tainted_Core", "TB_EMT_Core", "TB_Core_Research");
-
- explorationsCompat1 = new ResearchPage("ExplorationsCompat.1");
- explorationsCompat2 = new ResearchPage(cometMeteor);
- explorationsCompat3 = new ResearchPage(meteorComet);
- explorationsCompat.setPages(explorationsCompat1, explorationsCompat2, explorationsCompat3);
- explorationsCompat.setConcealed().setParents("TB_Core_Research", "TB_Explorations_Core");
-
- /*
- * uniqueCore = new ResearchItem( "TB_Unique_Core", category, new AspectList(), 0, 3, 0, new
- * ItemStack(Config.bootsCometMeteor)).setAutoUnlock();
- */
+ if (!EMTHelper.isActive() && !ExplorationsHelper.isActive() && !TaintedHelper.isActive()) {
+ return;
+ }
+
+ if (ExplorationsHelper.isActive()) {
+ explorationsCore = new ResearchItem(
+ "TB_Explorations_Core",
+ category,
+ new AspectList().add(TB_Aspect.BOOTS, 25).add(TB_Aspect.SPACE, 25).add(Aspect.EXCHANGE, 15),
+ 0,
+ -3,
+ 0,
+ new ItemStack(ThaumicExploration.bootsMeteor));
+ explorationsCore1 = new ResearchPage("ExplorationsCore.1");
+ explorationsCore.setPages(explorationsCore1);
+ explorationsCore.setConcealed().setParents("METEORBOOTS", "COMETBOOTS");
+ ResearchCategories.addResearch(explorationsCore);
+
+ explorationsCompat = new ResearchItem(
+ "TB_Explorations_Compat",
+ category,
+ new AspectList().add(TB_Aspect.BOOTS, 25).add(TB_Aspect.SPACE, 25).add(Aspect.EXCHANGE, 15),
+ 0,
+ -2,
+ 0,
+ new ItemStack(ExplorationsHelper.bootsCometMeteor));
+ explorationsCompat1 = new ResearchPage("ExplorationsCompat.1");
+ explorationsCompat2 = new ResearchPage(cometMeteor);
+ explorationsCompat3 = new ResearchPage(meteorComet);
+ explorationsCompat.setPages(explorationsCompat1, explorationsCompat2, explorationsCompat3);
+ explorationsCompat.setConcealed().setParents("TB_Core_Research", "TB_Explorations_Core");
+ ResearchCategories.addResearch(explorationsCompat);
+ }
+
+ if (TaintedHelper.isActive()) {
+ taintedCore = new ResearchItem(
+ "TB_Tainted_Core",
+ category,
+ new AspectList().add(TB_Aspect.BOOTS, 25).add(Aspect.ELDRITCH, 25).add(Aspect.EXCHANGE, 15),
+ 3,
+ 2,
+ 0,
+ new ItemStack(ItemRegistry.ItemVoidwalkerBoots));
+ taintedCore1 = new ResearchPage("TaintedCore.1");
+ taintedCore.setPages(taintedCore1);
+ taintedCore.setConcealed().setParents("VOIDWALKERBOOTS");
+ ResearchCategories.addResearch(taintedCore);
+ }
+
+ if (ExplorationsHelper.isActive() && TaintedHelper.isActive()) {
+ explorationsTaintedCompat = new ResearchItem(
+ "TB_Explorations_Tainted_Compat",
+ category,
+ new AspectList().add(TB_Aspect.BOOTS, 25).add(TB_Aspect.SPACE, 25).add(Aspect.ELDRITCH, 25)
+ .add(Aspect.EXCHANGE, 15),
+ 3,
+ -2,
+ 0,
+ new ItemStack(ExplorationsHelper.bootsMeteorVoid));
+ explorationsTainted1 = new ResearchPage("ExplorationsTainted.1");
+ explorationsTainted2 = new ResearchPage(voidMeteor);
+ explorationsTainted3 = new ResearchPage(voidComet);
+ explorationsTaintedCompat.setPages(explorationsTainted1, explorationsTainted2, explorationsTainted3);
+ explorationsTaintedCompat.setConcealed()
+ .setParents("TB_Explorations_Core", "TB_Tainted_Core", "TB_Core_Research");
+ ResearchCategories.addResearch(explorationsTaintedCompat);
+ }
- ResearchCategories.addResearch(coreResearch);
- ResearchCategories.addResearch(explorationsCore);
- ResearchCategories.addResearch(emtCore);
- ResearchCategories.addResearch(taintedCore);
- // ResearchCategories.addResearch(uniqueCore);
- ResearchCategories.addResearch(emtTaintedCompat);
- ResearchCategories.addResearch(explorationsTaintedCompat);
- ResearchCategories.addResearch(explorationsEmtCompat);
- ResearchCategories.addResearch(explorationsCompat);
}
public static ResearchPage getResearchPage(String ident) {
@@ -699,22 +491,22 @@ public static void setupItemAspects() {
item = new ItemStack(Items.blaze_rod);
ThaumcraftApi.registerObjectTag(item, list);
- list = new AspectList(new ItemStack(ThaumicExploration.bootsComet)).add(TB_Aspect.BOOTS, 12)
- .add(TB_Aspect.SPACE, 8);
- item = new ItemStack(ThaumicExploration.bootsComet);
- ThaumcraftApi.registerObjectTag(item, list);
-
- list = new AspectList(new ItemStack(ThaumicExploration.bootsMeteor)).add(TB_Aspect.BOOTS, 12)
- .add(TB_Aspect.SPACE, 8);
- item = new ItemStack(ThaumicExploration.bootsMeteor);
- ThaumcraftApi.registerObjectTag(item, list);
+ if (ExplorationsHelper.isActive()) {
+ list = new AspectList(new ItemStack(ThaumicExploration.bootsComet)).add(TB_Aspect.BOOTS, 12)
+ .add(TB_Aspect.SPACE, 8);
+ item = new ItemStack(ThaumicExploration.bootsComet);
+ ThaumcraftApi.registerObjectTag(item, list);
- list = new AspectList(new ItemStack(EMTItems.electricBootsTraveller)).add(TB_Aspect.BOOTS, 12);
- item = new ItemStack(EMTItems.electricBootsTraveller);
- ThaumcraftApi.registerObjectTag(item, list);
+ list = new AspectList(new ItemStack(ThaumicExploration.bootsMeteor)).add(TB_Aspect.BOOTS, 12)
+ .add(TB_Aspect.SPACE, 8);
+ item = new ItemStack(ThaumicExploration.bootsMeteor);
+ ThaumcraftApi.registerObjectTag(item, list);
+ }
- list = new AspectList(new ItemStack(ItemRegistry.ItemVoidwalkerBoots)).add(TB_Aspect.BOOTS, 12);
- item = new ItemStack(ItemRegistry.ItemVoidwalkerBoots);
- ThaumcraftApi.registerObjectTag(item, list);
+ if (TaintedHelper.isActive()) {
+ list = new AspectList(new ItemStack(ItemRegistry.ItemVoidwalkerBoots)).add(TB_Aspect.BOOTS, 12);
+ item = new ItemStack(ItemRegistry.ItemVoidwalkerBoots);
+ ThaumcraftApi.registerObjectTag(item, list);
+ }
}
}
diff --git a/src/main/resources/assets/thaumicboots/lang/en_US.lang b/src/main/resources/assets/thaumicboots/lang/en_US.lang
index d4e625d..1727217 100644
--- a/src/main/resources/assets/thaumicboots/lang/en_US.lang
+++ b/src/main/resources/assets/thaumicboots/lang/en_US.lang
@@ -75,11 +75,17 @@ EMTCore.1=Recently, a peer of your discovered something... peculiar: a form of s
EMTCore.2= In this, you found that you were able to create a pair of boots that ran on this "electricity" rather than the innate, and even moreso you were able to overcharge and improve their designs further.
You wonder where else this new energy could be applied...
ExplorationsTainted.1=Studying the void, you have made a unique discovery: the void has celestial bodies itself.
A quite peculiar revelation at that. You began to wonder if contained a similar magical energy like those of the mundane plane and found something miraculous! Similar to their counterparts, the void's bodies likewise contain innate magical properties; with one small caveat: they can't be tapped into directly.
However, by combining the energies of the void with the energies of the cosmic, you were able to make two more combined sets of boots, and continue to wonder if there may be more possibility than you thought?
ExplorationsCompat.1=In your studies of the stars, you had discovered two distinct forms of celestial energies, those being the energy of comets as well as the energy of meteors. However, after your discovery of the thaumic combinator, you began to wonder if there were a way to combine these two energy signals...
Lo and behold, there was! Two distinct methods actually, though the results are currently shockingly similar.
Perhaps there might be a way to enhance these further...
-EMTTainted.1=As you continued your studies of electricity, you noticed something interesting, like the traditional magical energies, electricity was likewise able to be combined into other energies. However, at one caveat: it doesn't exactly mix into the energy but rather, converts the natural into the artificial.
In your applications of this to void energy, you found that not only can they run on electricity, but likewise, they can both be overcharged by electricity AND boosted by enhanced void.
A rather interesting revelation...
-ExplorationsEMT.1=As you continued your studies of electricity, you noticed something interesting, like the traditional magical energies, electricity was likewise able to be combined into other energies. However, at one caveat: it doesn't exactly mix into the energy but rather, converts the natural into the artificial.
In your applications of this to the celestial energies, you found that they were able run on electricity, even being able to be overcharged, enhancing their natural tendencies.
A rather interesting revelation...
+EMTTainted.1=As you continued your studies of electricity, you noticed something interesting, like the traditional magical energies, electricity was likewise able to be combined into other energies. However, at one caveat: it doesn't exactly mix into the energy but rather, converts the natural into the artificial.
In your applications of this to void energy, you found that not only can they run on electricity, but likewise, they can both be overcharged by electricity AND boosted by enhanced void.
A rather interesting revelation...
+ExplorationsEMT.1=As you continued your studies of electricity, you noticed something interesting, like the traditional magical energies, electricity was likewise able to be combined into other energies. However, at one caveat: it doesn't exactly mix into the energy but rather, converts the natural into the artificial.
In your applications of this to the celestial energies, you found that they were able run on electricity, even being able to be overcharged, enhancing their natural tendencies.
A rather interesting revelation...
#Aspects
tc.aspect.caelum=Celestial Space
tc.aspect.tabernus=Boots, Traversal
-itemGroup.Thaumic Boots=Thaumic Boots
\ No newline at end of file
+itemGroup.Thaumic Boots=Thaumic Boots
+
+keybinding.speedtoggle=Modulate Speed Boost
+keybinding.jumptoggle=Modulate Jump Boost
+
+thaumicboots.jumpEffect=Jump Boost:
+thaumicboots.speedEffect=Speed Boost:
diff --git a/src/main/resources/assets/thaumicboots/model/boots_tainted_model.png b/src/main/resources/assets/thaumicboots/model/boots_tainted_model.png
new file mode 100644
index 0000000000000000000000000000000000000000..f06d56625600fb2ede3f30dc1cec3e2a44d712ef
GIT binary patch
literal 1373
zcmeAS@N?(olHy`uVBq!ia0vp^4nVBH!N$PAcy*Sa5Rk)??~tz_78O`%fY(kYAA+
z;hE;^%b*2hb1<+n3NbJPS&Tr)z$nE4QUPQ!cri-D*+GmNP&G^p4DFc=EKoI3KpF&2
z05M1pgl1a61Xtm(fEmtK0IFb6^s!n1q&N#aB8wRqlpi<;HsXMd|v6
zmX?>t*GR(@qC^Hr4V34!y
z3~j&`pok%y2T>oCTAZI#3Q``Lmsw(G1l58jjHC->w^cx9MQTojOJ;6rUNOifGZPzq
ztP)r?Mj|vC11&^oM3R7Nw9yBJEmBxRA`&bLj7d8#8+~}Hu;Xf&{cw9^4!j|uSpO?;ITP&Z-f1v$&k&WqQyzy5D7J}&Wv`?KVwc{2@5?$6`u
zi=Hr}X`<-ihq;?GqxKl>-T3$XfkVIg6rURDAAXz7E^$WA*x*iZQsRS?+fx$y)1;Ph
z=3a?jtY{#`)NIA#PW4C_G}YwUe+WT
z)A#svKHG#_>)+pRIO-6YbiMPZ$=h`Yb(ae^KV7_%=|;xc_gOsGE%OZxY#yh6h~3PT
zBrC0d*xxskZN?q{1sXHfa)z+8csbbes6T7I={z-I%DIz&{(pZL-4@S(->~EVo}(Y$
z->+}m|Nmd(-@|8)96500$cYb=VtX5X<2o86BP9;c_h0TKe@oM$_^fW*-SgiK-h7W{
z{dVUXd$q(8l`WF<_U_`nY};@>>SpPRL2>=o1a{r`Wx
fn}Woo%UTTk7Oh@T=;ZbdRM>dB`njxgN@xNAH0!lvI6-PsS%!O
zzP=1vKsE;hE29ttGmymygba*Q3?LOi7K0a~G@Kp8r~y^O#K6#=$-n|t69uF}-~?7ZRdwru6lZ})WHAGS+#wKV%)3x($H2g3kr@(E65;D(m7Jfe
zmza{Dl&V*eTL99lF>KRGtkGTEwv&Ohc=K5L>t&&5bJC}hFSR+Wu^ih404v8p$*sq
z6fuPJAnJosi}Q0zLCQn(GE3}?pjyy`k#vFVwhG9sNX?0G$;?g7D+b$SW}}Z)0;|SI
zTpE!ipc-xTL1Bv&){uw|?Lo+|9P=KpFJ1E!(#o-U3d7J^GB-S(bbD09qy
zefzeh(OFrR+cxRMN=@}l5@`wRp3tQ9!pGIzRfOfPh)er^1udnf4c&TOi<+aR%uIDG
z+oKUZ`(@i%o1Eb1CUcAP_TT%flX~~t-in9cYvw-()m=CA%he&Veo`~8k@(-S{7MNrQEb*e$N=3{2LJ%L-FZPYkg?47ZGy;AkA>7T7X
zN6eVs*5Pt)TebW7lN_SUygt75wX*-Sa?Y*-ne(sP|L}ZCzVg(oK0cvgL*5i!_x^%i
z*N%UU)|D_#oF=i=>85%0dXKZ~lS}J5>g@02%Ou$3vR!jd-)LUH^m8S@(_hh&x$`-`
zRovKmut7*xUH9^llfUyO8ExJ&XXmGu>F-zlyz^wq0jrkP&)#IlJ9k7v#&>L&Ivwr)mq)-*PG&n`cZDLPQH)W=o7N2v1``b$*kAE+bmc7zAZsQ
l&USVBlF!lvI6-PsS%!O
zzP=1vKsE;hE29ttGmymygba*Q3?LOi7K0a~G@Kp8r~y^O#K6#=$-n|t69uF}-~?7ZRdwru6lZ})WHAGS+#wKV%)3x($H2g3kr@(E65;D(m7Jfe
zmza{Dl&V*eTL99lF>KRGtkGTEwv&Ohc=K5L>t&&5bJC}hFSR+Wu^ih404v8p$*sq
z6fuPJAnJosi}Q0zLCQn(GE3}?pjyy`k#vFVwhG9sNX?0G$;?g7D+b$SW}}Z)0;|SI
zTpE!ipc-xTL1Bv&){uw|?Lo+|9P=KpFJ1E!%xo-U3d7J^Fy?|TOa%KSg0
zTkJXQ`sy8P&(8N=@9oG@*y*~fhl|~DjkuyuOP9im>rHXL*nfQ#u=9A(ZP%&HF|{T;
z%jrS?yQI7`yJwy$dAaPIZ@K?-nbJ)!)_yKH_p@%_{PWN2&Oc}Rztbf07t@3_vqTML
z3jV#5eRP~{%7wt|yzlw>v$EgZ__w$1!YY2RTc>TKdFBQP?QaN?nU(U3VY!-Qx!(<*
zf})Ia#%E1w5nqnpITDlPTDP!c<^=YOx%y`+%@n?yI7v@F@sMkmq0{0U9D2)GPHHGF
zRa+pS|Gt;)*TnU+q`>reI-hiMg+zGs?GnJQsW=
z^W>7P_H)R;TsoQAv-dz7v`+-w@;JsFS}gATrq=k}y)r;QRE?!5~CaVP&nm(bzQlX)I3kN)DYb(W%+sLb!@
z$L19*{cTzKF}G{Vy@H8c-nNEa=|6Vby?9(6W_)j=qZ+fU&XKy$R%XY432d{f_JuOkzDN*n(LH?8@+nKE{cb+)<^88qkzgcO!PeWilU+k@h
zmj^h4yaUf{vpc%jpWmSBKcC#K-7nlrTKpC$FFU?>!W*q=Q%#ait55j0-uXkm!aix|
zD)+W;Q(A0ixB3Sp+-g3#sP)asgP(5OWz4_&ea{;YuYmO63uljSl;?4d<$ARDE$5R9
zGF`L%y#8`
ppB~t;9WPvcr*XBiUW~ED2ln2F$|-ioKEDK&Yo4xtF6*2Ung9e!925Wm
literal 0
HcmV?d00001
diff --git a/src/main/resources/assets/thaumicboots/textures/items/bootstraveler copy.png b/src/main/resources/assets/thaumicboots/textures/items/bootstraveler copy.png
new file mode 100644
index 0000000000000000000000000000000000000000..4f4b5302291aee1ca6e96098cd75bdad29c09f09
GIT binary patch
literal 1293
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6-PsS%!O
zzP=1vKsE;hE29ttGmymygba*Q3?LOi7K0a~G@Kp8r~y^O#K6#=$-n|t69uF}-~?7ZRdwru6lZ})WHAGS+#wKV%)3x(2Q(ovGbExU!q>+tIX_n~
zF(p4KRj(qq0Hlk-rosxy%uOvxRH(?!$t$+1uvG%9umZ9{!um=IU?nBlwn`Dc0SeCf
zMX3s=dM0`XN_Jcd3JNwwDQQ+gE^bimK%T8qMoCG5mA-y?dAVM>v0i>ry1t>MrKP@s
zk-m|UE>MMTab;dfVufyAu`tKo-FP#GNIX
zX$YJ0ilN>DdQcxEqi?8Zpbs}2sMQ7}YUN*)nF_QSWWJrD4Ok_L7}OpceURlyj)C|T
zEDH3h9hZ$hJlO2Gd=9BcGB7Y5^K@|xu@GDu6z>t7DDppcd-e9$C9`MWzBR`)T586N
zIU0%o1(pW|y66X9s@CTeWZB!|>hIX^cp+He>f~$A`&h#C(;ie^NVplKV=&js{QGym
z?Q_q4^>cc$mic+z{ql3~zyCg0{*LkA<(AqSWsa)80M)2xru@9h;YC?l?XedhX~h@|
zGxNP{@Znssk}2eqRDBEAM}_A_b50k{5r1JZul0b3nX!DE?g6XxPc?A~NsW73zxLMT
ziAQ#vzV&49tm!vnVSA0Aci3Ca
zIoEow*6I0N{4!&5!99-+g`sR^>bs*7_q)8f5*QeH#emUvq12b{?3x_<^X4etJWw@}
z$?r9*gcR?OZA%W^XV}A^&z!4tNcgzH-=z#L-FJjJrdDlH>a*Z6xs%y`M0Sp^rNIBc
z%z>Kyi&Gq}Hn;L?ojEt9w8@t9Ncp!}D?S?Tj}y4(@~C4?p5wNifqJ5jHG&Jd?yX~-
z^GL~UPaaRm>D?()mzi!SC=NFdZPK!1$+u9oio>LO+U2rtnEq=T7ec?4<
z^sRGNFLIxL_sg#^`PMg9ufBR;Il=nnS4vgEceBFk6G!t_uD&O2D%alC8^bl}_>{v(
zcJnToBdej79MHmKR-Ag}M9Yuol0R}%@9cl%zWF|v)>OCY*QQkO{=#gtZ0j1Ctk0KL
zA2)xwhFN4wb6@pOx5*xk;u#A#zkGSf`zm9@g#P;X1=Blk*}4fyol%PAxlypFHQ$@z
zvHWC>C|!v?c3mg#g!k;N>6^E&?!@WDC*jFEtWw$n^bSS6KRWkgyg=06v?{Z2V%o)%
zXZ+gIP@>m+v{xrB?a+o<*@~S?lV0*LHS+CPqx45k^6x^&E2gX$YKu6WHtd}m7A8DF
zg|lnY(Qjpfe$$yhUwpAoGV|L{jeQdv;;tObS?g>z)oJf)xq60)Uxk<=G%fal3I|VD
KKbLh*2~7av2H~dw
literal 0
HcmV?d00001
diff --git a/src/main/resources/assets/thaumicboots/textures/items/bootstraveler.png b/src/main/resources/assets/thaumicboots/textures/items/bootstraveler.png
new file mode 100644
index 0000000000000000000000000000000000000000..c95f298fd6ce35505dfb8dac0d85b7a755f149c4
GIT binary patch
literal 1508
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6-PsS%!O
zzP=1vKsE;hE29ttGmymygba*Q3?LOi7K0a~G@Kp8r~y^O#K6#=$-n|t69uF}-~?7ZRdwru6lZ})WHAGS+#wKV%)3x($H2g3kr@(E65;D(m7Jfe
zmza{Dl&V*eTL99lF>KRGtkGTEwv&Ohc=K5L>t&&5bJC}hFSR+Wu^ih404v8p$*sq
z6fuPJAnJosi}Q0zLCQn(GE3}?pjyy`k#vFVwhG9sNX?0G$;?g7D+b$SW}}Z)0;|SI
zTpE!ipc-xTL1Bv&){uw|?Lo+|9P=KpFJ1E!&Uo-U3d7J^HIVm*QrCF=Ta
zTNeAC|7UJ)-n!P(_@d=Sr{9h-T&@atU2gT3mrfLLyyzQIB3dF`a@Cc!F?OY3Y2bp=
zWZo}s&1a`2HJzQAy-R-k%R9Hr%}mAaem!{l=e_yQEAM^ZBmZH3yY|8E1w!#fk2J3R
znR~l?x-3J4qyJ%r1<4bo#I{Xc=oZHB;c(JKCof@H%FDkN#ZS+0xdw;-eNj=i=7G{A
z_B9Q6pEwzD%B(DKTx$9t_Jihupwq7u4tV!oj5|K**GEUG{Wd`%tDPR+duiwYU}n{J
z2ZN3IvhFL=)7X9QeiF~_o^(_%L(y;IM~{gf#~HZNgaV`-l`BynF
zQ?K2-Q#8&mdS7hsciK|p4HwIFqk=Hz$;P)Gl>4{tH2E_*QDF*m&;ze+56rYO7P#^^
z@>)roEB$&b?c^lo?%C^7BrLC@Xxlz(gY?Q2fs3*Q_1g{!@Y@Ze9c;5b
z&b!}NurY63>Cf$vqqd?ta#G9Lx!(w-EoEIsRE`^OCA+UoMHRJc44x7{+?2&
QUQn6m>FVdQ&MBb@02YHA=l}o!
literal 0
HcmV?d00001