mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 23:03:16 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3456ce64d7 | ||
|
|
f3ccdb450d | ||
|
|
6df81d82d1 | ||
|
|
83733212fb | ||
|
|
721c5c6aca | ||
|
|
501cca5fd2 | ||
|
|
7ec71bdcc9 | ||
|
|
c450204272 | ||
|
|
58c206501b | ||
|
|
e7aaf791ad | ||
|
|
ab52ffb5df | ||
|
|
7eabde56d9 | ||
|
|
6d8ec1365a | ||
|
|
732ccd3b45 | ||
|
|
b16109fd9d | ||
|
|
1087b3dda0 | ||
|
|
9f6aac9db0 | ||
|
|
b4f208eca7 | ||
|
|
f26bd2c290 | ||
|
|
6fea13084d | ||
|
|
5074d8ba1d | ||
|
|
74d1aced60 |
No files matched your search
+6
-2
@@ -1,9 +1,13 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.45.130:dev'
|
compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.51.40:dev'
|
||||||
api 'com.github.GTNewHorizons:Baubles:1.0.4:dev'
|
api 'com.github.GTNewHorizons:Baubles:1.0.4:dev'
|
||||||
api 'com.github.GTNewHorizons:ModularUI:1.1.42:dev'
|
api 'com.github.GTNewHorizons:ModularUI:1.2.17:dev'
|
||||||
|
api ('com.github.GTNewHorizons:ThaumicBoots:1.4.2:dev'){
|
||||||
|
exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
api 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
api 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
||||||
api 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
|
api 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
|
||||||
|
|||||||
+12
-1
@@ -85,6 +85,11 @@ accessTransformersFile =
|
|||||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||||
usesMixins = false
|
usesMixins = false
|
||||||
|
|
||||||
|
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
|
||||||
|
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
|
||||||
|
# Mixin classes will have access to "main" classes, but not the other way around.
|
||||||
|
separateMixinSourceSet =
|
||||||
|
|
||||||
# Adds some debug arguments like verbose output and class export.
|
# Adds some debug arguments like verbose output and class export.
|
||||||
usesMixinDebug = false
|
usesMixinDebug = false
|
||||||
|
|
||||||
@@ -117,9 +122,15 @@ minimizeShadowedDependencies = true
|
|||||||
# If disabled, won't rename the shadowed classes.
|
# If disabled, won't rename the shadowed classes.
|
||||||
relocateShadowedDependencies = true
|
relocateShadowedDependencies = true
|
||||||
|
|
||||||
# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories.
|
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||||
includeWellKnownRepositories = true
|
includeWellKnownRepositories = true
|
||||||
|
|
||||||
|
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
|
||||||
|
# list of strings, with the acceptable keys being(case does not matter):
|
||||||
|
# cursemaven
|
||||||
|
# modrinth
|
||||||
|
excludeWellKnownRepositories =
|
||||||
|
|
||||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||||
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
||||||
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||||
|
|||||||
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.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@@ -55,7 +57,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -84,7 +86,8 @@ 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 "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$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
|
||||||
|
|||||||
Vendored
+2
@@ -13,6 +13,8 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.19'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -7,6 +7,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.SidedProxy;
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
@@ -20,7 +21,6 @@ import emt.command.CommandOutputs;
|
|||||||
import emt.init.EMTEntities;
|
import emt.init.EMTEntities;
|
||||||
import emt.init.Registry;
|
import emt.init.Registry;
|
||||||
import emt.network.PacketEMTKeys;
|
import emt.network.PacketEMTKeys;
|
||||||
import emt.network.PacketNodeInfo;
|
|
||||||
import emt.proxy.CommonProxy;
|
import emt.proxy.CommonProxy;
|
||||||
import emt.tile.solar.Solars;
|
import emt.tile.solar.Solars;
|
||||||
import emt.util.EMTClientEventHandler;
|
import emt.util.EMTClientEventHandler;
|
||||||
@@ -65,12 +65,18 @@ public class EMT {
|
|||||||
@Mod.Instance("EMT")
|
@Mod.Instance("EMT")
|
||||||
public static EMT instance;
|
public static EMT instance;
|
||||||
|
|
||||||
|
public static boolean isBootsActive = false;
|
||||||
|
public static final String BOOTS = "thaumicboots";
|
||||||
|
|
||||||
public boolean isSimulating() {
|
public boolean isSimulating() {
|
||||||
return !FMLCommonHandler.instance().getEffectiveSide().isClient();
|
return !FMLCommonHandler.instance().getEffectiveSide().isClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event) {
|
public void preInit(FMLPreInitializationEvent event) {
|
||||||
|
if (Loader.isModLoaded(BOOTS)) {
|
||||||
|
isBootsActive = true;
|
||||||
|
}
|
||||||
EMTConfigHandler.init(event.getSuggestedConfigurationFile());
|
EMTConfigHandler.init(event.getSuggestedConfigurationFile());
|
||||||
FMLCommonHandler.instance().bus().register(new EMTEventHandler());
|
FMLCommonHandler.instance().bus().register(new EMTEventHandler());
|
||||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||||
@@ -108,8 +114,5 @@ public class EMT {
|
|||||||
|
|
||||||
public void registerPackets() {
|
public void registerPackets() {
|
||||||
INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER);
|
INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER);
|
||||||
if (Registry.enableGTCompat) {
|
|
||||||
INSTANCE.registerMessage(PacketNodeInfo.class, PacketNodeInfo.class, 1, Side.CLIENT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class ModelSpecialArmor extends ModelBiped {
|
public class ModelSpecialArmor extends ModelBiped {
|
||||||
|
|
||||||
|
private static ModelSpecialArmor instance;
|
||||||
|
|
||||||
public ModelRenderer rightWing;
|
public ModelRenderer rightWing;
|
||||||
public ModelRenderer leftWing;
|
public ModelRenderer leftWing;
|
||||||
public ModelRenderer center;
|
public ModelRenderer center;
|
||||||
@@ -30,41 +32,43 @@ public class ModelSpecialArmor extends ModelBiped {
|
|||||||
public ModelSpecialArmor(float scale, float offset, int type) {
|
public ModelSpecialArmor(float scale, float offset, int type) {
|
||||||
super(scale, offset, type == 1 ? 128 : 64, type == 0 ? 32 : type == 1 ? 96 : 64);
|
super(scale, offset, type == 1 ? 128 : 64, type == 0 ? 32 : type == 1 ? 96 : 64);
|
||||||
this.type = type;
|
this.type = type;
|
||||||
switch (this.type) {
|
|
||||||
case 1:
|
|
||||||
this.textureWidth = 128;
|
|
||||||
this.textureHeight = 96;
|
|
||||||
this.jetpack = new ModelRenderer(this, 16, 69);
|
|
||||||
this.jetpack.setTextureSize(64, 48);
|
|
||||||
this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, scale * 2);
|
|
||||||
this.jetpack.setRotationPoint(0.0F, 0.0F + offset, 0.0F);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
this.textureWidth = 128;
|
||||||
this.textureWidth = 64;
|
this.textureHeight = 96;
|
||||||
this.textureHeight = 64;
|
this.jetpack = new ModelRenderer(this, 16, 69);
|
||||||
rightWing = new ModelRenderer(this, 24, 0 + 32);
|
this.jetpack.setTextureSize(64, 48);
|
||||||
rightWing.addBox(-11F, -1F, 0F, 11, 13, 1);
|
this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, scale * 2);
|
||||||
rightWing.setRotationPoint(-2F, 0F, 3F);
|
this.jetpack.setRotationPoint(0.0F, 0.0F + offset, 0.0F);
|
||||||
rightWing.setTextureSize(64, 32);
|
|
||||||
rightWing.mirror = false;
|
|
||||||
setRotation(rightWing, 0F, 0.1570796F, 0F);
|
|
||||||
|
|
||||||
leftWing = new ModelRenderer(this, 0, 0 + 32);
|
this.textureWidth = 64;
|
||||||
leftWing.addBox(0F, -1F, 0F, 11, 13, 1);
|
this.textureHeight = 64;
|
||||||
leftWing.setRotationPoint(2F, 0F, 3F);
|
rightWing = new ModelRenderer(this, 24, 0 + 32);
|
||||||
leftWing.setTextureSize(64, 32);
|
rightWing.addBox(-11F, -1F, 0F, 11, 13, 1);
|
||||||
leftWing.mirror = true;
|
rightWing.setRotationPoint(-2F, 0F, 3F);
|
||||||
setRotation(leftWing, 0F, -0.1570796F, 0F);
|
rightWing.setTextureSize(64, 32);
|
||||||
|
rightWing.mirror = false;
|
||||||
|
setRotation(rightWing, 0F, 0.1570796F, 0F);
|
||||||
|
|
||||||
center = new ModelRenderer(this, 0, 14 + 32);
|
leftWing = new ModelRenderer(this, 0, 0 + 32);
|
||||||
center.addBox(0F, 0F, 1F, 8, 14, 1);
|
leftWing.addBox(0F, -1F, 0F, 11, 13, 1);
|
||||||
center.setRotationPoint(-4F, 0F, 3F);
|
leftWing.setRotationPoint(2F, 0F, 3F);
|
||||||
center.setTextureSize(64, 32);
|
leftWing.setTextureSize(64, 32);
|
||||||
center.mirror = true;
|
leftWing.mirror = true;
|
||||||
setRotation(center, 0F, 0F, 0F);
|
setRotation(leftWing, 0F, -0.1570796F, 0F);
|
||||||
break;
|
|
||||||
}
|
center = new ModelRenderer(this, 0, 14 + 32);
|
||||||
|
center.addBox(0F, 0F, 1F, 8, 14, 1);
|
||||||
|
center.setRotationPoint(-4F, 0F, 3F);
|
||||||
|
center.setTextureSize(64, 32);
|
||||||
|
center.mirror = true;
|
||||||
|
setRotation(center, 0F, 0F, 0F);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ModelSpecialArmor getInstance() {
|
||||||
|
if (instance == null) instance = new ModelSpecialArmor();
|
||||||
|
|
||||||
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||||
@@ -96,6 +100,7 @@ public class ModelSpecialArmor extends ModelBiped {
|
|||||||
this.center.render(scale);
|
this.center.render(scale);
|
||||||
this.leftWing.render(scale);
|
this.leftWing.render(scale);
|
||||||
this.rightWing.render(scale);
|
this.rightWing.render(scale);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,6 +110,9 @@ public class ModelSpecialArmor extends ModelBiped {
|
|||||||
if (this.isJumping) {
|
if (this.isJumping) {
|
||||||
this.rightWing.rotateAngleY = 0.5f;
|
this.rightWing.rotateAngleY = 0.5f;
|
||||||
this.leftWing.rotateAngleY = -0.5f;
|
this.leftWing.rotateAngleY = -0.5f;
|
||||||
|
} else {
|
||||||
|
this.rightWing.rotateAngleY = 0.1570796F;
|
||||||
|
this.leftWing.rotateAngleY = -0.1570796F;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isSneak) {
|
if (this.isSneak) {
|
||||||
@@ -113,14 +121,22 @@ public class ModelSpecialArmor extends ModelBiped {
|
|||||||
this.jetpack.rotateAngleX = 0.5F;
|
this.jetpack.rotateAngleX = 0.5F;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.center.offsetY -= 0.1;
|
|
||||||
this.rightWing.offsetY -= 0.1;
|
|
||||||
this.leftWing.offsetY -= 0.1;
|
|
||||||
this.center.rotateAngleX = 0.5F;
|
this.center.rotateAngleX = 0.5F;
|
||||||
this.rightWing.rotateAngleX = 0.5F;
|
this.rightWing.rotateAngleX = 0.5F;
|
||||||
this.leftWing.rotateAngleX = 0.5F;
|
this.leftWing.rotateAngleX = 0.5F;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
switch (this.type) {
|
||||||
|
case 1:
|
||||||
|
this.jetpack.rotateAngleX = 0F;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
this.center.rotateAngleX = 0F;
|
||||||
|
this.rightWing.rotateAngleX = 0F;
|
||||||
|
this.leftWing.rotateAngleX = 0F;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,8 +4,14 @@ import net.minecraft.client.model.ModelBiped;
|
|||||||
import net.minecraft.client.model.ModelRenderer;
|
import net.minecraft.client.model.ModelRenderer;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class ModelWings extends ModelBiped {
|
public class ModelWings extends ModelBiped {
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
private static ModelWings instance = null;
|
||||||
|
|
||||||
public boolean isJumping = false;
|
public boolean isJumping = false;
|
||||||
ModelRenderer rightWing;
|
ModelRenderer rightWing;
|
||||||
ModelRenderer leftWing;
|
ModelRenderer leftWing;
|
||||||
@@ -41,6 +47,12 @@ public class ModelWings extends ModelBiped {
|
|||||||
this.bipedBody.addChild(center);
|
this.bipedBody.addChild(center);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ModelWings getInstance() {
|
||||||
|
if (instance == null) instance = new ModelWings();
|
||||||
|
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||||
@@ -55,20 +67,25 @@ public class ModelWings extends ModelBiped {
|
|||||||
model.rotateAngleZ = z;
|
model.rotateAngleZ = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRotationAngles(float f, float f1, float pt, float f3, float f4, float f5, Entity entity) {
|
public void setRotationAngles(float limbSwing, float limbSwingAmount, float playerTicksExisted,
|
||||||
|
float playerRotationYawHead, float playerRotationPitch, float f5, Entity entity) {
|
||||||
|
|
||||||
if (isJumping) {
|
if (isJumping) {
|
||||||
this.rightWing.rotateAngleY = 0.5f;
|
this.rightWing.rotateAngleY = 0.5f;
|
||||||
this.leftWing.rotateAngleY = -0.5f;
|
this.leftWing.rotateAngleY = -0.5f;
|
||||||
|
} else {
|
||||||
|
this.rightWing.rotateAngleY = 0.1570796F;
|
||||||
|
this.leftWing.rotateAngleY = -0.1570796F;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.isSneaking()) {
|
if (entity.isSneaking()) {
|
||||||
this.center.offsetY -= 0.1;
|
|
||||||
this.rightWing.offsetY -= 0.1;
|
|
||||||
this.leftWing.offsetY -= 0.1;
|
|
||||||
this.center.rotateAngleX = 0.5F;
|
this.center.rotateAngleX = 0.5F;
|
||||||
this.rightWing.rotateAngleX = 0.5F;
|
this.rightWing.rotateAngleX = 0.5F;
|
||||||
this.leftWing.rotateAngleX = 0.5F;
|
this.leftWing.rotateAngleX = 0.5F;
|
||||||
|
} else {
|
||||||
|
this.center.rotateAngleX = 0.0F;
|
||||||
|
this.rightWing.rotateAngleX = 0;
|
||||||
|
this.leftWing.rotateAngleX = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,37 +2,26 @@ package emt.gthandler.common.loader;
|
|||||||
|
|
||||||
import static emt.command.CommandOutputs.mkbook;
|
import static emt.command.CommandOutputs.mkbook;
|
||||||
import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
|
import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
|
||||||
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
|
import static gregtech.api.util.GTRecipeBuilder.SECONDS;
|
||||||
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import emt.tile.GT_MetaTileEntity_ResearchCompleter;
|
import gregtech.api.enums.GTValues;
|
||||||
import emt.util.EMTConfigHandler;
|
|
||||||
import gregtech.api.enums.GT_Values;
|
|
||||||
import gregtech.api.enums.Materials;
|
import gregtech.api.enums.Materials;
|
||||||
import gregtech.api.enums.OrePrefixes;
|
import gregtech.api.enums.OrePrefixes;
|
||||||
import gregtech.api.enums.TierEU;
|
import gregtech.api.enums.TierEU;
|
||||||
import gregtech.api.util.GT_OreDictUnificator;
|
import gregtech.api.util.GTOreDictUnificator;
|
||||||
import thaumcraft.common.config.ConfigItems;
|
import thaumcraft.common.config.ConfigItems;
|
||||||
|
|
||||||
public class EMT_GT_Loader {
|
public class EMT_GT_Loader {
|
||||||
|
|
||||||
public static ItemStack ResearchMultiblock;
|
|
||||||
|
|
||||||
public static void run() {
|
|
||||||
ResearchMultiblock = new GT_MetaTileEntity_ResearchCompleter(
|
|
||||||
EMTConfigHandler.aIDoffset + GT_Values.VN.length + 2,
|
|
||||||
"Research Completer",
|
|
||||||
"Research Completer").getStackForm(1L);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void runlate() {
|
public static void runlate() {
|
||||||
GT_Values.RA.stdBuilder()
|
GTValues.RA.stdBuilder()
|
||||||
.itemInputs(
|
.itemInputs(
|
||||||
new ItemStack(Items.book),
|
new ItemStack(Items.book),
|
||||||
GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L),
|
GTOreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import net.minecraft.item.crafting.IRecipe;
|
|||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import emt.EMT;
|
import emt.EMT;
|
||||||
import emt.util.EMTConfigHandler;
|
import emt.util.EMTConfigHandler;
|
||||||
@@ -102,8 +103,6 @@ public class EMTRecipes {
|
|||||||
public static ShapedArcaneRecipe electricScribingTools;
|
public static ShapedArcaneRecipe electricScribingTools;
|
||||||
public static ShapedArcaneRecipe thaumiumWing;
|
public static ShapedArcaneRecipe thaumiumWing;
|
||||||
public static ShapedArcaneRecipe thaumiumWings;
|
public static ShapedArcaneRecipe thaumiumWings;
|
||||||
public static ShapedArcaneRecipe researchCompleter;
|
|
||||||
public static ShapedArcaneRecipe magicalMachineCasing;
|
|
||||||
public static CrucibleRecipe ignisGenerator;
|
public static CrucibleRecipe ignisGenerator;
|
||||||
public static CrucibleRecipe auramGenerator;
|
public static CrucibleRecipe auramGenerator;
|
||||||
public static CrucibleRecipe arborGenerator;
|
public static CrucibleRecipe arborGenerator;
|
||||||
@@ -929,18 +928,6 @@ public class EMTRecipes {
|
|||||||
'X',
|
'X',
|
||||||
new ItemStack(EMTItems.itemEMTItems, 1, 14));
|
new ItemStack(EMTItems.itemEMTItems, 1, 14));
|
||||||
|
|
||||||
// magicalMachineCasing = addArcaneCraftingRecipe("ResearchCompleter", new
|
|
||||||
// ItemStack(GregTech_API.sBlockCasings8, 1, 6), EMTCraftingAspects.magicalMachineCasing, "XYX", "XZX", "XYX",
|
|
||||||
// 'X', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1), 'Y', new
|
|
||||||
// ItemStack(ConfigItems.itemResource, 1, 14) , 'Z', GT_OreDictUnificator.get(OrePrefixes.frameGt,
|
|
||||||
// Materials.Thaumium, 1));
|
|
||||||
|
|
||||||
// researchCompleter = addArcaneCraftingRecipe("ResearchCompleter", new ItemStack(GregTech_API.sBlockMachines,
|
|
||||||
// 1, 13001), EMTCraftingAspects.researchCompleter, "XYX", "YZY", "XAX", 'X',
|
|
||||||
// GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 1L), 'Y', new
|
|
||||||
// ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 2), 'Z', new ItemStack(GregTech_API.sBlockCasings8, 1, 6),
|
|
||||||
// 'A', new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5));
|
|
||||||
|
|
||||||
if (Registry.enableGTCompat) {
|
if (Registry.enableGTCompat) {
|
||||||
/** Crucible Recipes **/
|
/** Crucible Recipes **/
|
||||||
ignisGenerator = addCrucibleRecipe(
|
ignisGenerator = addCrucibleRecipe(
|
||||||
@@ -1091,54 +1078,58 @@ public class EMTRecipes {
|
|||||||
|
|
||||||
/** IC2 Stuff related recipes **/
|
/** IC2 Stuff related recipes **/
|
||||||
|
|
||||||
/* Ore Clusters Macerator Recipes */
|
final boolean isDreamcraftNotLoaded = !Loader.isModLoaded("dreamcraft");
|
||||||
ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy();
|
|
||||||
ironClusterRecipe.stackSize = 22;
|
|
||||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
|
||||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)),
|
|
||||||
null,
|
|
||||||
true,
|
|
||||||
ironClusterRecipe);
|
|
||||||
|
|
||||||
ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy();
|
if (isDreamcraftNotLoaded) {
|
||||||
goldClusterRecipe.stackSize = 22;
|
/* Ore Clusters Macerator Recipes */
|
||||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy();
|
||||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)),
|
ironClusterRecipe.stackSize = 22;
|
||||||
null,
|
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||||
true,
|
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)),
|
||||||
goldClusterRecipe);
|
null,
|
||||||
|
true,
|
||||||
|
ironClusterRecipe);
|
||||||
|
|
||||||
ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy();
|
ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy();
|
||||||
copperClusterRecipe.stackSize = 22;
|
goldClusterRecipe.stackSize = 22;
|
||||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)),
|
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)),
|
||||||
null,
|
null,
|
||||||
true,
|
true,
|
||||||
copperClusterRecipe);
|
goldClusterRecipe);
|
||||||
|
|
||||||
ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy();
|
ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy();
|
||||||
tinClusterRecipe.stackSize = 22;
|
copperClusterRecipe.stackSize = 22;
|
||||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)),
|
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)),
|
||||||
null,
|
null,
|
||||||
true,
|
true,
|
||||||
tinClusterRecipe);
|
copperClusterRecipe);
|
||||||
|
|
||||||
ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy();
|
ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy();
|
||||||
silverClusterRecipe.stackSize = 22;
|
tinClusterRecipe.stackSize = 22;
|
||||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)),
|
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)),
|
||||||
null,
|
null,
|
||||||
true,
|
true,
|
||||||
silverClusterRecipe);
|
tinClusterRecipe);
|
||||||
|
|
||||||
ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy();
|
ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy();
|
||||||
leadClusterRecipe.stackSize = 22;
|
silverClusterRecipe.stackSize = 22;
|
||||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)),
|
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)),
|
||||||
null,
|
null,
|
||||||
true,
|
true,
|
||||||
leadClusterRecipe);
|
silverClusterRecipe);
|
||||||
|
|
||||||
|
ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy();
|
||||||
|
leadClusterRecipe.stackSize = 22;
|
||||||
|
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||||
|
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)),
|
||||||
|
null,
|
||||||
|
true,
|
||||||
|
leadClusterRecipe);
|
||||||
|
}
|
||||||
|
|
||||||
/* Thaumium Plates Recipes */
|
/* Thaumium Plates Recipes */
|
||||||
thaumiumPlate = GameRegistry.addShapedRecipe(
|
thaumiumPlate = GameRegistry.addShapedRecipe(
|
||||||
@@ -1152,76 +1143,79 @@ public class EMTRecipes {
|
|||||||
new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE),
|
new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE),
|
||||||
'Z',
|
'Z',
|
||||||
new ItemStack(Blocks.obsidian));
|
new ItemStack(Blocks.obsidian));
|
||||||
Recipes.metalformerRolling.addRecipe(
|
|
||||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)),
|
|
||||||
null,
|
|
||||||
new ItemStack(EMTItems.itemEMTItems, 1, 5));
|
|
||||||
|
|
||||||
/* Ore Processing for Amber and Cinnabar */
|
if (isDreamcraftNotLoaded) {
|
||||||
if (EMTConfigHandler.removeAmberAndCinnabarMacerating) {
|
Recipes.metalformerRolling.addRecipe(
|
||||||
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
|
new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)),
|
||||||
IRecipeInput input = it.next();
|
null,
|
||||||
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) {
|
new ItemStack(EMTItems.itemEMTItems, 1, 5));
|
||||||
it.remove();
|
|
||||||
EMT.LOGGER.info("Removing conflicting amber macerating recipe(s)");
|
/* Ore Processing for Amber and Cinnabar */
|
||||||
|
if (EMTConfigHandler.removeAmberAndCinnabarMacerating) {
|
||||||
|
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
|
||||||
|
IRecipeInput input = it.next();
|
||||||
|
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) {
|
||||||
|
it.remove();
|
||||||
|
EMT.LOGGER.info("Removing conflicting amber macerating recipe(s)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
|
||||||
|
IRecipeInput input = it.next();
|
||||||
|
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) {
|
||||||
|
it.remove();
|
||||||
|
EMT.LOGGER.info("Removing Conflicting cinnabar macerating recipe(s)");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ItemStack crushedAmberRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 1);
|
||||||
|
crushedAmberRecipe.stackSize = 2;
|
||||||
|
Recipes.macerator.addRecipe(
|
||||||
|
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)),
|
||||||
|
null,
|
||||||
|
crushedAmberRecipe);
|
||||||
|
|
||||||
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
|
ItemStack crushedCinnabarRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 3);
|
||||||
IRecipeInput input = it.next();
|
crushedCinnabarRecipe.stackSize = 2;
|
||||||
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) {
|
Recipes.macerator.addRecipe(
|
||||||
it.remove();
|
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)),
|
||||||
EMT.LOGGER.info("Removing Conflicting cinnabar macerating recipe(s)");
|
null,
|
||||||
}
|
crushedCinnabarRecipe);
|
||||||
}
|
|
||||||
|
NBTTagCompound waterAmount = new NBTTagCompound();
|
||||||
|
waterAmount.setInteger("amount", 1000);
|
||||||
|
|
||||||
|
ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust");
|
||||||
|
smallCopperDust.stackSize = 2;
|
||||||
|
ItemStack smallTinDust = IC2Items.getItem("smallTinDust");
|
||||||
|
smallCopperDust.stackSize = 2;
|
||||||
|
|
||||||
|
Recipes.oreWashing.addRecipe(
|
||||||
|
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 1)),
|
||||||
|
waterAmount,
|
||||||
|
new ItemStack(EMTItems.itemEMTItems, 1, 2),
|
||||||
|
smallCopperDust,
|
||||||
|
IC2Items.getItem("stoneDust"));
|
||||||
|
Recipes.oreWashing.addRecipe(
|
||||||
|
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 3)),
|
||||||
|
waterAmount,
|
||||||
|
new ItemStack(EMTItems.itemEMTItems, 1, 4),
|
||||||
|
smallTinDust,
|
||||||
|
IC2Items.getItem("stoneDust"));
|
||||||
|
|
||||||
|
NBTTagCompound heatAmount = new NBTTagCompound();
|
||||||
|
heatAmount.setInteger("minHeat", 1000);
|
||||||
|
|
||||||
|
Recipes.centrifuge.addRecipe(
|
||||||
|
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 2)),
|
||||||
|
heatAmount,
|
||||||
|
IC2Items.getItem("smallCopperDust"),
|
||||||
|
new ItemStack(ConfigItems.itemResource, 1, 6));
|
||||||
|
Recipes.centrifuge.addRecipe(
|
||||||
|
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 4)),
|
||||||
|
heatAmount,
|
||||||
|
IC2Items.getItem("smallTinDust"),
|
||||||
|
new ItemStack(ConfigItems.itemResource, 1, 3));
|
||||||
}
|
}
|
||||||
ItemStack crushedAmberRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 1);
|
|
||||||
crushedAmberRecipe.stackSize = 2;
|
|
||||||
Recipes.macerator.addRecipe(
|
|
||||||
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)),
|
|
||||||
null,
|
|
||||||
crushedAmberRecipe);
|
|
||||||
|
|
||||||
ItemStack crushedCinnabarRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 3);
|
|
||||||
crushedCinnabarRecipe.stackSize = 2;
|
|
||||||
Recipes.macerator.addRecipe(
|
|
||||||
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)),
|
|
||||||
null,
|
|
||||||
crushedCinnabarRecipe);
|
|
||||||
|
|
||||||
NBTTagCompound waterAmount = new NBTTagCompound();
|
|
||||||
waterAmount.setInteger("amount", 1000);
|
|
||||||
|
|
||||||
ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust");
|
|
||||||
smallCopperDust.stackSize = 2;
|
|
||||||
ItemStack smallTinDust = IC2Items.getItem("smallTinDust");
|
|
||||||
smallCopperDust.stackSize = 2;
|
|
||||||
|
|
||||||
Recipes.oreWashing.addRecipe(
|
|
||||||
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 1)),
|
|
||||||
waterAmount,
|
|
||||||
new ItemStack(EMTItems.itemEMTItems, 1, 2),
|
|
||||||
smallCopperDust,
|
|
||||||
IC2Items.getItem("stoneDust"));
|
|
||||||
Recipes.oreWashing.addRecipe(
|
|
||||||
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 3)),
|
|
||||||
waterAmount,
|
|
||||||
new ItemStack(EMTItems.itemEMTItems, 1, 4),
|
|
||||||
smallTinDust,
|
|
||||||
IC2Items.getItem("stoneDust"));
|
|
||||||
|
|
||||||
NBTTagCompound heatAmount = new NBTTagCompound();
|
|
||||||
heatAmount.setInteger("minHeat", 1000);
|
|
||||||
|
|
||||||
Recipes.centrifuge.addRecipe(
|
|
||||||
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 2)),
|
|
||||||
heatAmount,
|
|
||||||
IC2Items.getItem("smallCopperDust"),
|
|
||||||
new ItemStack(ConfigItems.itemResource, 1, 6));
|
|
||||||
Recipes.centrifuge.addRecipe(
|
|
||||||
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 4)),
|
|
||||||
heatAmount,
|
|
||||||
IC2Items.getItem("smallTinDust"),
|
|
||||||
new ItemStack(ConfigItems.itemResource, 1, 3));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,10 +54,6 @@ public class EMTResearches {
|
|||||||
new ResearchPage(EMTRecipes.cardboard),
|
new ResearchPage(EMTRecipes.cardboard),
|
||||||
new ResearchPage(EMTRecipes.featherWing),
|
new ResearchPage(EMTRecipes.featherWing),
|
||||||
new ResearchPage(EMTRecipes.featherWings));
|
new ResearchPage(EMTRecipes.featherWings));
|
||||||
// new EMTResearchItem("ResearchCompleter", EMTResearchAspects.researchCompleter, -4, -2, 0, new
|
|
||||||
// ItemStack(GregTech_API.sBlockMachines, 1, 13001)).setParents("Electric Magic
|
|
||||||
// Tools").setParentsHidden("WANDPED", "WARDEDARCANA").registerResearchItem().setPages(new ResearchPage(""), new
|
|
||||||
// ResearchPage(EMTRecipes.magicalMachineCasing), new ResearchPage(EMTRecipes.researchCompleter));
|
|
||||||
/*************************************/
|
/*************************************/
|
||||||
|
|
||||||
/** Research that can be disabled **/
|
/** Research that can be disabled **/
|
||||||
|
|||||||
@@ -1,234 +0,0 @@
|
|||||||
package emt.init;
|
|
||||||
|
|
||||||
import static thaumcraft.api.aspects.Aspect.*;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.inventory.IInventory;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
|
|
||||||
import emt.EMT;
|
|
||||||
import emt.util.EMTResearchItem;
|
|
||||||
import gregtech.api.enums.ItemList;
|
|
||||||
import gregtech.api.enums.Materials;
|
|
||||||
import gregtech.api.enums.OrePrefixes;
|
|
||||||
import gregtech.api.util.GT_OreDictUnificator;
|
|
||||||
import gregtech.api.util.GT_Utility;
|
|
||||||
import thaumcraft.api.ThaumcraftApi;
|
|
||||||
import thaumcraft.api.ThaumcraftApiHelper;
|
|
||||||
import thaumcraft.api.aspects.AspectList;
|
|
||||||
import thaumcraft.api.crafting.IArcaneRecipe;
|
|
||||||
import thaumcraft.api.crafting.ShapedArcaneRecipe;
|
|
||||||
import thaumcraft.api.research.ResearchItem;
|
|
||||||
import thaumcraft.api.research.ResearchPage;
|
|
||||||
|
|
||||||
public class EMT_GTNH_Recipes_And_Researches implements Runnable {
|
|
||||||
|
|
||||||
private static LinkedHashMap<String, IArcaneRecipe> arcaneRecipeLinkedHashMap = new LinkedHashMap<>();
|
|
||||||
|
|
||||||
private static AspectList getPrimals(int amount) {
|
|
||||||
return new AspectList().add(ORDER, amount).add(ENTROPY, amount).add(AIR, amount).add(EARTH, amount)
|
|
||||||
.add(WATER, amount).add(FIRE, amount);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
|
|
||||||
EMTResearches.addResearchTab();
|
|
||||||
runArcaneRecipes();
|
|
||||||
runResreaches();
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private void runArcaneRecipes() {
|
|
||||||
arcaneRecipeLinkedHashMap.put(
|
|
||||||
"DiamondChainsaw",
|
|
||||||
new ShapedArcaneRecipe(
|
|
||||||
"DiamondChainsaw",
|
|
||||||
new ItemStack(EMTItems.diamondChainsaw),
|
|
||||||
getPrimals(35),
|
|
||||||
"sts",
|
|
||||||
"pmp",
|
|
||||||
"pbp",
|
|
||||||
's',
|
|
||||||
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Diamond, 1),
|
|
||||||
'p',
|
|
||||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1),
|
|
||||||
't',
|
|
||||||
GT_OreDictUnificator.get(OrePrefixes.toolHeadChainsaw, Materials.Thaumium, 1),
|
|
||||||
'b',
|
|
||||||
ItemList.Battery_RE_LV_Sodium.get(1),
|
|
||||||
'm',
|
|
||||||
ItemList.Electric_Motor_MV.get(1)));
|
|
||||||
arcaneRecipeLinkedHashMap.put(
|
|
||||||
"ThaumiumChainsaw",
|
|
||||||
new ShapedArcaneRecipe(
|
|
||||||
"ThaumiumChainsaw",
|
|
||||||
new ItemStack(EMTItems.thaumiumChainsaw),
|
|
||||||
getPrimals(35),
|
|
||||||
"sps",
|
|
||||||
"pmp",
|
|
||||||
"ppp",
|
|
||||||
's',
|
|
||||||
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Thaumium, 1),
|
|
||||||
'p',
|
|
||||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1),
|
|
||||||
'b',
|
|
||||||
ItemList.Battery_RE_LV_Sodium.get(1),
|
|
||||||
'm',
|
|
||||||
new ItemStack(EMTItems.diamondChainsaw)));
|
|
||||||
|
|
||||||
for (IArcaneRecipe recipe : arcaneRecipeLinkedHashMap.values()) {
|
|
||||||
ThaumcraftApi.getCraftingRecipes().add(recipe);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void runResreaches() {
|
|
||||||
HashSet<ResearchItem> researches = new HashSet<>();
|
|
||||||
researches.add(
|
|
||||||
new EMTResearchItem(
|
|
||||||
"ElectricMagicTools",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png")).setSpecial().setAutoUnlock()
|
|
||||||
.setPages(new ResearchPage("")));
|
|
||||||
researches.add(
|
|
||||||
new EMTResearchItem(
|
|
||||||
"DiamondChainsaw",
|
|
||||||
new AspectList().add(GREED, 12).add(FIRE, 9).add(METAL, 6).add(EARTH, 3),
|
|
||||||
0,
|
|
||||||
-2,
|
|
||||||
2,
|
|
||||||
new ItemStack(EMTItems.diamondChainsaw))
|
|
||||||
.setPages(new ResearchPage(arcaneRecipeLinkedHashMap.get("DiamondChainsaw"))).setRound()
|
|
||||||
.setParentsHidden("ElectricMagicTools"));
|
|
||||||
// researches.add(new EMTResearchItem("DiamondChainsaw",new
|
|
||||||
// AspectList().add(GREED,12).add(FIRE,9).add(METAL,6).add(EARTH,3),0,-2,2,new
|
|
||||||
// ItemStack(EMTItems.diamondChainsaw)).setRound());
|
|
||||||
researches.forEach(ResearchItem::registerResearchItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
class ShapedArcaneRecipeIgnoresNBT extends ShapedArcaneRecipe {
|
|
||||||
|
|
||||||
protected String research;
|
|
||||||
protected ItemStack result;
|
|
||||||
protected AspectList aspects;
|
|
||||||
protected Object[] recipe;
|
|
||||||
protected LinkedHashMap<Character, Object> translation = new LinkedHashMap<>();
|
|
||||||
int[] rowcolm;
|
|
||||||
|
|
||||||
public ShapedArcaneRecipeIgnoresNBT(String research, ItemStack result, AspectList aspects, Object... recipe) {
|
|
||||||
super(research, result, aspects, recipe);
|
|
||||||
this.research = research;
|
|
||||||
this.result = result;
|
|
||||||
this.aspects = aspects;
|
|
||||||
this.recipe = recipe;
|
|
||||||
int rows = 0;
|
|
||||||
int colums = 0;
|
|
||||||
if (!(recipe[0] instanceof String)) throw new UnsupportedOperationException(
|
|
||||||
"The Recipe must start with at least one String for the first row!");
|
|
||||||
int i = 0;
|
|
||||||
rowcolm = new int[3];
|
|
||||||
do {
|
|
||||||
rows++;
|
|
||||||
colums = Math.max(colums, ((String) recipe[i]).length());
|
|
||||||
rowcolm[i] = colums;
|
|
||||||
i = rows;
|
|
||||||
} while (recipe[i] instanceof String);
|
|
||||||
if (rows > 3 || colums > 3)
|
|
||||||
throw new UnsupportedOperationException("The Recipe must fit in a 3x3 crafting field!");
|
|
||||||
rowcolm = Arrays.copyOf(rowcolm, rows);
|
|
||||||
|
|
||||||
for (int j = i; j < recipe.length; j += 2) {
|
|
||||||
if (recipe[j] instanceof Character) translation.put((Character) recipe[j], recipe[j + 1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(IInventory inv, World world, EntityPlayer player) {
|
|
||||||
if (this.research.length() > 0
|
|
||||||
&& !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), this.research))
|
|
||||||
return false;
|
|
||||||
else {
|
|
||||||
for (int y = 0; y < rowcolm.length; y++) {
|
|
||||||
String rowAsString = ((String) recipe[y]);
|
|
||||||
for (int x = 0; x < rowcolm[y]; x++) {
|
|
||||||
Object itemReplacement = translation.get(rowAsString.toCharArray()[x]);
|
|
||||||
ItemStack slot = ThaumcraftApiHelper.getStackInRowAndColumn(inv, x, y);
|
|
||||||
if (itemReplacement != null && slot == null) {
|
|
||||||
return false;
|
|
||||||
} else if (itemReplacement instanceof String) {
|
|
||||||
if (!GT_Utility.areStacksEqual(
|
|
||||||
GT_OreDictUnificator.getFirstOre(itemReplacement, 1),
|
|
||||||
GT_OreDictUnificator.get(slot),
|
|
||||||
true))
|
|
||||||
if (!OreDictionary.getOres((String) itemReplacement).contains(slot)) return false;
|
|
||||||
} else if (itemReplacement instanceof ItemStack) {
|
|
||||||
if (!GT_Utility.isStackValid((ItemStack) itemReplacement)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!GT_Utility.areStacksEqual((ItemStack) itemReplacement, slot, true))
|
|
||||||
if (!GT_Utility.areUnificationsEqual((ItemStack) itemReplacement, slot, true))
|
|
||||||
if (!(((ItemStack) itemReplacement).getItem().equals(slot.getItem())
|
|
||||||
&& ((ItemStack) itemReplacement).getItemDamage()
|
|
||||||
== OreDictionary.WILDCARD_VALUE))
|
|
||||||
return false;
|
|
||||||
} else if (itemReplacement instanceof Collection) {
|
|
||||||
boolean hit = false;
|
|
||||||
for (Object o : (Collection<?>) itemReplacement) {
|
|
||||||
if (GT_Utility.areStacksEqual((ItemStack) o, slot, true)
|
|
||||||
|| GT_Utility.areUnificationsEqual((ItemStack) o, slot, true)
|
|
||||||
|| (((ItemStack) o).getItem().equals(slot.getItem())
|
|
||||||
&& ((ItemStack) itemReplacement).getItemDamage()
|
|
||||||
== OreDictionary.WILDCARD_VALUE))
|
|
||||||
hit = true;
|
|
||||||
}
|
|
||||||
if (!hit) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack getCraftingResult(IInventory iInventory) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRecipeSize() {
|
|
||||||
return recipe.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack getRecipeOutput() {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AspectList getAspects() {
|
|
||||||
return aspects;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AspectList getAspects(IInventory iInventory) {
|
|
||||||
return aspects;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getResearch() {
|
|
||||||
return research;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -17,9 +17,6 @@ public class Registry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void registerInit() {
|
public static void registerInit() {
|
||||||
if (enableGTCompat) {
|
|
||||||
EMT_GT_Loader.run();
|
|
||||||
}
|
|
||||||
EMTRecipes.registerEarlyRecipes();
|
EMTRecipes.registerEarlyRecipes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import net.minecraftforge.common.MinecraftForge;
|
|||||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||||
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.Optional.Interface;
|
||||||
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;
|
||||||
@@ -33,9 +35,11 @@ import thaumcraft.api.IVisDiscountGear;
|
|||||||
import thaumcraft.api.aspects.Aspect;
|
import thaumcraft.api.aspects.Aspect;
|
||||||
import thaumcraft.common.Thaumcraft;
|
import thaumcraft.common.Thaumcraft;
|
||||||
import thaumcraft.common.items.armor.Hover;
|
import thaumcraft.common.items.armor.Hover;
|
||||||
|
import thaumicboots.api.IBoots;
|
||||||
|
|
||||||
|
@Interface(iface = "thaumicboots.api.IBoots", modid = "thaumicboots")
|
||||||
public class ItemElectricBootsTraveller extends ItemArmor
|
public class ItemElectricBootsTraveller extends ItemArmor
|
||||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
|
implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor, IBoots {
|
||||||
|
|
||||||
public int maxCharge = 100000;
|
public int maxCharge = 100000;
|
||||||
public int energyPerDamage = 1000;
|
public int energyPerDamage = 1000;
|
||||||
@@ -121,15 +125,29 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||||
if (!player.capabilities.isFlying && (player.moveForward != 0.0F || player.moveStrafing != 0.0F)) {
|
if (getIntertialState(itemStack) && player.moveForward == 0
|
||||||
|
&& player.moveStrafing == 0
|
||||||
|
&& player.capabilities.isFlying) {
|
||||||
|
player.motionX *= 0.5;
|
||||||
|
player.motionZ *= 0.5;
|
||||||
|
}
|
||||||
|
boolean omniMode = false;
|
||||||
|
if (EMT.isBootsActive) {
|
||||||
|
omniMode = isOmniEnabled(itemStack);
|
||||||
|
if ((player.moveForward == 0F && player.moveStrafing == 0F && omniMode)
|
||||||
|
|| (player.moveForward <= 0F && !omniMode)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (player.moveForward != 0.0F || player.moveStrafing != 0.0F) {
|
||||||
if (player.worldObj.isRemote && !player.isSneaking()) {
|
if (player.worldObj.isRemote && !player.isSneaking()) {
|
||||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
|
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
|
||||||
Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
|
Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
|
||||||
}
|
}
|
||||||
player.stepHeight = 1.0F;
|
player.stepHeight = 1.0F;
|
||||||
}
|
}
|
||||||
|
float speedMod = (float) getSpeedModifier(itemStack);
|
||||||
if (player.onGround) {
|
if (player.onGround || player.isOnLadder() || player.capabilities.isFlying) {
|
||||||
float bonus = speedBonus;
|
float bonus = speedBonus;
|
||||||
if (player.isInWater()) {
|
if (player.isInWater()) {
|
||||||
bonus /= 4.0F;
|
bonus /= 4.0F;
|
||||||
@@ -138,29 +156,46 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
|||||||
if (player.isSneaking()) {
|
if (player.isSneaking()) {
|
||||||
bonus /= 2.0F;
|
bonus /= 2.0F;
|
||||||
}
|
}
|
||||||
|
bonus *= speedMod;
|
||||||
player.moveFlying(player.moveStrafing, player.moveForward, bonus);
|
if (EMT.isBootsActive) {
|
||||||
|
applyOmniState(player, bonus, itemStack);
|
||||||
|
} else if (player.moveForward > 0.0) {
|
||||||
|
player.moveFlying(0.0F, player.moveForward, bonus);
|
||||||
|
}
|
||||||
} else if (Hover.getHover(player.getEntityId())) {
|
} else if (Hover.getHover(player.getEntityId())) {
|
||||||
// Base ItemBootsTraveller jumpBonus equals to jumpBonus of Electric Boots,
|
// Base ItemBootsTraveller jumpBonus equals to jumpBonus of Electric Boots,
|
||||||
// so any other boots factor can be calculated via proportion method
|
// so any other boots factor can be calculated via proportion method
|
||||||
player.jumpMovementFactor = 0.03F
|
player.jumpMovementFactor = 0.03F
|
||||||
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
|
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
|
||||||
* jumpBonus;
|
* jumpBonus
|
||||||
|
* speedMod;
|
||||||
} else {
|
} else {
|
||||||
player.jumpMovementFactor = 0.05F
|
player.jumpMovementFactor = 0.05F
|
||||||
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
|
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
|
||||||
* jumpBonus;
|
* jumpBonus
|
||||||
|
* speedMod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Optional.Method(modid = "thaumicboots")
|
||||||
|
public void applyOmniState(EntityPlayer player, float bonus, ItemStack itemStack) {
|
||||||
|
if (player.moveForward != 0.0) {
|
||||||
|
player.moveFlying(0.0F, player.moveForward, bonus);
|
||||||
|
}
|
||||||
|
if (player.moveStrafing != 0.0 && getOmniState(itemStack)) {
|
||||||
|
player.moveFlying(player.moveStrafing, 0.0F, bonus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
|
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
|
||||||
if (event.entityLiving instanceof EntityPlayer) {
|
if (event.entityLiving instanceof EntityPlayer) {
|
||||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||||
boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this;
|
ItemStack boots = player.getCurrentArmor(0);
|
||||||
|
boolean hasArmor = boots != null && boots.getItem() == this;
|
||||||
|
|
||||||
if (hasArmor) player.motionY += jumpBonus;
|
if (hasArmor) player.motionY += jumpBonus * (float) getJumpModifier(boots);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,4 +311,34 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
|||||||
public int getRunicCharge(ItemStack itemStack) {
|
public int getRunicCharge(ItemStack itemStack) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Avoid NSM Exception when ThaumicBoots is not present.
|
||||||
|
public double getSpeedModifier(ItemStack stack) {
|
||||||
|
if (stack.stackTagCompound != null) {
|
||||||
|
return stack.stackTagCompound.getDouble("speed");
|
||||||
|
}
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getJumpModifier(ItemStack stack) {
|
||||||
|
if (stack.stackTagCompound != null) {
|
||||||
|
return stack.stackTagCompound.getDouble("jump");
|
||||||
|
}
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getOmniState(ItemStack stack) {
|
||||||
|
if (stack.stackTagCompound != null) {
|
||||||
|
return stack.stackTagCompound.getBoolean("omni");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getIntertialState(ItemStack stack) {
|
||||||
|
if (stack.stackTagCompound != null) {
|
||||||
|
return stack.stackTagCompound.getBoolean("inertiacanceling");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -390,22 +390,23 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
|
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
|
||||||
try {
|
if (entity instanceof EntityPlayer && stack != null && stack.stackTagCompound != null) {
|
||||||
if (entity instanceof EntityPlayer) {
|
byte wing = stack.stackTagCompound.getByte("wing");
|
||||||
byte wing = stack.stackTagCompound.getByte("wing");
|
if (wing == JETPACK) {
|
||||||
if (wing == JETPACK) {
|
ModelSpecialArmor.getInstance().type = 1;
|
||||||
ModelSpecialArmor mbm = new ModelSpecialArmor(1, 1);
|
} else if (wing != 0) {
|
||||||
return mbm;
|
ModelSpecialArmor.getInstance().type = 2;
|
||||||
} else if (wing != 0) {
|
if (stack.stackTagCompound.hasKey("isJumping")) {
|
||||||
ModelSpecialArmor mbm = new ModelSpecialArmor(1, 2);
|
ModelSpecialArmor.getInstance().isJumping = stack.stackTagCompound.getBoolean("isJumping");
|
||||||
mbm.isJumping = stack.stackTagCompound.getBoolean("isJumping");
|
|
||||||
return mbm;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ModelSpecialArmor.getInstance().type = 0;
|
||||||
}
|
}
|
||||||
} catch (NullPointerException e) {
|
} else {
|
||||||
new ModelSpecialArmor(1, 0);
|
ModelSpecialArmor.getInstance().type = 0;
|
||||||
}
|
}
|
||||||
return new ModelSpecialArmor(1, 0);
|
|
||||||
|
return ModelSpecialArmor.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@@ -533,6 +534,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
|||||||
|
|
||||||
if (isJumping && !player.onGround && player.motionY < 0) {
|
if (isJumping && !player.onGround && player.motionY < 0) {
|
||||||
player.motionY *= f1;
|
player.motionY *= f1;
|
||||||
|
player.fallDistance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.isInWater() && !player.capabilities.isCreativeMode) {
|
if (player.isInWater() && !player.capabilities.isCreativeMode) {
|
||||||
@@ -554,9 +556,6 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
|||||||
|
|
||||||
if (player.isSneaking() && !player.onGround && player.motionY < 0) {
|
if (player.isSneaking() && !player.onGround && player.motionY < 0) {
|
||||||
player.motionY *= 0.6;
|
player.motionY *= 0.6;
|
||||||
}
|
|
||||||
|
|
||||||
if (player.fallDistance > 0.0F) {
|
|
||||||
player.fallDistance = 0;
|
player.fallDistance = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,16 +51,13 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
|
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
|
||||||
try {
|
if (entity instanceof EntityPlayer && stack != null
|
||||||
if (entity instanceof EntityPlayer) {
|
&& stack.stackTagCompound != null
|
||||||
ModelWings mw = new ModelWings();
|
&& stack.stackTagCompound.hasKey("isJumping")) {
|
||||||
mw.isJumping = stack.stackTagCompound.getBoolean("isJumping");
|
ModelWings.getInstance().isJumping = stack.stackTagCompound.getBoolean("isJumping");
|
||||||
return mw;
|
|
||||||
}
|
|
||||||
} catch (NullPointerException e) {
|
|
||||||
return new ModelWings();
|
|
||||||
}
|
}
|
||||||
return new ModelWings();
|
|
||||||
|
return ModelWings.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -72,12 +69,12 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
|||||||
int amount) {
|
int amount) {
|
||||||
NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
|
NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
|
||||||
|
|
||||||
boolean isJmuping = nbtData.getBoolean("isJumping");
|
boolean isJumping = nbtData.getBoolean("isJumping");
|
||||||
boolean isHolding = nbtData.getBoolean("isHolding");
|
boolean isHolding = nbtData.getBoolean("isHolding");
|
||||||
|
|
||||||
nbtData.setBoolean("isJumping", IC2.keyboard.isJumpKeyDown(player));
|
nbtData.setBoolean("isJumping", IC2.keyboard.isJumpKeyDown(player));
|
||||||
|
|
||||||
if (isJmuping) {
|
if (isJumping) {
|
||||||
byte f = nbtData.getByte("f");
|
byte f = nbtData.getByte("f");
|
||||||
nbtData.setBoolean("isHolding", true);
|
nbtData.setBoolean("isHolding", true);
|
||||||
if (IC2.keyboard.isSneakKeyDown(player)) nbtData.setByte("f", (byte) (0));
|
if (IC2.keyboard.isSneakKeyDown(player)) nbtData.setByte("f", (byte) (0));
|
||||||
@@ -108,8 +105,9 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
|||||||
nbtData.setByte("f", (byte) 0);
|
nbtData.setByte("f", (byte) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isJmuping && !player.onGround && player.motionY < 0) {
|
if (isJumping && !player.onGround && player.motionY < 0) {
|
||||||
player.motionY *= f1;
|
player.motionY *= f1;
|
||||||
|
player.fallDistance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.isInWater() && !player.capabilities.isCreativeMode) {
|
if (player.isInWater() && !player.capabilities.isCreativeMode) {
|
||||||
@@ -127,6 +125,7 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
|||||||
|
|
||||||
if (player.isSneaking() && !player.onGround && player.motionY < 0) {
|
if (player.isSneaking() && !player.onGround && player.motionY < 0) {
|
||||||
player.motionY *= 0.6;
|
player.motionY *= 0.6;
|
||||||
|
player.fallDistance = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package emt.item.block;
|
package emt.item.block;
|
||||||
|
|
||||||
import static emt.util.EMTTextHelper.localize;
|
import static emt.util.EMTTextHelper.localize;
|
||||||
import static gregtech.api.util.GT_Utility.formatNumbers;
|
import static gregtech.api.util.GTUtility.formatNumbers;
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -1,20 +1,16 @@
|
|||||||
package emt.item.focus;
|
package emt.item.focus;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
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 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 thaumcraft.api.aspects.Aspect;
|
|
||||||
import thaumcraft.api.aspects.AspectList;
|
import thaumcraft.api.aspects.AspectList;
|
||||||
import thaumcraft.api.wands.ItemFocusBasic;
|
import thaumcraft.api.wands.ItemFocusBasic;
|
||||||
|
|
||||||
@@ -103,17 +99,4 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
|||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, @SuppressWarnings("rawtypes") List list,
|
|
||||||
boolean par4) {
|
|
||||||
AspectList cost = getVisCost(stack);
|
|
||||||
if (cost != null && cost.size() > 0) {
|
|
||||||
list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1"));
|
|
||||||
for (Aspect aspect : cost.getAspectsSorted()) {
|
|
||||||
float amount = cost.getAmount(aspect) / 100.0F;
|
|
||||||
list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||||
import gregtech.api.metatileentity.BaseMetaTileEntity;
|
import gregtech.api.metatileentity.BaseMetaTileEntity;
|
||||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
|
import gregtech.api.metatileentity.implementations.MTEHatchMaintenance;
|
||||||
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.api.wands.FocusUpgradeType;
|
||||||
@@ -57,8 +57,8 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
|
|||||||
TileEntity hatchCandidateTile = world.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
TileEntity hatchCandidateTile = world.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||||
if (hatchCandidateTile instanceof BaseMetaTileEntity) {
|
if (hatchCandidateTile instanceof BaseMetaTileEntity) {
|
||||||
IMetaTileEntity hatchCandidateMetaTile = ((BaseMetaTileEntity) hatchCandidateTile).getMetaTileEntity();
|
IMetaTileEntity hatchCandidateMetaTile = ((BaseMetaTileEntity) hatchCandidateTile).getMetaTileEntity();
|
||||||
if (hatchCandidateMetaTile instanceof GT_MetaTileEntity_Hatch_Maintenance) {
|
if (hatchCandidateMetaTile instanceof MTEHatchMaintenance) {
|
||||||
GT_MetaTileEntity_Hatch_Maintenance hatch = (GT_MetaTileEntity_Hatch_Maintenance) 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, true)) {
|
||||||
hatch.mCrowbar = true;
|
hatch.mCrowbar = true;
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
package emt.network;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.multiplayer.WorldClient;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import emt.tile.GT_MetaTileEntity_ResearchCompleter;
|
|
||||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
|
|
||||||
public class PacketNodeInfo implements IMessage, IMessageHandler<PacketNodeInfo, IMessage> {
|
|
||||||
|
|
||||||
private int mBlockX, mBlockY, mBlockZ, mDim, nodeDistance, nodeColor;
|
|
||||||
|
|
||||||
public PacketNodeInfo() {}
|
|
||||||
|
|
||||||
public PacketNodeInfo(int mBlockX, int mBlockY, int mBlockZ, int mDim, int nodeDistance, int nodeColor) {
|
|
||||||
this.mBlockX = mBlockX;
|
|
||||||
this.mBlockY = mBlockY;
|
|
||||||
this.mBlockZ = mBlockZ;
|
|
||||||
this.mDim = mDim;
|
|
||||||
this.nodeDistance = nodeDistance;
|
|
||||||
this.nodeColor = nodeColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void fromBytes(ByteBuf buf) {
|
|
||||||
mBlockX = buf.readInt();
|
|
||||||
mBlockY = buf.readInt();
|
|
||||||
mBlockZ = buf.readInt();
|
|
||||||
mDim = buf.readInt();
|
|
||||||
nodeDistance = buf.readInt();
|
|
||||||
nodeColor = buf.readInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void toBytes(ByteBuf buf) {
|
|
||||||
buf.writeInt(mBlockX);
|
|
||||||
buf.writeInt(mBlockY);
|
|
||||||
buf.writeInt(mBlockZ);
|
|
||||||
buf.writeInt(mDim);
|
|
||||||
buf.writeInt(nodeDistance);
|
|
||||||
buf.writeInt(nodeColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IMessage onMessage(PacketNodeInfo message, MessageContext ctx) {
|
|
||||||
WorldClient world = Minecraft.getMinecraft().theWorld;
|
|
||||||
if (world != null) {
|
|
||||||
if (world.blockExists(message.mBlockX, message.mBlockY, message.mBlockZ)) {
|
|
||||||
TileEntity tileEntity = world.getTileEntity(message.mBlockX, message.mBlockY, message.mBlockZ);
|
|
||||||
if (tileEntity instanceof IGregTechTileEntity) {
|
|
||||||
IGregTechTileEntity gtTile = (IGregTechTileEntity) tileEntity;
|
|
||||||
if (gtTile.getMetaTileEntity() instanceof GT_MetaTileEntity_ResearchCompleter) {
|
|
||||||
GT_MetaTileEntity_ResearchCompleter researchCompleter = (GT_MetaTileEntity_ResearchCompleter) gtTile
|
|
||||||
.getMetaTileEntity();
|
|
||||||
researchCompleter.setNodeValues(message.nodeDistance, message.nodeColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,382 +0,0 @@
|
|||||||
package emt.tile;
|
|
||||||
|
|
||||||
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
|
|
||||||
import static gregtech.api.enums.Textures.BlockIcons.*;
|
|
||||||
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
|
||||||
|
|
||||||
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
|
|
||||||
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
|
||||||
import emt.EMT;
|
|
||||||
import emt.network.PacketNodeInfo;
|
|
||||||
import gregtech.api.GregTech_API;
|
|
||||||
import gregtech.api.enums.Textures;
|
|
||||||
import gregtech.api.interfaces.ITexture;
|
|
||||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
|
||||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
|
||||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
|
|
||||||
import gregtech.api.render.TextureFactory;
|
|
||||||
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
|
|
||||||
import gregtech.api.util.GT_Utility;
|
|
||||||
import gregtech.api.util.shutdown.ShutDownReasonRegistry;
|
|
||||||
import thaumcraft.api.aspects.Aspect;
|
|
||||||
import thaumcraft.api.aspects.AspectList;
|
|
||||||
import thaumcraft.api.research.ResearchCategories;
|
|
||||||
import thaumcraft.api.research.ResearchItem;
|
|
||||||
import thaumcraft.common.Thaumcraft;
|
|
||||||
import thaumcraft.common.config.ConfigBlocks;
|
|
||||||
import thaumcraft.common.config.ConfigItems;
|
|
||||||
import thaumcraft.common.lib.research.ResearchManager;
|
|
||||||
import thaumcraft.common.lib.research.ResearchNoteData;
|
|
||||||
import thaumcraft.common.tiles.TileNode;
|
|
||||||
|
|
||||||
public class GT_MetaTileEntity_ResearchCompleter
|
|
||||||
extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_ResearchCompleter> {
|
|
||||||
|
|
||||||
private static final int CASING_INDEX = 184;
|
|
||||||
private static final int MAX_LENGTH = 13;
|
|
||||||
private static final int RECIPE_LENGTH = 1200;
|
|
||||||
private static final int RECIPE_EUT = 120;
|
|
||||||
private static final float NODE_COST_MULTIPLIER = 1.0f;
|
|
||||||
|
|
||||||
private int recipeAspectCost;
|
|
||||||
private int aspectsAbsorbed;
|
|
||||||
|
|
||||||
protected int mLength;
|
|
||||||
protected int mCasing;
|
|
||||||
protected boolean endFound;
|
|
||||||
|
|
||||||
// For displaying beam
|
|
||||||
private int lastNodeDistance;
|
|
||||||
private int lastNodeColor;
|
|
||||||
private int syncTimer;
|
|
||||||
|
|
||||||
private static final String STRUCTURE_PIECE_FIRST = "first";
|
|
||||||
private static final String STRUCTURE_PIECE_LATER = "later";
|
|
||||||
private static final String STRUCTURE_PIECE_LAST = "last";
|
|
||||||
private static final String STRUCTURE_PIECE_LATER_HINT = "laterHint";
|
|
||||||
private static final IStructureDefinition<GT_MetaTileEntity_ResearchCompleter> STRUCTURE_DEFINITION = StructureDefinition
|
|
||||||
.<GT_MetaTileEntity_ResearchCompleter>builder()
|
|
||||||
.addShape(STRUCTURE_PIECE_FIRST, transpose(new String[][] { { "ccc" }, { "g~g" }, { "ccc" }, }))
|
|
||||||
.addShape(STRUCTURE_PIECE_LATER, transpose(new String[][] { { "c c" }, { "gxg" }, { "c c" }, }))
|
|
||||||
.addShape(STRUCTURE_PIECE_LAST, transpose(new String[][] { { "c" }, { "g" }, { "c" }, }))
|
|
||||||
.addShape(STRUCTURE_PIECE_LATER_HINT, transpose(new String[][] { { "c c" }, { "g g" }, { "c c" }, }))
|
|
||||||
.addElement(
|
|
||||||
'c',
|
|
||||||
ofChain( // Magical machine casing or hatch
|
|
||||||
ofHatchAdder(
|
|
||||||
GT_MetaTileEntity_ResearchCompleter::addEnergyInputToMachineList,
|
|
||||||
CASING_INDEX,
|
|
||||||
1),
|
|
||||||
ofHatchAdder(GT_MetaTileEntity_ResearchCompleter::addInputToMachineList, CASING_INDEX, 1),
|
|
||||||
ofHatchAdder(GT_MetaTileEntity_ResearchCompleter::addOutputToMachineList, CASING_INDEX, 1),
|
|
||||||
ofHatchAdder(
|
|
||||||
GT_MetaTileEntity_ResearchCompleter::addMaintenanceToMachineList,
|
|
||||||
CASING_INDEX,
|
|
||||||
1),
|
|
||||||
onElementPass(
|
|
||||||
GT_MetaTileEntity_ResearchCompleter::onCasingFound,
|
|
||||||
ofBlock(GregTech_API.sBlockCasings8, 8))))
|
|
||||||
.addElement(
|
|
||||||
'x',
|
|
||||||
ofChain( // Check for the end but otherwise treat as a skipped spot
|
|
||||||
onElementPass(
|
|
||||||
GT_MetaTileEntity_ResearchCompleter::onEndFound,
|
|
||||||
ofBlock(ConfigBlocks.blockCosmeticOpaque, 2)),
|
|
||||||
isAir(), // Forgive me
|
|
||||||
notAir()))
|
|
||||||
.addElement('g', ofBlock(ConfigBlocks.blockCosmeticOpaque, 2)) // Warded glass
|
|
||||||
.build();
|
|
||||||
|
|
||||||
public GT_MetaTileEntity_ResearchCompleter(int aID, String aName, String aNameRegional) {
|
|
||||||
super(aID, aName, aNameRegional);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GT_MetaTileEntity_ResearchCompleter(String aName) {
|
|
||||||
super(aName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void saveNBTData(NBTTagCompound aNBT) {
|
|
||||||
aNBT.setInteger("recipeAspectCost", recipeAspectCost);
|
|
||||||
aNBT.setInteger("aspectsAbsorbed", aspectsAbsorbed);
|
|
||||||
aNBT.setInteger("mLength", mLength);
|
|
||||||
|
|
||||||
super.saveNBTData(aNBT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void loadNBTData(NBTTagCompound aNBT) {
|
|
||||||
recipeAspectCost = aNBT.getInteger("recipeAspectCost");
|
|
||||||
aspectsAbsorbed = aNBT.getInteger("aspectsAbsorbed");
|
|
||||||
mLength = aNBT.getInteger("mLength");
|
|
||||||
|
|
||||||
super.loadNBTData(aNBT);
|
|
||||||
}
|
|
||||||
|
|
||||||
// For client beam animation
|
|
||||||
public void setNodeValues(int nodeDistance, int nodeColor) {
|
|
||||||
this.lastNodeDistance = nodeDistance;
|
|
||||||
this.lastNodeColor = nodeColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
|
||||||
if (aBaseMetaTileEntity.isClientSide()) {
|
|
||||||
if (aBaseMetaTileEntity.isActive()) {
|
|
||||||
int xDir = aBaseMetaTileEntity.getBackFacing().offsetX;
|
|
||||||
int yDir = aBaseMetaTileEntity.getBackFacing().offsetY;
|
|
||||||
int zDir = aBaseMetaTileEntity.getBackFacing().offsetZ;
|
|
||||||
double xCoord = aBaseMetaTileEntity.getXCoord() + 0.5;
|
|
||||||
double yCoord = aBaseMetaTileEntity.getYCoord() + 0.5;
|
|
||||||
double zCoord = aBaseMetaTileEntity.getZCoord() + 0.5;
|
|
||||||
Thaumcraft.proxy.beam(
|
|
||||||
aBaseMetaTileEntity.getWorld(),
|
|
||||||
xCoord + 0.5 * xDir,
|
|
||||||
yCoord + 0.5 * yDir,
|
|
||||||
zCoord + 0.5 * zDir,
|
|
||||||
xCoord + xDir * lastNodeDistance,
|
|
||||||
yCoord + yDir * lastNodeDistance,
|
|
||||||
zCoord + zDir * lastNodeDistance,
|
|
||||||
3,
|
|
||||||
lastNodeColor,
|
|
||||||
true,
|
|
||||||
2,
|
|
||||||
1);
|
|
||||||
} else {
|
|
||||||
lastNodeDistance = 0;
|
|
||||||
lastNodeColor = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
super.onPostTick(aBaseMetaTileEntity, aTick);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onRunningTick(ItemStack aStack) {
|
|
||||||
float progressAmount = ((float) this.mProgresstime) / this.mMaxProgresstime;
|
|
||||||
int requiredVis = (int) Math.ceil(progressAmount * recipeAspectCost - aspectsAbsorbed);
|
|
||||||
syncTimer--;
|
|
||||||
|
|
||||||
IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
|
|
||||||
int xDir = aBaseMetaTileEntity.getBackFacing().offsetX;
|
|
||||||
int yDir = aBaseMetaTileEntity.getBackFacing().offsetY;
|
|
||||||
int zDir = aBaseMetaTileEntity.getBackFacing().offsetZ;
|
|
||||||
int i = 1;
|
|
||||||
|
|
||||||
// Loop through node spaces and drain them from front to back
|
|
||||||
while (i < this.mLength - 1 && requiredVis > 0) {
|
|
||||||
int nodeX = aBaseMetaTileEntity.getXCoord() + xDir * i;
|
|
||||||
int nodeY = aBaseMetaTileEntity.getYCoord() + yDir * i;
|
|
||||||
int nodeZ = aBaseMetaTileEntity.getZCoord() + zDir * i;
|
|
||||||
TileEntity tileEntity = aBaseMetaTileEntity.getWorld().getTileEntity(nodeX, nodeY, nodeZ);
|
|
||||||
|
|
||||||
if (tileEntity instanceof TileNode) {
|
|
||||||
TileNode aNode = (TileNode) tileEntity;
|
|
||||||
AspectList aspectsBase = aNode.getAspectsBase();
|
|
||||||
|
|
||||||
for (Aspect aspect : aspectsBase.getAspects()) {
|
|
||||||
int aspectAmount = aspectsBase.getAmount(aspect);
|
|
||||||
int drainAmount = Math.min(requiredVis, aspectAmount);
|
|
||||||
aNode.setNodeVisBase(aspect, (short) (aspectAmount - drainAmount));
|
|
||||||
aNode.takeFromContainer(aspect, drainAmount);
|
|
||||||
requiredVis -= drainAmount;
|
|
||||||
aspectsAbsorbed += drainAmount;
|
|
||||||
|
|
||||||
if (requiredVis <= 0) {
|
|
||||||
if (i != lastNodeDistance || aspect.getColor() != lastNodeColor)
|
|
||||||
sendClientAnimationUpdate(aBaseMetaTileEntity, i, aspect.getColor());
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aspectsBase.visSize() <= 0) aBaseMetaTileEntity.getWorld().setBlockToAir(nodeX, nodeY, nodeZ);
|
|
||||||
else {
|
|
||||||
aNode.markDirty();
|
|
||||||
aBaseMetaTileEntity.getWorld().markBlockForUpdate(nodeX, nodeY, nodeZ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (syncTimer <= 0) sendClientAnimationUpdate(aBaseMetaTileEntity, lastNodeDistance, lastNodeColor);
|
|
||||||
|
|
||||||
if (requiredVis > 0) this.stopMachine(ShutDownReasonRegistry.CRITICAL_NONE);
|
|
||||||
|
|
||||||
return super.onRunningTick(aStack);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void sendClientAnimationUpdate(IGregTechTileEntity aBaseMetaTileEntity, int nodeDistance, int nodeColor) {
|
|
||||||
int xCoord = aBaseMetaTileEntity.getXCoord();
|
|
||||||
int yCoord = aBaseMetaTileEntity.getYCoord();
|
|
||||||
int zCoord = aBaseMetaTileEntity.getZCoord();
|
|
||||||
int dim = aBaseMetaTileEntity.getWorld().provider.dimensionId;
|
|
||||||
|
|
||||||
PacketNodeInfo packet = new PacketNodeInfo(xCoord, yCoord, zCoord, dim, nodeDistance, nodeColor);
|
|
||||||
EMT.INSTANCE.sendToAllAround(packet, new NetworkRegistry.TargetPoint(dim, xCoord, yCoord, zCoord, 128));
|
|
||||||
|
|
||||||
lastNodeDistance = nodeDistance;
|
|
||||||
lastNodeColor = nodeColor;
|
|
||||||
syncTimer = 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCorrectMachinePart(ItemStack itemStack) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkRecipe(ItemStack itemStack) {
|
|
||||||
ArrayList<ItemStack> tInputList = this.getStoredInputs();
|
|
||||||
|
|
||||||
for (ItemStack stack : tInputList) {
|
|
||||||
if (GT_Utility.isStackValid(stack) && stack.stackSize > 0) {
|
|
||||||
if (stack.getItem() == ConfigItems.itemResearchNotes
|
|
||||||
&& !stack.stackTagCompound.getBoolean("complete")) {
|
|
||||||
ResearchNoteData noteData = ResearchManager.getData(stack);
|
|
||||||
if (noteData == null) continue;
|
|
||||||
ResearchItem researchItem = ResearchCategories.getResearch(noteData.key);
|
|
||||||
if (researchItem == null) continue;
|
|
||||||
|
|
||||||
this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
|
|
||||||
this.mEfficiencyIncrease = 10000;
|
|
||||||
this.calculateOverclockedNessMultiInternal(
|
|
||||||
RECIPE_EUT,
|
|
||||||
RECIPE_LENGTH,
|
|
||||||
1,
|
|
||||||
this.getMaxInputVoltage(),
|
|
||||||
false);
|
|
||||||
if (this.mMaxProgresstime == 2147483646 && this.mEUt == 2147483646) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.mEUt > 0) {
|
|
||||||
this.mEUt = -this.mEUt;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a completed version of the note to output
|
|
||||||
this.mOutputItems = new ItemStack[] { GT_Utility.copyAmount(1, stack) };
|
|
||||||
this.mOutputItems[0].stackTagCompound.setBoolean("complete", true);
|
|
||||||
this.mOutputItems[0].setItemDamage(64);
|
|
||||||
stack.stackSize -= 1;
|
|
||||||
this.aspectsAbsorbed = 0;
|
|
||||||
this.recipeAspectCost = (int) Math.ceil(researchItem.tags.visSize() * NODE_COST_MULTIPLIER);
|
|
||||||
|
|
||||||
this.lastNodeDistance = 0;
|
|
||||||
this.lastNodeColor = 0;
|
|
||||||
|
|
||||||
this.sendLoopStart((byte) 20);
|
|
||||||
this.updateSlots();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
|
|
||||||
mLength = 1;
|
|
||||||
mCasing = 0;
|
|
||||||
endFound = false;
|
|
||||||
|
|
||||||
// check front
|
|
||||||
if (!checkPiece(STRUCTURE_PIECE_FIRST, 1, 1, 0)) return false;
|
|
||||||
|
|
||||||
// check middle pieces
|
|
||||||
while (!endFound && mLength++ < MAX_LENGTH) {
|
|
||||||
if (!checkPiece(STRUCTURE_PIECE_LATER, 1, 1, -(mLength - 1))) return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return endFound && mLength >= 3
|
|
||||||
&& checkPiece(STRUCTURE_PIECE_LAST, 0, 1, -(mLength - 1))
|
|
||||||
&& mCasing >= mLength * 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getMaxEfficiency(ItemStack itemStack) {
|
|
||||||
return 10000;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getPollutionPerTick(ItemStack itemStack) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getDamageToComponent(ItemStack itemStack) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean explodesOnComponentBreak(ItemStack itemStack) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
|
|
||||||
return new GT_MetaTileEntity_ResearchCompleter(this.mName);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void onCasingFound() {
|
|
||||||
mCasing++;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void onEndFound() {
|
|
||||||
endFound = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
|
|
||||||
int ColorIndex, boolean aActive, boolean aRedstone) {
|
|
||||||
if (side == facing) {
|
|
||||||
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
|
|
||||||
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE).extFacing().build(),
|
|
||||||
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE_GLOW).extFacing().glow()
|
|
||||||
.build() };
|
|
||||||
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
|
|
||||||
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER).extFacing().build(),
|
|
||||||
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_GLOW).extFacing().glow()
|
|
||||||
.build() };
|
|
||||||
}
|
|
||||||
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IStructureDefinition<GT_MetaTileEntity_ResearchCompleter> getStructureDefinition() {
|
|
||||||
return STRUCTURE_DEFINITION;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected GT_Multiblock_Tooltip_Builder createTooltip() {
|
|
||||||
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
|
|
||||||
tt.addMachineType("Research Completer").addInfo("Controller block for the Research Completer")
|
|
||||||
.addInfo("Completes Thaumcraft research notes using EU and Thaumcraft nodes")
|
|
||||||
.addInfo("Place nodes in the center row").addSeparator()
|
|
||||||
.beginVariableStructureBlock(3, 3, 3, 3, 3, MAX_LENGTH, true).addController("Front center")
|
|
||||||
.addOtherStructurePart("Magical machine casing", "Top and bottom layers outside. 3 x L minimum")
|
|
||||||
.addOtherStructurePart("Warded glass", "Middle layer outside").addEnergyHatch("Any casing")
|
|
||||||
.addMaintenanceHatch("Any casing").addInputBus("Any casing").addOutputBus("Any casing")
|
|
||||||
.toolTipFinisher("Electro-Magic Tools");
|
|
||||||
return tt;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void construct(ItemStack stackSize, boolean hintsOnly) {
|
|
||||||
buildPiece(STRUCTURE_PIECE_FIRST, stackSize, hintsOnly, 1, 1, 0);
|
|
||||||
int tTotalLength = Math.min(MAX_LENGTH, stackSize.stackSize + 2);
|
|
||||||
for (int i = 1; i < tTotalLength; i++) {
|
|
||||||
buildPiece(STRUCTURE_PIECE_LATER_HINT, stackSize, hintsOnly, 1, 1, -i);
|
|
||||||
}
|
|
||||||
buildPiece(STRUCTURE_PIECE_LAST, stackSize, hintsOnly, 0, 1, -(tTotalLength - 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -29,12 +29,12 @@ import emt.tile.DefinitelyNotAIC2Source;
|
|||||||
import emt.tile.TileEntityEMT;
|
import emt.tile.TileEntityEMT;
|
||||||
import emt.util.EMTConfigHandler;
|
import emt.util.EMTConfigHandler;
|
||||||
import emt.util.EMTEssentiasOutputs;
|
import emt.util.EMTEssentiasOutputs;
|
||||||
import gregtech.api.enums.GT_Values;
|
import gregtech.api.enums.GTValues;
|
||||||
import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
|
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.GT_Packet_Block_Event;
|
import gregtech.api.net.GTPacketBlockEvent;
|
||||||
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;
|
||||||
@@ -434,18 +434,18 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getOutputAmperage() {
|
public long getOutputAmperage() {
|
||||||
if (this.generating / 20.0D / 20.0D <= GT_Values.V[this.energySource.getSourceTier()]) {
|
if (this.generating / 20.0D / 20.0D <= GTValues.V[this.energySource.getSourceTier()]) {
|
||||||
return 1L;
|
return 1L;
|
||||||
}
|
}
|
||||||
if (this.generating / 20.0D / 20.0D % GT_Values.V[this.energySource.getSourceTier()] == 0.0D) {
|
if (this.generating / 20.0D / 20.0D % GTValues.V[this.energySource.getSourceTier()] == 0.0D) {
|
||||||
return (long) (this.generating / 20.0D / 20.0D / GT_Values.V[this.energySource.getSourceTier()]);
|
return (long) (this.generating / 20.0D / 20.0D / GTValues.V[this.energySource.getSourceTier()]);
|
||||||
}
|
}
|
||||||
return (long) (1L + (this.generating / 20.0D / 20.0D / GT_Values.V[this.energySource.getSourceTier()]));
|
return (long) (1L + (this.generating / 20.0D / 20.0D / GTValues.V[this.energySource.getSourceTier()]));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getOutputVoltage() {
|
public long getOutputVoltage() {
|
||||||
return GT_Values.V[this.energySource.getSourceTier()];
|
return GTValues.V[this.energySource.getSourceTier()];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -843,9 +843,9 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendBlockEvent(byte aID, byte aValue) {
|
public void sendBlockEvent(byte aID, byte aValue) {
|
||||||
GT_Values.NW.sendPacketToAllPlayersInRange(
|
GTValues.NW.sendPacketToAllPlayersInRange(
|
||||||
this.worldObj,
|
this.worldObj,
|
||||||
new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
new GTPacketBlockEvent(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
||||||
this.xCoord,
|
this.xCoord,
|
||||||
this.zCoord);
|
this.zCoord);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package emt.tile.solar;
|
package emt.tile.solar;
|
||||||
|
|
||||||
import static gregtech.api.recipe.RecipeMaps.chemicalBathRecipes;
|
import static gregtech.api.recipe.RecipeMaps.chemicalBathRecipes;
|
||||||
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
|
import static gregtech.api.util.GTRecipeBuilder.SECONDS;
|
||||||
import static thaumcraft.api.aspects.Aspect.*;
|
import static thaumcraft.api.aspects.Aspect.*;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@@ -16,7 +16,7 @@ import emt.block.BlockSolars;
|
|||||||
import emt.init.EMTBlocks;
|
import emt.init.EMTBlocks;
|
||||||
import emt.item.block.ItemBlockSolars;
|
import emt.item.block.ItemBlockSolars;
|
||||||
import emt.util.EMTConfigHandler;
|
import emt.util.EMTConfigHandler;
|
||||||
import gregtech.api.enums.GT_Values;
|
import gregtech.api.enums.GTValues;
|
||||||
import gregtech.api.enums.Materials;
|
import gregtech.api.enums.Materials;
|
||||||
import gregtech.api.enums.TierEU;
|
import gregtech.api.enums.TierEU;
|
||||||
import thaumcraft.api.aspects.Aspect;
|
import thaumcraft.api.aspects.Aspect;
|
||||||
@@ -140,7 +140,7 @@ public enum Solars {
|
|||||||
public static void registerReverseRecipes() {
|
public static void registerReverseRecipes() {
|
||||||
for (Solars s : Solars.values()) {
|
for (Solars s : Solars.values()) {
|
||||||
if (s.aspect != null) {
|
if (s.aspect != null) {
|
||||||
GT_Values.RA.stdBuilder().itemInputs(new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta))
|
GTValues.RA.stdBuilder().itemInputs(new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta))
|
||||||
.fluidInputs(Materials.Chlorine.getGas(1000))
|
.fluidInputs(Materials.Chlorine.getGas(1000))
|
||||||
.itemOutputs(
|
.itemOutputs(
|
||||||
new ItemStack(
|
new ItemStack(
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ import emt.client.gui.EMT_UITextures;
|
|||||||
import emt.init.EMTBlocks;
|
import emt.init.EMTBlocks;
|
||||||
import emt.tile.DefinitelyNotAIC2Source;
|
import emt.tile.DefinitelyNotAIC2Source;
|
||||||
import emt.tile.TileEntityEMT;
|
import emt.tile.TileEntityEMT;
|
||||||
import gregtech.api.enums.GT_Values;
|
import gregtech.api.enums.GTValues;
|
||||||
import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
|
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.GT_Packet_Block_Event;
|
import gregtech.api.net.GTPacketBlockEvent;
|
||||||
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;
|
||||||
@@ -102,10 +102,10 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getTierFromCapacity(long capacity) {
|
private int getTierFromCapacity(long capacity) {
|
||||||
for (int i = 0; i < GT_Values.V.length; i++) {
|
for (int i = 0; i < GTValues.V.length; i++) {
|
||||||
if (capacity / 1000 < GT_Values.V[i]) return i;
|
if (capacity / 1000 < GTValues.V[i]) return i;
|
||||||
}
|
}
|
||||||
return GT_Values.V.length - 1;
|
return GTValues.V.length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -424,11 +424,11 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
|||||||
long[] voltAmp = new long[2];
|
long[] voltAmp = new long[2];
|
||||||
voltAmp[0] = getOutputVoltage();
|
voltAmp[0] = getOutputVoltage();
|
||||||
long generating = (long) Math.floor(output * getMaxMulti());
|
long generating = (long) Math.floor(output * getMaxMulti());
|
||||||
if (generating <= GT_Values.V[energySource.getSourceTier()]) {
|
if (generating <= GTValues.V[energySource.getSourceTier()]) {
|
||||||
voltAmp[1] = 1L;
|
voltAmp[1] = 1L;
|
||||||
} else if (generating % GT_Values.V[energySource.getSourceTier()] == 0.0D) {
|
} else if (generating % GTValues.V[energySource.getSourceTier()] == 0.0D) {
|
||||||
voltAmp[1] = (generating / GT_Values.V[energySource.getSourceTier()]);
|
voltAmp[1] = (generating / GTValues.V[energySource.getSourceTier()]);
|
||||||
} else voltAmp[1] = (1L + (generating / GT_Values.V[energySource.getSourceTier()]));
|
} else voltAmp[1] = (1L + (generating / GTValues.V[energySource.getSourceTier()]));
|
||||||
return voltAmp;
|
return voltAmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,28 +437,28 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
|||||||
return calculateMaxVoltAmp()[1];
|
return calculateMaxVoltAmp()[1];
|
||||||
// long ret;
|
// long ret;
|
||||||
// if (this.energySource.getSourceTier() <= 4) {
|
// if (this.energySource.getSourceTier() <= 4) {
|
||||||
// if (this.generating <= GT_Values.V[this.energySource.getSourceTier() - 2]) {
|
// if (this.generating <= GTValues.V[this.energySource.getSourceTier() - 2]) {
|
||||||
// ret = 1L;
|
// ret = 1L;
|
||||||
// }
|
// }
|
||||||
// if (this.generating % GT_Values.V[this.energySource.getSourceTier() - 2] == 0.0D) {
|
// if (this.generating % GTValues.V[this.energySource.getSourceTier() - 2] == 0.0D) {
|
||||||
// ret = (long) (this.generating / GT_Values.V[this.energySource.getSourceTier() - 2]);
|
// ret = (long) (this.generating / GTValues.V[this.energySource.getSourceTier() - 2]);
|
||||||
// } else
|
// } else
|
||||||
// ret = (long) (1L + (this.generating / GT_Values.V[this.energySource.getSourceTier() - 2]));
|
// ret = (long) (1L + (this.generating / GTValues.V[this.energySource.getSourceTier() - 2]));
|
||||||
// } else {
|
// } else {
|
||||||
// if (this.generating <= GT_Values.V[this.energySource.getSourceTier() - 1]) {
|
// if (this.generating <= GTValues.V[this.energySource.getSourceTier() - 1]) {
|
||||||
// ret = 1L;
|
// ret = 1L;
|
||||||
// }
|
// }
|
||||||
// if (this.generating % GT_Values.V[this.energySource.getSourceTier()] == 0.0D) {
|
// if (this.generating % GTValues.V[this.energySource.getSourceTier()] == 0.0D) {
|
||||||
// ret = (long) (this.generating / GT_Values.V[this.energySource.getSourceTier() - 1]);
|
// ret = (long) (this.generating / GTValues.V[this.energySource.getSourceTier() - 1]);
|
||||||
// } else
|
// } else
|
||||||
// ret = (long) (1L + (this.generating / GT_Values.V[this.energySource.getSourceTier() - 1]));
|
// ret = (long) (1L + (this.generating / GTValues.V[this.energySource.getSourceTier() - 1]));
|
||||||
// }
|
// }
|
||||||
// return ret;
|
// return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getOutputVoltage() {
|
public long getOutputVoltage() {
|
||||||
return GT_Values.V[this.energySource.getSourceTier()];
|
return GTValues.V[this.energySource.getSourceTier()];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -856,9 +856,9 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendBlockEvent(byte aID, byte aValue) {
|
public void sendBlockEvent(byte aID, byte aValue) {
|
||||||
GT_Values.NW.sendPacketToAllPlayersInRange(
|
GTValues.NW.sendPacketToAllPlayersInRange(
|
||||||
this.worldObj,
|
this.worldObj,
|
||||||
new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
new GTPacketBlockEvent(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
||||||
this.xCoord,
|
this.xCoord,
|
||||||
this.zCoord);
|
this.zCoord);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,8 +98,4 @@ public class EMTCraftingAspects {
|
|||||||
public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.AIR, 8);
|
public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.AIR, 8);
|
||||||
public static AspectList uuMatterCrystal = new AspectList().add(Aspect.CRYSTAL, 8).add(Aspect.COLD, 8)
|
public static AspectList uuMatterCrystal = new AspectList().add(Aspect.CRYSTAL, 8).add(Aspect.COLD, 8)
|
||||||
.add(Aspect.MAGIC, 8);
|
.add(Aspect.MAGIC, 8);
|
||||||
public static AspectList researchCompleter = new AspectList().add(Aspect.FIRE, 50).add(Aspect.WATER, 50)
|
|
||||||
.add(Aspect.AIR, 50).add(Aspect.EARTH, 50).add(Aspect.ORDER, 50).add(Aspect.ENTROPY, 50);
|
|
||||||
public static AspectList magicalMachineCasing = new AspectList().add(Aspect.FIRE, 8).add(Aspect.AIR, 8)
|
|
||||||
.add(Aspect.ORDER, 8);
|
|
||||||
}
|
}
|
||||||
@@ -94,6 +94,4 @@ public class EMTResearchAspects {
|
|||||||
public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5)
|
public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5)
|
||||||
.add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4);
|
.add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4);
|
||||||
public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AIR, 3);
|
public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AIR, 3);
|
||||||
public static AspectList researchCompleter = new AspectList().add(Aspect.MIND, 8).add(Aspect.MECHANISM, 5)
|
|
||||||
.add(Aspect.EXCHANGE, 5).add(Aspect.AURA, 4);
|
|
||||||
}
|
}
|
||||||
@@ -87,6 +87,7 @@ item.EMT.wing.feather.name=Feather Duct-Taped Wings
|
|||||||
item.EMT.wing.thaumium.name=Thaumium Reinforced Wings
|
item.EMT.wing.thaumium.name=Thaumium Reinforced Wings
|
||||||
item.EMT.wing.nano.name=Nanosuit Wings
|
item.EMT.wing.nano.name=Nanosuit Wings
|
||||||
item.EMT.wing.quantum.name=Quantum Wings
|
item.EMT.wing.quantum.name=Quantum Wings
|
||||||
|
ic2.EMT.quantum.name=Infused Quantum Chestplate
|
||||||
item.EMT.chestplates.infusedQuantum.name=Infused Quantum Chestplate
|
item.EMT.chestplates.infusedQuantum.name=Infused Quantum Chestplate
|
||||||
item.EMT.hammer.broken.name=Broken Relic of Mjolnir
|
item.EMT.hammer.broken.name=Broken Relic of Mjolnir
|
||||||
item.EMT.hammer.name=Mjolnir
|
item.EMT.hammer.name=Mjolnir
|
||||||
@@ -113,15 +114,22 @@ item.EMT.focus.energyBall.name=Energy Ball Focus
|
|||||||
tile.EMT.electricCloud.name=Electric Cloud
|
tile.EMT.electricCloud.name=Electric Cloud
|
||||||
tile.EMT.shield.name=Shield Block
|
tile.EMT.shield.name=Shield Block
|
||||||
tile.EMT.portablenode.name=Portable Node
|
tile.EMT.portablenode.name=Portable Node
|
||||||
|
tile.EMT.essentia.name=Essentia Generator
|
||||||
tile.EMT.essentia.potentia.name=Potentia Generator
|
tile.EMT.essentia.potentia.name=Potentia Generator
|
||||||
tile.EMT.essentia.ignis.name=Ignis Generator
|
tile.EMT.essentia.ignis.name=Ignis Generator
|
||||||
tile.EMT.essentia.auram.name=Auram Generator
|
tile.EMT.essentia.auram.name=Auram Generator
|
||||||
tile.EMT.essentia.arbor.name=Arbor Generator
|
tile.EMT.essentia.arbor.name=Arbor Generator
|
||||||
tile.EMT.essentia.aer.name=Aer Generator
|
tile.EMT.essentia.aer.name=Aer Generator
|
||||||
tile.EMT.essentia.lucrum.name=Lucrum Generator
|
tile.EMT.essentia.lucrum.name=Lucrum Generator
|
||||||
|
tile.EMT.machine.name=Machine
|
||||||
tile.EMT.machine.wandrecharge.name=Industrial Wand Charging Station
|
tile.EMT.machine.wandrecharge.name=Industrial Wand Charging Station
|
||||||
tile.EMT.machine.etheralprocessor.name=Ethereal Processor
|
tile.EMT.machine.etheralprocessor.name=Ethereal Processor
|
||||||
tile.EMT.machine.essentiafiller.name=Essentia Filler - Marked for deprecation
|
tile.EMT.machine.essentiafiller.name=Essentia Filler - Marked for deprecation
|
||||||
|
tile.EMT.solar.name=Compressed Solar Panel
|
||||||
|
tile.EMT.solar2.name=Double Compressed Aer Solar
|
||||||
|
tile.EMT.solar3.name=Quadruple Compressed Solar
|
||||||
|
tile.EMT.solar4.name=Sextuple Compressed Perditio Solar
|
||||||
|
tile.EMT.solar5.name=Octuple Compressed Terra Solar
|
||||||
tile.EMT.solar.compressed.name=Compressed Solar Panel
|
tile.EMT.solar.compressed.name=Compressed Solar Panel
|
||||||
tile.EMT.solar.doublecompressed.name=Double Compressed Solar Panel
|
tile.EMT.solar.doublecompressed.name=Double Compressed Solar Panel
|
||||||
tile.EMT.solar.triplecompressed.name=Triple Compressed Solar Panel
|
tile.EMT.solar.triplecompressed.name=Triple Compressed Solar Panel
|
||||||
@@ -389,10 +397,12 @@ emt.rsname.Inventory Charging Ring=Inventory Charging Ring
|
|||||||
emt.tag.Inventory Charging Ring=Passive charger
|
emt.tag.Inventory Charging Ring=Passive charger
|
||||||
emt.text.Inventory Charging Ring=While other thaumaturgists use rings to charge their runic shields, you feel that there are better applications for them. By fusing power sources into a mundane ring, you have learned how to funnel its charging effects into electric items in your inventory instead. It doesn't generate much at only 32 EU per tick, but that just means there's room for improvement.
|
emt.text.Inventory Charging Ring=While other thaumaturgists use rings to charge their runic shields, you feel that there are better applications for them. By fusing power sources into a mundane ring, you have learned how to funnel its charging effects into electric items in your inventory instead. It doesn't generate much at only 32 EU per tick, but that just means there's room for improvement.
|
||||||
|
|
||||||
|
item.EMT.bauble.name=Armor Charging Ring
|
||||||
emt.rsname.Armor Charging Ring=Armor Charging Ring
|
emt.rsname.Armor Charging Ring=Armor Charging Ring
|
||||||
emt.tag.Armor Charging Ring=Passive life-saver
|
emt.tag.Armor Charging Ring=Passive life-saver
|
||||||
emt.text.Armor Charging Ring=You have found the low but constant recharge rate of your new ring to be more useful than anticipated, but it would be nice if it charged your armor when there wasn't a tool in need of power. By infusing a few more power sources and a piece of armor, you have found a way to have it do just that. Sadly, the new power sources do not increase the recharge rate, but progress is progress.
|
emt.text.Armor Charging Ring=You have found the low but constant recharge rate of your new ring to be more useful than anticipated, but it would be nice if it charged your armor when there wasn't a tool in need of power. By infusing a few more power sources and a piece of armor, you have found a way to have it do just that. Sadly, the new power sources do not increase the recharge rate, but progress is progress.
|
||||||
|
|
||||||
|
item.EMT.item.bauble.name=The One Ring
|
||||||
emt.rsname.The One Ring=The One Ring
|
emt.rsname.The One Ring=The One Ring
|
||||||
emt.tag.The One Ring=Forged inside the pit of the volcanic Mount Doom...
|
emt.tag.The One Ring=Forged inside the pit of the volcanic Mount Doom...
|
||||||
emt.text.The One Ring=Three Rings for the Elven-kings under the sky, Seven for the Dwarf-lords in their halls of stone, Nine for Mortal Men doomed to die, One for the Dark Lord on his dark throne in the Land of Mordor where the Shadows lie. One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them in the Land of Mordor where the Shadows lie. -J.R.R. Tolkien's epigraph to The Lord of The Rings.<BR>You dream of being able to disappear from sight , therefore becoming invulnerable to any attack. You have heard that this Ring lays somewhere in ruins, unaltered by time...
|
emt.text.The One Ring=Three Rings for the Elven-kings under the sky, Seven for the Dwarf-lords in their halls of stone, Nine for Mortal Men doomed to die, One for the Dark Lord on his dark throne in the Land of Mordor where the Shadows lie. One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them in the Land of Mordor where the Shadows lie. -J.R.R. Tolkien's epigraph to The Lord of The Rings.<BR>You dream of being able to disappear from sight , therefore becoming invulnerable to any attack. You have heard that this Ring lays somewhere in ruins, unaltered by time...
|
||||||
@@ -416,7 +426,3 @@ emt.text.Quantum Wings=After exploring all the possibilities of nanotechnologies
|
|||||||
emt.rsname.Infused Quantum Armor=Infused Quantum Сhestplate.
|
emt.rsname.Infused Quantum Armor=Infused Quantum Сhestplate.
|
||||||
emt.tag.Infused Quantum Armor=The last step is here...
|
emt.tag.Infused Quantum Armor=The last step is here...
|
||||||
emt.text.Infused Quantum Armor=You had been nothing to do and you decided to do something useful. You had an idea in your head of making armor which you can fasten the wings or backpack for being protected in flight. Take the wings or backpack in your hands and sit down to put their on armor. To remove them, hold Shift + "Unequip"(see in options).
|
emt.text.Infused Quantum Armor=You had been nothing to do and you decided to do something useful. You had an idea in your head of making armor which you can fasten the wings or backpack for being protected in flight. Take the wings or backpack in your hands and sit down to put their on armor. To remove them, hold Shift + "Unequip"(see in options).
|
||||||
|
|
||||||
emt.rsname.ResearchCompleter=Automated Research
|
|
||||||
emt.tag.ResearchCompleter=No more ordo spam
|
|
||||||
emt.text.ResearchCompleter=It was fun at first, but you've decided it's time to find a better way to handle all this research. By mixing technology and magic you have come up with a multiblock that can complete a research note by itself.<BR><BR>To function, it needs nodes to be placed in the center of the structure and will slowly destroy them while running. Node stabilizers are optional but recommended for keeping so many nodes close together without them destroying each other.
|
|
||||||
@@ -12,10 +12,10 @@ gui.EMT.inventory=Инвентарь
|
|||||||
gui.EMT.book.aspect.output.eu.title=Книга выхода эссенции
|
gui.EMT.book.aspect.output.eu.title=Книга выхода эссенции
|
||||||
gui.EMT.book.aspect.output.essentia.eu=Выход EU за эссенцию
|
gui.EMT.book.aspect.output.essentia.eu=Выход EU за эссенцию
|
||||||
gui.EMT.key.unequip=Снять
|
gui.EMT.key.unequip=Снять
|
||||||
emt.Output=Выход:
|
emt.Output=Выход:
|
||||||
emt.Storage=Хранилище:
|
emt.Storage=Хранилище:
|
||||||
emt.PressShift=<Нажмите SHIFT>
|
emt.PressShift=<Нажмите SHIFT>
|
||||||
emt.Generating=Генерирует:
|
emt.Generating=Генерирует:
|
||||||
emt.Fuel=горючее
|
emt.Fuel=горючее
|
||||||
|
|
||||||
#=============Tooltips=============
|
#=============Tooltips=============
|
||||||
@@ -411,7 +411,3 @@ emt.text.Quantum Wings=После исследования всех возмож
|
|||||||
emt.rsname.Infused Quantum Armor=Наполненный квантовый нагрудник.
|
emt.rsname.Infused Quantum Armor=Наполненный квантовый нагрудник.
|
||||||
emt.tag.Infused Quantum Armor=Последний шаг...
|
emt.tag.Infused Quantum Armor=Последний шаг...
|
||||||
emt.text.Infused Quantum Armor=Вам было нечего делать, и Вы решили заняться хоть чем-то полезным. Вам в голову пришла идея создания брони, на которую можно нацепить крылья или ранец, чтобы быть защищёнными в полёте. Возмите в руку крылья или ранец, и присядьте чтобы надеть их на броню. Чтобы снять их, зажмите Shift + "Снять"(Смотрите в настройках).
|
emt.text.Infused Quantum Armor=Вам было нечего делать, и Вы решили заняться хоть чем-то полезным. Вам в голову пришла идея создания брони, на которую можно нацепить крылья или ранец, чтобы быть защищёнными в полёте. Возмите в руку крылья или ранец, и присядьте чтобы надеть их на броню. Чтобы снять их, зажмите Shift + "Снять"(Смотрите в настройках).
|
||||||
|
|
||||||
emt.rsname.ResearchCompleter=Автоматизированное исследование
|
|
||||||
emt.tag.ResearchCompleter=Больше никакого спама
|
|
||||||
emt.text.ResearchCompleter=Поначалу это было весело, но вы решили, что пришло время найти лучший способ провести все эти исследования. Смешав технологию и магию, вы создали мультиблок, который может самостоятельно завершить исследовательскую заметку.<BR><BR>Для работы ему необходимо, чтобы узлы были размещены в центре конструкции, и он будет медленно разрушать их во время работы. Стабилизаторы узлов не являются обязательными, но рекомендуются для удержания большого количества узлов близко друг к другу, не разрушая друг друга.
|
|
||||||
@@ -406,7 +406,3 @@ emt.text.Quantum Wings=在探索完纳米科技所有的可能性后,你决定
|
|||||||
emt.rsname.Infused Quantum Armor=注魔量子胸甲
|
emt.rsname.Infused Quantum Armor=注魔量子胸甲
|
||||||
emt.tag.Infused Quantum Armor=最后的一步...
|
emt.tag.Infused Quantum Armor=最后的一步...
|
||||||
emt.text.Infused Quantum Armor=你已经无事可做,但是你决定做一些有用的东西.你的脑海中浮现出一个想法,在制作盔甲时可以把羽翼或者背包系在一起以保证飞行的安全.持有羽翼或者背包时在潜行状态下右击可以将它们系在盔甲上.要将它们拿下来时只需要按住Shift + [卸下装备]键(详见[选项]-[控制]).
|
emt.text.Infused Quantum Armor=你已经无事可做,但是你决定做一些有用的东西.你的脑海中浮现出一个想法,在制作盔甲时可以把羽翼或者背包系在一起以保证飞行的安全.持有羽翼或者背包时在潜行状态下右击可以将它们系在盔甲上.要将它们拿下来时只需要按住Shift + [卸下装备]键(详见[选项]-[控制]).
|
||||||
|
|
||||||
emt.rsname.ResearchCompleter=自动化研究
|
|
||||||
emt.tag.ResearchCompleter=再也不用担心秩序危机了
|
|
||||||
emt.text.ResearchCompleter=连连看一开始很有趣,但你已经决定寻找一种更好的方法解决所有的研究.最终,你结合科技与魔法,制造出了一台多方块机器,可以自动完成研究笔记.<BR><BR>需要将灵气节点放在机器内部才能使其正常运行,而且在运行过程中,机器会缓慢摧毁这些节点.节点稳定器不是必须品,但为了让这么多节点不互相打架,我们还是推荐使用节点稳定器.
|
|
||||||
Reference in new issue
Block a user