mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-25 22:34:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
572b1eff97 | ||
|
|
eab5ce16af | ||
|
|
f657893feb | ||
|
|
94220122e3 | ||
|
|
3ee7e99054 | ||
|
|
d42aa5e7bd | ||
|
|
824b6bc3b4 | ||
|
|
83ef9ce92c | ||
|
|
c1642ad8e1 |
No files matched your search
@@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
#Electro-Magic Tools
|
||||
# Electro-Magic Tools
|
||||
|
||||
Electro-Magic Tools is a Minecraft mod which integrates Thaumcraft 4 with IndustrialCraft 2 by adding cross-mod tools and items, such as magic solar panels, essentia generators and legendary items.
|
||||
|
||||
@@ -19,7 +19,7 @@ Before posting to the issue tracker, make sure you meet the following criteria:
|
||||
- You've gone through the effort to isolate EMT from other mods that aren't related to the issue.
|
||||
- You've gone through the effort to find what conditions are necessary to reproduce the issue.
|
||||
- The issue is subtle enough and has been around long enough that you think we might have missed it.
|
||||
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
|
||||
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
|
||||
|
||||
# Upstream
|
||||
|
||||
@@ -27,4 +27,4 @@ Before posting to the issue tracker, make sure you meet the following criteria:
|
||||
|
||||
# License
|
||||
|
||||
Electro-Magic-Tools is licensed under the GPL 3
|
||||
Electro-Magic-Tools is licensed under the GPL 3
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.0-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:ModularUI:1.3.0:dev')
|
||||
api('com.github.GTNewHorizons:ThaumicBoots:1.4.14:dev') {
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.6-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:ModularUI:1.3.1:dev')
|
||||
api('com.github.GTNewHorizons:ThaumicBoots:1.5.5:dev') {
|
||||
exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools'
|
||||
exclude module: 'Baubles'
|
||||
}
|
||||
@@ -11,5 +11,5 @@ dependencies {
|
||||
api('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.46:dev')
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.190:dev')
|
||||
}
|
||||
+16
-1
@@ -43,6 +43,10 @@ developmentEnvironmentUserName = Developer
|
||||
# See https://github.com/bsideup/jabel for details on how this works.
|
||||
enableModernJavaSyntax = true
|
||||
|
||||
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
|
||||
# and should *not* be used in most situations. -1 disables this.
|
||||
# forceToolchainVersion = -1
|
||||
|
||||
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||
enableGenericInjection = true
|
||||
@@ -96,7 +100,9 @@ usesMixinDebug = false
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin =
|
||||
|
||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
||||
# Specify the package that contains all of your Mixins. The package must exist or
|
||||
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
|
||||
# it must match with this or the build will fail.
|
||||
mixinsPackage =
|
||||
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
@@ -172,6 +178,12 @@ curseForgeRelations =
|
||||
# projects. New projects should not use this parameter.
|
||||
# customArchiveBaseName =
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
|
||||
# runClientWorkingDirectory = run/client
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
|
||||
# runServerWorkingDirectory = run/server
|
||||
|
||||
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||
# The check is ONLY performed if the version is a git tag.
|
||||
@@ -201,3 +213,6 @@ curseForgeRelations =
|
||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||
# ideaCheckSpotlessOnBuild = true
|
||||
|
||||
# Non-GTNH properties
|
||||
org.gradle.configuration-cache = true
|
||||
org.gradle.parallel = true
|
||||
@@ -0,0 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d6690dfd71c4c91e08577437b5b2beb0/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3cd7045fca9a72cd9bc7d14a385e594c/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect
|
||||
toolchainVersion=25
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -114,7 +114,6 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -172,7 +171,6 @@ fi
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -212,8 +210,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
Vendored
+1
-2
@@ -70,11 +70,10 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
// Add any additional repositories for your dependencies here
|
||||
|
||||
repositories {
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'glease'
|
||||
url = 'https://maven.glease.net/repos/releases/'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroup('net.glease')
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.44'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.10'
|
||||
}
|
||||
|
||||
|
||||
@@ -124,10 +124,6 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack stack, EntityLivingBase player) {
|
||||
if (!player.isInvisible()) {
|
||||
player.setInvisible(true);
|
||||
((EntityPlayer) player).capabilities.disableDamage = true;
|
||||
}
|
||||
|
||||
// Stop doing this 20 times per second...
|
||||
if (random.nextInt(20) > 0) return;
|
||||
@@ -151,11 +147,27 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
if (!player.worldObj.isRemote) {
|
||||
// EMT.LOGGER.info( String.format( "Total Corruption: %d ItemWarpLevel: %d", corruption, getItemWarpLevel(
|
||||
// stack, false ) ));
|
||||
|
||||
if (random.nextInt(55) == 0) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 2000, 4, false));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2000, 4, false));
|
||||
player.addPotionEffect(new PotionEffect(Potion.hunger.id, 2000, 0, false));
|
||||
if (corruption > 3000) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2000, 1, false));
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2000, 1, false));
|
||||
}
|
||||
if (corruption > 1000) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2000, 1, false));
|
||||
}
|
||||
if (corruption > 6000) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2000, 1, false));
|
||||
}
|
||||
}
|
||||
if (corruption == 0) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 2000, 4, false));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2000, 4, false));
|
||||
((EntityPlayer) player).addChatMessage(
|
||||
new ChatComponentText(
|
||||
EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever "
|
||||
EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been temporarily "
|
||||
+ EMTTextHelper.PURPLE
|
||||
+ "tainted. "
|
||||
+ EMTTextHelper.RED
|
||||
@@ -165,48 +177,62 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
+ EMTTextHelper.ITALIC
|
||||
+ "increase, and strange things will start happening."));
|
||||
}
|
||||
// First effect should become active after ~5 Minutes
|
||||
else if (corruption > 300 && corruption < 1400 && random.nextInt(100) == 0) {
|
||||
// First effect should become active after ~1 Minute
|
||||
if (corruption > 60 && corruption < 400 && random.nextInt(100) == 0) {
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring somehow feels heavy"));
|
||||
if (random.nextBoolean()) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false));
|
||||
else player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
|
||||
} else if (corruption >= 1400 && corruption < 3800 && random.nextInt(100) == 0) {
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
player.addPotionEffect(new PotionEffect(Potion.poison.id, 500, 2, false));
|
||||
} else if (corruption >= 3800 && corruption < 6500 && random.nextInt(100) == 0) {
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 3, false));
|
||||
if (random.nextBoolean()) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 4, false));
|
||||
else player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 4, false));
|
||||
}
|
||||
if (corruption > 30 && random.nextInt(80) == 0) {
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring falters"));
|
||||
player.removePotionEffect(14);
|
||||
player.removePotionEffect(11);
|
||||
player.removePotionEffect(5);
|
||||
player.removePotionEffect(1);
|
||||
player.removePotionEffect(8);
|
||||
player.removePotionEffect(3);
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 400, 3, false));
|
||||
/*
|
||||
* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt! ((EntityPlayer)
|
||||
* player).writeToNBT(tag); tag.removeTag( NBT_TAG_FORGE_DATA ); ((EntityPlayer)
|
||||
* player).readFromNBT(tag);
|
||||
*/
|
||||
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 1, false));
|
||||
}
|
||||
if (corruption >= 150 && corruption < 8000 && random.nextInt(150) == 0) {
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "Your arms feel heavy"));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 600, 4, false));
|
||||
player.addPotionEffect(new PotionEffect(Potion.weakness.id, 600, 4, false));
|
||||
}
|
||||
if (corruption >= 700 && corruption < 8000 && random.nextInt(150) == 0) {
|
||||
player.removePotionEffect(11);
|
||||
player.motionY += 2d;
|
||||
} else if (corruption >= 6500 && random.nextInt(10000) == 0) {
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
} else if (corruption >= 1000 && random.nextInt(500) == 0) {
|
||||
player.removePotionEffect(11);
|
||||
player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false));
|
||||
}
|
||||
|
||||
if (corruption >= 300) { // worn more than 5 minutes
|
||||
if (corruption >= 60) { // worn more than 1 minute
|
||||
if (random.nextInt(100) == 0) { // every 100 seconds
|
||||
getItemWarpLevel(stack, true);
|
||||
((EntityPlayer) player).addChatMessage(
|
||||
new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple"));
|
||||
}
|
||||
if (random.nextInt(300) == 0) { // randomly every 5 minutes
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 1, false); // adds 1 perm warp
|
||||
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, random.nextInt(1)); // adds 0-1
|
||||
// sticky warp
|
||||
if (random.nextInt(300) == 2) { // randomly every 5 minutes
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 15, true); // adds 15 temp warp
|
||||
((EntityPlayer) player).addChatMessage(
|
||||
new ChatComponentText(EMTTextHelper.PURPLE + "Your body suddenly starts to glow purple"));
|
||||
}
|
||||
if (corruption >= 3600) { // if you wear it for more than an hour total
|
||||
if (random.nextInt(300) == 0) {
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5), false); // adds
|
||||
// 5-10
|
||||
// perm
|
||||
// warp
|
||||
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5)); // adds
|
||||
// 5-10
|
||||
// sticky
|
||||
// warp
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 10 + random.nextInt(40), true); // adds
|
||||
// 10-50
|
||||
if (corruption >= 180) { // if you wear it for 3 minutes
|
||||
if (random.nextInt(290) == 1) {
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring corrupts"));
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 10 + random.nextInt(20), true); // adds
|
||||
// 10-30
|
||||
// temp
|
||||
// warp,
|
||||
// but
|
||||
@@ -240,10 +266,12 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
|
||||
player.setInvisible(false);
|
||||
if (!((EntityPlayer) player).capabilities.isCreativeMode)
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
|
||||
player.removePotionEffect(14);
|
||||
player.removePotionEffect(11);
|
||||
player.removePotionEffect(5);
|
||||
player.removePotionEffect(1);
|
||||
player.removePotionEffect(8);
|
||||
player.removePotionEffect(3);
|
||||
/*
|
||||
* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt! ((EntityPlayer)
|
||||
* player).writeToNBT(tag); tag.removeTag( NBT_TAG_FORGE_DATA ); ((EntityPlayer) player).readFromNBT(tag);
|
||||
|
||||
@@ -24,7 +24,6 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.init.EMTItems;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
@@ -36,6 +35,7 @@ import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
import thaumicboots.api.IBoots;
|
||||
import thaumicboots.mixins.early.minecraft.EntityLivingBaseAccessor;
|
||||
|
||||
@Interface(iface = "thaumicboots.api.IBoots", modid = "thaumicboots")
|
||||
public class ItemElectricBootsTraveller extends ItemArmor
|
||||
@@ -46,7 +46,8 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
public int visDiscount = 2;
|
||||
public float speedBonus = 0.055F;
|
||||
// constant from Thaumcraft's EventHandlerEntity#playerJumps for basic Traveller Boots
|
||||
public float jumpBonus = 0.2750000059604645F;
|
||||
public static final float BASE_JUMP_BONUS = 0.2750000059604645F;
|
||||
public float jumpBonus = BASE_JUMP_BONUS;
|
||||
public double transferLimit = 100;
|
||||
|
||||
public ItemElectricBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||
@@ -125,22 +126,21 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
if (getIntertialState(itemStack) && player.moveForward == 0
|
||||
if (getInertiaState(itemStack) && player.moveForward == 0
|
||||
&& player.moveStrafing == 0
|
||||
&& player.capabilities.isFlying) {
|
||||
player.motionX *= 0.5;
|
||||
player.motionZ *= 0.5;
|
||||
}
|
||||
boolean omniMode = false;
|
||||
if (EMT.isBootsActive) {
|
||||
omniMode = isOmniEnabled(itemStack);
|
||||
boolean omniMode = getOmniState(itemStack);
|
||||
if ((player.moveForward == 0F && player.moveStrafing == 0F && omniMode)
|
||||
|| (player.moveForward <= 0F && !omniMode)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (player.moveForward != 0.0F || player.moveStrafing != 0.0F) {
|
||||
if (player.worldObj.isRemote && !player.isSneaking()) {
|
||||
if (player.worldObj.isRemote && !player.isSneaking() && getStepAssistState(itemStack)) {
|
||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
|
||||
Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
|
||||
}
|
||||
@@ -165,15 +165,9 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
} else if (Hover.getHover(player.getEntityId())) {
|
||||
// Base ItemBootsTraveller jumpBonus equals to jumpBonus of Electric Boots,
|
||||
// so any other boots factor can be calculated via proportion method
|
||||
player.jumpMovementFactor = 0.03F
|
||||
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
|
||||
* jumpBonus
|
||||
* speedMod;
|
||||
player.jumpMovementFactor = (0.03F / BASE_JUMP_BONUS * jumpBonus - 0.02F) * speedMod + 0.02F;
|
||||
} else {
|
||||
player.jumpMovementFactor = 0.05F
|
||||
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
|
||||
* jumpBonus
|
||||
* speedMod;
|
||||
player.jumpMovementFactor = (0.05F / BASE_JUMP_BONUS * jumpBonus - 0.02F) * speedMod + 0.02F;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,8 +177,15 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
if (player.moveForward != 0.0) {
|
||||
player.moveFlying(0.0F, player.moveForward, bonus);
|
||||
}
|
||||
if (player.moveStrafing != 0.0 && getOmniState(itemStack)) {
|
||||
player.moveFlying(player.moveStrafing, 0.0F, bonus);
|
||||
if (getOmniState(itemStack)) {
|
||||
if (player.moveStrafing != 0.0) player.moveFlying(player.moveStrafing, 0.0F, bonus);
|
||||
boolean jumping = ((EntityLivingBaseAccessor) player).getIsJumping();
|
||||
boolean sneaking = player.isSneaking();
|
||||
if (sneaking && !jumping && !player.onGround) {
|
||||
player.motionY -= bonus;
|
||||
} else if (jumping && !sneaking) {
|
||||
player.motionY += bonus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,20 +215,12 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
|
||||
@Override
|
||||
public int getItemEnchantability() {
|
||||
if (EMTConfigHandler.enchanting == false) {
|
||||
return 0;
|
||||
} else {
|
||||
return 4;
|
||||
}
|
||||
return EMTConfigHandler.enchanting ? 4 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
|
||||
if (EMTConfigHandler.enchanting == false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return EMTConfigHandler.enchanting;
|
||||
}
|
||||
|
||||
public int getEnergyPerDamage() {
|
||||
@@ -273,27 +266,34 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
|
||||
// Avoid NSM Exception when ThaumicBoots is not present.
|
||||
public double getSpeedModifier(ItemStack stack) {
|
||||
if (stack.stackTagCompound != null) {
|
||||
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("speed")) {
|
||||
return stack.stackTagCompound.getDouble("speed");
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public double getJumpModifier(ItemStack stack) {
|
||||
if (stack.stackTagCompound != null) {
|
||||
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("jump")) {
|
||||
return stack.stackTagCompound.getDouble("jump");
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public boolean getOmniState(ItemStack stack) {
|
||||
if (stack.stackTagCompound != null) {
|
||||
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("omni")) {
|
||||
return stack.stackTagCompound.getBoolean("omni");
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean getIntertialState(ItemStack stack) {
|
||||
public boolean getStepAssistState(ItemStack stack) {
|
||||
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("step")) {
|
||||
return stack.stackTagCompound.getBoolean("step");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean getInertiaState(ItemStack stack) {
|
||||
if (stack.stackTagCompound != null) {
|
||||
return stack.stackTagCompound.getBoolean("inertiacanceling");
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import ic2.api.item.ElectricItem;
|
||||
@@ -140,6 +141,7 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
|
||||
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
|
||||
list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
|
||||
}
|
||||
|
||||
public double getDamageAbsorptionRatio() {
|
||||
|
||||
@@ -17,5 +17,13 @@ public class EMTDungeonChestGenerator {
|
||||
1,
|
||||
EMTConfigHandler.chanceTaintedMjolnir));
|
||||
}
|
||||
if (!EMTConfigHandler.oneRingSpawn) {
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(
|
||||
new WeightedRandomChestContent(
|
||||
new ItemStack(EMTItems.onering),
|
||||
0,
|
||||
1,
|
||||
EMTConfigHandler.chanceOneRing));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,14 @@
|
||||
package emt.util;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
@@ -29,7 +25,7 @@ public class EMTEventHandler {
|
||||
|
||||
/**
|
||||
* Intercept the onLivingHurt event so that we can mitigate fall damage with feather wings
|
||||
*
|
||||
*
|
||||
* @param e Entity that is being damaged
|
||||
*/
|
||||
@SubscribeEvent
|
||||
@@ -82,21 +78,6 @@ public class EMTEventHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onSetEntityAttack(LivingSetAttackTargetEvent e) {
|
||||
if (e.entityLiving instanceof EntityLiving && e.target instanceof EntityPlayer) {
|
||||
IInventory inventory = BaublesApi.getBaubles((EntityPlayer) e.target);
|
||||
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack stack = inventory.getStackInSlot(i);
|
||||
|
||||
if (stack != null && stack.getItem() == EMTItems.onering) {
|
||||
((EntityLiving) e.entityLiving).setAttackTarget(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void createCloud(PlayerInteractEvent e) {
|
||||
if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK || e.world.isRemote) {
|
||||
|
||||
Reference in new issue
Block a user