mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 23:03:16 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
824b6bc3b4 | ||
|
|
83ef9ce92c | ||
|
|
c1642ad8e1 | ||
|
|
9a51e36a33 | ||
|
|
41ba26b62d | ||
|
|
d16c3f27d4 | ||
|
|
46fa64f4f7 | ||
|
|
893d79e147 | ||
|
|
4920c605bc | ||
|
|
5eadeb8067 | ||
|
|
9dee3ae782 | ||
|
|
9b40d06fb7 | ||
|
|
1c69ce9b4d | ||
|
|
1049ca875c | ||
|
|
1d613494e9 | ||
|
|
1d81835e32 | ||
|
|
940073709b | ||
|
|
9052428a3d | ||
|
|
e1e53af24f | ||
|
|
71c9976777 | ||
|
|
cc46d6a039 | ||
|
|
358a1f213e | ||
|
|
91a816555b | ||
|
|
bb9ed2f219 | ||
|
|
730826c9d9 | ||
|
|
0650072b85 | ||
|
|
d48233f266 | ||
|
|
367f37c7d5 | ||
|
|
a1151399fc | ||
|
|
cb68d0a951 |
No files matched your search
+7
-6
@@ -1,14 +1,15 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.51.40:dev'
|
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.2-GTNH:dev')
|
||||||
api 'com.github.GTNewHorizons:Baubles:1.0.4:dev'
|
api('com.github.GTNewHorizons:ModularUI:1.3.0:dev')
|
||||||
api 'com.github.GTNewHorizons:ModularUI:1.2.17:dev'
|
api('com.github.GTNewHorizons:ThaumicBoots:1.5.0:dev') {
|
||||||
api ('com.github.GTNewHorizons:ThaumicBoots:1.4.2:dev'){
|
|
||||||
exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools'
|
exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools'
|
||||||
|
exclude module: 'Baubles'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||||
|
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||||
|
|
||||||
api 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.87:dev')
|
||||||
api 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
|
|
||||||
}
|
}
|
||||||
+14
-6
@@ -14,7 +14,7 @@ modId = EMT
|
|||||||
modGroup = emt
|
modGroup = emt
|
||||||
|
|
||||||
# Whether to use modGroup as the maven publishing group.
|
# Whether to use modGroup as the maven publishing group.
|
||||||
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
# When false, com.github.GTNewHorizons is used.
|
||||||
useModGroupForPublishing = false
|
useModGroupForPublishing = false
|
||||||
|
|
||||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||||
@@ -50,10 +50,10 @@ enableGenericInjection = true
|
|||||||
# Generate a class with a String field for the mod version named as defined below.
|
# Generate a class with a String field for the mod version named as defined below.
|
||||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||||
generateGradleTokenClass =
|
generateGradleTokenClass = emt.EMTTags
|
||||||
|
|
||||||
# Name of the token containing the project's current version to generate/replace.
|
# Name of the token containing the project's current version to generate/replace.
|
||||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
gradleTokenVersion = VERSION
|
||||||
|
|
||||||
# [DEPRECATED] Mod ID replacement token.
|
# [DEPRECATED] Mod ID replacement token.
|
||||||
gradleTokenModId =
|
gradleTokenModId =
|
||||||
@@ -70,7 +70,7 @@ gradleTokenGroupName =
|
|||||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||||
# version in @Mod([...], version = VERSION, [...]).
|
# version in @Mod([...], version = VERSION, [...]).
|
||||||
# Leave these properties empty to skip individual token replacements.
|
# Leave these properties empty to skip individual token replacements.
|
||||||
replaceGradleTokenInFile = EMT.java
|
replaceGradleTokenInFile =
|
||||||
|
|
||||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||||
# leave this property empty.
|
# leave this property empty.
|
||||||
@@ -96,7 +96,9 @@ usesMixinDebug = false
|
|||||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||||
mixinPlugin =
|
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 =
|
mixinsPackage =
|
||||||
|
|
||||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||||
@@ -151,7 +153,7 @@ modrinthProjectId =
|
|||||||
# type can be one of [project, version],
|
# type can be one of [project, version],
|
||||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||||
modrinthRelations =
|
modrinthRelations =
|
||||||
|
|
||||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||||
@@ -172,6 +174,12 @@ curseForgeRelations =
|
|||||||
# projects. New projects should not use this parameter.
|
# projects. New projects should not use this parameter.
|
||||||
# customArchiveBaseName =
|
# 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.
|
# 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'.
|
# 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.
|
# The check is ONLY performed if the version is a git tag.
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@@ -115,7 +114,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@@ -206,7 +205,7 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
@@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|||||||
Vendored
+2
-2
@@ -70,11 +70,11 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@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%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
@@ -1,4 +1,15 @@
|
|||||||
// Add any additional repositories for your dependencies here
|
// Add any additional repositories for your dependencies here
|
||||||
|
|
||||||
repositories {
|
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 {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.48'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -40,8 +40,8 @@ public class EMT {
|
|||||||
|
|
||||||
public static final String NAME = "Electro-Magic Tools";
|
public static final String NAME = "Electro-Magic Tools";
|
||||||
public static final String MOD_ID = "EMT";
|
public static final String MOD_ID = "EMT";
|
||||||
public static final String VERSION = "GRADLETOKEN_VERSION";
|
public static final String VERSION = EMTTags.VERSION;
|
||||||
public static final String TEXTURE_PATH = "emt";
|
public static final String RESOURCE_PATH = "emt";
|
||||||
public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory";
|
public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory";
|
||||||
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
|
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
|
||||||
public static final String COMMON_PROXY = "emt.proxy.CommonProxy";
|
public static final String COMMON_PROXY = "emt.proxy.CommonProxy";
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public abstract class BlockBase extends Block {
|
|||||||
name = unlocName;
|
name = unlocName;
|
||||||
setBlockName(EMT.MOD_ID + ".block." + unlocName);
|
setBlockName(EMT.MOD_ID + ".block." + unlocName);
|
||||||
if (textureName != null) {
|
if (textureName != null) {
|
||||||
setBlockTextureName(EMT.TEXTURE_PATH + ":" + textureName);
|
setBlockTextureName(EMT.RESOURCE_PATH + ":" + textureName);
|
||||||
}
|
}
|
||||||
setCreativeTab(EMT.TAB);
|
setCreativeTab(EMT.TAB);
|
||||||
setStepSound(soundType);
|
setStepSound(soundType);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class BlockElectricCloud extends BlockBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerBlockIcons(IIconRegister ir) {
|
public void registerBlockIcons(IIconRegister ir) {
|
||||||
icon = ir.registerIcon(EMT.TEXTURE_PATH + ":empty");
|
icon = ir.registerIcon(EMT.RESOURCE_PATH + ":empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -33,20 +33,20 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister ir) {
|
public void registerBlockIcons(IIconRegister ir) {
|
||||||
super.registerBlockIcons(ir);
|
super.registerBlockIcons(ir);
|
||||||
this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top");
|
this.blockIcon = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/top");
|
||||||
|
|
||||||
for (int meta = 0; meta < subtypes; meta++) {
|
for (int meta = 0; meta < subtypes; meta++) {
|
||||||
iconSets[meta].top = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
|
iconSets[meta].top = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/top");
|
||||||
iconSets[meta].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
|
iconSets[meta].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/top");
|
||||||
iconSets[meta].side = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/side");
|
iconSets[meta].side = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/side");
|
||||||
}
|
}
|
||||||
|
|
||||||
iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/potentiafront");
|
iconSets[0].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/potentiafront");
|
||||||
iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/ignisfront");
|
iconSets[1].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/ignisfront");
|
||||||
iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/auramfront");
|
iconSets[2].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/auramfront");
|
||||||
iconSets[3].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/arborfront");
|
iconSets[3].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/arborfront");
|
||||||
iconSets[4].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
|
iconSets[4].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/aerfront");
|
||||||
iconSets[5].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
|
iconSets[5].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/aerfront");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -36,27 +36,27 @@ public class BlockMachines extends BlockBaseContainer {
|
|||||||
public void registerBlockIcons(IIconRegister ir) {
|
public void registerBlockIcons(IIconRegister ir) {
|
||||||
super.registerBlockIcons(ir);
|
super.registerBlockIcons(ir);
|
||||||
|
|
||||||
this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top");
|
this.blockIcon = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/top");
|
||||||
|
|
||||||
iconSets[0].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top");
|
iconSets[0].top = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/top");
|
||||||
iconSets[1].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
iconSets[1].top = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||||
iconSets[2].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
iconSets[2].top = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||||
|
|
||||||
iconSets[0].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side");
|
iconSets[0].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/side");
|
||||||
iconSets[1].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator");
|
iconSets[1].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmacerator");
|
||||||
iconSets[2].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
iconSets[2].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||||
|
|
||||||
iconSets[0].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side");
|
iconSets[0].side = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/side");
|
||||||
iconSets[1].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator");
|
iconSets[1].side = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmacerator");
|
||||||
iconSets[2].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
iconSets[2].side = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||||
|
|
||||||
iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger");
|
iconSets[0].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/wandcharger");
|
||||||
iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfront");
|
iconSets[1].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratorfront");
|
||||||
iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
iconSets[2].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||||
|
|
||||||
iconSets[0].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger");
|
iconSets[0].frontOn = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/wandcharger");
|
||||||
iconSets[1].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfrontactive");
|
iconSets[1].frontOn = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratorfrontactive");
|
||||||
iconSets[2].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
iconSets[2].frontOn = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class BlockPortableNode extends BlockAiry {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerBlockIcons(IIconRegister ri) {
|
public void registerBlockIcons(IIconRegister ri) {
|
||||||
texture = ri.registerIcon(EMT.TEXTURE_PATH + ":portablenode");
|
texture = ri.registerIcon(EMT.RESOURCE_PATH + ":portablenode");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class BlockShield extends Block {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
this.blockIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":shield");
|
this.blockIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":shield");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -30,19 +30,19 @@ public class BlockSolars extends BlockBaseContainer {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister ir) {
|
public void registerBlockIcons(IIconRegister ir) {
|
||||||
IIcon solarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/solartop");
|
IIcon solarTop = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/solartop");
|
||||||
IIcon doubleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/doublesolartop");
|
IIcon doubleSolarTop = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/doublesolartop");
|
||||||
IIcon tripleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/triplesolartop");
|
IIcon tripleSolarTop = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/triplesolartop");
|
||||||
|
|
||||||
IIcon bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/bottom");
|
IIcon bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/bottom");
|
||||||
|
|
||||||
IIcon side = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/side");
|
IIcon side = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/side");
|
||||||
IIcon waterSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/water/waterside");
|
IIcon waterSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/water/waterside");
|
||||||
IIcon darkSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/dark/darkside");
|
IIcon darkSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/dark/darkside");
|
||||||
IIcon orderSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/order/orderside");
|
IIcon orderSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/order/orderside");
|
||||||
IIcon fireSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/fire/fireside");
|
IIcon fireSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/fire/fireside");
|
||||||
IIcon airSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/air/airside");
|
IIcon airSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/air/airside");
|
||||||
IIcon earthSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/earth/earthside");
|
IIcon earthSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/earth/earthside");
|
||||||
|
|
||||||
IIcon[] sides = { side, orderSide, darkSide, airSide, earthSide, waterSide, fireSide };
|
IIcon[] sides = { side, orderSide, darkSide, airSide, earthSide, waterSide, fireSide };
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
package emt.client.gui;
|
package emt.client.gui;
|
||||||
|
|
||||||
import static emt.EMT.TEXTURE_PATH;
|
import static emt.EMT.RESOURCE_PATH;
|
||||||
|
|
||||||
import com.gtnewhorizons.modularui.api.drawable.UITexture;
|
import com.gtnewhorizons.modularui.api.drawable.UITexture;
|
||||||
|
|
||||||
public class EMT_UITextures {
|
public class EMT_UITextures {
|
||||||
|
|
||||||
public static final UITexture OVERLAY_SLOT_FUSION_CRAFTING = UITexture
|
public static final UITexture OVERLAY_SLOT_FUSION_CRAFTING = UITexture
|
||||||
.fullImage(TEXTURE_PATH, "guis/overlay_slot/fusion_crafter");
|
.fullImage(RESOURCE_PATH, "guis/overlay_slot/fusion_crafter");
|
||||||
public static final UITexture OVERLAY_SLOT_WAND = UITexture.fullImage(TEXTURE_PATH, "guis/overlay_slot/wand");
|
public static final UITexture OVERLAY_SLOT_WAND = UITexture.fullImage(RESOURCE_PATH, "guis/overlay_slot/wand");
|
||||||
|
|
||||||
public static final UITexture PICTURE_GAUGE_EMPTY_25 = UITexture
|
public static final UITexture PICTURE_GAUGE_EMPTY_25 = UITexture
|
||||||
.fullImage(TEXTURE_PATH, "guis/picture/gauge_empty_25");
|
.fullImage(RESOURCE_PATH, "guis/picture/gauge_empty_25");
|
||||||
public static final UITexture PICTURE_GAUGE_GENERATOR = UITexture
|
public static final UITexture PICTURE_GAUGE_GENERATOR = UITexture
|
||||||
.fullImage(TEXTURE_PATH, "guis/picture/gauge_generator");
|
.fullImage(RESOURCE_PATH, "guis/picture/gauge_generator");
|
||||||
public static final UITexture PICTURE_GAUGE_SOLAR = UITexture.fullImage(TEXTURE_PATH, "guis/picture/gauge_solar");
|
public static final UITexture PICTURE_GAUGE_SOLAR = UITexture.fullImage(RESOURCE_PATH, "guis/picture/gauge_solar");
|
||||||
public static final UITexture PICTURE_GAUGE_EMPTY_11 = UITexture
|
public static final UITexture PICTURE_GAUGE_EMPTY_11 = UITexture
|
||||||
.fullImage(TEXTURE_PATH, "guis/picture/gauge_empty_11");
|
.fullImage(RESOURCE_PATH, "guis/picture/gauge_empty_11");
|
||||||
public static final UITexture PICTURE_SOLAR_INDICATOR = UITexture
|
public static final UITexture PICTURE_SOLAR_INDICATOR = UITexture
|
||||||
.fullImage(TEXTURE_PATH, "guis/picture/solar_indicator");
|
.fullImage(RESOURCE_PATH, "guis/picture/solar_indicator");
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ import emt.entity.EntityLaser;
|
|||||||
public class RenderLaser extends Render {
|
public class RenderLaser extends Render {
|
||||||
|
|
||||||
private static final ResourceLocation laserTexture = new ResourceLocation(
|
private static final ResourceLocation laserTexture = new ResourceLocation(
|
||||||
EMT.TEXTURE_PATH,
|
EMT.RESOURCE_PATH,
|
||||||
"textures/models/lasermodel.png");
|
"textures/models/lasermodel.png");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import emt.entity.EntityShield;
|
|||||||
public class RenderShield extends Render {
|
public class RenderShield extends Render {
|
||||||
|
|
||||||
private static final ResourceLocation shieldTexture = new ResourceLocation(
|
private static final ResourceLocation shieldTexture = new ResourceLocation(
|
||||||
EMT.TEXTURE_PATH,
|
EMT.RESOURCE_PATH,
|
||||||
"textures/models/shield.png");
|
"textures/models/shield.png");
|
||||||
static int glCallList;
|
static int glCallList;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class EMT_GT_Loader {
|
|||||||
GTValues.RA.stdBuilder()
|
GTValues.RA.stdBuilder()
|
||||||
.itemInputs(
|
.itemInputs(
|
||||||
new ItemStack(Items.book),
|
new ItemStack(Items.book),
|
||||||
GTOreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L),
|
GTOreDictUnificator.get(OrePrefixes.circuit, Materials.LV, 1L),
|
||||||
new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE))
|
new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE))
|
||||||
.itemOutputs(mkbook()).duration(6 * SECONDS).eut(TierEU.RECIPE_MV / 2).addTo(assemblerRecipes);
|
.itemOutputs(mkbook()).duration(6 * SECONDS).eut(TierEU.RECIPE_MV / 2).addTo(assemblerRecipes);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ public class EMTResearches {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void addResearchTab() {
|
public static void addResearchTab() {
|
||||||
ResourceLocation background = new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/background.png");
|
ResourceLocation background = new ResourceLocation(EMT.RESOURCE_PATH, "textures/misc/background.png");
|
||||||
ResearchCategories
|
ResearchCategories
|
||||||
.registerCategory("EMT", new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png"), background);
|
.registerCategory("EMT", new ResourceLocation(EMT.RESOURCE_PATH, "textures/misc/emt.png"), background);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addResearch() {
|
public static void addResearch() {
|
||||||
@@ -31,7 +31,7 @@ public class EMTResearches {
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png")).setRound().setAutoUnlock()
|
new ResourceLocation(EMT.RESOURCE_PATH, "textures/misc/emt.png")).setRound().setAutoUnlock()
|
||||||
.registerResearchItem().setPages(new ResearchPage(""));
|
.registerResearchItem().setPages(new ResearchPage(""));
|
||||||
new EMTResearchItem("Diamond Chainsaw", 5, -6, 0, new ItemStack(EMTItems.diamondChainsaw)).setRound()
|
new EMTResearchItem("Diamond Chainsaw", 5, -6, 0, new ItemStack(EMTItems.diamondChainsaw)).setRound()
|
||||||
.setAutoUnlock().registerResearchItem()
|
.setAutoUnlock().registerResearchItem()
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class ItemBase extends Item {
|
|||||||
public ItemBase(String unlocName, String textureName) {
|
public ItemBase(String unlocName, String textureName) {
|
||||||
super();
|
super();
|
||||||
setUnlocalizedName(EMT.MOD_ID + unlocName);
|
setUnlocalizedName(EMT.MOD_ID + unlocName);
|
||||||
setTextureName(EMT.TEXTURE_PATH + ":" + textureName);
|
setTextureName(EMT.RESOURCE_PATH + ":" + textureName);
|
||||||
setCreativeTab(EMT.TAB);
|
setCreativeTab(EMT.TAB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister ri) {
|
public void registerIcons(IIconRegister ri) {
|
||||||
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":armoreumaker");
|
this.icon[0] = ri.registerIcon(EMT.RESOURCE_PATH + ":armoreumaker");
|
||||||
this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":inventoryeumaker");
|
this.icon[1] = ri.registerIcon(EMT.RESOURCE_PATH + ":inventoryeumaker");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -124,26 +124,26 @@ public class ItemMaterials extends Item {
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister ri) {
|
public void registerIcons(IIconRegister ri) {
|
||||||
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/clusteruranium");
|
this.icon[0] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/clusteruranium");
|
||||||
this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedamber");
|
this.icon[1] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/crushedamber");
|
||||||
this.icon[2] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedamber");
|
this.icon[2] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/purifiedamber");
|
||||||
this.icon[3] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedcinnabar");
|
this.icon[3] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/crushedcinnabar");
|
||||||
this.icon[4] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedcinnabar");
|
this.icon[4] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/purifiedcinnabar");
|
||||||
this.icon[5] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumplate");
|
this.icon[5] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/thaumiumplate");
|
||||||
this.icon[6] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/lightningsummoner");
|
this.icon[6] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/lightningsummoner");
|
||||||
this.icon[7] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/feathermesh");
|
this.icon[7] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/feathermesh");
|
||||||
this.icon[8] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/glue");
|
this.icon[8] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/glue");
|
||||||
this.icon[9] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/ducttape");
|
this.icon[9] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/ducttape");
|
||||||
this.icon[10] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/rubberball");
|
this.icon[10] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/rubberball");
|
||||||
this.icon[11] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboard");
|
this.icon[11] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/cardboard");
|
||||||
this.icon[12] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboardsheet");
|
this.icon[12] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/cardboardsheet");
|
||||||
this.icon[13] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/taintedfeather");
|
this.icon[13] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/taintedfeather");
|
||||||
this.icon[14] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumWing");
|
this.icon[14] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/thaumiumWing");
|
||||||
this.icon[15] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/uumatterdrop");
|
this.icon[15] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/uumatterdrop");
|
||||||
this.icon[16] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/draconicSchematic");
|
this.icon[16] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/draconicSchematic");
|
||||||
this.icon[17] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/wyvernSchematic");
|
this.icon[17] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/wyvernSchematic");
|
||||||
this.icon[18] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/awakenedSchematic");
|
this.icon[18] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/awakenedSchematic");
|
||||||
this.icon[19] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/chaoticSchematic");
|
this.icon[19] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/chaoticSchematic");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister ri) {
|
public void registerIcons(IIconRegister ri) {
|
||||||
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":onering");
|
this.icon[0] = ri.registerIcon(EMT.RESOURCE_PATH + ":onering");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
|||||||
this.setMaxDamage(27);
|
this.setMaxDamage(27);
|
||||||
this.setMaxStackSize(1);
|
this.setMaxStackSize(1);
|
||||||
this.setCreativeTab(EMT.TAB);
|
this.setCreativeTab(EMT.TAB);
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -73,7 +73,7 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_electric");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/boots_electric");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -188,17 +188,6 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
|
|
||||||
if (event.entityLiving instanceof EntityPlayer) {
|
|
||||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
|
||||||
ItemStack boots = player.getCurrentArmor(0);
|
|
||||||
boolean hasArmor = boots != null && boots.getItem() == this;
|
|
||||||
|
|
||||||
if (hasArmor) player.motionY += jumpBonus * (float) getJumpModifier(boots);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// make the boots worth upgrading
|
// make the boots worth upgrading
|
||||||
public float getMaxHealthyDropDist() {
|
public float getMaxHealthyDropDist() {
|
||||||
return 20.0F;
|
return 20.0F;
|
||||||
@@ -208,39 +197,9 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
|||||||
return 4.0f;
|
return 4.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onLivingFall(LivingFallEvent event) {
|
|
||||||
if ((EMT.instance.isSimulating()) && ((event.entity instanceof EntityLivingBase))) {
|
|
||||||
if (event.entity instanceof EntityPlayer) {
|
|
||||||
EntityPlayer entity = (EntityPlayer) event.entity;
|
|
||||||
if ((entity.inventory.armorInventory[0] != null)
|
|
||||||
&& (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) {
|
|
||||||
ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller) entity.inventory.armorInventory[0]
|
|
||||||
.getItem();
|
|
||||||
ItemStack stack = entity.inventory.armorInventory[0];
|
|
||||||
|
|
||||||
// Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty
|
|
||||||
if (tUsedBoots.getMinimumDropDist() > event.distance) {
|
|
||||||
event.setCanceled(true);
|
|
||||||
} else {
|
|
||||||
float tEnergyDemand = tUsedBoots.energyPerDamage
|
|
||||||
* (((event.distance > tUsedBoots.getMaxHealthyDropDist()) ? event.distance * 3
|
|
||||||
: event.distance) - 4.0F);
|
|
||||||
if (tEnergyDemand <= ElectricItem.manager.getCharge(stack)) {
|
|
||||||
// EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance,
|
|
||||||
// tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() ));
|
|
||||||
ElectricItem.manager.discharge(stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false);
|
|
||||||
event.setCanceled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/electricboots.png";
|
return EMT.RESOURCE_PATH + ":textures/models/electricboots.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -341,4 +300,49 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class EventHandler {
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
|
||||||
|
if (event.entityLiving instanceof EntityPlayer) {
|
||||||
|
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||||
|
ItemStack boots = player.getCurrentArmor(0);
|
||||||
|
boolean hasArmor = boots != null && boots.getItem() == ItemElectricBootsTraveller.this;
|
||||||
|
|
||||||
|
if (hasArmor) player.motionY += jumpBonus * (float) getJumpModifier(boots);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onLivingFall(LivingFallEvent event) {
|
||||||
|
if ((EMT.instance.isSimulating()) && ((event.entity instanceof EntityLivingBase))) {
|
||||||
|
if (event.entity instanceof EntityPlayer) {
|
||||||
|
EntityPlayer entity = (EntityPlayer) event.entity;
|
||||||
|
if ((entity.inventory.armorInventory[0] != null)
|
||||||
|
&& (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) {
|
||||||
|
ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller) entity.inventory.armorInventory[0]
|
||||||
|
.getItem();
|
||||||
|
ItemStack stack = entity.inventory.armorInventory[0];
|
||||||
|
|
||||||
|
// Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty
|
||||||
|
if (tUsedBoots.getMinimumDropDist() > event.distance) {
|
||||||
|
event.setCanceled(true);
|
||||||
|
} else {
|
||||||
|
float tEnergyDemand = tUsedBoots.energyPerDamage
|
||||||
|
* (((event.distance > tUsedBoots.getMaxHealthyDropDist()) ? event.distance * 3
|
||||||
|
: event.distance) - 4.0F);
|
||||||
|
if (tEnergyDemand <= ElectricItem.manager.getCharge(stack)) {
|
||||||
|
// EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance,
|
||||||
|
// tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() ));
|
||||||
|
ElectricItem.manager
|
||||||
|
.discharge(stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false);
|
||||||
|
event.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,12 +4,16 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
|||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import emt.EMT;
|
import emt.EMT;
|
||||||
import emt.util.EMTConfigHandler;
|
import emt.util.EMTConfigHandler;
|
||||||
|
import gregtech.api.hazards.Hazard;
|
||||||
|
import gregtech.api.hazards.IHazardProtector;
|
||||||
|
|
||||||
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
|
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||||
|
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller implements IHazardProtector {
|
||||||
|
|
||||||
public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||||
super(material, par3, par4);
|
super(material, par3, par4);
|
||||||
@@ -44,11 +48,17 @@ public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_nano");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/boots_nano");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/nanobootstravel.png";
|
return EMT.RESOURCE_PATH + ":textures/models/nanobootstravel.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "gregtech_nh")
|
||||||
|
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,12 +4,16 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
|||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import emt.EMT;
|
import emt.EMT;
|
||||||
import emt.util.EMTConfigHandler;
|
import emt.util.EMTConfigHandler;
|
||||||
|
import gregtech.api.hazards.Hazard;
|
||||||
|
import gregtech.api.hazards.IHazardProtector;
|
||||||
|
|
||||||
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
|
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||||
|
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller implements IHazardProtector {
|
||||||
|
|
||||||
public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||||
super(material, par3, par4);
|
super(material, par3, par4);
|
||||||
@@ -44,11 +48,17 @@ public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_quantum");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/boots_quantum");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/quantumbootstravel.png";
|
return EMT.RESOURCE_PATH + ":textures/models/quantumbootstravel.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "gregtech_nh")
|
||||||
|
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,7 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -28,6 +29,8 @@ import emt.EMT;
|
|||||||
import emt.client.model.ModelSpecialArmor;
|
import emt.client.model.ModelSpecialArmor;
|
||||||
import emt.init.EMTItems;
|
import emt.init.EMTItems;
|
||||||
import emt.util.EMTConfigHandler;
|
import emt.util.EMTConfigHandler;
|
||||||
|
import gregtech.api.hazards.Hazard;
|
||||||
|
import gregtech.api.hazards.IHazardProtector;
|
||||||
import ic2.api.item.ElectricItem;
|
import ic2.api.item.ElectricItem;
|
||||||
import ic2.api.item.IC2Items;
|
import ic2.api.item.IC2Items;
|
||||||
import ic2.core.IC2;
|
import ic2.core.IC2;
|
||||||
@@ -38,7 +41,8 @@ import ic2.core.item.armor.ItemArmorElectric;
|
|||||||
import ic2.core.util.StackUtil;
|
import ic2.core.util.StackUtil;
|
||||||
import thaumcraft.api.IRunicArmor;
|
import thaumcraft.api.IRunicArmor;
|
||||||
|
|
||||||
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor {
|
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||||
|
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor, IHazardProtector {
|
||||||
|
|
||||||
public static AudioSource audioSource;
|
public static AudioSource audioSource;
|
||||||
protected static ArrayList<Integer> potionRemovalCost = new ArrayList<Integer>();
|
protected static ArrayList<Integer> potionRemovalCost = new ArrayList<Integer>();
|
||||||
@@ -56,18 +60,18 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
|||||||
|
|
||||||
public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) {
|
public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) {
|
||||||
super(internalName, InternalName.quantum, armorType, 20000000D, 18000.0D, 4);
|
super(internalName, InternalName.quantum, armorType, 20000000D, 18000.0D, 4);
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||||
this.setCreativeTab(EMT.TAB);
|
this.setCreativeTab(EMT.TAB);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
iconNONE = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest");
|
iconNONE = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest");
|
||||||
iconJETPACK = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_jetpack");
|
iconJETPACK = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_jetpack");
|
||||||
iconTHAUMIUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_t");
|
iconTHAUMIUM = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_wing_t");
|
||||||
iconNANO = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_n");
|
iconNANO = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_wing_n");
|
||||||
iconQUANTUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_q");
|
iconQUANTUM = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_wing_q");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -79,24 +83,6 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
|||||||
return (StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim();
|
return (StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onEntityLivingFallEvent(LivingFallEvent event) {
|
|
||||||
if (IC2.platform.isSimulating() && (event.entity instanceof EntityLivingBase)) {
|
|
||||||
EntityLivingBase entity = (EntityLivingBase) event.entity;
|
|
||||||
ItemStack armor = entity.getEquipmentInSlot(1);
|
|
||||||
|
|
||||||
if ((armor != null) && (armor.getItem() == this)) {
|
|
||||||
int fallDamage = Math.max((int) event.distance - 10, 0);
|
|
||||||
double energyCost = getEnergyPerDamage() * fallDamage;
|
|
||||||
|
|
||||||
if (energyCost <= ElectricItem.manager.getCharge(armor)) {
|
|
||||||
ElectricItem.manager.discharge(armor, energyCost, Integer.MAX_VALUE, true, false, false);
|
|
||||||
event.setCanceled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getDamageAbsorptionRatio() {
|
public double getDamageAbsorptionRatio() {
|
||||||
return 1.1D;
|
return 1.1D;
|
||||||
@@ -370,15 +356,15 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
|||||||
|
|
||||||
switch (wing) {
|
switch (wing) {
|
||||||
case JETPACK:
|
case JETPACK:
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/quantum_jetpack.png";
|
return EMT.RESOURCE_PATH + ":textures/models/quantum_jetpack.png";
|
||||||
case THAUMIUM:
|
case THAUMIUM:
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_t.png";
|
return EMT.RESOURCE_PATH + ":textures/models/quantum_wings_t.png";
|
||||||
case NANO:
|
case NANO:
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_n.png";
|
return EMT.RESOURCE_PATH + ":textures/models/quantum_wings_n.png";
|
||||||
case QUANTUM:
|
case QUANTUM:
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_q.png";
|
return EMT.RESOURCE_PATH + ":textures/models/quantum_wings_q.png";
|
||||||
default:
|
default:
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/quantum.png";
|
return EMT.RESOURCE_PATH + ":textures/models/quantum.png";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,4 +550,31 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
|||||||
public int getRunicCharge(ItemStack itemStack) {
|
public int getRunicCharge(ItemStack itemStack) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "gregtech_nh")
|
||||||
|
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class EventHandler {
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onEntityLivingFallEvent(LivingFallEvent event) {
|
||||||
|
if (IC2.platform.isSimulating() && (event.entity instanceof EntityLivingBase)) {
|
||||||
|
EntityLivingBase entity = (EntityLivingBase) event.entity;
|
||||||
|
ItemStack armor = entity.getEquipmentInSlot(1);
|
||||||
|
|
||||||
|
if ((armor != null) && (armor.getItem() == ItemInfusedQuantumChestplate.this)) {
|
||||||
|
int fallDamage = Math.max((int) event.distance - 10, 0);
|
||||||
|
double energyCost = getEnergyPerDamage() * fallDamage;
|
||||||
|
|
||||||
|
if (energyCost <= ElectricItem.manager.getCharge(armor)) {
|
||||||
|
ElectricItem.manager.discharge(armor, energyCost, Integer.MAX_VALUE, true, false, false);
|
||||||
|
event.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -43,15 +43,37 @@ public class ItemElectricGoggles extends ItemArmor
|
|||||||
this.setCreativeTab(EMT.TAB);
|
this.setCreativeTab(EMT.TAB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow damage to be set to avoid breaking IC2 Energy bar or other features, while preventing the item from
|
||||||
|
* breaking.
|
||||||
|
*
|
||||||
|
* @param stack the item stack
|
||||||
|
* @param damage the new damage value
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setDamage(ItemStack stack, int damage) {
|
||||||
|
int max = stack.getMaxDamage();
|
||||||
|
|
||||||
|
if (max > 0) {
|
||||||
|
if (damage >= max) {
|
||||||
|
damage = max - 1;
|
||||||
|
} else if (damage < 0) {
|
||||||
|
damage = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super.setDamage(stack, damage);
|
||||||
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_electric");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_electric");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/electricgoggles.png";
|
return EMT.RESOURCE_PATH + ":textures/models/electricgoggles.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -6,12 +6,16 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import emt.EMT;
|
import emt.EMT;
|
||||||
|
import gregtech.api.hazards.Hazard;
|
||||||
|
import gregtech.api.hazards.IHazardProtector;
|
||||||
import ic2.api.item.IC2Items;
|
import ic2.api.item.IC2Items;
|
||||||
|
|
||||||
public class ItemNanoGoggles extends ItemElectricGoggles {
|
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||||
|
public class ItemNanoGoggles extends ItemElectricGoggles implements IHazardProtector {
|
||||||
|
|
||||||
public ItemNanoGoggles(ArmorMaterial material, int renderIndex, int armorType) {
|
public ItemNanoGoggles(ArmorMaterial material, int renderIndex, int armorType) {
|
||||||
super(material, renderIndex, armorType);
|
super(material, renderIndex, armorType);
|
||||||
@@ -28,12 +32,12 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_nano");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_nano");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/thaumicnanohelmet.png";
|
return EMT.RESOURCE_PATH + ":textures/models/thaumicnanohelmet.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -50,4 +54,10 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
|
|||||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||||
IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack);
|
IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "gregtech_nh")
|
||||||
|
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -42,12 +42,12 @@ public class ItemQuantumGoggles extends ItemNanoGoggles {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_quantum");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_quantum");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/thaumicquantumhelmet.png";
|
return EMT.RESOURCE_PATH + ":textures/models/thaumicquantumhelmet.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -48,12 +48,12 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_solar");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_solar");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/solarrevealinghelmet.png";
|
return EMT.RESOURCE_PATH + ":textures/models/solarrevealinghelmet.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_feather");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_feather");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/featherwing.png";
|
return EMT.RESOURCE_PATH + ":textures/models/featherwing.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -14,15 +14,21 @@ import net.minecraft.util.StatCollector;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ISpecialArmor;
|
import net.minecraftforge.common.ISpecialArmor;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import emt.EMT;
|
import emt.EMT;
|
||||||
import emt.util.EMTConfigHandler;
|
import emt.util.EMTConfigHandler;
|
||||||
|
import emt.util.EMTTextHelper;
|
||||||
|
import gregtech.api.hazards.Hazard;
|
||||||
|
import gregtech.api.hazards.IHazardProtector;
|
||||||
import ic2.api.item.ElectricItem;
|
import ic2.api.item.ElectricItem;
|
||||||
import ic2.api.item.IElectricItem;
|
import ic2.api.item.IElectricItem;
|
||||||
import ic2.api.item.IMetalArmor;
|
import ic2.api.item.IMetalArmor;
|
||||||
|
|
||||||
public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectricItem, ISpecialArmor, IMetalArmor {
|
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||||
|
public class ItemNanoWing extends ItemThaumiumReinforcedWing
|
||||||
|
implements IElectricItem, ISpecialArmor, IMetalArmor, IHazardProtector {
|
||||||
|
|
||||||
public static int maxCharge = 1000000;
|
public static int maxCharge = 1000000;
|
||||||
public int tier = 3;
|
public int tier = 3;
|
||||||
@@ -45,7 +51,7 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_nano");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_nano");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -64,7 +70,7 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/nanowing.png";
|
return EMT.RESOURCE_PATH + ":textures/models/nanowing.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -135,6 +141,7 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
|||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
|
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(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
|
||||||
|
list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDamageAbsorptionRatio() {
|
public double getDamageAbsorptionRatio() {
|
||||||
@@ -176,4 +183,10 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
|||||||
public Item getEmptyItem(ItemStack itemStack) {
|
public Item getEmptyItem(ItemStack itemStack) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "gregtech_nh")
|
||||||
|
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -33,13 +33,13 @@ public class ItemQuantumWing extends ItemNanoWing {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_quantum");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_quantum");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/quantumwing.png";
|
return EMT.RESOURCE_PATH + ":textures/models/quantumwing.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -40,13 +40,13 @@ public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisD
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_thaumium");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_thaumium");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||||
return EMT.TEXTURE_PATH + ":textures/models/thaumiumwing.png";
|
return EMT.RESOURCE_PATH + ":textures/models/thaumiumwing.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class ItemBlockElectricCloud extends ItemBlock {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister ir) {
|
public void registerIcons(IIconRegister ir) {
|
||||||
icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "electric_cloud");
|
icon = ir.registerIcon(EMT.RESOURCE_PATH + ":" + "electric_cloud");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -31,21 +31,7 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister ir) {
|
public void registerIcons(IIconRegister ir) {
|
||||||
this.icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "focus_" + textureName);
|
this.icon = ir.registerIcon(EMT.RESOURCE_PATH + ":" + "focus_" + textureName);
|
||||||
}
|
|
||||||
|
|
||||||
boolean hasDepth() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getFocusColor(ItemStack stack) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isItemTool(ItemStack par1ItemStack) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -63,18 +49,10 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
|||||||
return new AspectList();
|
return new AspectList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isUseItem(ItemStack stack) {
|
|
||||||
return isVisCostPerTick(stack);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isVisCostPerTick() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer,
|
public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer,
|
||||||
MovingObjectPosition paramMovingObjectPosition) {
|
MovingObjectPosition paramMovingObjectPosition) {
|
||||||
if (isUseItem(paramItemStack)) paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
|
if (isVisCostPerTick(paramItemStack)) paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
|
||||||
return paramItemStack;
|
return paramItemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,19 +62,9 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
|||||||
@Override
|
@Override
|
||||||
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {}
|
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getSortingHelper(ItemStack itemstack) {
|
|
||||||
return "00";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
|
public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemEnchantability() {
|
|
||||||
return 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
package emt.item.focus;
|
package emt.item.focus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import emt.util.EMTConfigHandler;
|
import emt.util.EMTConfigHandler;
|
||||||
@@ -35,32 +37,27 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
|||||||
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add(
|
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add(
|
||||||
e.getKey(),
|
e.getKey(),
|
||||||
(int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
(int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||||
return visCost;
|
return actualCost;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSortingHelper(ItemStack itemstack) {
|
public String getSortingHelper(ItemStack itemstack) {
|
||||||
return "WANDCHARGING";
|
return "WANDCHARGING" + super.getSortingHelper(itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player,
|
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player,
|
||||||
MovingObjectPosition movingobjectposition) {
|
MovingObjectPosition movingobjectposition) {
|
||||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||||
if (player.capabilities.isCreativeMode
|
if (player.capabilities.isCreativeMode
|
||||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
|
|
||||||
int energyLeft = (int) (EMTConfigHandler.chargeFocusProduction
|
int energyLeft = getChargeRate(itemstack);
|
||||||
* Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
|
||||||
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
|
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
|
||||||
if (energyLeft > 0) {
|
if (energyLeft > 0) {
|
||||||
if ((player.inventory.armorInventory[i] != null)
|
if ((player.inventory.armorInventory[i] != null)
|
||||||
@@ -89,4 +86,16 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
|||||||
}
|
}
|
||||||
return itemstack;
|
return itemstack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getChargeRate(ItemStack itemstack) {
|
||||||
|
return (int) (EMTConfigHandler.chargeFocusProduction
|
||||||
|
* Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||||
|
list.add(StatCollector.translateToLocal("item.EMT.focus.EU.cost.info"));
|
||||||
|
list.add(StatCollector.translateToLocalFormatted("item.EMT.focus.EU.cost.once", getChargeRate(stack)));
|
||||||
|
super.addInformation(stack, player, list, par4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
import thaumcraft.api.aspects.Aspect;
|
import thaumcraft.api.aspects.Aspect;
|
||||||
import thaumcraft.api.aspects.AspectList;
|
import thaumcraft.api.aspects.AspectList;
|
||||||
|
import thaumcraft.api.wands.FocusUpgradeType;
|
||||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||||
|
|
||||||
public class ItemChristmasFocus extends ItemBaseFocus {
|
public class ItemChristmasFocus extends ItemBaseFocus {
|
||||||
@@ -30,7 +31,12 @@ public class ItemChristmasFocus extends ItemBaseFocus {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSortingHelper(ItemStack itemstack) {
|
public String getSortingHelper(ItemStack itemstack) {
|
||||||
return "CHRISTMAS";
|
return "CHRISTMAS" + super.getSortingHelper(itemstack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||||
|
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -42,7 +48,7 @@ public class ItemChristmasFocus extends ItemBaseFocus {
|
|||||||
int y = mop.blockY + 1;
|
int y = mop.blockY + 1;
|
||||||
int z = mop.blockZ;
|
int z = mop.blockZ;
|
||||||
if (player.capabilities.isCreativeMode
|
if (player.capabilities.isCreativeMode
|
||||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
EntitySnowman snowman;
|
EntitySnowman snowman;
|
||||||
snowman = new EntitySnowman(world);
|
snowman = new EntitySnowman(world);
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
package emt.item.focus;
|
package emt.item.focus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import emt.entity.EntityEnergyBall;
|
import emt.entity.EntityEnergyBall;
|
||||||
import ic2.api.item.ElectricItem;
|
import ic2.api.item.ElectricItem;
|
||||||
|
import thaumcraft.api.wands.FocusUpgradeType;
|
||||||
|
|
||||||
public class ItemEnergyBallFocus extends ItemBaseFocus {
|
public class ItemEnergyBallFocus extends ItemBaseFocus {
|
||||||
|
|
||||||
@@ -22,7 +26,12 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSortingHelper(ItemStack itemstack) {
|
public String getSortingHelper(ItemStack itemstack) {
|
||||||
return "ENERGYBALL";
|
return "ENERGYBALL" + super.getSortingHelper(itemstack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||||
|
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -36,9 +45,10 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
|
|||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
double val = ElectricItem.manager.discharge(armor, 5120, 4, true, false, false);
|
int cost = getCost(stack);
|
||||||
|
double val = ElectricItem.manager.discharge(armor, cost, 4, true, false, false);
|
||||||
|
|
||||||
if (val < 5120) {
|
if (val < cost) {
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,4 +61,18 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
|
|||||||
|
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base cost of 5120 with a 10% discount per level of frugal.
|
||||||
|
*/
|
||||||
|
private int getCost(ItemStack stack) {
|
||||||
|
return (int) (5120 * (1.0 - (0.1 * getUpgradeLevel(stack, FocusUpgradeType.frugal))));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||||
|
list.add(StatCollector.translateToLocal("item.EMT.focus.EU.cost.info"));
|
||||||
|
list.add(StatCollector.translateToLocalFormatted("item.EMT.focus.EU.cost.once", getCost(stack)));
|
||||||
|
this.addFocusInformation(stack, player, list, par4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSortingHelper(ItemStack itemstack) {
|
public String getSortingHelper(ItemStack itemstack) {
|
||||||
return "EXPLOSION";
|
return "EXPLOSION" + super.getSortingHelper(itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -39,7 +39,7 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
|||||||
MovingObjectPosition movingobjectposition) {
|
MovingObjectPosition movingobjectposition) {
|
||||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||||
if (player.capabilities.isCreativeMode
|
if (player.capabilities.isCreativeMode
|
||||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
EntityLaser laser;
|
EntityLaser laser;
|
||||||
laser = new EntityLaser(world, player, 1);
|
laser = new EntityLaser(world, player, 1);
|
||||||
@@ -54,12 +54,4 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
|||||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Use this method to define custom logic about which upgrades can be applied. This can be used to set up upgrade
|
|
||||||
* "trees" that make certain upgrades available only when others are unlocked first, when certain research is
|
|
||||||
* completed, or similar logic.
|
|
||||||
*/
|
|
||||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package emt.item.focus;
|
package emt.item.focus;
|
||||||
|
|
||||||
|
import static emt.EMT.RESOURCE_PATH;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||||
@@ -19,6 +22,10 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
|
|||||||
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 2500).add(Aspect.EARTH, 2500)
|
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 2500).add(Aspect.EARTH, 2500)
|
||||||
.add(Aspect.ORDER, 2500);
|
.add(Aspect.ORDER, 2500);
|
||||||
|
|
||||||
|
private static final ResourceLocation focusMaintenanceSound = new ResourceLocation(
|
||||||
|
RESOURCE_PATH,
|
||||||
|
"maintenance.MaintenanceWandFocus");
|
||||||
|
|
||||||
public ItemMaintenanceFocus() {
|
public ItemMaintenanceFocus() {
|
||||||
super("maintenance");
|
super("maintenance");
|
||||||
}
|
}
|
||||||
@@ -35,7 +42,7 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSortingHelper(ItemStack itemstack) {
|
public String getSortingHelper(ItemStack itemstack) {
|
||||||
return "MAINTENANCE";
|
return "MAINTENANCE" + super.getSortingHelper(itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -60,13 +67,14 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
|
|||||||
if (hatchCandidateMetaTile instanceof MTEHatchMaintenance) {
|
if (hatchCandidateMetaTile instanceof MTEHatchMaintenance) {
|
||||||
MTEHatchMaintenance hatch = (MTEHatchMaintenance) hatchCandidateMetaTile;
|
MTEHatchMaintenance hatch = (MTEHatchMaintenance) hatchCandidateMetaTile;
|
||||||
if (player.capabilities.isCreativeMode
|
if (player.capabilities.isCreativeMode
|
||||||
|| wand.consumeAllVis(itemStack, player, getVisCost(itemStack), true, true)) {
|
|| wand.consumeAllVis(itemStack, player, getVisCost(itemStack), true, false)) {
|
||||||
hatch.mCrowbar = true;
|
hatch.mCrowbar = true;
|
||||||
hatch.mScrewdriver = true;
|
hatch.mScrewdriver = true;
|
||||||
hatch.mHardHammer = true;
|
hatch.mHardHammer = true;
|
||||||
hatch.mSolderingTool = true;
|
hatch.mSolderingTool = true;
|
||||||
hatch.mWrench = true;
|
hatch.mWrench = true;
|
||||||
hatch.mSoftHammer = true;
|
hatch.mSoftMallet = true;
|
||||||
|
hatch.setMaintenanceSound(focusMaintenanceSound, 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package emt.item.focus;
|
package emt.item.focus;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -12,6 +13,7 @@ import emt.entity.EntityShield;
|
|||||||
import ic2.core.IC2;
|
import ic2.core.IC2;
|
||||||
import thaumcraft.api.aspects.Aspect;
|
import thaumcraft.api.aspects.Aspect;
|
||||||
import thaumcraft.api.aspects.AspectList;
|
import thaumcraft.api.aspects.AspectList;
|
||||||
|
import thaumcraft.api.wands.FocusUpgradeType;
|
||||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||||
|
|
||||||
public class ItemShieldFocus extends ItemBaseFocus {
|
public class ItemShieldFocus extends ItemBaseFocus {
|
||||||
@@ -35,22 +37,28 @@ public class ItemShieldFocus extends ItemBaseFocus {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSortingHelper(ItemStack itemstack) {
|
public String getSortingHelper(ItemStack itemstack) {
|
||||||
return "SHIELD";
|
return "SHIELD" + super.getSortingHelper(itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUseItem(ItemStack stack) {
|
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||||
|
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isVisCostPerTick(ItemStack stack) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
|
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
|
||||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||||
for (PotionEffect effect : new LinkedList<PotionEffect>(player.getActivePotionEffects())) {
|
List<PotionEffect> potionEffects = new ArrayList<>(player.getActivePotionEffects());
|
||||||
|
for (PotionEffect effect : potionEffects) {
|
||||||
IC2.platform.removePotion(player, effect.getPotionID());
|
IC2.platform.removePotion(player, effect.getPotionID());
|
||||||
}
|
}
|
||||||
if (!player.capabilities.isCreativeMode
|
if (!player.capabilities.isCreativeMode
|
||||||
&& !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
&& !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
|
||||||
player.stopUsingItem();
|
player.stopUsingItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,7 +69,7 @@ public class ItemShieldFocus extends ItemBaseFocus {
|
|||||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||||
player.setItemInUse(itemstack, Integer.MAX_VALUE);
|
player.setItemInUse(itemstack, Integer.MAX_VALUE);
|
||||||
if (!world.isRemote && (player.capabilities.isCreativeMode
|
if (!world.isRemote && (player.capabilities.isCreativeMode
|
||||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true))) {
|
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false))) {
|
||||||
EntityShield shield = new EntityShield(world, player);
|
EntityShield shield = new EntityShield(world, player);
|
||||||
world.spawnEntityInWorld(shield);
|
world.spawnEntityInWorld(shield);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package emt.item.focus;
|
package emt.item.focus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
import emt.util.EMTConfigHandler;
|
import emt.util.EMTConfigHandler;
|
||||||
import ic2.api.item.ElectricItem;
|
import ic2.api.item.ElectricItem;
|
||||||
@@ -28,7 +30,7 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSortingHelper(ItemStack itemstack) {
|
public String getSortingHelper(ItemStack itemstack) {
|
||||||
return "ELECTRICCHARGING";
|
return "ELECTRICCHARGING" + super.getSortingHelper(itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -42,38 +44,63 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
|
|||||||
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add(
|
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add(
|
||||||
e.getKey(),
|
e.getKey(),
|
||||||
(int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
(int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||||
return visCost;
|
return actualCost;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) {
|
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) {
|
||||||
|
|
||||||
if (!player.worldObj.isRemote) {
|
if (!player.worldObj.isRemote) {
|
||||||
ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem();
|
ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem();
|
||||||
|
if (wandIsFull(itemstack, wandItem)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ItemStack armor = player.inventory.armorInventory[1];
|
int cost = getCost(itemstack) / 4;
|
||||||
if (armor != null) {
|
for (ItemStack stack : player.inventory.armorInventory) {
|
||||||
if ((ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)
|
if (stack == null || ElectricItem.manager.getCharge(stack) < cost) {
|
||||||
&& (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player))
|
return;
|
||||||
&& (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player))
|
|
||||||
&& (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)))) {
|
|
||||||
int amount = (int) (100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
|
||||||
wandItem.addRealVis(itemstack, Aspect.ORDER, amount, true);
|
|
||||||
wandItem.addRealVis(itemstack, Aspect.FIRE, amount, true);
|
|
||||||
wandItem.addRealVis(itemstack, Aspect.ENTROPY, amount, true);
|
|
||||||
wandItem.addRealVis(itemstack, Aspect.WATER, amount, true);
|
|
||||||
wandItem.addRealVis(itemstack, Aspect.EARTH, amount, true);
|
|
||||||
wandItem.addRealVis(itemstack, Aspect.AIR, amount, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (ItemStack stack : player.inventory.armorInventory) {
|
||||||
|
ElectricItem.manager.use(stack, cost, player);
|
||||||
|
}
|
||||||
|
int amount = (int) (100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||||
|
wandItem.addRealVis(itemstack, Aspect.ORDER, amount, true);
|
||||||
|
wandItem.addRealVis(itemstack, Aspect.FIRE, amount, true);
|
||||||
|
wandItem.addRealVis(itemstack, Aspect.ENTROPY, amount, true);
|
||||||
|
wandItem.addRealVis(itemstack, Aspect.WATER, amount, true);
|
||||||
|
wandItem.addRealVis(itemstack, Aspect.EARTH, amount, true);
|
||||||
|
wandItem.addRealVis(itemstack, Aspect.AIR, amount, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean wandIsFull(ItemStack itemstack, ItemWandCasting wandItem) {
|
||||||
|
int size = wandItem.getMaxVis(itemstack);
|
||||||
|
for (Aspect a : Aspect.getPrimalAspects()) {
|
||||||
|
if (wandItem.getVis(itemstack, a) < size) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base cost from config with a 10% discount per level of frugal.
|
||||||
|
*/
|
||||||
|
private int getCost(ItemStack stack) {
|
||||||
|
return (int) (EMTConfigHandler.wandChargeFocusCost
|
||||||
|
* (1.0 - (0.1 * getUpgradeLevel(stack, FocusUpgradeType.frugal))));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||||
|
list.add(StatCollector.translateToLocal("item.EMT.focus.EU.cost.info"));
|
||||||
|
list.add(StatCollector.translateToLocalFormatted("item.EMT.focus.EU.cost.tick", getCost(stack)));
|
||||||
|
super.addInformation(stack, player, list, par4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.icon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/hoe_growth");
|
this.icon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/hoe_growth");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/electricthorhammer");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":hammer/electricthorhammer");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class ItemThorHammer extends ItemSword implements IRepairable {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/thorhammer");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":hammer/thorhammer");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class ItemThorHammerBroken extends ItemSword implements IRepairable {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/taintedthorhammer");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":hammer/taintedthorhammer");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_diamond");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/chainsaw_diamond");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_stream");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/chainsaw_stream");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class ItemThaumiumChainsaw extends ItemDiamondChainsaw {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_thaumium");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/chainsaw_thaumium");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_rockbreaker");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/drill_rockbreaker");
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isEffectiveAgainst(Block block) {
|
private boolean isEffectiveAgainst(Block block) {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_thaumium");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/drill_thaumium");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class ItemOmnitoolDiamond extends ItemOmnitoolIron {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_diamond");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/omnitool_diamond");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_iron");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/omnitool_iron");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class ItemOmnitoolThaumium extends ItemOmnitoolDiamond {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_thaumium");
|
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/omnitool_thaumium");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
|
|||||||
import gregtech.api.interfaces.tileentity.IEnergyConnected;
|
import gregtech.api.interfaces.tileentity.IEnergyConnected;
|
||||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||||
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
||||||
import gregtech.api.net.GTPacketBlockEvent;
|
import gregtech.common.data.GTBlockEventTracker;
|
||||||
import thaumcraft.api.ThaumcraftApiHelper;
|
import thaumcraft.api.ThaumcraftApiHelper;
|
||||||
import thaumcraft.api.aspects.Aspect;
|
import thaumcraft.api.aspects.Aspect;
|
||||||
import thaumcraft.api.aspects.AspectList;
|
import thaumcraft.api.aspects.AspectList;
|
||||||
@@ -56,12 +56,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
|||||||
public int storage;
|
public int storage;
|
||||||
public short mpshownstroage;
|
public short mpshownstroage;
|
||||||
public int maxstorage;
|
public int maxstorage;
|
||||||
public byte maxfuel;
|
public byte maxfuel = 64;
|
||||||
public byte fuel;
|
public byte fuel = 0;
|
||||||
public byte refuel;
|
// The amount to pull from jars (through the air like the runic matrix) when empty.
|
||||||
public long timer = 0L;
|
// Values above 1 do not work with essentia mirrors.
|
||||||
|
public byte refuel = 1;
|
||||||
|
// Used to make the generator sleep between failed attempts to draw essentia from nearby jars.
|
||||||
|
public int timer = 0;
|
||||||
|
// The number of ticks to wait after failing to draw essentia.
|
||||||
|
public final int refuelSleepTime = 40;
|
||||||
public boolean dead = true;
|
public boolean dead = true;
|
||||||
public byte color;
|
public byte color = -1;
|
||||||
private boolean side;
|
private boolean side;
|
||||||
|
|
||||||
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
|
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
|
||||||
@@ -94,18 +99,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
|||||||
public TileEntityBaseGenerator() {
|
public TileEntityBaseGenerator() {
|
||||||
this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage);
|
this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage);
|
||||||
this.maxstorage = ((int) this.energySource.getCapacity());
|
this.maxstorage = ((int) this.energySource.getCapacity());
|
||||||
this.maxfuel = 64;
|
|
||||||
this.fuel = 0;
|
|
||||||
this.refuel = 1;
|
|
||||||
this.color = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
this.side = !this.worldObj.isRemote;
|
this.side = !this.worldObj.isRemote;
|
||||||
this.dead = false;
|
this.dead = false;
|
||||||
this.timer += 1L;
|
this.timer--;
|
||||||
if (this.timer <= Long.MAX_VALUE - 1) this.timer = 0L;
|
if (this.timer <= Integer.MIN_VALUE + 1) this.timer = 0;
|
||||||
|
if (this.fuel + this.refuel > this.maxfuel) {
|
||||||
|
this.timer = refuelSleepTime;
|
||||||
|
}
|
||||||
storeFuel();
|
storeFuel();
|
||||||
fillfrompipe();
|
fillfrompipe();
|
||||||
createEnergy();
|
createEnergy();
|
||||||
@@ -113,64 +117,61 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void storeFuel() {
|
public void storeFuel() {
|
||||||
if (!side) return;
|
if (this.timer > 0 || !side) {
|
||||||
|
return;
|
||||||
if (this.fuel < this.maxfuel) {
|
}
|
||||||
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
|
boolean stored = false;
|
||||||
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
|
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
|
||||||
for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) {
|
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
|
||||||
TileEntity tile = this.worldObj.getTileEntity(x, y, z);
|
for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) {
|
||||||
if (tile instanceof IAspectSource) {
|
TileEntity tile = this.worldObj.getTileEntity(x, y, z);
|
||||||
IAspectSource as = (IAspectSource) tile;
|
if (tile instanceof IAspectSource as && as.takeFromContainer(this.aspect, this.refuel)) {
|
||||||
if ((as.doesContainerContainAmount(this.aspect, this.refuel))
|
PacketHandler.INSTANCE.sendToAllAround(
|
||||||
&& (as.takeFromContainer(this.aspect, this.refuel))) {
|
new PacketFXEssentiaSource(
|
||||||
PacketHandler.INSTANCE.sendToAllAround(
|
this.xCoord,
|
||||||
new PacketFXEssentiaSource(
|
this.yCoord,
|
||||||
this.xCoord,
|
this.zCoord,
|
||||||
this.yCoord,
|
(byte) (this.xCoord - x),
|
||||||
this.zCoord,
|
(byte) (this.yCoord - y),
|
||||||
(byte) (this.xCoord - x),
|
(byte) (this.zCoord - z),
|
||||||
(byte) (this.yCoord - y),
|
this.aspect.getColor()),
|
||||||
(byte) (this.zCoord - z),
|
new NetworkRegistry.TargetPoint(
|
||||||
this.aspect.getColor()),
|
getWorldObj().provider.dimensionId,
|
||||||
new NetworkRegistry.TargetPoint(
|
this.xCoord,
|
||||||
getWorldObj().provider.dimensionId,
|
this.yCoord,
|
||||||
this.xCoord,
|
this.zCoord,
|
||||||
this.yCoord,
|
32.0D));
|
||||||
this.zCoord,
|
addToContainer(this.aspect, this.refuel);
|
||||||
32.0D));
|
if (this.fuel + this.refuel > this.maxfuel) {
|
||||||
addToContainer(this.aspect, this.refuel);
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
stored = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!stored) {
|
||||||
|
this.timer = refuelSleepTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fillfrompipe() {
|
public void fillfrompipe() {
|
||||||
if (!side) return;
|
if (this.fuel >= this.maxfuel || !side) return;
|
||||||
|
|
||||||
if (this.fuel == this.maxfuel) return;
|
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
|
TileEntity pipeTE = ThaumcraftApiHelper
|
||||||
TileEntity[] te = new TileEntity[ForgeDirection.VALID_DIRECTIONS.length];
|
.getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, direction);
|
||||||
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
|
if (pipeTE != null) {
|
||||||
te[i] = ThaumcraftApiHelper.getConnectableTile(
|
IEssentiaTransport pipe = (IEssentiaTransport) pipeTE;
|
||||||
this.worldObj,
|
if (!pipe.canOutputTo(direction)) {
|
||||||
this.xCoord,
|
continue;
|
||||||
this.yCoord,
|
|
||||||
this.zCoord,
|
|
||||||
ForgeDirection.VALID_DIRECTIONS[i]);
|
|
||||||
if (te[i] != null) {
|
|
||||||
IEssentiaTransport pipe = (IEssentiaTransport) te[i];
|
|
||||||
if (!pipe.canOutputTo(ForgeDirection.VALID_DIRECTIONS[i])) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if ((pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]) != null)
|
if ((pipe.getEssentiaType(direction) != null) && (pipe.getEssentiaType(direction).equals(this.aspect))
|
||||||
&& (pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]).equals(this.aspect))
|
&& (pipe.getSuctionAmount(direction) < getSuctionAmount(direction))) {
|
||||||
&& (pipe.getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i])
|
addToContainer(this.aspect, pipe.takeEssentia(this.aspect, 1, direction));
|
||||||
< getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]))) {
|
if (this.fuel >= this.maxfuel) {
|
||||||
addToContainer(this.aspect, pipe.takeEssentia(this.aspect, 1, ForgeDirection.VALID_DIRECTIONS[i]));
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -510,11 +511,6 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
|||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||||
return 0L;
|
return 0L;
|
||||||
@@ -700,17 +696,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte getMetaID(int aX, int aY, int aZ) {
|
public int getMetaID(int aX, int aY, int aZ) {
|
||||||
return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ);
|
return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte getMetaIDOffset(int aX, int aY, int aZ) {
|
public int getMetaIDOffset(int aX, int aY, int aZ) {
|
||||||
return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
|
return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte getMetaIDAtSide(ForgeDirection side) {
|
public int getMetaIDAtSide(ForgeDirection side) {
|
||||||
int tX = getOffsetX(side, 1);
|
int tX = getOffsetX(side, 1);
|
||||||
int tY = getOffsetY(side, 1);
|
int tY = getOffsetY(side, 1);
|
||||||
int tZ = getOffsetZ(side, 1);
|
int tZ = getOffsetZ(side, 1);
|
||||||
@@ -718,7 +714,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
public int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||||
if (aDistance == 1) {
|
if (aDistance == 1) {
|
||||||
return getMetaIDAtSide(side);
|
return getMetaIDAtSide(side);
|
||||||
}
|
}
|
||||||
@@ -843,11 +839,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendBlockEvent(byte aID, byte aValue) {
|
public void sendBlockEvent(byte aID, byte aValue) {
|
||||||
GTValues.NW.sendPacketToAllPlayersInRange(
|
GTBlockEventTracker.enqueue(worldObj, xCoord, yCoord, zCoord, aID, aValue);
|
||||||
this.worldObj,
|
|
||||||
new GTPacketBlockEvent(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
|
||||||
this.xCoord,
|
|
||||||
this.zCoord);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
|
|||||||
import gregtech.api.interfaces.tileentity.IEnergyConnected;
|
import gregtech.api.interfaces.tileentity.IEnergyConnected;
|
||||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||||
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
||||||
import gregtech.api.net.GTPacketBlockEvent;
|
import gregtech.common.data.GTBlockEventTracker;
|
||||||
import ic2.api.tile.IWrenchable;
|
import ic2.api.tile.IWrenchable;
|
||||||
import thaumcraft.api.aspects.Aspect;
|
import thaumcraft.api.aspects.Aspect;
|
||||||
import thaumcraft.api.visnet.VisNetHandler;
|
import thaumcraft.api.visnet.VisNetHandler;
|
||||||
@@ -162,9 +162,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
|||||||
case AQUA: {
|
case AQUA: {
|
||||||
if (worldObj.isThundering()) return 6F;
|
if (worldObj.isThundering()) return 6F;
|
||||||
else if (worldObj.isRaining()) return 3F;
|
else if (worldObj.isRaining()) return 3F;
|
||||||
else if (!worldObj.isThundering() && !worldObj.isRaining()
|
else if (worldObj.getBlock(xCoord, yCoord + 1, zCoord).equals(Blocks.water)) return 2F;
|
||||||
&& worldObj.getBlock(xCoord, yCoord + 1, zCoord).equals(Blocks.water))
|
|
||||||
return 2F;
|
|
||||||
else return 1F;
|
else return 1F;
|
||||||
}
|
}
|
||||||
case IGNIS: {
|
case IGNIS: {
|
||||||
@@ -193,7 +191,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
|||||||
this.isActive = true;
|
this.isActive = true;
|
||||||
if (side) {
|
if (side) {
|
||||||
this.generating = output * calc_multi();
|
this.generating = output * calc_multi();
|
||||||
this.energySource.addEnergy(this.output * calc_multi());
|
this.energySource.addEnergy(this.generating);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
isActive = false;
|
isActive = false;
|
||||||
@@ -713,17 +711,17 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte getMetaID(int aX, int aY, int aZ) {
|
public int getMetaID(int aX, int aY, int aZ) {
|
||||||
return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ);
|
return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte getMetaIDOffset(int aX, int aY, int aZ) {
|
public int getMetaIDOffset(int aX, int aY, int aZ) {
|
||||||
return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
|
return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte getMetaIDAtSide(ForgeDirection side) {
|
public int getMetaIDAtSide(ForgeDirection side) {
|
||||||
int tX = getOffsetX(side, 1);
|
int tX = getOffsetX(side, 1);
|
||||||
int tY = getOffsetY(side, 1);
|
int tY = getOffsetY(side, 1);
|
||||||
int tZ = getOffsetZ(side, 1);
|
int tZ = getOffsetZ(side, 1);
|
||||||
@@ -731,7 +729,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
public int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||||
if (aDistance == 1) {
|
if (aDistance == 1) {
|
||||||
return getMetaIDAtSide(side);
|
return getMetaIDAtSide(side);
|
||||||
}
|
}
|
||||||
@@ -856,11 +854,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendBlockEvent(byte aID, byte aValue) {
|
public void sendBlockEvent(byte aID, byte aValue) {
|
||||||
GTValues.NW.sendPacketToAllPlayersInRange(
|
GTBlockEventTracker.enqueue(this.worldObj, this.xCoord, this.yCoord, this.zCoord, aID, aValue);
|
||||||
this.worldObj,
|
|
||||||
new GTPacketBlockEvent(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
|
||||||
this.xCoord,
|
|
||||||
this.zCoord);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -17,13 +17,5 @@ public class EMTDungeonChestGenerator {
|
|||||||
1,
|
1,
|
||||||
EMTConfigHandler.chanceTaintedMjolnir));
|
EMTConfigHandler.chanceTaintedMjolnir));
|
||||||
}
|
}
|
||||||
if (!EMTConfigHandler.oneRingSpawn) {
|
|
||||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(
|
|
||||||
new WeightedRandomChestContent(
|
|
||||||
new ItemStack(EMTItems.onering),
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
EMTConfigHandler.chanceOneRing));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,11 @@ import thaumcraft.common.entities.monster.EntityTaintChicken;
|
|||||||
|
|
||||||
public class EMTEventHandler {
|
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
|
@SubscribeEvent
|
||||||
public void onLivingHurt(LivingHurtEvent e) {
|
public void onLivingHurt(LivingHurtEvent e) {
|
||||||
if (!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall) return;
|
if (!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall) return;
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ gui.EMT.book.aspect.output.eu.title=Essentia Ausgabe Buch
|
|||||||
gui.EMT.book.aspect.output.essentia.eu=EU Leistung per Essentia
|
gui.EMT.book.aspect.output.essentia.eu=EU Leistung per Essentia
|
||||||
gui.EMT.key.unequip=Ausziehen
|
gui.EMT.key.unequip=Ausziehen
|
||||||
emt.Output=Ausgabe:
|
emt.Output=Ausgabe:
|
||||||
emt.Storage=Speicher:
|
emt.Storage=Speicher:
|
||||||
emt.PressShift=<Drücke SHIFT>
|
emt.PressShift=<Drücke SHIFT>
|
||||||
emt.Generating=Erzeugt:
|
emt.Generating=Erzeugt:
|
||||||
emt.Fuel=Brennstoff
|
emt.Fuel=Brennstoff
|
||||||
|
|
||||||
#=============Tooltips=============
|
#=============Tooltips=============
|
||||||
@@ -100,6 +100,9 @@ item.EMT.focus.charge.name=Stab Fokus: Aufladung
|
|||||||
item.EMT.focus.chargeWand.name=Stab Fokus: Stabs Aufladung
|
item.EMT.focus.chargeWand.name=Stab Fokus: Stabs Aufladung
|
||||||
item.EMT.focus.electricCloud.name=Electrische Wolke
|
item.EMT.focus.electricCloud.name=Electrische Wolke
|
||||||
item.EMT.focus.energyBall.name=Energie Ball Fokus
|
item.EMT.focus.energyBall.name=Energie Ball Fokus
|
||||||
|
item.EMT.focus.EU.cost.info=EU pro Zauber
|
||||||
|
item.EMT.focus.EU.cost.once= §r%s §eEU§0
|
||||||
|
item.EMT.focus.EU.cost.tick= §r%s §eEU/t§0
|
||||||
|
|
||||||
#=============Block Names=============
|
#=============Block Names=============
|
||||||
tile.EMT.electricCloud.name=Electrische Wolke
|
tile.EMT.electricCloud.name=Electrische Wolke
|
||||||
|
|||||||
@@ -109,6 +109,9 @@ item.EMT.focus.chargeWand.name=Wand Focus: Wand Charging
|
|||||||
item.EMT.focus.maintenance.name=Wand Focus: Maintenance
|
item.EMT.focus.maintenance.name=Wand Focus: Maintenance
|
||||||
item.EMT.focus.electricCloud.name=Electric Cloud
|
item.EMT.focus.electricCloud.name=Electric Cloud
|
||||||
item.EMT.focus.energyBall.name=Energy Ball Focus
|
item.EMT.focus.energyBall.name=Energy Ball Focus
|
||||||
|
item.EMT.focus.EU.cost.info=EU per cast
|
||||||
|
item.EMT.focus.EU.cost.once= §r%s §eEU§0
|
||||||
|
item.EMT.focus.EU.cost.tick= §r%s §eEU/t§0
|
||||||
|
|
||||||
#=============Block Names=============
|
#=============Block Names=============
|
||||||
tile.EMT.electricCloud.name=Electric Cloud
|
tile.EMT.electricCloud.name=Electric Cloud
|
||||||
|
|||||||
@@ -102,6 +102,9 @@ item.EMT.focus.chargeWand.name=Набалдашник: Зарядка жезла
|
|||||||
item.EMT.focus.maintenance.name=Набалдашник: Обслуживание
|
item.EMT.focus.maintenance.name=Набалдашник: Обслуживание
|
||||||
item.EMT.focus.electricCloud.name=Электризованное облако
|
item.EMT.focus.electricCloud.name=Электризованное облако
|
||||||
item.EMT.focus.energyBall.name=Набалдашник: Наэлектризованное облако
|
item.EMT.focus.energyBall.name=Набалдашник: Наэлектризованное облако
|
||||||
|
item.EMT.focus.EU.cost.info=EU за использование
|
||||||
|
item.EMT.focus.EU.cost.once= §r%s §eEU§0
|
||||||
|
item.EMT.focus.EU.cost.tick= §r%s §eEU/тик§0
|
||||||
|
|
||||||
#=============Block Names=============
|
#=============Block Names=============
|
||||||
tile.EMT.electricCloud.name=Наэлектризованное облако
|
tile.EMT.electricCloud.name=Наэлектризованное облако
|
||||||
|
|||||||
@@ -102,6 +102,9 @@ item.EMT.focus.charge.name=法杖核心:充电
|
|||||||
item.EMT.focus.chargeWand.name=法杖核心:化魔
|
item.EMT.focus.chargeWand.name=法杖核心:化魔
|
||||||
item.EMT.focus.electricCloud.name=雷云之光
|
item.EMT.focus.electricCloud.name=雷云之光
|
||||||
item.EMT.focus.energyBall.name=法杖核心:能量球
|
item.EMT.focus.energyBall.name=法杖核心:能量球
|
||||||
|
item.EMT.focus.EU.cost.info=EU/每次施法
|
||||||
|
item.EMT.focus.EU.cost.once= §r%s §eEU§0
|
||||||
|
item.EMT.focus.EU.cost.tick= §r%s §eEU/t§0
|
||||||
|
|
||||||
#=============Block Names=============
|
#=============Block Names=============
|
||||||
tile.EMT.electricCloud.name=雷云之光
|
tile.EMT.electricCloud.name=雷云之光
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"maintenance.MaintenanceWandFocus": {
|
||||||
|
"category": "block",
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "MaintenanceWandFocus",
|
||||||
|
"stream": false,
|
||||||
|
"licensing": {
|
||||||
|
"author_name": "Kynake",
|
||||||
|
"license_url": "https://creativecommons.org/licenses/by-sa/4.0/",
|
||||||
|
"license_name": "Attribution-ShareAlike 4.0",
|
||||||
|
"original_sound_urls": [
|
||||||
|
"https://freesound.org/people/tgerginov/sounds/671175/",
|
||||||
|
"https://opengameart.org/content/68-workshop-sounds"
|
||||||
|
],
|
||||||
|
"original_sound_names": [
|
||||||
|
"671175__tgerginov__magic.wav",
|
||||||
|
"workshop - ratchet2.wav"
|
||||||
|
],
|
||||||
|
"original_author_urls": [
|
||||||
|
"https://freesound.org/people/tgerginov/",
|
||||||
|
"https://opengameart.org/users/bart"
|
||||||
|
],
|
||||||
|
"original_author_names": [
|
||||||
|
"tgerginov",
|
||||||
|
"bart"
|
||||||
|
],
|
||||||
|
"original_license_url": "https://creativecommons.org/publicdomain/zero/1.0/",
|
||||||
|
"original_license_name": "CC0 1.0 Universal"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Reference in new issue
Block a user