mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-25 22:34:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a51e36a33 | ||
|
|
41ba26b62d | ||
|
|
d16c3f27d4 | ||
|
|
46fa64f4f7 | ||
|
|
893d79e147 | ||
|
|
4920c605bc | ||
|
|
5eadeb8067 | ||
|
|
9dee3ae782 | ||
|
|
9b40d06fb7 | ||
|
|
1c69ce9b4d | ||
|
|
1049ca875c | ||
|
|
1d613494e9 | ||
|
|
1d81835e32 | ||
|
|
940073709b | ||
|
|
9052428a3d | ||
|
|
e1e53af24f | ||
|
|
71c9976777 | ||
|
|
cc46d6a039 | ||
|
|
358a1f213e | ||
|
|
91a816555b | ||
|
|
bb9ed2f219 | ||
|
|
730826c9d9 | ||
|
|
0650072b85 | ||
|
|
d48233f266 | ||
|
|
367f37c7d5 | ||
|
|
a1151399fc | ||
|
|
cb68d0a951 | ||
|
|
3456ce64d7 | ||
|
|
f3ccdb450d | ||
|
|
6df81d82d1 | ||
|
|
83733212fb | ||
|
|
721c5c6aca | ||
|
|
501cca5fd2 | ||
|
|
7ec71bdcc9 | ||
|
|
c450204272 | ||
|
|
58c206501b | ||
|
|
e7aaf791ad | ||
|
|
ab52ffb5df | ||
|
|
7eabde56d9 | ||
|
|
6d8ec1365a |
No files matched your search
+7
-6
@@ -1,14 +1,15 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.48.123:dev'
|
||||
api 'com.github.GTNewHorizons:Baubles:1.0.4:dev'
|
||||
api 'com.github.GTNewHorizons:ModularUI:1.2.0:dev'
|
||||
api ('com.github.GTNewHorizons:ThaumicBoots:1.3.7:dev'){
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.0-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:ModularUI:1.3.0:dev')
|
||||
api('com.github.GTNewHorizons:ThaumicBoots:1.4.14:dev') {
|
||||
exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools'
|
||||
exclude module: 'Baubles'
|
||||
}
|
||||
|
||||
api('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
|
||||
api 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
||||
api 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.46:dev')
|
||||
}
|
||||
+5
-5
@@ -14,7 +14,7 @@ modId = EMT
|
||||
modGroup = emt
|
||||
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
@@ -50,10 +50,10 @@ enableGenericInjection = true
|
||||
# Generate a class with a String field for the mod version named as defined below.
|
||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||
generateGradleTokenClass =
|
||||
generateGradleTokenClass = emt.EMTTags
|
||||
|
||||
# Name of the token containing the project's current version to generate/replace.
|
||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||
gradleTokenVersion = VERSION
|
||||
|
||||
# [DEPRECATED] Mod ID replacement token.
|
||||
gradleTokenModId =
|
||||
@@ -70,7 +70,7 @@ gradleTokenGroupName =
|
||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||
# version in @Mod([...], version = VERSION, [...]).
|
||||
# Leave these properties empty to skip individual token replacements.
|
||||
replaceGradleTokenInFile = EMT.java
|
||||
replaceGradleTokenInFile =
|
||||
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||
# leave this property empty.
|
||||
@@ -151,7 +151,7 @@ modrinthProjectId =
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
modrinthRelations =
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -86,8 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -206,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.25'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.44'
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import emt.command.CommandOutputs;
|
||||
import emt.init.EMTEntities;
|
||||
import emt.init.Registry;
|
||||
import emt.network.PacketEMTKeys;
|
||||
import emt.network.PacketNodeInfo;
|
||||
import emt.proxy.CommonProxy;
|
||||
import emt.tile.solar.Solars;
|
||||
import emt.util.EMTClientEventHandler;
|
||||
@@ -41,8 +40,8 @@ public class EMT {
|
||||
|
||||
public static final String NAME = "Electro-Magic Tools";
|
||||
public static final String MOD_ID = "EMT";
|
||||
public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
public static final String TEXTURE_PATH = "emt";
|
||||
public static final String VERSION = EMTTags.VERSION;
|
||||
public static final String RESOURCE_PATH = "emt";
|
||||
public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory";
|
||||
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
|
||||
public static final String COMMON_PROXY = "emt.proxy.CommonProxy";
|
||||
@@ -115,8 +114,5 @@ public class EMT {
|
||||
|
||||
public void registerPackets() {
|
||||
INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER);
|
||||
if (Registry.enableGTCompat) {
|
||||
INSTANCE.registerMessage(PacketNodeInfo.class, PacketNodeInfo.class, 1, Side.CLIENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public abstract class BlockBase extends Block {
|
||||
name = unlocName;
|
||||
setBlockName(EMT.MOD_ID + ".block." + unlocName);
|
||||
if (textureName != null) {
|
||||
setBlockTextureName(EMT.TEXTURE_PATH + ":" + textureName);
|
||||
setBlockTextureName(EMT.RESOURCE_PATH + ":" + textureName);
|
||||
}
|
||||
setCreativeTab(EMT.TAB);
|
||||
setStepSound(soundType);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class BlockElectricCloud extends BlockBase {
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
icon = ir.registerIcon(EMT.TEXTURE_PATH + ":empty");
|
||||
icon = ir.registerIcon(EMT.RESOURCE_PATH + ":empty");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,20 +33,20 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
super.registerBlockIcons(ir);
|
||||
this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top");
|
||||
this.blockIcon = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/top");
|
||||
|
||||
for (int meta = 0; meta < subtypes; meta++) {
|
||||
iconSets[meta].top = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
|
||||
iconSets[meta].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
|
||||
iconSets[meta].side = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/side");
|
||||
iconSets[meta].top = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/top");
|
||||
iconSets[meta].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/top");
|
||||
iconSets[meta].side = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/side");
|
||||
}
|
||||
|
||||
iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/potentiafront");
|
||||
iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/ignisfront");
|
||||
iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/auramfront");
|
||||
iconSets[3].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/arborfront");
|
||||
iconSets[4].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
|
||||
iconSets[5].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
|
||||
iconSets[0].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/potentiafront");
|
||||
iconSets[1].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/ignisfront");
|
||||
iconSets[2].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/auramfront");
|
||||
iconSets[3].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/arborfront");
|
||||
iconSets[4].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/aerfront");
|
||||
iconSets[5].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/aerfront");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,27 +36,27 @@ public class BlockMachines extends BlockBaseContainer {
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
super.registerBlockIcons(ir);
|
||||
|
||||
this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top");
|
||||
this.blockIcon = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/top");
|
||||
|
||||
iconSets[0].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top");
|
||||
iconSets[1].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
||||
iconSets[2].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
||||
iconSets[0].top = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/top");
|
||||
iconSets[1].top = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||
iconSets[2].top = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||
|
||||
iconSets[0].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side");
|
||||
iconSets[1].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator");
|
||||
iconSets[2].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
||||
iconSets[0].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/side");
|
||||
iconSets[1].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmacerator");
|
||||
iconSets[2].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||
|
||||
iconSets[0].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side");
|
||||
iconSets[1].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator");
|
||||
iconSets[2].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
||||
iconSets[0].side = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/side");
|
||||
iconSets[1].side = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmacerator");
|
||||
iconSets[2].side = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||
|
||||
iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger");
|
||||
iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfront");
|
||||
iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
||||
iconSets[0].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/wandcharger");
|
||||
iconSets[1].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratorfront");
|
||||
iconSets[2].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||
|
||||
iconSets[0].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger");
|
||||
iconSets[1].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfrontactive");
|
||||
iconSets[2].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop");
|
||||
iconSets[0].frontOn = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/wandcharger");
|
||||
iconSets[1].frontOn = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratorfrontactive");
|
||||
iconSets[2].frontOn = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -60,7 +60,7 @@ public class BlockPortableNode extends BlockAiry {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister ri) {
|
||||
texture = ri.registerIcon(EMT.TEXTURE_PATH + ":portablenode");
|
||||
texture = ri.registerIcon(EMT.RESOURCE_PATH + ":portablenode");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -39,7 +39,7 @@ public class BlockShield extends Block {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":shield");
|
||||
this.blockIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":shield");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,19 +30,19 @@ public class BlockSolars extends BlockBaseContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
IIcon solarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/solartop");
|
||||
IIcon doubleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/doublesolartop");
|
||||
IIcon tripleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/triplesolartop");
|
||||
IIcon solarTop = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/solartop");
|
||||
IIcon doubleSolarTop = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/doublesolartop");
|
||||
IIcon tripleSolarTop = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/triplesolartop");
|
||||
|
||||
IIcon bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/bottom");
|
||||
IIcon bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/bottom");
|
||||
|
||||
IIcon side = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/side");
|
||||
IIcon waterSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/water/waterside");
|
||||
IIcon darkSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/dark/darkside");
|
||||
IIcon orderSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/order/orderside");
|
||||
IIcon fireSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/fire/fireside");
|
||||
IIcon airSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/air/airside");
|
||||
IIcon earthSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/earth/earthside");
|
||||
IIcon side = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/side");
|
||||
IIcon waterSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/water/waterside");
|
||||
IIcon darkSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/dark/darkside");
|
||||
IIcon orderSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/order/orderside");
|
||||
IIcon fireSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/fire/fireside");
|
||||
IIcon airSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/air/airside");
|
||||
IIcon earthSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/earth/earthside");
|
||||
|
||||
IIcon[] sides = { side, orderSide, darkSide, airSide, earthSide, waterSide, fireSide };
|
||||
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
package emt.client.gui;
|
||||
|
||||
import static emt.EMT.TEXTURE_PATH;
|
||||
import static emt.EMT.RESOURCE_PATH;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.drawable.UITexture;
|
||||
|
||||
public class EMT_UITextures {
|
||||
|
||||
public static final UITexture OVERLAY_SLOT_FUSION_CRAFTING = UITexture
|
||||
.fullImage(TEXTURE_PATH, "guis/overlay_slot/fusion_crafter");
|
||||
public static final UITexture OVERLAY_SLOT_WAND = UITexture.fullImage(TEXTURE_PATH, "guis/overlay_slot/wand");
|
||||
.fullImage(RESOURCE_PATH, "guis/overlay_slot/fusion_crafter");
|
||||
public static final UITexture OVERLAY_SLOT_WAND = UITexture.fullImage(RESOURCE_PATH, "guis/overlay_slot/wand");
|
||||
|
||||
public static final UITexture PICTURE_GAUGE_EMPTY_25 = UITexture
|
||||
.fullImage(TEXTURE_PATH, "guis/picture/gauge_empty_25");
|
||||
.fullImage(RESOURCE_PATH, "guis/picture/gauge_empty_25");
|
||||
public static final UITexture PICTURE_GAUGE_GENERATOR = UITexture
|
||||
.fullImage(TEXTURE_PATH, "guis/picture/gauge_generator");
|
||||
public static final UITexture PICTURE_GAUGE_SOLAR = UITexture.fullImage(TEXTURE_PATH, "guis/picture/gauge_solar");
|
||||
.fullImage(RESOURCE_PATH, "guis/picture/gauge_generator");
|
||||
public static final UITexture PICTURE_GAUGE_SOLAR = UITexture.fullImage(RESOURCE_PATH, "guis/picture/gauge_solar");
|
||||
public static final UITexture PICTURE_GAUGE_EMPTY_11 = UITexture
|
||||
.fullImage(TEXTURE_PATH, "guis/picture/gauge_empty_11");
|
||||
.fullImage(RESOURCE_PATH, "guis/picture/gauge_empty_11");
|
||||
public static final UITexture PICTURE_SOLAR_INDICATOR = UITexture
|
||||
.fullImage(TEXTURE_PATH, "guis/picture/solar_indicator");
|
||||
.fullImage(RESOURCE_PATH, "guis/picture/solar_indicator");
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import emt.entity.EntityLaser;
|
||||
public class RenderLaser extends Render {
|
||||
|
||||
private static final ResourceLocation laserTexture = new ResourceLocation(
|
||||
EMT.TEXTURE_PATH,
|
||||
EMT.RESOURCE_PATH,
|
||||
"textures/models/lasermodel.png");
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@ import emt.entity.EntityShield;
|
||||
public class RenderShield extends Render {
|
||||
|
||||
private static final ResourceLocation shieldTexture = new ResourceLocation(
|
||||
EMT.TEXTURE_PATH,
|
||||
EMT.RESOURCE_PATH,
|
||||
"textures/models/shield.png");
|
||||
static int glCallList;
|
||||
|
||||
|
||||
@@ -2,37 +2,26 @@ package emt.gthandler.common.loader;
|
||||
|
||||
import static emt.command.CommandOutputs.mkbook;
|
||||
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.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import emt.tile.GT_MetaTileEntity_ResearchCompleter;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.GTValues;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.enums.TierEU;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GTOreDictUnificator;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
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() {
|
||||
GT_Values.RA.stdBuilder()
|
||||
GTValues.RA.stdBuilder()
|
||||
.itemInputs(
|
||||
new ItemStack(Items.book),
|
||||
GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.circuit, Materials.LV, 1L),
|
||||
new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE))
|
||||
.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.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
@@ -102,8 +103,6 @@ public class EMTRecipes {
|
||||
public static ShapedArcaneRecipe electricScribingTools;
|
||||
public static ShapedArcaneRecipe thaumiumWing;
|
||||
public static ShapedArcaneRecipe thaumiumWings;
|
||||
public static ShapedArcaneRecipe researchCompleter;
|
||||
public static ShapedArcaneRecipe magicalMachineCasing;
|
||||
public static CrucibleRecipe ignisGenerator;
|
||||
public static CrucibleRecipe auramGenerator;
|
||||
public static CrucibleRecipe arborGenerator;
|
||||
@@ -929,18 +928,6 @@ public class EMTRecipes {
|
||||
'X',
|
||||
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) {
|
||||
/** Crucible Recipes **/
|
||||
ignisGenerator = addCrucibleRecipe(
|
||||
@@ -1091,54 +1078,58 @@ public class EMTRecipes {
|
||||
|
||||
/** IC2 Stuff related recipes **/
|
||||
|
||||
/* Ore Clusters Macerator Recipes */
|
||||
ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy();
|
||||
ironClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)),
|
||||
null,
|
||||
true,
|
||||
ironClusterRecipe);
|
||||
final boolean isDreamcraftNotLoaded = !Loader.isModLoaded("dreamcraft");
|
||||
|
||||
ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy();
|
||||
goldClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)),
|
||||
null,
|
||||
true,
|
||||
goldClusterRecipe);
|
||||
if (isDreamcraftNotLoaded) {
|
||||
/* Ore Clusters Macerator Recipes */
|
||||
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 copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy();
|
||||
copperClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)),
|
||||
null,
|
||||
true,
|
||||
copperClusterRecipe);
|
||||
ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy();
|
||||
goldClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)),
|
||||
null,
|
||||
true,
|
||||
goldClusterRecipe);
|
||||
|
||||
ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy();
|
||||
tinClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)),
|
||||
null,
|
||||
true,
|
||||
tinClusterRecipe);
|
||||
ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy();
|
||||
copperClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)),
|
||||
null,
|
||||
true,
|
||||
copperClusterRecipe);
|
||||
|
||||
ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy();
|
||||
silverClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)),
|
||||
null,
|
||||
true,
|
||||
silverClusterRecipe);
|
||||
ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy();
|
||||
tinClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)),
|
||||
null,
|
||||
true,
|
||||
tinClusterRecipe);
|
||||
|
||||
ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy();
|
||||
leadClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)),
|
||||
null,
|
||||
true,
|
||||
leadClusterRecipe);
|
||||
ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy();
|
||||
silverClusterRecipe.stackSize = 22;
|
||||
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
|
||||
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)),
|
||||
null,
|
||||
true,
|
||||
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 */
|
||||
thaumiumPlate = GameRegistry.addShapedRecipe(
|
||||
@@ -1152,76 +1143,79 @@ public class EMTRecipes {
|
||||
new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE),
|
||||
'Z',
|
||||
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 (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)");
|
||||
if (isDreamcraftNotLoaded) {
|
||||
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 (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();) {
|
||||
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 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));
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ public class EMTResearches {
|
||||
}
|
||||
|
||||
public static void addResearchTab() {
|
||||
ResourceLocation background = new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/background.png");
|
||||
ResourceLocation background = new ResourceLocation(EMT.RESOURCE_PATH, "textures/misc/background.png");
|
||||
ResearchCategories
|
||||
.registerCategory("EMT", new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png"), background);
|
||||
.registerCategory("EMT", new ResourceLocation(EMT.RESOURCE_PATH, "textures/misc/emt.png"), background);
|
||||
}
|
||||
|
||||
public static void addResearch() {
|
||||
@@ -31,7 +31,7 @@ public class EMTResearches {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png")).setRound().setAutoUnlock()
|
||||
new ResourceLocation(EMT.RESOURCE_PATH, "textures/misc/emt.png")).setRound().setAutoUnlock()
|
||||
.registerResearchItem().setPages(new ResearchPage(""));
|
||||
new EMTResearchItem("Diamond Chainsaw", 5, -6, 0, new ItemStack(EMTItems.diamondChainsaw)).setRound()
|
||||
.setAutoUnlock().registerResearchItem()
|
||||
@@ -54,10 +54,6 @@ public class EMTResearches {
|
||||
new ResearchPage(EMTRecipes.cardboard),
|
||||
new ResearchPage(EMTRecipes.featherWing),
|
||||
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 **/
|
||||
|
||||
@@ -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() {
|
||||
if (enableGTCompat) {
|
||||
EMT_GT_Loader.run();
|
||||
}
|
||||
EMTRecipes.registerEarlyRecipes();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ItemBase extends Item {
|
||||
public ItemBase(String unlocName, String textureName) {
|
||||
super();
|
||||
setUnlocalizedName(EMT.MOD_ID + unlocName);
|
||||
setTextureName(EMT.TEXTURE_PATH + ":" + textureName);
|
||||
setTextureName(EMT.RESOURCE_PATH + ":" + textureName);
|
||||
setCreativeTab(EMT.TAB);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,8 +57,8 @@ public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ri) {
|
||||
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":armoreumaker");
|
||||
this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":inventoryeumaker");
|
||||
this.icon[0] = ri.registerIcon(EMT.RESOURCE_PATH + ":armoreumaker");
|
||||
this.icon[1] = ri.registerIcon(EMT.RESOURCE_PATH + ":inventoryeumaker");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -124,26 +124,26 @@ public class ItemMaterials extends Item {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ri) {
|
||||
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/clusteruranium");
|
||||
this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedamber");
|
||||
this.icon[2] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedamber");
|
||||
this.icon[3] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedcinnabar");
|
||||
this.icon[4] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedcinnabar");
|
||||
this.icon[5] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumplate");
|
||||
this.icon[6] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/lightningsummoner");
|
||||
this.icon[7] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/feathermesh");
|
||||
this.icon[8] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/glue");
|
||||
this.icon[9] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/ducttape");
|
||||
this.icon[10] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/rubberball");
|
||||
this.icon[11] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboard");
|
||||
this.icon[12] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboardsheet");
|
||||
this.icon[13] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/taintedfeather");
|
||||
this.icon[14] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumWing");
|
||||
this.icon[15] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/uumatterdrop");
|
||||
this.icon[16] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/draconicSchematic");
|
||||
this.icon[17] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/wyvernSchematic");
|
||||
this.icon[18] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/awakenedSchematic");
|
||||
this.icon[19] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/chaoticSchematic");
|
||||
this.icon[0] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/clusteruranium");
|
||||
this.icon[1] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/crushedamber");
|
||||
this.icon[2] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/purifiedamber");
|
||||
this.icon[3] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/crushedcinnabar");
|
||||
this.icon[4] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/purifiedcinnabar");
|
||||
this.icon[5] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/thaumiumplate");
|
||||
this.icon[6] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/lightningsummoner");
|
||||
this.icon[7] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/feathermesh");
|
||||
this.icon[8] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/glue");
|
||||
this.icon[9] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/ducttape");
|
||||
this.icon[10] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/rubberball");
|
||||
this.icon[11] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/cardboard");
|
||||
this.icon[12] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/cardboardsheet");
|
||||
this.icon[13] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/taintedfeather");
|
||||
this.icon[14] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/thaumiumWing");
|
||||
this.icon[15] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/uumatterdrop");
|
||||
this.icon[16] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/draconicSchematic");
|
||||
this.icon[17] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/wyvernSchematic");
|
||||
this.icon[18] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/awakenedSchematic");
|
||||
this.icon[19] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/chaoticSchematic");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -72,7 +72,7 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ri) {
|
||||
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":onering");
|
||||
this.icon[0] = ri.registerIcon(EMT.RESOURCE_PATH + ":onering");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
this.setMaxDamage(27);
|
||||
this.setMaxStackSize(1);
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -73,7 +73,7 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_electric");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/boots_electric");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -188,17 +188,6 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
|
||||
if (event.entityLiving instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
ItemStack boots = player.getCurrentArmor(0);
|
||||
boolean hasArmor = boots != null && boots.getItem() == this;
|
||||
|
||||
if (hasArmor) player.motionY += jumpBonus * (float) getJumpModifier(boots);
|
||||
}
|
||||
}
|
||||
|
||||
// make the boots worth upgrading
|
||||
public float getMaxHealthyDropDist() {
|
||||
return 20.0F;
|
||||
@@ -208,39 +197,9 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
return 4.0f;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingFall(LivingFallEvent event) {
|
||||
if ((EMT.instance.isSimulating()) && ((event.entity instanceof EntityLivingBase))) {
|
||||
if (event.entity instanceof EntityPlayer) {
|
||||
EntityPlayer entity = (EntityPlayer) event.entity;
|
||||
if ((entity.inventory.armorInventory[0] != null)
|
||||
&& (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) {
|
||||
ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller) entity.inventory.armorInventory[0]
|
||||
.getItem();
|
||||
ItemStack stack = entity.inventory.armorInventory[0];
|
||||
|
||||
// Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty
|
||||
if (tUsedBoots.getMinimumDropDist() > event.distance) {
|
||||
event.setCanceled(true);
|
||||
} else {
|
||||
float tEnergyDemand = tUsedBoots.energyPerDamage
|
||||
* (((event.distance > tUsedBoots.getMaxHealthyDropDist()) ? event.distance * 3
|
||||
: event.distance) - 4.0F);
|
||||
if (tEnergyDemand <= ElectricItem.manager.getCharge(stack)) {
|
||||
// EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance,
|
||||
// tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() ));
|
||||
ElectricItem.manager.discharge(stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false);
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/electricboots.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/electricboots.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -341,4 +300,49 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
return false;
|
||||
}
|
||||
|
||||
public class EventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
|
||||
if (event.entityLiving instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
ItemStack boots = player.getCurrentArmor(0);
|
||||
boolean hasArmor = boots != null && boots.getItem() == ItemElectricBootsTraveller.this;
|
||||
|
||||
if (hasArmor) player.motionY += jumpBonus * (float) getJumpModifier(boots);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingFall(LivingFallEvent event) {
|
||||
if ((EMT.instance.isSimulating()) && ((event.entity instanceof EntityLivingBase))) {
|
||||
if (event.entity instanceof EntityPlayer) {
|
||||
EntityPlayer entity = (EntityPlayer) event.entity;
|
||||
if ((entity.inventory.armorInventory[0] != null)
|
||||
&& (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) {
|
||||
ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller) entity.inventory.armorInventory[0]
|
||||
.getItem();
|
||||
ItemStack stack = entity.inventory.armorInventory[0];
|
||||
|
||||
// Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty
|
||||
if (tUsedBoots.getMinimumDropDist() > event.distance) {
|
||||
event.setCanceled(true);
|
||||
} else {
|
||||
float tEnergyDemand = tUsedBoots.energyPerDamage
|
||||
* (((event.distance > tUsedBoots.getMaxHealthyDropDist()) ? event.distance * 3
|
||||
: event.distance) - 4.0F);
|
||||
if (tEnergyDemand <= ElectricItem.manager.getCharge(stack)) {
|
||||
// EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance,
|
||||
// tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() ));
|
||||
ElectricItem.manager
|
||||
.discharge(stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false);
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,12 +4,16 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
|
||||
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller implements IHazardProtector {
|
||||
|
||||
public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||
super(material, par3, par4);
|
||||
@@ -44,11 +48,17 @@ public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_nano");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/boots_nano");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/nanobootstravel.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/nanobootstravel.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,16 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
|
||||
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller implements IHazardProtector {
|
||||
|
||||
public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||
super(material, par3, par4);
|
||||
@@ -44,11 +48,17 @@ public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_quantum");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/boots_quantum");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/quantumbootstravel.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/quantumbootstravel.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -28,6 +29,8 @@ import emt.EMT;
|
||||
import emt.client.model.ModelSpecialArmor;
|
||||
import emt.init.EMTItems;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.core.IC2;
|
||||
@@ -38,7 +41,8 @@ import ic2.core.item.armor.ItemArmorElectric;
|
||||
import ic2.core.util.StackUtil;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor, IHazardProtector {
|
||||
|
||||
public static AudioSource audioSource;
|
||||
protected static ArrayList<Integer> potionRemovalCost = new ArrayList<Integer>();
|
||||
@@ -56,18 +60,18 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
|
||||
public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) {
|
||||
super(internalName, InternalName.quantum, armorType, 20000000D, 18000.0D, 4);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
iconNONE = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest");
|
||||
iconJETPACK = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_jetpack");
|
||||
iconTHAUMIUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_t");
|
||||
iconNANO = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_n");
|
||||
iconQUANTUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_q");
|
||||
iconNONE = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest");
|
||||
iconJETPACK = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_jetpack");
|
||||
iconTHAUMIUM = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_wing_t");
|
||||
iconNANO = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_wing_n");
|
||||
iconQUANTUM = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_wing_q");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,24 +83,6 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
return (StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityLivingFallEvent(LivingFallEvent event) {
|
||||
if (IC2.platform.isSimulating() && (event.entity instanceof EntityLivingBase)) {
|
||||
EntityLivingBase entity = (EntityLivingBase) event.entity;
|
||||
ItemStack armor = entity.getEquipmentInSlot(1);
|
||||
|
||||
if ((armor != null) && (armor.getItem() == this)) {
|
||||
int fallDamage = Math.max((int) event.distance - 10, 0);
|
||||
double energyCost = getEnergyPerDamage() * fallDamage;
|
||||
|
||||
if (energyCost <= ElectricItem.manager.getCharge(armor)) {
|
||||
ElectricItem.manager.discharge(armor, energyCost, Integer.MAX_VALUE, true, false, false);
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 1.1D;
|
||||
@@ -370,15 +356,15 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
|
||||
switch (wing) {
|
||||
case JETPACK:
|
||||
return EMT.TEXTURE_PATH + ":textures/models/quantum_jetpack.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/quantum_jetpack.png";
|
||||
case THAUMIUM:
|
||||
return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_t.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/quantum_wings_t.png";
|
||||
case NANO:
|
||||
return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_n.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/quantum_wings_n.png";
|
||||
case QUANTUM:
|
||||
return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_q.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/quantum_wings_q.png";
|
||||
default:
|
||||
return EMT.TEXTURE_PATH + ":textures/models/quantum.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/quantum.png";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -534,6 +520,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
|
||||
if (isJumping && !player.onGround && player.motionY < 0) {
|
||||
player.motionY *= f1;
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
|
||||
if (player.isInWater() && !player.capabilities.isCreativeMode) {
|
||||
@@ -555,9 +542,6 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
|
||||
if (player.isSneaking() && !player.onGround && player.motionY < 0) {
|
||||
player.motionY *= 0.6;
|
||||
}
|
||||
|
||||
if (player.fallDistance > 0.0F) {
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
}
|
||||
@@ -566,4 +550,31 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
public int getRunicCharge(ItemStack itemStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public class EventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityLivingFallEvent(LivingFallEvent event) {
|
||||
if (IC2.platform.isSimulating() && (event.entity instanceof EntityLivingBase)) {
|
||||
EntityLivingBase entity = (EntityLivingBase) event.entity;
|
||||
ItemStack armor = entity.getEquipmentInSlot(1);
|
||||
|
||||
if ((armor != null) && (armor.getItem() == ItemInfusedQuantumChestplate.this)) {
|
||||
int fallDamage = Math.max((int) event.distance - 10, 0);
|
||||
double energyCost = getEnergyPerDamage() * fallDamage;
|
||||
|
||||
if (energyCost <= ElectricItem.manager.getCharge(armor)) {
|
||||
ElectricItem.manager.discharge(armor, energyCost, Integer.MAX_VALUE, true, false, false);
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,15 +43,37 @@ public class ItemElectricGoggles extends ItemArmor
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow damage to be set to avoid breaking IC2 Energy bar or other features, while preventing the item from
|
||||
* breaking.
|
||||
*
|
||||
* @param stack the item stack
|
||||
* @param damage the new damage value
|
||||
*/
|
||||
@Override
|
||||
public void setDamage(ItemStack stack, int damage) {
|
||||
int max = stack.getMaxDamage();
|
||||
|
||||
if (max > 0) {
|
||||
if (damage >= max) {
|
||||
damage = max - 1;
|
||||
} else if (damage < 0) {
|
||||
damage = 0;
|
||||
}
|
||||
}
|
||||
|
||||
super.setDamage(stack, damage);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_electric");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_electric");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/electricgoggles.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/electricgoggles.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,12 +6,16 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import ic2.api.item.IC2Items;
|
||||
|
||||
public class ItemNanoGoggles extends ItemElectricGoggles {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||
public class ItemNanoGoggles extends ItemElectricGoggles implements IHazardProtector {
|
||||
|
||||
public ItemNanoGoggles(ArmorMaterial material, int renderIndex, int armorType) {
|
||||
super(material, renderIndex, armorType);
|
||||
@@ -28,12 +32,12 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_nano");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_nano");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/thaumicnanohelmet.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/thaumicnanohelmet.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -50,4 +54,10 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -42,12 +42,12 @@ public class ItemQuantumGoggles extends ItemNanoGoggles {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_quantum");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_quantum");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/thaumicquantumhelmet.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/thaumicquantumhelmet.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,12 +48,12 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_solar");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_solar");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/solarrevealinghelmet.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/solarrevealinghelmet.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,13 +39,13 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_feather");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_feather");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/featherwing.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/featherwing.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,6 +107,7 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
|
||||
if (isJumping && !player.onGround && player.motionY < 0) {
|
||||
player.motionY *= f1;
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
|
||||
if (player.isInWater() && !player.capabilities.isCreativeMode) {
|
||||
@@ -124,6 +125,7 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
|
||||
if (player.isSneaking() && !player.onGround && player.motionY < 0) {
|
||||
player.motionY *= 0.6;
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,15 +14,20 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
|
||||
public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectricItem, ISpecialArmor, IMetalArmor {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
|
||||
public class ItemNanoWing extends ItemThaumiumReinforcedWing
|
||||
implements IElectricItem, ISpecialArmor, IMetalArmor, IHazardProtector {
|
||||
|
||||
public static int maxCharge = 1000000;
|
||||
public int tier = 3;
|
||||
@@ -45,7 +50,7 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_nano");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_nano");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -64,7 +69,7 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/nanowing.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/nanowing.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -176,4 +181,10 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
||||
public Item getEmptyItem(ItemStack itemStack) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -33,13 +33,13 @@ public class ItemQuantumWing extends ItemNanoWing {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_quantum");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_quantum");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/quantumwing.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/quantumwing.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,13 +40,13 @@ public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisD
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_thaumium");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_thaumium");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/thaumiumwing.png";
|
||||
return EMT.RESOURCE_PATH + ":textures/models/thaumiumwing.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ItemBlockElectricCloud extends ItemBlock {
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "electric_cloud");
|
||||
icon = ir.registerIcon(EMT.RESOURCE_PATH + ":" + "electric_cloud");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package emt.item.block;
|
||||
|
||||
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.util.List;
|
||||
|
||||
@@ -31,21 +31,7 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "focus_" + textureName);
|
||||
}
|
||||
|
||||
boolean hasDepth() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemTool(ItemStack par1ItemStack) {
|
||||
return true;
|
||||
this.icon = ir.registerIcon(EMT.RESOURCE_PATH + ":" + "focus_" + textureName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,18 +49,10 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
return new AspectList();
|
||||
}
|
||||
|
||||
public boolean isUseItem(ItemStack stack) {
|
||||
return isVisCostPerTick(stack);
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer,
|
||||
MovingObjectPosition paramMovingObjectPosition) {
|
||||
if (isUseItem(paramItemStack)) paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
|
||||
if (isVisCostPerTick(paramItemStack)) paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
|
||||
return paramItemStack;
|
||||
}
|
||||
|
||||
@@ -84,19 +62,9 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
@Override
|
||||
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "00";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemEnchantability() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
@@ -35,32 +37,27 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add(
|
||||
e.getKey(),
|
||||
(int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
return visCost;
|
||||
return actualCost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "WANDCHARGING";
|
||||
return "WANDCHARGING" + super.getSortingHelper(itemstack);
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||
}
|
||||
|
||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player,
|
||||
MovingObjectPosition movingobjectposition) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
if (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
|
||||
if (!world.isRemote) {
|
||||
|
||||
int energyLeft = (int) (EMTConfigHandler.chargeFocusProduction
|
||||
* Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
int energyLeft = getChargeRate(itemstack);
|
||||
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
|
||||
if (energyLeft > 0) {
|
||||
if ((player.inventory.armorInventory[i] != null)
|
||||
@@ -89,4 +86,16 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
private int getChargeRate(ItemStack itemstack) {
|
||||
return (int) (EMTConfigHandler.chargeFocusProduction
|
||||
* Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
list.add(StatCollector.translateToLocal("item.EMT.focus.EU.cost.info"));
|
||||
list.add(StatCollector.translateToLocalFormatted("item.EMT.focus.EU.cost.once", getChargeRate(stack)));
|
||||
super.addInformation(stack, player, list, par4);
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class ItemChristmasFocus extends ItemBaseFocus {
|
||||
@@ -30,7 +31,12 @@ public class ItemChristmasFocus extends ItemBaseFocus {
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "CHRISTMAS";
|
||||
return "CHRISTMAS" + super.getSortingHelper(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -42,7 +48,7 @@ public class ItemChristmasFocus extends ItemBaseFocus {
|
||||
int y = mop.blockY + 1;
|
||||
int z = mop.blockZ;
|
||||
if (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
|
||||
if (!world.isRemote) {
|
||||
EntitySnowman snowman;
|
||||
snowman = new EntitySnowman(world);
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import emt.entity.EntityEnergyBall;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
|
||||
public class ItemEnergyBallFocus extends ItemBaseFocus {
|
||||
|
||||
@@ -22,7 +26,12 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "ENERGYBALL";
|
||||
return "ENERGYBALL" + super.getSortingHelper(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,9 +45,10 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
|
||||
return stack;
|
||||
}
|
||||
|
||||
double val = ElectricItem.manager.discharge(armor, 5120, 4, true, false, false);
|
||||
int cost = getCost(stack);
|
||||
double val = ElectricItem.manager.discharge(armor, cost, 4, true, false, false);
|
||||
|
||||
if (val < 5120) {
|
||||
if (val < cost) {
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -51,4 +61,18 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
/**
|
||||
* Base cost of 5120 with a 10% discount per level of frugal.
|
||||
*/
|
||||
private int getCost(ItemStack stack) {
|
||||
return (int) (5120 * (1.0 - (0.1 * getUpgradeLevel(stack, FocusUpgradeType.frugal))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
list.add(StatCollector.translateToLocal("item.EMT.focus.EU.cost.info"));
|
||||
list.add(StatCollector.translateToLocalFormatted("item.EMT.focus.EU.cost.once", getCost(stack)));
|
||||
this.addFocusInformation(stack, player, list, par4);
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "EXPLOSION";
|
||||
return "EXPLOSION" + super.getSortingHelper(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -39,7 +39,7 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
MovingObjectPosition movingobjectposition) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
if (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
|
||||
if (!world.isRemote) {
|
||||
EntityLaser laser;
|
||||
laser = new EntityLaser(world, player, 1);
|
||||
@@ -54,12 +54,4 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to define custom logic about which upgrades can be applied. This can be used to set up upgrade
|
||||
* "trees" that make certain upgrades available only when others are unlocked first, when certain research is
|
||||
* completed, or similar logic.
|
||||
*/
|
||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,17 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import static emt.EMT.RESOURCE_PATH;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
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.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
@@ -19,6 +22,10 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 2500).add(Aspect.EARTH, 2500)
|
||||
.add(Aspect.ORDER, 2500);
|
||||
|
||||
private static final ResourceLocation focusMaintenanceSound = new ResourceLocation(
|
||||
RESOURCE_PATH,
|
||||
"maintenance.MaintenanceWandFocus");
|
||||
|
||||
public ItemMaintenanceFocus() {
|
||||
super("maintenance");
|
||||
}
|
||||
@@ -35,7 +42,7 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "MAINTENANCE";
|
||||
return "MAINTENANCE" + super.getSortingHelper(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -57,16 +64,17 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
|
||||
TileEntity hatchCandidateTile = world.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||
if (hatchCandidateTile instanceof BaseMetaTileEntity) {
|
||||
IMetaTileEntity hatchCandidateMetaTile = ((BaseMetaTileEntity) hatchCandidateTile).getMetaTileEntity();
|
||||
if (hatchCandidateMetaTile instanceof GT_MetaTileEntity_Hatch_Maintenance) {
|
||||
GT_MetaTileEntity_Hatch_Maintenance hatch = (GT_MetaTileEntity_Hatch_Maintenance) hatchCandidateMetaTile;
|
||||
if (hatchCandidateMetaTile instanceof MTEHatchMaintenance) {
|
||||
MTEHatchMaintenance hatch = (MTEHatchMaintenance) hatchCandidateMetaTile;
|
||||
if (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemStack, player, getVisCost(itemStack), true, true)) {
|
||||
|| wand.consumeAllVis(itemStack, player, getVisCost(itemStack), true, false)) {
|
||||
hatch.mCrowbar = true;
|
||||
hatch.mScrewdriver = true;
|
||||
hatch.mHardHammer = true;
|
||||
hatch.mSolderingTool = true;
|
||||
hatch.mWrench = true;
|
||||
hatch.mSoftHammer = true;
|
||||
hatch.mSoftMallet = true;
|
||||
hatch.setMaintenanceSound(focusMaintenanceSound, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -12,6 +13,7 @@ import emt.entity.EntityShield;
|
||||
import ic2.core.IC2;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class ItemShieldFocus extends ItemBaseFocus {
|
||||
@@ -35,22 +37,28 @@ public class ItemShieldFocus extends ItemBaseFocus {
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "SHIELD";
|
||||
return "SHIELD" + super.getSortingHelper(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseItem(ItemStack stack) {
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisCostPerTick(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
for (PotionEffect effect : new LinkedList<PotionEffect>(player.getActivePotionEffects())) {
|
||||
List<PotionEffect> potionEffects = new ArrayList<>(player.getActivePotionEffects());
|
||||
for (PotionEffect effect : potionEffects) {
|
||||
IC2.platform.removePotion(player, effect.getPotionID());
|
||||
}
|
||||
if (!player.capabilities.isCreativeMode
|
||||
&& !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
&& !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
|
||||
player.stopUsingItem();
|
||||
}
|
||||
}
|
||||
@@ -61,7 +69,7 @@ public class ItemShieldFocus extends ItemBaseFocus {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
player.setItemInUse(itemstack, Integer.MAX_VALUE);
|
||||
if (!world.isRemote && (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true))) {
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false))) {
|
||||
EntityShield shield = new EntityShield(world, player);
|
||||
world.spawnEntityInWorld(shield);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
@@ -28,7 +30,7 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "ELECTRICCHARGING";
|
||||
return "ELECTRICCHARGING" + super.getSortingHelper(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -42,38 +44,63 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add(
|
||||
e.getKey(),
|
||||
(int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
return visCost;
|
||||
return actualCost;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||
}
|
||||
|
||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) {
|
||||
|
||||
if (!player.worldObj.isRemote) {
|
||||
ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem();
|
||||
if (wandIsFull(itemstack, wandItem)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack armor = player.inventory.armorInventory[1];
|
||||
if (armor != null) {
|
||||
if ((ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)
|
||||
&& (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player))
|
||||
&& (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player))
|
||||
&& (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)))) {
|
||||
int amount = (int) (100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
wandItem.addRealVis(itemstack, Aspect.ORDER, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.FIRE, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.ENTROPY, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.WATER, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.EARTH, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.AIR, amount, true);
|
||||
int cost = getCost(itemstack) / 4;
|
||||
for (ItemStack stack : player.inventory.armorInventory) {
|
||||
if (stack == null || ElectricItem.manager.getCharge(stack) < cost) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (ItemStack stack : player.inventory.armorInventory) {
|
||||
ElectricItem.manager.use(stack, cost, player);
|
||||
}
|
||||
int amount = (int) (100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
wandItem.addRealVis(itemstack, Aspect.ORDER, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.FIRE, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.ENTROPY, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.WATER, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.EARTH, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.AIR, amount, true);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean wandIsFull(ItemStack itemstack, ItemWandCasting wandItem) {
|
||||
int size = wandItem.getMaxVis(itemstack);
|
||||
for (Aspect a : Aspect.getPrimalAspects()) {
|
||||
if (wandItem.getVis(itemstack, a) < size) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Base cost from config with a 10% discount per level of frugal.
|
||||
*/
|
||||
private int getCost(ItemStack stack) {
|
||||
return (int) (EMTConfigHandler.wandChargeFocusCost
|
||||
* (1.0 - (0.1 * getUpgradeLevel(stack, FocusUpgradeType.frugal))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
list.add(StatCollector.translateToLocal("item.EMT.focus.EU.cost.info"));
|
||||
list.add(StatCollector.translateToLocalFormatted("item.EMT.focus.EU.cost.tick", getCost(stack)));
|
||||
super.addInformation(stack, player, list, par4);
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.icon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/hoe_growth");
|
||||
this.icon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/hoe_growth");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/electricthorhammer");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":hammer/electricthorhammer");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ItemThorHammer extends ItemSword implements IRepairable {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/thorhammer");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":hammer/thorhammer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ItemThorHammerBroken extends ItemSword implements IRepairable {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/taintedthorhammer");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":hammer/taintedthorhammer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_diamond");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/chainsaw_diamond");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_stream");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/chainsaw_stream");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ItemThaumiumChainsaw extends ItemDiamondChainsaw {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_thaumium");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/chainsaw_thaumium");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_rockbreaker");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/drill_rockbreaker");
|
||||
}
|
||||
|
||||
private boolean isEffectiveAgainst(Block block) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_thaumium");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/drill_thaumium");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ItemOmnitoolDiamond extends ItemOmnitoolIron {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_diamond");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/omnitool_diamond");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_iron");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/omnitool_iron");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ItemOmnitoolThaumium extends ItemOmnitoolDiamond {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_thaumium");
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/omnitool_thaumium");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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.util.EMTConfigHandler;
|
||||
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.IEnergyConnected;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
||||
import gregtech.api.net.GT_Packet_Block_Event;
|
||||
import gregtech.common.data.GTBlockEventTracker;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
@@ -56,12 +56,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
public int storage;
|
||||
public short mpshownstroage;
|
||||
public int maxstorage;
|
||||
public byte maxfuel;
|
||||
public byte fuel;
|
||||
public byte refuel;
|
||||
public long timer = 0L;
|
||||
public byte maxfuel = 64;
|
||||
public byte fuel = 0;
|
||||
// The amount to pull from jars (through the air like the runic matrix) when empty.
|
||||
// Values above 1 do not work with essentia mirrors.
|
||||
public byte refuel = 1;
|
||||
// Used to make the generator sleep between failed attempts to draw essentia from nearby jars.
|
||||
public int timer = 0;
|
||||
// The number of ticks to wait after failing to draw essentia.
|
||||
public final int refuelSleepTime = 40;
|
||||
public boolean dead = true;
|
||||
public byte color;
|
||||
public byte color = -1;
|
||||
private boolean side;
|
||||
|
||||
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
|
||||
@@ -94,18 +99,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
public TileEntityBaseGenerator() {
|
||||
this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage);
|
||||
this.maxstorage = ((int) this.energySource.getCapacity());
|
||||
this.maxfuel = 64;
|
||||
this.fuel = 0;
|
||||
this.refuel = 1;
|
||||
this.color = -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
this.side = !this.worldObj.isRemote;
|
||||
this.dead = false;
|
||||
this.timer += 1L;
|
||||
if (this.timer <= Long.MAX_VALUE - 1) this.timer = 0L;
|
||||
this.timer--;
|
||||
if (this.timer <= Integer.MIN_VALUE + 1) this.timer = 0;
|
||||
if (this.fuel + this.refuel > this.maxfuel) {
|
||||
this.timer = refuelSleepTime;
|
||||
}
|
||||
storeFuel();
|
||||
fillfrompipe();
|
||||
createEnergy();
|
||||
@@ -113,64 +117,61 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
public void storeFuel() {
|
||||
if (!side) return;
|
||||
|
||||
if (this.fuel < this.maxfuel) {
|
||||
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
|
||||
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
|
||||
for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) {
|
||||
TileEntity tile = this.worldObj.getTileEntity(x, y, z);
|
||||
if (tile instanceof IAspectSource) {
|
||||
IAspectSource as = (IAspectSource) tile;
|
||||
if ((as.doesContainerContainAmount(this.aspect, this.refuel))
|
||||
&& (as.takeFromContainer(this.aspect, this.refuel))) {
|
||||
PacketHandler.INSTANCE.sendToAllAround(
|
||||
new PacketFXEssentiaSource(
|
||||
this.xCoord,
|
||||
this.yCoord,
|
||||
this.zCoord,
|
||||
(byte) (this.xCoord - x),
|
||||
(byte) (this.yCoord - y),
|
||||
(byte) (this.zCoord - z),
|
||||
this.aspect.getColor()),
|
||||
new NetworkRegistry.TargetPoint(
|
||||
getWorldObj().provider.dimensionId,
|
||||
this.xCoord,
|
||||
this.yCoord,
|
||||
this.zCoord,
|
||||
32.0D));
|
||||
addToContainer(this.aspect, this.refuel);
|
||||
}
|
||||
if (this.timer > 0 || !side) {
|
||||
return;
|
||||
}
|
||||
boolean stored = false;
|
||||
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
|
||||
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
|
||||
for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) {
|
||||
TileEntity tile = this.worldObj.getTileEntity(x, y, z);
|
||||
if (tile instanceof IAspectSource as && as.takeFromContainer(this.aspect, this.refuel)) {
|
||||
PacketHandler.INSTANCE.sendToAllAround(
|
||||
new PacketFXEssentiaSource(
|
||||
this.xCoord,
|
||||
this.yCoord,
|
||||
this.zCoord,
|
||||
(byte) (this.xCoord - x),
|
||||
(byte) (this.yCoord - y),
|
||||
(byte) (this.zCoord - z),
|
||||
this.aspect.getColor()),
|
||||
new NetworkRegistry.TargetPoint(
|
||||
getWorldObj().provider.dimensionId,
|
||||
this.xCoord,
|
||||
this.yCoord,
|
||||
this.zCoord,
|
||||
32.0D));
|
||||
addToContainer(this.aspect, this.refuel);
|
||||
if (this.fuel + this.refuel > this.maxfuel) {
|
||||
return;
|
||||
}
|
||||
stored = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!stored) {
|
||||
this.timer = refuelSleepTime;
|
||||
}
|
||||
}
|
||||
|
||||
public void fillfrompipe() {
|
||||
if (!side) return;
|
||||
if (this.fuel >= this.maxfuel || !side) return;
|
||||
|
||||
if (this.fuel == this.maxfuel) return;
|
||||
|
||||
TileEntity[] te = new TileEntity[ForgeDirection.VALID_DIRECTIONS.length];
|
||||
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
|
||||
te[i] = ThaumcraftApiHelper.getConnectableTile(
|
||||
this.worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord,
|
||||
this.zCoord,
|
||||
ForgeDirection.VALID_DIRECTIONS[i]);
|
||||
if (te[i] != null) {
|
||||
IEssentiaTransport pipe = (IEssentiaTransport) te[i];
|
||||
if (!pipe.canOutputTo(ForgeDirection.VALID_DIRECTIONS[i])) {
|
||||
return;
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
TileEntity pipeTE = ThaumcraftApiHelper
|
||||
.getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, direction);
|
||||
if (pipeTE != null) {
|
||||
IEssentiaTransport pipe = (IEssentiaTransport) pipeTE;
|
||||
if (!pipe.canOutputTo(direction)) {
|
||||
continue;
|
||||
}
|
||||
if ((pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]) != null)
|
||||
&& (pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]).equals(this.aspect))
|
||||
&& (pipe.getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i])
|
||||
< getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]))) {
|
||||
addToContainer(this.aspect, pipe.takeEssentia(this.aspect, 1, ForgeDirection.VALID_DIRECTIONS[i]));
|
||||
if ((pipe.getEssentiaType(direction) != null) && (pipe.getEssentiaType(direction).equals(this.aspect))
|
||||
&& (pipe.getSuctionAmount(direction) < getSuctionAmount(direction))) {
|
||||
addToContainer(this.aspect, pipe.takeEssentia(this.aspect, 1, direction));
|
||||
if (this.fuel >= this.maxfuel) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -434,18 +435,18 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
if (this.generating / 20.0D / 20.0D % GT_Values.V[this.energySource.getSourceTier()] == 0.0D) {
|
||||
return (long) (this.generating / 20.0D / 20.0D / GT_Values.V[this.energySource.getSourceTier()]);
|
||||
if (this.generating / 20.0D / 20.0D % GTValues.V[this.energySource.getSourceTier()] == 0.0D) {
|
||||
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
|
||||
public long getOutputVoltage() {
|
||||
return GT_Values.V[this.energySource.getSourceTier()];
|
||||
return GTValues.V[this.energySource.getSourceTier()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -510,11 +511,6 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
return 0L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||
return 0L;
|
||||
@@ -700,17 +696,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaID(int aX, int aY, int aZ) {
|
||||
public int getMetaID(int aX, int aY, int aZ) {
|
||||
return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDOffset(int aX, int aY, int aZ) {
|
||||
public int getMetaIDOffset(int aX, int aY, int aZ) {
|
||||
return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSide(ForgeDirection side) {
|
||||
public int getMetaIDAtSide(ForgeDirection side) {
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
@@ -718,7 +714,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
public int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getMetaIDAtSide(side);
|
||||
}
|
||||
@@ -843,11 +839,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
|
||||
@Override
|
||||
public void sendBlockEvent(byte aID, byte aValue) {
|
||||
GT_Values.NW.sendPacketToAllPlayersInRange(
|
||||
this.worldObj,
|
||||
new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
||||
this.xCoord,
|
||||
this.zCoord);
|
||||
GTBlockEventTracker.enqueue(worldObj, xCoord, yCoord, zCoord, aID, aValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package emt.tile.solar;
|
||||
|
||||
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 java.util.LinkedHashMap;
|
||||
@@ -16,7 +16,7 @@ import emt.block.BlockSolars;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.item.block.ItemBlockSolars;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.GTValues;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.TierEU;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
@@ -140,7 +140,7 @@ public enum Solars {
|
||||
public static void registerReverseRecipes() {
|
||||
for (Solars s : Solars.values()) {
|
||||
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))
|
||||
.itemOutputs(
|
||||
new ItemStack(
|
||||
|
||||
@@ -29,12 +29,12 @@ import emt.client.gui.EMT_UITextures;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.tile.DefinitelyNotAIC2Source;
|
||||
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.IEnergyConnected;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
||||
import gregtech.api.net.GT_Packet_Block_Event;
|
||||
import gregtech.common.data.GTBlockEventTracker;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
@@ -102,10 +102,10 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
private int getTierFromCapacity(long capacity) {
|
||||
for (int i = 0; i < GT_Values.V.length; i++) {
|
||||
if (capacity / 1000 < GT_Values.V[i]) return i;
|
||||
for (int i = 0; i < GTValues.V.length; i++) {
|
||||
if (capacity / 1000 < GTValues.V[i]) return i;
|
||||
}
|
||||
return GT_Values.V.length - 1;
|
||||
return GTValues.V.length - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -162,9 +162,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
case AQUA: {
|
||||
if (worldObj.isThundering()) return 6F;
|
||||
else if (worldObj.isRaining()) return 3F;
|
||||
else if (!worldObj.isThundering() && !worldObj.isRaining()
|
||||
&& worldObj.getBlock(xCoord, yCoord + 1, zCoord).equals(Blocks.water))
|
||||
return 2F;
|
||||
else if (worldObj.getBlock(xCoord, yCoord + 1, zCoord).equals(Blocks.water)) return 2F;
|
||||
else return 1F;
|
||||
}
|
||||
case IGNIS: {
|
||||
@@ -193,7 +191,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
this.isActive = true;
|
||||
if (side) {
|
||||
this.generating = output * calc_multi();
|
||||
this.energySource.addEnergy(this.output * calc_multi());
|
||||
this.energySource.addEnergy(this.generating);
|
||||
}
|
||||
} else {
|
||||
isActive = false;
|
||||
@@ -424,11 +422,11 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
long[] voltAmp = new long[2];
|
||||
voltAmp[0] = getOutputVoltage();
|
||||
long generating = (long) Math.floor(output * getMaxMulti());
|
||||
if (generating <= GT_Values.V[energySource.getSourceTier()]) {
|
||||
if (generating <= GTValues.V[energySource.getSourceTier()]) {
|
||||
voltAmp[1] = 1L;
|
||||
} else if (generating % GT_Values.V[energySource.getSourceTier()] == 0.0D) {
|
||||
voltAmp[1] = (generating / GT_Values.V[energySource.getSourceTier()]);
|
||||
} else voltAmp[1] = (1L + (generating / GT_Values.V[energySource.getSourceTier()]));
|
||||
} else if (generating % GTValues.V[energySource.getSourceTier()] == 0.0D) {
|
||||
voltAmp[1] = (generating / GTValues.V[energySource.getSourceTier()]);
|
||||
} else voltAmp[1] = (1L + (generating / GTValues.V[energySource.getSourceTier()]));
|
||||
return voltAmp;
|
||||
}
|
||||
|
||||
@@ -437,28 +435,28 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
return calculateMaxVoltAmp()[1];
|
||||
// long ret;
|
||||
// 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;
|
||||
// }
|
||||
// if (this.generating % GT_Values.V[this.energySource.getSourceTier() - 2] == 0.0D) {
|
||||
// ret = (long) (this.generating / GT_Values.V[this.energySource.getSourceTier() - 2]);
|
||||
// if (this.generating % GTValues.V[this.energySource.getSourceTier() - 2] == 0.0D) {
|
||||
// ret = (long) (this.generating / GTValues.V[this.energySource.getSourceTier() - 2]);
|
||||
// } 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 {
|
||||
// if (this.generating <= GT_Values.V[this.energySource.getSourceTier() - 1]) {
|
||||
// if (this.generating <= GTValues.V[this.energySource.getSourceTier() - 1]) {
|
||||
// ret = 1L;
|
||||
// }
|
||||
// if (this.generating % GT_Values.V[this.energySource.getSourceTier()] == 0.0D) {
|
||||
// ret = (long) (this.generating / GT_Values.V[this.energySource.getSourceTier() - 1]);
|
||||
// if (this.generating % GTValues.V[this.energySource.getSourceTier()] == 0.0D) {
|
||||
// ret = (long) (this.generating / GTValues.V[this.energySource.getSourceTier() - 1]);
|
||||
// } 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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getOutputVoltage() {
|
||||
return GT_Values.V[this.energySource.getSourceTier()];
|
||||
return GTValues.V[this.energySource.getSourceTier()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -713,17 +711,17 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaID(int aX, int aY, int aZ) {
|
||||
public int getMetaID(int aX, int aY, int aZ) {
|
||||
return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDOffset(int aX, int aY, int aZ) {
|
||||
public int getMetaIDOffset(int aX, int aY, int aZ) {
|
||||
return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSide(ForgeDirection side) {
|
||||
public int getMetaIDAtSide(ForgeDirection side) {
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
@@ -731,7 +729,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
public int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getMetaIDAtSide(side);
|
||||
}
|
||||
@@ -856,11 +854,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
|
||||
@Override
|
||||
public void sendBlockEvent(byte aID, byte aValue) {
|
||||
GT_Values.NW.sendPacketToAllPlayersInRange(
|
||||
this.worldObj,
|
||||
new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
||||
this.xCoord,
|
||||
this.zCoord);
|
||||
GTBlockEventTracker.enqueue(this.worldObj, this.xCoord, this.yCoord, this.zCoord, aID, aValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -98,8 +98,4 @@ public class EMTCraftingAspects {
|
||||
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)
|
||||
.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);
|
||||
}
|
||||
@@ -17,13 +17,5 @@ public class EMTDungeonChestGenerator {
|
||||
1,
|
||||
EMTConfigHandler.chanceTaintedMjolnir));
|
||||
}
|
||||
if (!EMTConfigHandler.oneRingSpawn) {
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(
|
||||
new WeightedRandomChestContent(
|
||||
new ItemStack(EMTItems.onering),
|
||||
0,
|
||||
1,
|
||||
EMTConfigHandler.chanceOneRing));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,11 @@ import thaumcraft.common.entities.monster.EntityTaintChicken;
|
||||
|
||||
public class EMTEventHandler {
|
||||
|
||||
/**
|
||||
* Intercept the onLivingHurt event so that we can mitigate fall damage with feather wings
|
||||
*
|
||||
* @param e Entity that is being damaged
|
||||
*/
|
||||
@SubscribeEvent
|
||||
public void onLivingHurt(LivingHurtEvent e) {
|
||||
if (!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall) return;
|
||||
|
||||
@@ -94,6 +94,4 @@ public class EMTResearchAspects {
|
||||
public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5)
|
||||
.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 researchCompleter = new AspectList().add(Aspect.MIND, 8).add(Aspect.MECHANISM, 5)
|
||||
.add(Aspect.EXCHANGE, 5).add(Aspect.AURA, 4);
|
||||
}
|
||||
@@ -13,9 +13,9 @@ gui.EMT.book.aspect.output.eu.title=Essentia Ausgabe Buch
|
||||
gui.EMT.book.aspect.output.essentia.eu=EU Leistung per Essentia
|
||||
gui.EMT.key.unequip=Ausziehen
|
||||
emt.Output=Ausgabe:
|
||||
emt.Storage=Speicher:
|
||||
emt.Storage=Speicher:
|
||||
emt.PressShift=<Drücke SHIFT>
|
||||
emt.Generating=Erzeugt:
|
||||
emt.Generating=Erzeugt:
|
||||
emt.Fuel=Brennstoff
|
||||
|
||||
#=============Tooltips=============
|
||||
@@ -100,6 +100,9 @@ item.EMT.focus.charge.name=Stab Fokus: Aufladung
|
||||
item.EMT.focus.chargeWand.name=Stab Fokus: Stabs Aufladung
|
||||
item.EMT.focus.electricCloud.name=Electrische Wolke
|
||||
item.EMT.focus.energyBall.name=Energie Ball Fokus
|
||||
item.EMT.focus.EU.cost.info=EU pro Zauber
|
||||
item.EMT.focus.EU.cost.once= §r%s §eEU§0
|
||||
item.EMT.focus.EU.cost.tick= §r%s §eEU/t§0
|
||||
|
||||
#=============Block Names=============
|
||||
tile.EMT.electricCloud.name=Electrische Wolke
|
||||
|
||||
@@ -87,6 +87,7 @@ item.EMT.wing.feather.name=Feather Duct-Taped Wings
|
||||
item.EMT.wing.thaumium.name=Thaumium Reinforced Wings
|
||||
item.EMT.wing.nano.name=Nanosuit 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.hammer.broken.name=Broken Relic of Mjolnir
|
||||
item.EMT.hammer.name=Mjolnir
|
||||
@@ -108,20 +109,30 @@ item.EMT.focus.chargeWand.name=Wand Focus: Wand Charging
|
||||
item.EMT.focus.maintenance.name=Wand Focus: Maintenance
|
||||
item.EMT.focus.electricCloud.name=Electric Cloud
|
||||
item.EMT.focus.energyBall.name=Energy Ball Focus
|
||||
item.EMT.focus.EU.cost.info=EU per cast
|
||||
item.EMT.focus.EU.cost.once= §r%s §eEU§0
|
||||
item.EMT.focus.EU.cost.tick= §r%s §eEU/t§0
|
||||
|
||||
#=============Block Names=============
|
||||
tile.EMT.electricCloud.name=Electric Cloud
|
||||
tile.EMT.shield.name=Shield Block
|
||||
tile.EMT.portablenode.name=Portable Node
|
||||
tile.EMT.essentia.name=Essentia Generator
|
||||
tile.EMT.essentia.potentia.name=Potentia Generator
|
||||
tile.EMT.essentia.ignis.name=Ignis Generator
|
||||
tile.EMT.essentia.auram.name=Auram Generator
|
||||
tile.EMT.essentia.arbor.name=Arbor Generator
|
||||
tile.EMT.essentia.aer.name=Aer 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.etheralprocessor.name=Ethereal Processor
|
||||
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.doublecompressed.name=Double Compressed Solar Panel
|
||||
tile.EMT.solar.triplecompressed.name=Triple Compressed Solar Panel
|
||||
@@ -389,10 +400,12 @@ emt.rsname.Inventory Charging Ring=Inventory Charging Ring
|
||||
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.
|
||||
|
||||
item.EMT.bauble.name=Armor Charging Ring
|
||||
emt.rsname.Armor Charging Ring=Armor Charging Ring
|
||||
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.
|
||||
|
||||
item.EMT.item.bauble.name=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.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 +429,3 @@ emt.text.Quantum Wings=After exploring all the possibilities of nanotechnologies
|
||||
emt.rsname.Infused Quantum Armor=Infused Quantum Сhestplate.
|
||||
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.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.essentia.eu=Выход EU за эссенцию
|
||||
gui.EMT.key.unequip=Снять
|
||||
emt.Output=Выход:
|
||||
emt.Storage=Хранилище:
|
||||
emt.Output=Выход:
|
||||
emt.Storage=Хранилище:
|
||||
emt.PressShift=<Нажмите SHIFT>
|
||||
emt.Generating=Генерирует:
|
||||
emt.Generating=Генерирует:
|
||||
emt.Fuel=горючее
|
||||
|
||||
#=============Tooltips=============
|
||||
@@ -102,6 +102,9 @@ item.EMT.focus.chargeWand.name=Набалдашник: Зарядка жезла
|
||||
item.EMT.focus.maintenance.name=Набалдашник: Обслуживание
|
||||
item.EMT.focus.electricCloud.name=Электризованное облако
|
||||
item.EMT.focus.energyBall.name=Набалдашник: Наэлектризованное облако
|
||||
item.EMT.focus.EU.cost.info=EU за использование
|
||||
item.EMT.focus.EU.cost.once= §r%s §eEU§0
|
||||
item.EMT.focus.EU.cost.tick= §r%s §eEU/тик§0
|
||||
|
||||
#=============Block Names=============
|
||||
tile.EMT.electricCloud.name=Наэлектризованное облако
|
||||
@@ -411,7 +414,3 @@ emt.text.Quantum Wings=После исследования всех возмож
|
||||
emt.rsname.Infused Quantum Armor=Наполненный квантовый нагрудник.
|
||||
emt.tag.Infused Quantum Armor=Последний шаг...
|
||||
emt.text.Infused Quantum Armor=Вам было нечего делать, и Вы решили заняться хоть чем-то полезным. Вам в голову пришла идея создания брони, на которую можно нацепить крылья или ранец, чтобы быть защищёнными в полёте. Возмите в руку крылья или ранец, и присядьте чтобы надеть их на броню. Чтобы снять их, зажмите Shift + "Снять"(Смотрите в настройках).
|
||||
|
||||
emt.rsname.ResearchCompleter=Автоматизированное исследование
|
||||
emt.tag.ResearchCompleter=Больше никакого спама
|
||||
emt.text.ResearchCompleter=Поначалу это было весело, но вы решили, что пришло время найти лучший способ провести все эти исследования. Смешав технологию и магию, вы создали мультиблок, который может самостоятельно завершить исследовательскую заметку.<BR><BR>Для работы ему необходимо, чтобы узлы были размещены в центре конструкции, и он будет медленно разрушать их во время работы. Стабилизаторы узлов не являются обязательными, но рекомендуются для удержания большого количества узлов близко друг к другу, не разрушая друг друга.
|
||||
@@ -102,6 +102,9 @@ item.EMT.focus.charge.name=法杖核心:充电
|
||||
item.EMT.focus.chargeWand.name=法杖核心:化魔
|
||||
item.EMT.focus.electricCloud.name=雷云之光
|
||||
item.EMT.focus.energyBall.name=法杖核心:能量球
|
||||
item.EMT.focus.EU.cost.info=EU/每次施法
|
||||
item.EMT.focus.EU.cost.once= §r%s §eEU§0
|
||||
item.EMT.focus.EU.cost.tick= §r%s §eEU/t§0
|
||||
|
||||
#=============Block Names=============
|
||||
tile.EMT.electricCloud.name=雷云之光
|
||||
@@ -406,7 +409,3 @@ emt.text.Quantum Wings=在探索完纳米科技所有的可能性后,你决定
|
||||
emt.rsname.Infused Quantum Armor=注魔量子胸甲
|
||||
emt.tag.Infused Quantum Armor=最后的一步...
|
||||
emt.text.Infused Quantum Armor=你已经无事可做,但是你决定做一些有用的东西.你的脑海中浮现出一个想法,在制作盔甲时可以把羽翼或者背包系在一起以保证飞行的安全.持有羽翼或者背包时在潜行状态下右击可以将它们系在盔甲上.要将它们拿下来时只需要按住Shift + [卸下装备]键(详见[选项]-[控制]).
|
||||
|
||||
emt.rsname.ResearchCompleter=自动化研究
|
||||
emt.tag.ResearchCompleter=再也不用担心秩序危机了
|
||||
emt.text.ResearchCompleter=连连看一开始很有趣,但你已经决定寻找一种更好的方法解决所有的研究.最终,你结合科技与魔法,制造出了一台多方块机器,可以自动完成研究笔记.<BR><BR>需要将灵气节点放在机器内部才能使其正常运行,而且在运行过程中,机器会缓慢摧毁这些节点.节点稳定器不是必须品,但为了让这么多节点不互相打架,我们还是推荐使用节点稳定器.
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"maintenance.MaintenanceWandFocus": {
|
||||
"category": "block",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "MaintenanceWandFocus",
|
||||
"stream": false,
|
||||
"licensing": {
|
||||
"author_name": "Kynake",
|
||||
"license_url": "https://creativecommons.org/licenses/by-sa/4.0/",
|
||||
"license_name": "Attribution-ShareAlike 4.0",
|
||||
"original_sound_urls": [
|
||||
"https://freesound.org/people/tgerginov/sounds/671175/",
|
||||
"https://opengameart.org/content/68-workshop-sounds"
|
||||
],
|
||||
"original_sound_names": [
|
||||
"671175__tgerginov__magic.wav",
|
||||
"workshop - ratchet2.wav"
|
||||
],
|
||||
"original_author_urls": [
|
||||
"https://freesound.org/people/tgerginov/",
|
||||
"https://opengameart.org/users/bart"
|
||||
],
|
||||
"original_author_names": [
|
||||
"tgerginov",
|
||||
"bart"
|
||||
],
|
||||
"original_license_url": "https://creativecommons.org/publicdomain/zero/1.0/",
|
||||
"original_license_name": "CC0 1.0 Universal"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in new issue
Block a user