mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-20 20:12:23 +00:00
update build script
spotless update gt dep
This commit is contained in:
107 files changed
+4980
-1920
No files matched your search
@@ -29,8 +29,7 @@ import org.apache.logging.log4j.Logger;
|
||||
name = EMT.NAME,
|
||||
version = EMT.VERSION,
|
||||
guiFactory = EMT.GUI_FACTORY,
|
||||
dependencies = EMT.DEPENDS
|
||||
)
|
||||
dependencies = EMT.DEPENDS)
|
||||
public class EMT {
|
||||
public static final String NAME = "Electro-Magic Tools";
|
||||
public static final String MOD_ID = "EMT";
|
||||
@@ -40,19 +39,19 @@ public class EMT {
|
||||
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
|
||||
public static final String COMMON_PROXY = "emt.proxy.CommonProxy";
|
||||
public static final String CHANNEL = "EMT";
|
||||
public static final String DEPENDS =
|
||||
"required-after:Thaumcraft;" +
|
||||
"required-after:IC2;" +
|
||||
"required-after:gregtech;" +
|
||||
"after:Avaritia;" +
|
||||
"after:MagicBees;" +
|
||||
"after:ForbiddenMagic;" +
|
||||
"after:dreamcraft;";
|
||||
public static final String DEPENDS = "required-after:Thaumcraft;" + "required-after:IC2;"
|
||||
+ "required-after:gregtech;"
|
||||
+ "after:Avaritia;"
|
||||
+ "after:MagicBees;"
|
||||
+ "after:ForbiddenMagic;"
|
||||
+ "after:dreamcraft;";
|
||||
public static final CreativeTabs TAB = new EMTCreativeTab("EMT.creativeTab");
|
||||
public static final Logger LOGGER = LogManager.getLogger("Electro-Magic Tools");
|
||||
public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("EMT");
|
||||
|
||||
@SidedProxy(clientSide = "emt.proxy.ClientProxy", serverSide = "emt.proxy.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
@Mod.Instance("EMT")
|
||||
public static EMT instance;
|
||||
|
||||
|
||||
@@ -22,4 +22,4 @@ public abstract class BlockBase extends Block {
|
||||
public BlockBase(String unlocName, Material material, SoundType soundType, float hardness) {
|
||||
this(unlocName, material, null, soundType, hardness);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ public abstract class BlockBaseContainer extends BlockContainer {
|
||||
|
||||
public int instance;
|
||||
public int countOfMetas;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IconSet[] iconSets;
|
||||
|
||||
@@ -26,11 +27,18 @@ public abstract class BlockBaseContainer extends BlockContainer {
|
||||
this(unlocName, material, soundType, 1, hardness);
|
||||
}
|
||||
|
||||
public BlockBaseContainer(String unlocName, Material material, SoundType soundType, int countOfMetas, float hardness) {
|
||||
public BlockBaseContainer(
|
||||
String unlocName, Material material, SoundType soundType, int countOfMetas, float hardness) {
|
||||
this(unlocName, material, soundType, countOfMetas, 0, hardness);
|
||||
}
|
||||
|
||||
public BlockBaseContainer(String unlocName, Material material, SoundType soundType, int countOfMetas, int curInstance, float hardness) {
|
||||
public BlockBaseContainer(
|
||||
String unlocName,
|
||||
Material material,
|
||||
SoundType soundType,
|
||||
int countOfMetas,
|
||||
int curInstance,
|
||||
float hardness) {
|
||||
super(material);
|
||||
this.setBlockName(EMT.MOD_ID + "." + unlocName);
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
@@ -64,8 +72,7 @@ public abstract class BlockBaseContainer extends BlockContainer {
|
||||
TileEntityEMT tile = (TileEntityEMT) access.getTileEntity(x, y, z);
|
||||
int meta = access.getBlockMetadata(x, y, z);
|
||||
|
||||
if (meta >= countOfMetas)
|
||||
return null;
|
||||
if (meta >= countOfMetas) return null;
|
||||
|
||||
IconSet set = iconSets[meta];
|
||||
|
||||
@@ -97,8 +104,7 @@ public abstract class BlockBaseContainer extends BlockContainer {
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if (meta >= countOfMetas)
|
||||
return null;
|
||||
if (meta >= countOfMetas) return null;
|
||||
|
||||
IconSet set = iconSets[meta];
|
||||
|
||||
@@ -120,8 +126,7 @@ public abstract class BlockBaseContainer extends BlockContainer {
|
||||
int facing = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
TileEntityEMT tile = (TileEntityEMT) world.getTileEntity(x, y, z);
|
||||
|
||||
if (tile == null)
|
||||
return;
|
||||
if (tile == null) return;
|
||||
|
||||
switch (facing) {
|
||||
case 0:
|
||||
|
||||
@@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.TileElectricCloud;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -14,8 +15,6 @@ import net.minecraft.world.World;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXSparkle;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockElectricCloud extends BlockBase {
|
||||
public IIcon icon;
|
||||
|
||||
@@ -27,7 +26,17 @@ public class BlockElectricCloud extends BlockBase {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random rnd) {
|
||||
FXSparkle ef = new FXSparkle(world, x + 0.5F, y + 0.5F, z + 0.5F, x + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, y + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, z + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, 1.0F, 6, 3);
|
||||
FXSparkle ef = new FXSparkle(
|
||||
world,
|
||||
x + 0.5F,
|
||||
y + 0.5F,
|
||||
z + 0.5F,
|
||||
x + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F,
|
||||
y + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F,
|
||||
z + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F,
|
||||
1.0F,
|
||||
6,
|
||||
3);
|
||||
ef.setGravity(0.05F);
|
||||
ParticleEngine.instance.addEffect(world, ef);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.generator.TileEntityBaseGenerator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
@@ -15,9 +17,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
|
||||
private static int subtypes = 6;
|
||||
@@ -76,7 +75,8 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3) {
|
||||
public boolean onBlockActivated(
|
||||
World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import emt.gthandler.common.implementations.automation.EssentiaFiller;
|
||||
import emt.tile.TileEntityEtherealMacerator;
|
||||
import emt.tile.TileEntityIndustrialWandRecharge;
|
||||
import ic2.api.item.IC2Items;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -20,9 +22,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockMachines extends BlockBaseContainer {
|
||||
|
||||
public BlockMachines(String name) {
|
||||
@@ -77,7 +76,8 @@ public class BlockMachines extends BlockBaseContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||
public boolean onBlockActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||
if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityIndustrialWandRecharge) {
|
||||
player.openGui(EMT.instance, 0, world, x, y, z);
|
||||
} else if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityEtherealMacerator) {
|
||||
@@ -115,10 +115,16 @@ public class BlockMachines extends BlockBaseContainer {
|
||||
float ry = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float rz = rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
|
||||
EntityItem entityItem = new EntityItem(
|
||||
world,
|
||||
x + rx,
|
||||
y + ry,
|
||||
z + rz,
|
||||
new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
|
||||
|
||||
if (item.hasTagCompound()) {
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy());
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound)
|
||||
item.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float factor = 0.05F;
|
||||
|
||||
@@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.TileEntityPortableNode;
|
||||
import java.util.Random;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -13,8 +14,6 @@ import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.blocks.BlockAiry;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockPortableNode extends BlockAiry {
|
||||
|
||||
public IIcon texture;
|
||||
@@ -54,8 +53,7 @@ public class BlockPortableNode extends BlockAiry {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {
|
||||
}
|
||||
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
@@ -69,7 +67,8 @@ public class BlockPortableNode extends BlockAiry {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||
public boolean onBlockActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||
if (!world.isRemote && player.isSneaking() && player.getHeldItem() == null) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.removeTileEntity(x, y, z);
|
||||
|
||||
@@ -3,6 +3,7 @@ package emt.block;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -12,8 +13,6 @@ import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockShield extends Block {
|
||||
|
||||
public BlockShield(String name) {
|
||||
@@ -72,6 +71,5 @@ public class BlockShield extends Block {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {
|
||||
}
|
||||
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.solar.Solars;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -15,9 +17,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BlockSolars extends BlockBaseContainer {
|
||||
|
||||
public BlockSolars(String name, int countOfMetas, int instance) {
|
||||
@@ -112,8 +111,7 @@ public class BlockSolars extends BlockBaseContainer {
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if (meta >= countOfMetas)
|
||||
return null;
|
||||
if (meta >= countOfMetas) return null;
|
||||
|
||||
if (side < 1) {
|
||||
return iconSets[meta].bottom;
|
||||
@@ -137,7 +135,8 @@ public class BlockSolars extends BlockBaseContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3) {
|
||||
public boolean onBlockActivated(
|
||||
World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@ public class EMTKeys {
|
||||
keyUnequip = new KeyBinding(EMTTextHelper.localize("gui.EMT.key.unequip"), Keyboard.KEY_Z, "EMT");
|
||||
ClientRegistry.registerKeyBinding(keyUnequip);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,8 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiEtherealMacerator extends GuiContainer {
|
||||
|
||||
public static final ResourceLocation texture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/etherealmacerator.png");
|
||||
public static final ResourceLocation texture =
|
||||
new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/etherealmacerator.png");
|
||||
|
||||
public GuiEtherealMacerator(InventoryPlayer inventory, TileEntityEtherealMacerator te) {
|
||||
super(new ContainerEtheralMacerator(inventory, te));
|
||||
|
||||
@@ -24,7 +24,6 @@ public class GuiGenerator extends GuiContainer {
|
||||
this.ySize = 168;
|
||||
}
|
||||
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
String formatPanelName = I18n.format(this.tileentity.getInventoryName());
|
||||
int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2;
|
||||
@@ -32,19 +31,42 @@ public class GuiGenerator extends GuiContainer {
|
||||
String storageString = I18n.format("emt.Storage");
|
||||
String fuel = I18n.format("emt.Fuel");
|
||||
if (this.tileentity.maxstorage < 1000)
|
||||
this.fontRendererObj.drawString(storageString + this.tileentity.mpshownstroage * 1000 + "/" + this.tileentity.maxstorage + "EU", 36, 22, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
storageString + this.tileentity.mpshownstroage * 1000 + "/" + this.tileentity.maxstorage + "EU",
|
||||
36,
|
||||
22,
|
||||
0);
|
||||
else if (10000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 10000000)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage) + "/" + (this.tileentity.maxstorage / 1000) + "kEU", 36, 22, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
storageString + (this.tileentity.mpshownstroage) + "/" + (this.tileentity.maxstorage / 1000)
|
||||
+ "kEU",
|
||||
36,
|
||||
22,
|
||||
0);
|
||||
else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage / 1000) + "/" + (this.tileentity.maxstorage / 1000000) + "MEU", 36, 22, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
storageString + (this.tileentity.mpshownstroage / 1000) + "/"
|
||||
+ (this.tileentity.maxstorage / 1000000) + "MEU",
|
||||
36,
|
||||
22,
|
||||
0);
|
||||
else if (1000000000 <= this.tileentity.maxstorage)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage / 1000000) + "/" + (this.tileentity.maxstorage / 1000000000) + "GEU", 36, 22, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
storageString + (this.tileentity.mpshownstroage / 1000000) + "/"
|
||||
+ (this.tileentity.maxstorage / 1000000000) + "GEU",
|
||||
36,
|
||||
22,
|
||||
0);
|
||||
if (this.tileentity.isActive)
|
||||
this.fontRendererObj.drawString(I18n.format("emt.Generating") + Double.toString(this.tileentity.generating / 20 / 20) + " EU/t", 36, 35, 0);
|
||||
else
|
||||
this.fontRendererObj.drawString(I18n.format("emt.Generating") + "0 EU/t", 36, 35, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("emt.Generating") + Double.toString(this.tileentity.generating / 20 / 20) + " EU/t",
|
||||
36,
|
||||
35,
|
||||
0);
|
||||
else this.fontRendererObj.drawString(I18n.format("emt.Generating") + "0 EU/t", 36, 35, 0);
|
||||
this.fontRendererObj.drawString(fuel + ": " + Integer.toString(this.tileentity.fuel), 36, 48, 0);
|
||||
this.fontRendererObj.drawString(fuel + "/t: " + Integer.toString((this.tileentity.fuel * 20 * 20) - this.tileentity.tick), 36, 63, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
fuel + "/t: " + Integer.toString((this.tileentity.fuel * 20 * 20) - this.tileentity.tick), 36, 63, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,8 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiIndustrialWandRecharger extends GuiContainer {
|
||||
|
||||
public static final ResourceLocation texture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/wandcharger.png");
|
||||
public static final ResourceLocation texture =
|
||||
new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/wandcharger.png");
|
||||
|
||||
public GuiIndustrialWandRecharger(InventoryPlayer inventory, TileEntityIndustrialWandRecharge te) {
|
||||
super(new ContainerIndustrialWandRecharge(inventory, te));
|
||||
|
||||
@@ -30,7 +30,13 @@ public class GuiSolar extends GuiContainer {
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||
color = this.tileentity.getInventoryName().replaceAll("Solar", "").replaceAll("Compressed", "").replaceAll("Triple", "").replaceAll("Double", "").trim();
|
||||
color = this.tileentity
|
||||
.getInventoryName()
|
||||
.replaceAll("Solar", "")
|
||||
.replaceAll("Compressed", "")
|
||||
.replaceAll("Triple", "")
|
||||
.replaceAll("Double", "")
|
||||
.trim();
|
||||
if (color != null)
|
||||
switch (color) {
|
||||
case "Aer": {
|
||||
@@ -63,9 +69,7 @@ public class GuiSolar extends GuiContainer {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
else GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.renderEngine.bindTexture(tex);
|
||||
|
||||
@@ -76,8 +80,7 @@ public class GuiSolar extends GuiContainer {
|
||||
int l = this.tileentity.gaugeEnergyScaled(33);
|
||||
drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14);
|
||||
}
|
||||
if (this.tileentity.generating > 9)
|
||||
drawTexturedModalRect(h + 18, k + 42, 195, 20, 11, 14);
|
||||
if (this.tileentity.generating > 9) drawTexturedModalRect(h + 18, k + 42, 195, 20, 11, 14);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,27 +88,45 @@ public class GuiSolar extends GuiContainer {
|
||||
String formatPanelName = I18n.format(this.tileentity.getInventoryName(), new Object[0]);
|
||||
int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2;
|
||||
|
||||
if (!color.equals("Terra"))
|
||||
this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, 6618118);
|
||||
else
|
||||
this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, cColor);
|
||||
if (!color.equals("Terra")) this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, 6618118);
|
||||
else this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, cColor);
|
||||
|
||||
String storageString = I18n.format("emt.Storage", new Object[0]);
|
||||
|
||||
if (this.tileentity.maxstorage < 1000)
|
||||
this.fontRendererObj.drawString(storageString + this.tileentity.storage + "/" + this.tileentity.maxstorage + "EU", 36, 22, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
storageString + this.tileentity.storage + "/" + this.tileentity.maxstorage + "EU", 36, 22, 0);
|
||||
else if (10000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 10000000)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage) + "/" + (this.tileentity.maxstorage / 1000) + "kEU", 36, 22, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
storageString + (this.tileentity.mp_storage) + "/" + (this.tileentity.maxstorage / 1000) + "kEU",
|
||||
36,
|
||||
22,
|
||||
0);
|
||||
else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage / 1000) + "/" + (this.tileentity.maxstorage / 1000000) + "MEU", 36, 22, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
storageString + (this.tileentity.mp_storage / 1000) + "/" + (this.tileentity.maxstorage / 1000000)
|
||||
+ "MEU",
|
||||
36,
|
||||
22,
|
||||
0);
|
||||
else if (1000000000 <= this.tileentity.maxstorage)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage / 1000000) + "/" + (this.tileentity.maxstorage / 1000000000) + "GEU", 36, 22, 0);
|
||||
this.fontRendererObj.drawString(
|
||||
storageString + (this.tileentity.mp_storage / 1000000) + "/"
|
||||
+ (this.tileentity.maxstorage / 1000000000) + "GEU",
|
||||
36,
|
||||
22,
|
||||
0);
|
||||
if (this.tileentity.isActive)
|
||||
// if (Double.toString(this.tileentity.generating).length()>5)
|
||||
// this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating).substring(0, 4)+" EU/t", 36, 35, 0);
|
||||
// else
|
||||
this.fontRendererObj.drawString(I18n.format("emt.Generating", new Object[0]) + Double.toString(this.tileentity.generating) + " EU/t", 36, 35, 0);
|
||||
else
|
||||
this.fontRendererObj.drawString(I18n.format("emt.Generating", new Object[0]) + "0 EU/t", 36, 35, 0);
|
||||
// if (Double.toString(this.tileentity.generating).length()>5)
|
||||
// this.fontRendererObj.drawString(I18n.format("emt.Generating",new
|
||||
// Object[0])+Double.toString(this.tileentity.generating).substring(0, 4)+" EU/t", 36, 35, 0);
|
||||
// else
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("emt.Generating", new Object[0]) + Double.toString(this.tileentity.generating)
|
||||
+ " EU/t",
|
||||
36,
|
||||
35,
|
||||
0);
|
||||
else this.fontRendererObj.drawString(I18n.format("emt.Generating", new Object[0]) + "0 EU/t", 36, 35, 0);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,28 @@
|
||||
package emt.client.gui.config;
|
||||
|
||||
import static emt.util.EMTConfigHandler.*;
|
||||
|
||||
import cpw.mods.fml.client.config.GuiConfig;
|
||||
import cpw.mods.fml.client.config.IConfigElement;
|
||||
import emt.EMT;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.config.ConfigCategory;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import static emt.util.EMTConfigHandler.*;
|
||||
|
||||
public class EMTGuiConfig extends GuiConfig {
|
||||
|
||||
public EMTGuiConfig(GuiScreen parentScreen) {
|
||||
super(parentScreen, getConfigElements(parentScreen), EMT.MOD_ID, false, false, StatCollector.translateToLocal("gui." + EMT.MOD_ID + ".config.title"));
|
||||
super(
|
||||
parentScreen,
|
||||
getConfigElements(parentScreen),
|
||||
EMT.MOD_ID,
|
||||
false,
|
||||
false,
|
||||
StatCollector.translateToLocal("gui." + EMT.MOD_ID + ".config.title"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
package emt.client.gui.config;
|
||||
|
||||
import cpw.mods.fml.client.IModGuiFactory;
|
||||
import java.util.Set;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class EMTGuiFactory implements IModGuiFactory {
|
||||
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance) {
|
||||
|
||||
}
|
||||
public void initialize(Minecraft minecraftInstance) {}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package emt.client.gui.container;
|
||||
|
||||
import emt.tile.generator.TileEntityBaseGenerator;
|
||||
import java.util.Locale;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
@@ -8,10 +9,7 @@ import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class ConainerGenerator
|
||||
extends Container {
|
||||
public class ConainerGenerator extends Container {
|
||||
private TileEntityBaseGenerator tileentity;
|
||||
|
||||
public ConainerGenerator(InventoryPlayer inventoryplayer, TileEntityBaseGenerator tileentity) {
|
||||
@@ -52,8 +50,7 @@ public class ConainerGenerator
|
||||
if (i == 0) {
|
||||
this.tileentity.generating = (((int) j) * 400);
|
||||
} else if (i == 1) {
|
||||
if (j == 0 || this.tileentity.fuel != j)
|
||||
this.tileentity.tick = 0;
|
||||
if (j == 0 || this.tileentity.fuel != j) this.tileentity.tick = 0;
|
||||
this.tileentity.fuel = ((byte) j);
|
||||
} else if (i == 2) {
|
||||
this.tileentity.mpshownstroage = (short) j;
|
||||
@@ -83,7 +80,6 @@ public class ConainerGenerator
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
|
||||
return null;
|
||||
}
|
||||
@@ -92,4 +88,4 @@ public class ConainerGenerator
|
||||
this.detectAndSendChanges();
|
||||
return this.tileentity.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,14 @@
|
||||
package emt.client.gui.container;
|
||||
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import java.nio.ByteBuffer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class ContainerSolars
|
||||
extends Container {
|
||||
public class ContainerSolars extends Container {
|
||||
byte[] generating = new byte[8];
|
||||
byte[] mpStorage = new byte[8];
|
||||
private TileEntitySolarBase tileentity;
|
||||
@@ -20,8 +18,11 @@ public class ContainerSolars
|
||||
}
|
||||
|
||||
public void detectAndSendChanges() {
|
||||
byte[] generating = ByteBuffer.allocate(8).putDouble(this.tileentity.generating).array();
|
||||
byte[] mpStorage = ByteBuffer.allocate(8).putDouble(this.tileentity.getSourceStored() / 1000).array();
|
||||
byte[] generating =
|
||||
ByteBuffer.allocate(8).putDouble(this.tileentity.generating).array();
|
||||
byte[] mpStorage = ByteBuffer.allocate(8)
|
||||
.putDouble(this.tileentity.getSourceStored() / 1000)
|
||||
.array();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
|
||||
@@ -38,8 +39,7 @@ public class ContainerSolars
|
||||
public void updateProgressBar(int i, int j) {
|
||||
if (i < 8) {
|
||||
generating[i] = (byte) j;
|
||||
if (i == 7)
|
||||
this.tileentity.generating = ByteBuffer.wrap(generating).getDouble();
|
||||
if (i == 7) this.tileentity.generating = ByteBuffer.wrap(generating).getDouble();
|
||||
}
|
||||
if (i > 7 && i < 16) {
|
||||
mpStorage[i - 8] = (byte) j;
|
||||
@@ -56,4 +56,4 @@ public class ContainerSolars
|
||||
this.detectAndSendChanges();
|
||||
return this.tileentity.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ public class ModelSpecialArmor extends ModelBiped {
|
||||
public ModelRenderer center;
|
||||
public ModelRenderer jetpack;
|
||||
public boolean isJumping;
|
||||
public int type = 0;// 0 - Nothing, 1 - Jetpack, 2 - Wings
|
||||
public int type = 0; // 0 - Nothing, 1 - Jetpack, 2 - Wings
|
||||
|
||||
public ModelSpecialArmor() {
|
||||
this(1, 0);
|
||||
@@ -71,12 +71,22 @@ public class ModelSpecialArmor extends ModelBiped {
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void render(Entity entity, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) {
|
||||
public void render(
|
||||
Entity entity,
|
||||
float p_78088_2_,
|
||||
float p_78088_3_,
|
||||
float p_78088_4_,
|
||||
float p_78088_5_,
|
||||
float p_78088_6_,
|
||||
float scale) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
this.heldItemRight = player.inventory.getCurrentItem() != null ? 1 : 0;
|
||||
this.isRiding = player.isRiding();
|
||||
this.isSneak = player.isSneaking();
|
||||
this.aimedBow = player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem().getItemUseAction(player.inventory.getCurrentItem()) == EnumAction.bow && player.isUsingItem();
|
||||
this.aimedBow = player.inventory.getCurrentItem() != null
|
||||
&& player.inventory.getCurrentItem().getItem().getItemUseAction(player.inventory.getCurrentItem())
|
||||
== EnumAction.bow
|
||||
&& player.isUsingItem();
|
||||
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entity);
|
||||
|
||||
this.bipedBody.render(scale);
|
||||
@@ -91,10 +101,16 @@ public class ModelSpecialArmor extends ModelBiped {
|
||||
this.leftWing.render(scale);
|
||||
this.rightWing.render(scale);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity entity) {
|
||||
public void setRotationAngles(
|
||||
float p_78087_1_,
|
||||
float p_78087_2_,
|
||||
float p_78087_3_,
|
||||
float p_78087_4_,
|
||||
float p_78087_5_,
|
||||
float p_78087_6_,
|
||||
Entity entity) {
|
||||
super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, entity);
|
||||
if (this.isJumping) {
|
||||
this.rightWing.rotateAngleY = 0.5f;
|
||||
@@ -117,4 +133,4 @@ public class ModelSpecialArmor extends ModelBiped {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,8 @@ import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class RenderLaser extends Render {
|
||||
|
||||
private static final ResourceLocation laserTexture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/lasermodel.png");
|
||||
private static final ResourceLocation laserTexture =
|
||||
new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/lasermodel.png");
|
||||
|
||||
@Override
|
||||
public void doRender(Entity entityLaser, double x, double y, double z, float par8, float pTick) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package emt.client.renderer;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.entity.EntityShield;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -12,10 +14,9 @@ import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
public class RenderShield extends Render {
|
||||
private static final ResourceLocation shieldTexture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/shield.png");
|
||||
private static final ResourceLocation shieldTexture =
|
||||
new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/shield.png");
|
||||
static int glCallList;
|
||||
|
||||
static {
|
||||
@@ -79,7 +80,11 @@ public class RenderShield extends Render {
|
||||
glDisable(GL_CULL_FACE);
|
||||
|
||||
glPushMatrix();
|
||||
if (((EntityShield) entityShield).owner != null && !Minecraft.getMinecraft().thePlayer.getDisplayName().equals(((EntityShield) entityShield).owner.getDisplayName())) {
|
||||
if (((EntityShield) entityShield).owner != null
|
||||
&& !Minecraft.getMinecraft()
|
||||
.thePlayer
|
||||
.getDisplayName()
|
||||
.equals(((EntityShield) entityShield).owner.getDisplayName())) {
|
||||
glTranslated(x, y, z);
|
||||
}
|
||||
|
||||
@@ -94,5 +99,4 @@ public class RenderShield extends Render {
|
||||
protected ResourceLocation getEntityTexture(Entity texture) {
|
||||
return shieldTexture;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package emt.command;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import emt.util.EMTTextHelper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommand;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
@@ -12,9 +14,6 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CommandOutputs extends CommandBase {
|
||||
|
||||
public static ItemStack mkbook() {
|
||||
@@ -33,15 +32,25 @@ public class CommandOutputs extends CommandBase {
|
||||
for (final Aspect aspect : Aspect.aspects.values()) {
|
||||
++counter;
|
||||
|
||||
if (aspect.equals(Aspect.ENERGY) || aspect.equals(Aspect.TREE) || aspect.equals(Aspect.FIRE) || aspect.equals(Aspect.AURA) || aspect.equals(Aspect.GREED) || aspect.equals(Aspect.AIR))
|
||||
text3 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D / 20D) + "EU\n";
|
||||
if (aspect.equals(Aspect.ENERGY)
|
||||
|| aspect.equals(Aspect.TREE)
|
||||
|| aspect.equals(Aspect.FIRE)
|
||||
|| aspect.equals(Aspect.AURA)
|
||||
|| aspect.equals(Aspect.GREED)
|
||||
|| aspect.equals(Aspect.AIR))
|
||||
text3 += aspect.getTag() + ": "
|
||||
+ String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D / 20D) + "EU\n";
|
||||
|
||||
if (counter < 12) {
|
||||
text2 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D) + "EU/t\n";
|
||||
text += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n";
|
||||
text2 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D)
|
||||
+ "EU/t\n";
|
||||
text += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()))
|
||||
+ "EU\n";
|
||||
} else {
|
||||
text2 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D) + "EU\n";
|
||||
text += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n";
|
||||
text2 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D)
|
||||
+ "EU\n";
|
||||
text += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()))
|
||||
+ "EU\n";
|
||||
bookL.add(text);
|
||||
bookL2.add(text2);
|
||||
text2 = "";
|
||||
@@ -109,8 +118,12 @@ public class CommandOutputs extends CommandBase {
|
||||
public void processCommand(ICommandSender command, String[] astring) {
|
||||
ItemStack book = mkbook();
|
||||
|
||||
if (!command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).inventory.addItemStackToInventory(book))
|
||||
command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(book, 0);
|
||||
|
||||
if (!command.getEntityWorld()
|
||||
.getPlayerEntityByName(command.getCommandSenderName())
|
||||
.inventory
|
||||
.addItemStackToInventory(book))
|
||||
command.getEntityWorld()
|
||||
.getPlayerEntityByName(command.getCommandSenderName())
|
||||
.entityDropItem(book, 0);
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,8 @@ public class EntityArcher extends EntitySnowman implements IExtendedEntityProper
|
||||
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
|
||||
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, true, false, IMob.mobSelector));
|
||||
this.targetTasks.addTask(
|
||||
3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, true, false, IMob.mobSelector));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 0.30D));
|
||||
}
|
||||
|
||||
@@ -83,10 +84,13 @@ public class EntityArcher extends EntitySnowman implements IExtendedEntityProper
|
||||
|
||||
@Override
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase entity, float par2) {
|
||||
EntityArrow entityarrow = new EntityArrow(this.worldObj, this, entity, 1.6F, (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4));
|
||||
EntityArrow entityarrow = new EntityArrow(this.worldObj, this, entity, 1.6F, (float)
|
||||
(14 - this.worldObj.difficultySetting.getDifficultyId() * 4));
|
||||
int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, this.getHeldItem());
|
||||
int punchLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, this.getHeldItem());
|
||||
entityarrow.setDamage((double) (par2 * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F));
|
||||
entityarrow.setDamage((double) (par2 * 2.0F)
|
||||
+ this.rand.nextGaussian() * 0.25D
|
||||
+ (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F));
|
||||
|
||||
if (powerLevel > 0) {
|
||||
entityarrow.setDamage(entityarrow.getDamage() + (double) powerLevel * 0.5D + 0.5D);
|
||||
@@ -105,14 +109,11 @@ public class EntityArcher extends EntitySnowman implements IExtendedEntityProper
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNBTData(NBTTagCompound compound) {
|
||||
}
|
||||
public void saveNBTData(NBTTagCompound compound) {}
|
||||
|
||||
@Override
|
||||
public void loadNBTData(NBTTagCompound compound) {
|
||||
}
|
||||
public void loadNBTData(NBTTagCompound compound) {}
|
||||
|
||||
@Override
|
||||
public void init(Entity entity, World world) {
|
||||
}
|
||||
public void init(Entity entity, World world) {}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
@@ -17,8 +18,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class EntityEnergyBall extends Entity implements IProjectile, IEntityAdditionalSpawnData {
|
||||
public static final int RADIUS = 8;
|
||||
public static final int MAX_TICKS_IN_TILE = 60;
|
||||
@@ -31,6 +30,7 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
|
||||
* Pls, don't ask me why 1 =)
|
||||
**/
|
||||
public int ticksInAir = 1;
|
||||
|
||||
public double accelerationX = 0;
|
||||
public double accelerationY = 0;
|
||||
public double accelerationZ = 0;
|
||||
@@ -51,7 +51,12 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
|
||||
this(world);
|
||||
|
||||
this.shootingEntity = shootingEntity;
|
||||
this.setLocationAndAngles(shootingEntity.posX, shootingEntity.posY + shootingEntity.getEyeHeight(), shootingEntity.posZ, shootingEntity.rotationYaw, shootingEntity.rotationPitch);
|
||||
this.setLocationAndAngles(
|
||||
shootingEntity.posX,
|
||||
shootingEntity.posY + shootingEntity.getEyeHeight(),
|
||||
shootingEntity.posZ,
|
||||
shootingEntity.rotationYaw,
|
||||
shootingEntity.rotationPitch);
|
||||
}
|
||||
|
||||
public EntityEnergyBall(World world) {
|
||||
@@ -97,7 +102,8 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
|
||||
|
||||
for (int chX = -chunkSize; chX < chunkSize; chX++) {
|
||||
for (int chZ = -chunkSize; chZ < chunkSize; chZ++) {
|
||||
Chunk chunk = worldObj.getChunkFromChunkCoords(chX + (int) (this.posX / 16), chZ + (int) (this.posZ / 16));
|
||||
Chunk chunk = worldObj.getChunkFromChunkCoords(
|
||||
chX + (int) (this.posX / 16), chZ + (int) (this.posZ / 16));
|
||||
|
||||
if (chunk.isChunkLoaded && chunk.hasEntities) {
|
||||
for (int i = 0; i < chunk.entityLists.length; i++) {
|
||||
@@ -106,7 +112,8 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
|
||||
double width = entity.posX - this.posX;
|
||||
double height = entity.posY - this.posY;
|
||||
double length = entity.posZ - this.posZ;
|
||||
double hyp = MathHelper.sqrt_double((width * width) + (length * length) + (height * height));
|
||||
double hyp =
|
||||
MathHelper.sqrt_double((width * width) + (length * length) + (height * height));
|
||||
|
||||
if (hyp <= RADIUS) {
|
||||
entities.add(entity);
|
||||
@@ -116,7 +123,6 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
|
||||
if (worldObj.isRemote) {
|
||||
Thaumcraft.proxy.bolt(worldObj, this, entity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,7 +135,8 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
|
||||
else {
|
||||
/** Collision detection **/
|
||||
Vec3 vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec3next = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
Vec3 vec3next = Vec3.createVectorHelper(
|
||||
this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition mop = this.worldObj.rayTraceBlocks(vec3, vec3next);
|
||||
|
||||
this.ticksInAir++;
|
||||
@@ -144,7 +151,9 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
|
||||
float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionZ, this.motionX) * 180.0D / Math.PI) + 90.0F;
|
||||
|
||||
for (this.rotationPitch = (float) (Math.atan2((double) f1, this.motionY) * 180.0D / Math.PI) - 90.0F; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) {
|
||||
for (this.rotationPitch = (float) (Math.atan2((double) f1, this.motionY) * 180.0D / Math.PI) - 90.0F;
|
||||
this.rotationPitch - this.prevRotationPitch < -180.0F;
|
||||
this.prevRotationPitch -= 360.0F) {
|
||||
;
|
||||
}
|
||||
|
||||
@@ -203,13 +212,12 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
}
|
||||
protected void entityInit() {}
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
nbt.setByte("inTile", (byte) (this.inTile ? 1 : 0));
|
||||
nbt.setTag("direction", this.newDoubleNBTList(new double[]{this.motionX, this.motionY, this.motionZ}));
|
||||
nbt.setTag("direction", this.newDoubleNBTList(new double[] {this.motionX, this.motionY, this.motionZ}));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -229,6 +237,5 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setThrowableHeading(double x, double y, double z, float p1, float p2) {
|
||||
}
|
||||
public void setThrowableHeading(double x, double y, double z, float p1, float p2) {}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package emt.entity;
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -16,8 +17,6 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EntityLaser extends Entity implements IThrowableEntity, IProjectile {
|
||||
public Entity shootingEntity;
|
||||
private Block inTile;
|
||||
@@ -43,14 +42,21 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
this.shootingEntity = entity;
|
||||
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setLocationAndAngles(entity.posX, entity.posY + (double) entity.getEyeHeight(), entity.posZ, entity.rotationYaw, entity.rotationPitch);
|
||||
this.setLocationAndAngles(
|
||||
entity.posX,
|
||||
entity.posY + (double) entity.getEyeHeight(),
|
||||
entity.posZ,
|
||||
entity.rotationYaw,
|
||||
entity.rotationPitch);
|
||||
this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
|
||||
this.posY -= 0.10000000149011612D;
|
||||
this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
|
||||
this.yOffset = 0.0F;
|
||||
|
||||
this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI)
|
||||
* MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI)
|
||||
* MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, speed, 1.0F);
|
||||
@@ -61,8 +67,7 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
}
|
||||
protected void entityInit() {}
|
||||
|
||||
@Override
|
||||
public void setThrowableHeading(double x, double y, double z, float speed, float scale) {
|
||||
@@ -84,7 +89,6 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
this.motionX = velX;
|
||||
this.motionY = velY;
|
||||
this.motionZ = velZ;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -95,24 +99,29 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
|
||||
if (block.getMaterial() != Material.air) {
|
||||
block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
|
||||
AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
|
||||
AxisAlignedBB axisalignedbb =
|
||||
block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
|
||||
|
||||
if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) {
|
||||
if (axisalignedbb != null
|
||||
&& axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) {
|
||||
this.inGround = true;
|
||||
}
|
||||
}
|
||||
|
||||
block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
|
||||
AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
|
||||
AxisAlignedBB axisalignedbb =
|
||||
block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
|
||||
|
||||
if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) {
|
||||
if (axisalignedbb != null
|
||||
&& axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) {
|
||||
this.inGround = true;
|
||||
}
|
||||
|
||||
if (this.inGround) {
|
||||
int k = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
|
||||
if (!this.worldObj.isRemote) {
|
||||
this.worldObj.createExplosion(this, (int) this.posX, (int) this.posY, (int) this.posZ, explosionStrength, true);
|
||||
this.worldObj.createExplosion(
|
||||
this, (int) this.posX, (int) this.posY, (int) this.posZ, explosionStrength, true);
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
@@ -133,17 +142,26 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
} else {
|
||||
++this.ticksInAir;
|
||||
Vec3 vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec3next = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
Vec3 vec3next = Vec3.createVectorHelper(
|
||||
this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec3next, false, true, false);
|
||||
vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
vec3next = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
vec3next = Vec3.createVectorHelper(
|
||||
this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
|
||||
if (movingobjectposition != null) {
|
||||
vec3next = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
|
||||
vec3next = Vec3.createVectorHelper(
|
||||
movingobjectposition.hitVec.xCoord,
|
||||
movingobjectposition.hitVec.yCoord,
|
||||
movingobjectposition.hitVec.zCoord);
|
||||
}
|
||||
|
||||
Entity entity = null;
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(
|
||||
this,
|
||||
this.boundingBox
|
||||
.addCoord(this.motionX, this.motionY, this.motionZ)
|
||||
.expand(1.0D, 1.0D, 1.0D));
|
||||
double d0 = 0.0D;
|
||||
int l;
|
||||
float down;
|
||||
@@ -153,7 +171,8 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
|
||||
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
|
||||
down = 0.3F;
|
||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double) down, (double) down, (double) down);
|
||||
AxisAlignedBB axisalignedbb1 =
|
||||
entity1.boundingBox.expand((double) down, (double) down, (double) down);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3next, vec3);
|
||||
|
||||
if (movingobjectposition1 != null) {
|
||||
@@ -171,10 +190,14 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
}
|
||||
|
||||
if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||
if (movingobjectposition != null
|
||||
&& movingobjectposition.entityHit != null
|
||||
&& movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
|
||||
|
||||
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) {
|
||||
if (entityplayer.capabilities.disableDamage
|
||||
|| this.shootingEntity instanceof EntityPlayer
|
||||
&& !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) {
|
||||
movingobjectposition = null;
|
||||
}
|
||||
}
|
||||
@@ -184,9 +207,11 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
|
||||
if (movingobjectposition != null) {
|
||||
if (movingobjectposition.entityHit != null) {
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
f2 = MathHelper.sqrt_double(
|
||||
this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
if (!this.worldObj.isRemote) {
|
||||
this.worldObj.createExplosion(this, (int) this.posX, (int) this.posY, (int) this.posZ, explosionStrength, true);
|
||||
this.worldObj.createExplosion(
|
||||
this, (int) this.posX, (int) this.posY, (int) this.posZ, explosionStrength, true);
|
||||
this.setDead();
|
||||
}
|
||||
} else {
|
||||
@@ -198,7 +223,8 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
this.motionX = movingobjectposition.hitVec.xCoord - this.posX;
|
||||
this.motionY = movingobjectposition.hitVec.yCoord - this.posY;
|
||||
this.motionZ = movingobjectposition.hitVec.zCoord - this.posZ;
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
f2 = MathHelper.sqrt_double(
|
||||
this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
this.posX -= this.motionX / (double) f2 * 0.05000000074505806D;
|
||||
this.posY -= this.motionY / (double) f2 * 0.05000000074505806D;
|
||||
this.posZ -= this.motionZ / (double) f2 * 0.05000000074505806D;
|
||||
@@ -212,7 +238,9 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
|
||||
for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
|
||||
for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f2) * 180.0D / Math.PI);
|
||||
this.rotationPitch - this.prevRotationPitch < -180.0F;
|
||||
this.prevRotationPitch -= 360.0F)
|
||||
;
|
||||
|
||||
while (this.rotationPitch - this.prevRotationPitch >= 180.0F) {
|
||||
@@ -227,13 +255,18 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
this.prevRotationYaw += 360.0F;
|
||||
}
|
||||
|
||||
|
||||
if (this.isInWater()) {
|
||||
for (int j1 = 0; j1 < 4; ++j1) {
|
||||
f3 = 0.25F;
|
||||
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) f3, this.posY - this.motionY * (double) f3, this.posZ - this.motionZ * (double) f3, this.motionX, this.motionY, this.motionZ);
|
||||
this.worldObj.spawnParticle(
|
||||
"bubble",
|
||||
this.posX - this.motionX * (double) f3,
|
||||
this.posY - this.motionY * (double) f3,
|
||||
this.posZ - this.motionZ * (double) f3,
|
||||
this.motionX,
|
||||
this.motionY,
|
||||
this.motionZ);
|
||||
}
|
||||
|
||||
}
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
@@ -282,4 +315,4 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
|
||||
public void setThrower(Entity entity) {
|
||||
shootingEntity = entity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,12 +33,10 @@ public class EntityShield extends Entity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
}
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
}
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox() {
|
||||
@@ -62,7 +60,13 @@ public class EntityShield extends Entity {
|
||||
this.posZ = z;
|
||||
float f = this.width / 2.0F;
|
||||
float f1 = this.height;
|
||||
this.boundingBox.setBounds(x - (double) f, y - (double) this.yOffset - 2 + (double) this.ySize, z - (double) f, x + (double) f, y - (double) this.yOffset - 2 + (double) this.ySize + (double) f1, z + (double) f);
|
||||
this.boundingBox.setBounds(
|
||||
x - (double) f,
|
||||
y - (double) this.yOffset - 2 + (double) this.ySize,
|
||||
z - (double) f,
|
||||
x + (double) f,
|
||||
y - (double) this.yOffset - 2 + (double) this.ySize + (double) f1,
|
||||
z + (double) f);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,6 +7,7 @@ import emt.gthandler.common.items.EMT_CasingBlock;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.render.TextureFactory;
|
||||
import gregtech.common.blocks.GT_Block_Casings_Abstract;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -14,12 +15,11 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EMT_GT_Block extends GT_Block_Casings_Abstract {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] texture;
|
||||
|
||||
private final String[] textureNames;
|
||||
|
||||
public EMT_GT_Block(String[] texture) {
|
||||
@@ -59,5 +59,4 @@ public class EMT_GT_Block extends GT_Block_Casings_Abstract {
|
||||
texture[i] = par1IconRegister.registerIcon(textureNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.MetaTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -13,9 +14,6 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input {
|
||||
|
||||
private static int ApTe = (int) Math.ceil(Aspect.aspects.size() / GT_Values.V.length);
|
||||
@@ -36,12 +34,9 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input {
|
||||
public boolean addAspectList(final AspectList A) {
|
||||
|
||||
if ((this.mTier + 1) * ApTe > A.size() + current.size()) {
|
||||
if (current.visSize() + A.visSize() < (this.mTier + 1) * ApTe * 64)
|
||||
current.add(A);
|
||||
if (current.visSize() + A.visSize() < (this.mTier + 1) * ApTe * 64) current.add(A);
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
|
||||
} else return false;
|
||||
}
|
||||
|
||||
public void setCurrent(AspectList List) {
|
||||
@@ -53,19 +48,19 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input {
|
||||
}
|
||||
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new EssentiaHatch("Essentia Hatch " + GT_Values.VN[this.mTier], this.mTier, this.getDescription(), this.mTextures);
|
||||
return new EssentiaHatch(
|
||||
"Essentia Hatch " + GT_Values.VN[this.mTier], this.mTier, this.getDescription(), this.mTextures);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
//TODO: new GUI.
|
||||
// TODO: new GUI.
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
//TODO: new contanier GUI.
|
||||
// TODO: new contanier GUI.
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -96,12 +91,12 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() { //this is the fucking tooltip -_-'
|
||||
return new String[]{
|
||||
"Essentia Hatch for usage in Multiblocks",
|
||||
"Can only be filled with the Essentia Filler",
|
||||
"Can hold " + Integer.toString((ApTe * (mTier + 1))) + " Different Essentia Types",
|
||||
"Can hold " + Integer.toString((64 * ApTe * (mTier + 1))) + " Essentia in total"
|
||||
public String[] getDescription() { // this is the fucking tooltip -_-'
|
||||
return new String[] {
|
||||
"Essentia Hatch for usage in Multiblocks",
|
||||
"Can only be filled with the Essentia Filler",
|
||||
"Can hold " + Integer.toString((ApTe * (mTier + 1))) + " Different Essentia Types",
|
||||
"Can hold " + Integer.toString((64 * ApTe * (mTier + 1))) + " Essentia in total"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -151,7 +146,6 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
public boolean isFluidInputAllowed(FluidStack aFluid) {
|
||||
return false;
|
||||
}
|
||||
@@ -167,5 +161,4 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input {
|
||||
public int getCapacity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import emt.gthandler.common.implementations.EssentiaHatch;
|
||||
import emt.tile.TileEntityEMT;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -14,8 +15,6 @@ import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.aspects.IAspectContainer;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, IEssentiaTransport {
|
||||
|
||||
private AspectList current = new AspectList();
|
||||
@@ -36,7 +35,6 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I
|
||||
}
|
||||
}
|
||||
tagCompound.setTag("Aspects", tlist);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,32 +60,27 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null)
|
||||
T = this.worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null)
|
||||
T = this.worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null)
|
||||
T = this.worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null)
|
||||
T = this.worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null)
|
||||
T = this.worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
@@ -96,14 +89,12 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I
|
||||
}
|
||||
|
||||
private boolean checkTE(final TileEntity T) {
|
||||
if (T == null)
|
||||
return false;
|
||||
if (T == null) return false;
|
||||
if (this.current.visSize() > 0)
|
||||
if (T instanceof IGregTechTileEntity) {
|
||||
IMetaTileEntity M = ((IGregTechTileEntity) T).getMetaTileEntity();
|
||||
if (M instanceof EssentiaHatch) {
|
||||
if (((EssentiaHatch) M).addAspectList(current))
|
||||
this.current = new AspectList();
|
||||
if (((EssentiaHatch) M).addAspectList(current)) this.current = new AspectList();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -114,14 +105,22 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I
|
||||
public void fillfrompipe() {
|
||||
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]);
|
||||
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;
|
||||
}
|
||||
if ((pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]) != null) && (pipe.getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]) < getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]))) {
|
||||
addToContainer(pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), pipe.takeEssentia(pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), 1, ForgeDirection.VALID_DIRECTIONS[i]));
|
||||
if ((pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]) != null)
|
||||
&& (pipe.getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i])
|
||||
< getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]))) {
|
||||
addToContainer(
|
||||
pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]),
|
||||
pipe.takeEssentia(
|
||||
pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]),
|
||||
1,
|
||||
ForgeDirection.VALID_DIRECTIONS[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -169,8 +168,7 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I
|
||||
for (Aspect a : aspectList.aspects.keySet())
|
||||
if (current.aspects.containsKey(a)) {
|
||||
ret.add(true);
|
||||
} else
|
||||
ret.add(false);
|
||||
} else ret.add(false);
|
||||
return !ret.contains(false);
|
||||
}
|
||||
|
||||
@@ -195,9 +193,7 @@ public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSuction(Aspect aspect, int i) {
|
||||
|
||||
}
|
||||
public void setSuction(Aspect aspect, int i) {}
|
||||
|
||||
@Override
|
||||
public Aspect getSuctionType(ForgeDirection forgeDirection) {
|
||||
|
||||
@@ -6,38 +6,42 @@ import emt.EMT;
|
||||
import emt.gthandler.common.blocks.EMT_GT_Block;
|
||||
import gregtech.api.util.GT_LanguageManager;
|
||||
import gregtech.common.blocks.GT_Item_Casings_Abstract;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EMT_CasingBlock extends GT_Item_Casings_Abstract {
|
||||
|
||||
public static final Block[] EMT_GT_BLOCKS = {new EMT_GT_Block(new String[]
|
||||
{
|
||||
public static final Block[] EMT_GT_BLOCKS = {
|
||||
new EMT_GT_Block(new String[] {
|
||||
EMT.TEXTURE_PATH + ":machines/side",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/inner",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/siderawI",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/rawcoreI",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/siderawII",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/rawcoreII",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/rawcoreII", //unused?
|
||||
EMT.TEXTURE_PATH + ":machines/GT/rawcoreII", // unused?
|
||||
EMT.TEXTURE_PATH + ":machines/GT/ROBUST_NAQUADAH_ALLOY",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/BLOODY_ICHORIUM",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/DRACONIUM",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/WYVERN",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/AWAKENED_DRACONIUM",
|
||||
EMT.TEXTURE_PATH + ":machines/GT/CHAOTIC",
|
||||
}
|
||||
)};
|
||||
})
|
||||
};
|
||||
|
||||
protected final String deccCasing01Tooltip = GT_LanguageManager.addStringLocalization("gt.casing01tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 1");
|
||||
protected final String deccCasing02Tooltip = GT_LanguageManager.addStringLocalization("gt.casing02tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 2");
|
||||
protected final String deccCasing03Tooltip = GT_LanguageManager.addStringLocalization("gt.casing03tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 3");
|
||||
protected final String deccCasing04Tooltip = GT_LanguageManager.addStringLocalization("gt.casing04tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 4");
|
||||
protected final String deccCasing05Tooltip = GT_LanguageManager.addStringLocalization("gt.casing05tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 5");
|
||||
protected final String deccCasing01Tooltip = GT_LanguageManager.addStringLocalization(
|
||||
"gt.casing01tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 1");
|
||||
protected final String deccCasing02Tooltip = GT_LanguageManager.addStringLocalization(
|
||||
"gt.casing02tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 2");
|
||||
protected final String deccCasing03Tooltip = GT_LanguageManager.addStringLocalization(
|
||||
"gt.casing03tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 3");
|
||||
protected final String deccCasing04Tooltip = GT_LanguageManager.addStringLocalization(
|
||||
"gt.casing04tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 4");
|
||||
protected final String deccCasing05Tooltip = GT_LanguageManager.addStringLocalization(
|
||||
"gt.casing05tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 5");
|
||||
|
||||
public EMT_CasingBlock(final Block par1) {
|
||||
super(par1);
|
||||
@@ -57,8 +61,9 @@ public class EMT_CasingBlock extends GT_Item_Casings_Abstract {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT) //so it only gets sent clientside?
|
||||
public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) {
|
||||
@SideOnly(Side.CLIENT) // so it only gets sent clientside?
|
||||
public void addInformation(
|
||||
final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) {
|
||||
super.addInformation(aStack, aPlayer, aList, aF3_H);
|
||||
|
||||
switch (getDamage(aStack)) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package emt.gthandler.common.loader;
|
||||
|
||||
import static emt.command.CommandOutputs.mkbook;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import emt.gthandler.common.implementations.EssentiaHatch;
|
||||
import emt.gthandler.common.items.EMT_CasingBlock;
|
||||
@@ -21,11 +23,8 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
import static emt.command.CommandOutputs.mkbook;
|
||||
|
||||
public class EMT_GT_Loader implements Runnable {
|
||||
|
||||
|
||||
public static final int TIERS = GT_Values.VN.length;
|
||||
public static int aIDoffset = 13000 - TIERS - 1;
|
||||
public static ItemStack[] EHatch = new ItemStack[TIERS];
|
||||
@@ -37,60 +36,184 @@ public class EMT_GT_Loader implements Runnable {
|
||||
public void run() {
|
||||
|
||||
for (int i = 0; i < TIERS; i++) {
|
||||
EHatch[i] = new EssentiaHatch(aIDoffset + i, "Essentia Hatch " + GT_Values.VN[i], "Essentia Hatch " + GT_Values.VN[i], i).getStackForm(1L);
|
||||
EHatch[i] = new EssentiaHatch(
|
||||
aIDoffset + i, "Essentia Hatch " + GT_Values.VN[i], "Essentia Hatch " + GT_Values.VN[i], i)
|
||||
.getStackForm(1L);
|
||||
}
|
||||
|
||||
LEG = new EMT_Large_Essentia_Gen(aIDoffset + TIERS + 1, "Large Essentia Generator", "Large Essentia Generator").getStackForm(1L);
|
||||
LEG = new EMT_Large_Essentia_Gen(aIDoffset + TIERS + 1, "Large Essentia Generator", "Large Essentia Generator")
|
||||
.getStackForm(1L);
|
||||
|
||||
//Dragonblood recipe for magics haters
|
||||
if(Loader.isModLoaded("miscutils")) {
|
||||
GT_Values.RA.addMixerRecipe(new ItemStack[]{new ItemStack(Blocks.dragon_egg, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DraconiumAwakened, 64L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DraconiumAwakened, 64L)}, new FluidStack[]{Materials.Radon.getPlasma(144)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 8L)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("molten.dragonblood"), 288)}, 14000, 1966080);
|
||||
// Dragonblood recipe for magics haters
|
||||
if (Loader.isModLoaded("miscutils")) {
|
||||
GT_Values.RA.addMixerRecipe(
|
||||
new ItemStack[] {
|
||||
new ItemStack(Blocks.dragon_egg, 1),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DraconiumAwakened, 64L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DraconiumAwakened, 64L)
|
||||
},
|
||||
new FluidStack[] {Materials.Radon.getPlasma(144)},
|
||||
new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 8L)},
|
||||
new FluidStack[] {new FluidStack(FluidRegistry.getFluid("molten.dragonblood"), 288)},
|
||||
14000,
|
||||
1966080);
|
||||
}
|
||||
//Casing blocks
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Osmiridium, 4L)}, Materials.SolderingAlloy.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Indium, 1L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Tungsten, 4L)}, Materials.SolderingAlloy.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
// Casing blocks
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Osmiridium, 4L)
|
||||
},
|
||||
Materials.SolderingAlloy.getMolten(576L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2),
|
||||
100,
|
||||
(int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Indium, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Tungsten, 4L)
|
||||
},
|
||||
Materials.SolderingAlloy.getMolten(576L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3),
|
||||
100,
|
||||
(int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
if (Loader.isModLoaded("ThaumicTinkerer"))
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 2L, 2)}, Materials.Concrete.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 4), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2),
|
||||
GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 2L, 2)
|
||||
},
|
||||
Materials.Concrete.getMolten(2304L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 4),
|
||||
100,
|
||||
(int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
else
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), Materials.ElectrumFlux.getPlates(8)}, Materials.Concrete.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 4), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L)}, Materials.Osmiridium.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 5), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 6L), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.NaquadahAlloy, 6L)}, Materials.Void.getMolten(1152L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 7), 24000, 491520);
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("dreamcraft", "tile.BloodyIchorium", 1, 0), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Osmiridium, 6L)}, Materials.Void.getMolten(1152L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 8), 24000, 491520);
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 8), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Draconium, 6L), GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0)}, Materials.Void.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 9), 24000, 491520);//uv
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 9), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.CosmicNeutronium, 6L), GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 2, 0)}, Materials.Void.getMolten(4608L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 10), 12000, 1996080);//uhv, you need uhv to get the thing anyway?
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 10), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.DraconiumAwakened, 6L), GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 3, 0)}, Materials.Void.getMolten(9216L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 11), 12000, 7864320);//uev
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 11), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Infinity, 6L), GT_ModHandler.getModItem("DraconicEvolution", "chaoticCore", 4, 0)}, Materials.Void.getMolten(18432L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 12), 12000, 31457280);//uiv, use the multi
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), Materials.ElectrumFlux.getPlates(8)
|
||||
},
|
||||
Materials.Concrete.getMolten(2304L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 4),
|
||||
100,
|
||||
(int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L)
|
||||
},
|
||||
Materials.Osmiridium.getMolten(576L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 5),
|
||||
100,
|
||||
(int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 6L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.NaquadahAlloy, 6L)
|
||||
},
|
||||
Materials.Void.getMolten(1152L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 7),
|
||||
24000,
|
||||
491520);
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
GT_ModHandler.getModItem("dreamcraft", "tile.BloodyIchorium", 1, 0),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Osmiridium, 6L)
|
||||
},
|
||||
Materials.Void.getMolten(1152L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 8),
|
||||
24000,
|
||||
491520);
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 8),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Draconium, 6L),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0)
|
||||
},
|
||||
Materials.Void.getMolten(2304L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 9),
|
||||
24000,
|
||||
491520); // uv
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 9),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.CosmicNeutronium, 6L),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 2, 0)
|
||||
},
|
||||
Materials.Void.getMolten(4608L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 10),
|
||||
12000,
|
||||
1996080); // uhv, you need uhv to get the thing anyway?
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 10),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.DraconiumAwakened, 6L),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 3, 0)
|
||||
},
|
||||
Materials.Void.getMolten(9216L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 11),
|
||||
12000,
|
||||
7864320); // uev
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 11),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Infinity, 6L),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaoticCore", 4, 0)
|
||||
},
|
||||
Materials.Void.getMolten(18432L),
|
||||
new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 12),
|
||||
12000,
|
||||
31457280); // uiv, use the multi
|
||||
|
||||
EMT_RecipeAdder.Run();
|
||||
|
||||
DECC = new DE_Fusion_Crafter(5001, "de_fusion_crafter", "Draconic Evolution Fusion Crafter").getStackForm(1L);
|
||||
|
||||
/* New DECF controller recipe moved to TT. only create the old one here if tectech or blood magic is not around.*/
|
||||
/* New DECF controller recipe moved to TT. only create the old one here if tectech or blood magic is not around.*/
|
||||
|
||||
if(!(Loader.isModLoaded("tectech")&&Loader.isModLoaded("AWWayofTime"))){
|
||||
GT_Values.RA.addAssemblylineRecipe(GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 10780), 144000, new Object[]{
|
||||
GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 10780),
|
||||
ItemList.Robot_Arm_LuV.get(2L),
|
||||
ItemList.Electric_Motor_LuV.get(2L),
|
||||
ItemList.Field_Generator_LuV.get(1L),
|
||||
new Object[]{OrePrefixes.circuit.get(Materials.Master), 2},
|
||||
ItemList.Casing_Coil_Naquadah.get(8L),
|
||||
}, new FluidStack[]{
|
||||
Materials.SolderingAlloy.getMolten(2304L),
|
||||
Materials.Thaumium.getMolten(1440L),
|
||||
}, DECC, 1500, 16384);
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < ItemList.HATCHES_INPUT.length; i++) {
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.HATCHES_INPUT[i].get(1L), new ItemStack(ConfigBlocks.blockTube, 1, 4)}, Materials.Thaumium.getMolten(288L), EHatch[i], 100, (int) (GT_Values.V[i] - (GT_Values.V[i] / 10)));
|
||||
if (!(Loader.isModLoaded("tectech") && Loader.isModLoaded("AWWayofTime"))) {
|
||||
GT_Values.RA.addAssemblylineRecipe(
|
||||
GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 10780),
|
||||
144000,
|
||||
new Object[] {
|
||||
GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 10780),
|
||||
ItemList.Robot_Arm_LuV.get(2L),
|
||||
ItemList.Electric_Motor_LuV.get(2L),
|
||||
ItemList.Field_Generator_LuV.get(1L),
|
||||
new Object[] {OrePrefixes.circuit.get(Materials.Master), 2},
|
||||
ItemList.Casing_Coil_Naquadah.get(8L),
|
||||
},
|
||||
new FluidStack[] {
|
||||
Materials.SolderingAlloy.getMolten(2304L), Materials.Thaumium.getMolten(1440L),
|
||||
},
|
||||
DECC,
|
||||
1500,
|
||||
16384);
|
||||
}
|
||||
|
||||
for (int i = 0; i < ItemList.HATCHES_INPUT.length; i++) {
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {ItemList.HATCHES_INPUT[i].get(1L), new ItemStack(ConfigBlocks.blockTube, 1, 4)},
|
||||
Materials.Thaumium.getMolten(288L),
|
||||
EHatch[i],
|
||||
100,
|
||||
(int) (GT_Values.V[i] - (GT_Values.V[i] / 10)));
|
||||
}
|
||||
|
||||
ResearchMultiblock = new GT_MetaTileEntity_ResearchCompleter(aIDoffset + TIERS + 2, "Research Completer", "Research Completer").getStackForm(1L);
|
||||
ResearchMultiblock = new GT_MetaTileEntity_ResearchCompleter(
|
||||
aIDoffset + TIERS + 2, "Research Completer", "Research Completer")
|
||||
.getStackForm(1L);
|
||||
}
|
||||
|
||||
public void runlate() {
|
||||
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Items.book), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE)}, GT_Values.NF, mkbook(), 128, 64);
|
||||
GT_Values.RA.addAssemblerRecipe(
|
||||
new ItemStack[] {
|
||||
new ItemStack(Items.book),
|
||||
GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L),
|
||||
new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE)
|
||||
},
|
||||
GT_Values.NF,
|
||||
mkbook(),
|
||||
128,
|
||||
64);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package emt.gthandler.common.loader;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.E;
|
||||
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import emt.init.EMTItems;
|
||||
import gregtech.api.enums.Materials;
|
||||
@@ -7,118 +10,187 @@ import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Recipe;
|
||||
import java.util.HashSet;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.E;
|
||||
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
|
||||
|
||||
|
||||
public class EMT_RecipeAdder {
|
||||
public static final GT_Recipe.GT_Recipe_Map sFusionCraftingRecipes = new GT_Recipe.GT_Recipe_Map(new HashSet<>(4), "emt.recipe.fusioncrafting", "Draconic Evolution Fusion Crafter", null, RES_PATH_GUI + "basicmachines/Default", 6, 1, 1, 0, 1, "Tier Casing: ", 1, E, false, false);
|
||||
public static final GT_Recipe.GT_Recipe_Map sFusionCraftingRecipes = new GT_Recipe.GT_Recipe_Map(
|
||||
new HashSet<>(4),
|
||||
"emt.recipe.fusioncrafting",
|
||||
"Draconic Evolution Fusion Crafter",
|
||||
null,
|
||||
RES_PATH_GUI + "basicmachines/Default",
|
||||
6,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
"Tier Casing: ",
|
||||
1,
|
||||
E,
|
||||
false,
|
||||
false);
|
||||
|
||||
public static void addFusionCraftingRecipe(ItemStack[] inputs, FluidStack[] fluidinputs, ItemStack[] outputs, FluidStack[] fluidoutputs, int aDuration, int aEUt, int aTier) {
|
||||
sFusionCraftingRecipes.addRecipe(true, inputs, outputs, null, fluidinputs, fluidoutputs, aDuration, aEUt, aTier);
|
||||
public static void addFusionCraftingRecipe(
|
||||
ItemStack[] inputs,
|
||||
FluidStack[] fluidinputs,
|
||||
ItemStack[] outputs,
|
||||
FluidStack[] fluidoutputs,
|
||||
int aDuration,
|
||||
int aEUt,
|
||||
int aTier) {
|
||||
sFusionCraftingRecipes.addRecipe(
|
||||
true, inputs, outputs, null, fluidinputs, fluidoutputs, aDuration, aEUt, aTier);
|
||||
}
|
||||
|
||||
public static void addFusionCraftingRecipeNonOptimized(ItemStack[] inputs, FluidStack[] fluidinputs, ItemStack[] outputs, FluidStack[] fluidoutputs, int aDuration, int aEUt, int aTier) {
|
||||
sFusionCraftingRecipes.addRecipe(false, inputs, outputs, null, fluidinputs, fluidoutputs, aDuration, aEUt, aTier);
|
||||
}
|
||||
public static void addFusionCraftingRecipe(ItemStack[] inputs, ItemStack output, int aDuration, int aEUt, int aTier) {
|
||||
addFusionCraftingRecipe(inputs, null, new ItemStack[] { output }, null, aDuration, aEUt, aTier);
|
||||
public static void addFusionCraftingRecipeNonOptimized(
|
||||
ItemStack[] inputs,
|
||||
FluidStack[] fluidinputs,
|
||||
ItemStack[] outputs,
|
||||
FluidStack[] fluidoutputs,
|
||||
int aDuration,
|
||||
int aEUt,
|
||||
int aTier) {
|
||||
sFusionCraftingRecipes.addRecipe(
|
||||
false, inputs, outputs, null, fluidinputs, fluidoutputs, aDuration, aEUt, aTier);
|
||||
}
|
||||
|
||||
//Use this if you don't want your recipes quantity to be splitted
|
||||
public static void addFusionCraftingRecipeNonOptimized(ItemStack[] inputs, FluidStack fluidinput, ItemStack output, FluidStack fluidoutput, int aDuration, int aEUt, int aTier) {
|
||||
addFusionCraftingRecipeNonOptimized(inputs, new FluidStack[] { fluidinput }, new ItemStack[] { output }, new FluidStack[] { fluidoutput }, aDuration, aEUt, aTier);
|
||||
public static void addFusionCraftingRecipe(
|
||||
ItemStack[] inputs, ItemStack output, int aDuration, int aEUt, int aTier) {
|
||||
addFusionCraftingRecipe(inputs, null, new ItemStack[] {output}, null, aDuration, aEUt, aTier);
|
||||
}
|
||||
|
||||
// Use this if you don't want your recipes quantity to be splitted
|
||||
public static void addFusionCraftingRecipeNonOptimized(
|
||||
ItemStack[] inputs,
|
||||
FluidStack fluidinput,
|
||||
ItemStack output,
|
||||
FluidStack fluidoutput,
|
||||
int aDuration,
|
||||
int aEUt,
|
||||
int aTier) {
|
||||
addFusionCraftingRecipeNonOptimized(
|
||||
inputs,
|
||||
new FluidStack[] {fluidinput},
|
||||
new ItemStack[] {output},
|
||||
new FluidStack[] {fluidoutput},
|
||||
aDuration,
|
||||
aEUt,
|
||||
aTier);
|
||||
}
|
||||
|
||||
public static void Run() {
|
||||
|
||||
// CORES
|
||||
|
||||
addFusionCraftingRecipe(new ItemStack[]{
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 4),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Ichorium, 1),
|
||||
GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 16)},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0),
|
||||
400, 30720, 1);
|
||||
addFusionCraftingRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 4),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Ichorium, 1),
|
||||
GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 16)
|
||||
},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0),
|
||||
400,
|
||||
30720,
|
||||
1);
|
||||
|
||||
addFusionCraftingRecipe(new ItemStack[]{
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 6),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 4, 0),
|
||||
GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 17)},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 1, 0),
|
||||
800, 65536, 2);
|
||||
addFusionCraftingRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 6),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 4, 0),
|
||||
GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 17)
|
||||
},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 1, 0),
|
||||
800,
|
||||
65536,
|
||||
2);
|
||||
|
||||
addFusionCraftingRecipe(new ItemStack[]{
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 8),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 4),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 4, 0),
|
||||
GT_ModHandler.getModItem("dreamcraft", "ManyullynCrystal", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 18)},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 1, 0),
|
||||
1600, 122880, 3);
|
||||
|
||||
addFusionCraftingRecipe(new ItemStack[]{
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 12),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 6),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 4, 0),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaosShard", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 19)},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaoticCore", 1, 0),
|
||||
3200, 500000, 4);
|
||||
addFusionCraftingRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 8),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 4),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 4, 0),
|
||||
GT_ModHandler.getModItem("dreamcraft", "ManyullynCrystal", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 18)
|
||||
},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 1, 0),
|
||||
1600,
|
||||
122880,
|
||||
3);
|
||||
|
||||
addFusionCraftingRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 12),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 6),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 4, 0),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaosShard", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 19)
|
||||
},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaoticCore", 1, 0),
|
||||
3200,
|
||||
500000,
|
||||
4);
|
||||
|
||||
// ENERGY CORES
|
||||
|
||||
addFusionCraftingRecipe(new ItemStack[]{
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 8),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedstoneAlloy, 4),
|
||||
GT_ModHandler.getModItem("AdvancedSolarPanel", "asp_crafting_items", 4, 1),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 17)},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 1, 0),
|
||||
1000, 65536, 2);
|
||||
addFusionCraftingRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 8),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedstoneAlloy, 4),
|
||||
GT_ModHandler.getModItem("AdvancedSolarPanel", "asp_crafting_items", 4, 1),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 17)
|
||||
},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 1, 0),
|
||||
1000,
|
||||
65536,
|
||||
2);
|
||||
|
||||
addFusionCraftingRecipe(new ItemStack[]{
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 8),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 4, 0),
|
||||
GT_ModHandler.getModItem("AdvancedSolarPanel", "asp_crafting_items", 4, 4),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 18)},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 1, 1),
|
||||
2000, 122880, 3);
|
||||
addFusionCraftingRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 8),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 4, 0),
|
||||
GT_ModHandler.getModItem("AdvancedSolarPanel", "asp_crafting_items", 4, 4),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 18)
|
||||
},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 1, 1),
|
||||
2000,
|
||||
122880,
|
||||
3);
|
||||
|
||||
//Dragon Blood
|
||||
if(Loader.isModLoaded("miscutils")) {
|
||||
// Dragon Blood
|
||||
if (Loader.isModLoaded("miscutils")) {
|
||||
|
||||
addFusionCraftingRecipeNonOptimized(
|
||||
new ItemStack[]{
|
||||
new ItemStack(Blocks.dragon_egg, 0),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DraconiumAwakened, 64)},
|
||||
Materials.Radon.getPlasma(144),
|
||||
null,
|
||||
new FluidStack(FluidRegistry.getFluid("molten.dragonblood"), 288),
|
||||
4200, 1966080, 3);
|
||||
new ItemStack[] {
|
||||
new ItemStack(Blocks.dragon_egg, 0),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DraconiumAwakened, 64)
|
||||
},
|
||||
Materials.Radon.getPlasma(144),
|
||||
null,
|
||||
new FluidStack(FluidRegistry.getFluid("molten.dragonblood"), 288),
|
||||
4200,
|
||||
1966080,
|
||||
3);
|
||||
|
||||
addFusionCraftingRecipeNonOptimized(
|
||||
new ItemStack[]{
|
||||
GT_ModHandler.getModItem("witchery", "infinityegg", 0),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DraconiumAwakened, 64)},
|
||||
Materials.Radon.getPlasma(72),
|
||||
null,
|
||||
new FluidStack(FluidRegistry.getFluid("molten.dragonblood"), 432),
|
||||
3600, 1966080, 3);
|
||||
new ItemStack[] {
|
||||
GT_ModHandler.getModItem("witchery", "infinityegg", 0),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DraconiumAwakened, 64)
|
||||
},
|
||||
Materials.Radon.getPlasma(72),
|
||||
null,
|
||||
new FluidStack(FluidRegistry.getFluid("molten.dragonblood"), 432),
|
||||
3600,
|
||||
1966080,
|
||||
3);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+136
-92
@@ -1,5 +1,10 @@
|
||||
package emt.gthandler.common.tileentities.machines.multi;
|
||||
|
||||
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
|
||||
import static gregtech.api.enums.GT_Values.V;
|
||||
import static gregtech.api.enums.Textures.BlockIcons.*;
|
||||
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
|
||||
|
||||
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
|
||||
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
|
||||
import emt.EMT;
|
||||
@@ -14,21 +19,14 @@ import gregtech.api.render.TextureFactory;
|
||||
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
|
||||
import gregtech.api.util.GT_Recipe;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
|
||||
import static gregtech.api.enums.GT_Values.V;
|
||||
import static gregtech.api.enums.Textures.BlockIcons.*;
|
||||
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
|
||||
|
||||
|
||||
public class DE_Fusion_Crafter extends GT_MetaTileEntity_EnhancedMultiBlockBase<DE_Fusion_Crafter> {
|
||||
private static final int CASING_INDEX = (1 << 7) + (15 + 48);
|
||||
private int mTierCasing = 0;
|
||||
@@ -49,48 +47,61 @@ public class DE_Fusion_Crafter extends GT_MetaTileEntity_EnhancedMultiBlockBase<
|
||||
}
|
||||
|
||||
private static final String STRUCTURE_PIECE_MAIN = "main";
|
||||
private static final List<Pair<Block, Integer>> fusionCasingTiers = Arrays.asList(
|
||||
Pair.of(GregTech_API.sBlockCasings4, 6),
|
||||
Pair.of(GregTech_API.sBlockCasings4, 8)
|
||||
);
|
||||
private static final List<Pair<Block, Integer>> fusionCasingTiers =
|
||||
Arrays.asList(Pair.of(GregTech_API.sBlockCasings4, 6), Pair.of(GregTech_API.sBlockCasings4, 8));
|
||||
private static final List<Pair<Block, Integer>> coreTiers = Arrays.asList(
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 8),
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 9),
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 10),
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 11),
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 12)
|
||||
);
|
||||
private static final IStructureDefinition<DE_Fusion_Crafter> STRUCTURE_DEFINITION = StructureDefinition.<DE_Fusion_Crafter>builder()
|
||||
.addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{
|
||||
{"nnnnn", "nnnnn", "nnnnn", "nnnnn", "nnnnn"},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{"RRRRR", "R F R", "RFfFR", "R F R", "RRRRR"},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{"RRRRR", "R F R", "RFfFR", "R F R", "RRRRR"},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{"NN~NN", "NNNNN", "NNNNN", "NNNNN", "NNNNN"}
|
||||
}))
|
||||
.addElement('N', ofChain(
|
||||
onElementPass(e -> e.mCasing++, ofBlock(EMT_CasingBlock.EMT_GT_BLOCKS[0], 7)),
|
||||
ofHatchAdder(DE_Fusion_Crafter::addEnergyInputToMachineList, CASING_INDEX, 1),
|
||||
ofHatchAdder(DE_Fusion_Crafter::addInputToMachineList, CASING_INDEX, 1),
|
||||
ofHatchAdder(DE_Fusion_Crafter::addOutputToMachineList, CASING_INDEX, 1),
|
||||
ofHatchAdder(DE_Fusion_Crafter::addMaintenanceToMachineList, CASING_INDEX, 1)
|
||||
))
|
||||
.addElement('n', onElementPass(e -> e.mCasing++, ofBlock(EMT_CasingBlock.EMT_GT_BLOCKS[0], 7)))
|
||||
.addElement('f', ofBlock(GregTech_API.sBlockCasings4, 7))
|
||||
.addElement('F', ofBlocksTiered((Block b, int m) -> {
|
||||
if (b != GregTech_API.sBlockCasings4 || (m != 6 && m != 8)) return -2;
|
||||
return m == 6 ? 1 : 2;
|
||||
}, fusionCasingTiers, -1, (e, i) -> e.mFusionTierCasing = i, e -> e.mFusionTierCasing))
|
||||
.addElement('R', ofBlocksTiered((Block b, int m) -> {
|
||||
if (b != EMT_CasingBlock.EMT_GT_BLOCKS[0] || m < 8 || m > 12) return -2;
|
||||
return m - 7;
|
||||
}, coreTiers, -1, (e, i) -> e.mTierCasing = i, e -> e.mTierCasing))
|
||||
.build();
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 8),
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 9),
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 10),
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 11),
|
||||
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 12));
|
||||
private static final IStructureDefinition<DE_Fusion_Crafter> STRUCTURE_DEFINITION =
|
||||
StructureDefinition.<DE_Fusion_Crafter>builder()
|
||||
.addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
|
||||
{"nnnnn", "nnnnn", "nnnnn", "nnnnn", "nnnnn"},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{"RRRRR", "R F R", "RFfFR", "R F R", "RRRRR"},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{"RRRRR", "R F R", "RFfFR", "R F R", "RRRRR"},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{" ", " F ", " FfF ", " F ", " "},
|
||||
{"NN~NN", "NNNNN", "NNNNN", "NNNNN", "NNNNN"}
|
||||
}))
|
||||
.addElement(
|
||||
'N',
|
||||
ofChain(
|
||||
onElementPass(e -> e.mCasing++, ofBlock(EMT_CasingBlock.EMT_GT_BLOCKS[0], 7)),
|
||||
ofHatchAdder(DE_Fusion_Crafter::addEnergyInputToMachineList, CASING_INDEX, 1),
|
||||
ofHatchAdder(DE_Fusion_Crafter::addInputToMachineList, CASING_INDEX, 1),
|
||||
ofHatchAdder(DE_Fusion_Crafter::addOutputToMachineList, CASING_INDEX, 1),
|
||||
ofHatchAdder(DE_Fusion_Crafter::addMaintenanceToMachineList, CASING_INDEX, 1)))
|
||||
.addElement('n', onElementPass(e -> e.mCasing++, ofBlock(EMT_CasingBlock.EMT_GT_BLOCKS[0], 7)))
|
||||
.addElement('f', ofBlock(GregTech_API.sBlockCasings4, 7))
|
||||
.addElement(
|
||||
'F',
|
||||
ofBlocksTiered(
|
||||
(Block b, int m) -> {
|
||||
if (b != GregTech_API.sBlockCasings4 || (m != 6 && m != 8)) return -2;
|
||||
return m == 6 ? 1 : 2;
|
||||
},
|
||||
fusionCasingTiers,
|
||||
-1,
|
||||
(e, i) -> e.mFusionTierCasing = i,
|
||||
e -> e.mFusionTierCasing))
|
||||
.addElement(
|
||||
'R',
|
||||
ofBlocksTiered(
|
||||
(Block b, int m) -> {
|
||||
if (b != EMT_CasingBlock.EMT_GT_BLOCKS[0] || m < 8 || m > 12) return -2;
|
||||
return m - 7;
|
||||
},
|
||||
coreTiers,
|
||||
-1,
|
||||
(e, i) -> e.mTierCasing = i,
|
||||
e -> e.mTierCasing))
|
||||
.build();
|
||||
|
||||
@Override
|
||||
public IStructureDefinition<DE_Fusion_Crafter> getStructureDefinition() {
|
||||
@@ -101,8 +112,7 @@ public class DE_Fusion_Crafter extends GT_MetaTileEntity_EnhancedMultiBlockBase<
|
||||
mCasing = 0;
|
||||
mTierCasing = -1;
|
||||
mFusionTierCasing = -1;
|
||||
if (!checkPiece(STRUCTURE_PIECE_MAIN, 2, 9, 0))
|
||||
return false;
|
||||
if (!checkPiece(STRUCTURE_PIECE_MAIN, 2, 9, 0)) return false;
|
||||
if (mCasing < 19) return false;
|
||||
if (mTierCasing == -2 || mFusionTierCasing == -2) return false;
|
||||
if (mTierCasing > 3 && mFusionTierCasing < 2) return false;
|
||||
@@ -112,54 +122,86 @@ public class DE_Fusion_Crafter extends GT_MetaTileEntity_EnhancedMultiBlockBase<
|
||||
@Override
|
||||
protected GT_Multiblock_Tooltip_Builder createTooltip() {
|
||||
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
|
||||
tt.
|
||||
addMachineType("Fusion Crafter").
|
||||
addInfo("Controller Block for the Draconic Evolution Fusion Crafter").
|
||||
addInfo("Machine can be overclocked by using casings above the recipe tier:").
|
||||
addInfo("Recipe time is divided by number of tiers above the recipe").
|
||||
addInfo("Normal EU OC still applies !").
|
||||
addInfo("To see the structure, use a " + EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.GRAY + " structure hologram on the Controller!").
|
||||
addSeparator().
|
||||
beginStructureBlock(5, 10, 5, false).
|
||||
addController("Front bottom center").
|
||||
addCasingInfo("Naquadah Alloy Fusion Casing", 19).
|
||||
addOtherStructurePart("Fusion Coil Block", "Center pillar").
|
||||
addOtherStructurePart("Fusion Machine Casing", "Touching Fusion Coil Block at every side").
|
||||
addOtherStructurePart("Tiered Fusion Casing", "Rings (5x5 hollow) at layer 4 and 7").
|
||||
addStructureInfo("Bloody Ichorium for tier 1, Draconium for tier 2, etc").
|
||||
addStructureInfo("To use tier 3 + you have to use fusion casing MK II").
|
||||
addInputBus("Any bottom casing", 1).
|
||||
addInputHatch("Any bottom casing", 1).
|
||||
addOutputBus("Any bottom casing", 1).
|
||||
addOutputHatch("Any bottom casing", 1).
|
||||
addEnergyHatch("Any bottom casing", 1).
|
||||
addMaintenanceHatch("Any bottom casing", 1).
|
||||
toolTipFinisher(EMT.NAME);
|
||||
tt.addMachineType("Fusion Crafter")
|
||||
.addInfo("Controller Block for the Draconic Evolution Fusion Crafter")
|
||||
.addInfo("Machine can be overclocked by using casings above the recipe tier:")
|
||||
.addInfo("Recipe time is divided by number of tiers above the recipe")
|
||||
.addInfo("Normal EU OC still applies !")
|
||||
.addInfo("To see the structure, use a " + EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE
|
||||
+ "Tech" + EnumChatFormatting.GRAY + " structure hologram on the Controller!")
|
||||
.addSeparator()
|
||||
.beginStructureBlock(5, 10, 5, false)
|
||||
.addController("Front bottom center")
|
||||
.addCasingInfo("Naquadah Alloy Fusion Casing", 19)
|
||||
.addOtherStructurePart("Fusion Coil Block", "Center pillar")
|
||||
.addOtherStructurePart("Fusion Machine Casing", "Touching Fusion Coil Block at every side")
|
||||
.addOtherStructurePart("Tiered Fusion Casing", "Rings (5x5 hollow) at layer 4 and 7")
|
||||
.addStructureInfo("Bloody Ichorium for tier 1, Draconium for tier 2, etc")
|
||||
.addStructureInfo("To use tier 3 + you have to use fusion casing MK II")
|
||||
.addInputBus("Any bottom casing", 1)
|
||||
.addInputHatch("Any bottom casing", 1)
|
||||
.addOutputBus("Any bottom casing", 1)
|
||||
.addOutputHatch("Any bottom casing", 1)
|
||||
.addEnergyHatch("Any bottom casing", 1)
|
||||
.addMaintenanceHatch("Any bottom casing", 1)
|
||||
.toolTipFinisher(EMT.NAME);
|
||||
return tt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
public ITexture[] getTexture(
|
||||
IGregTechTileEntity aBaseMetaTileEntity,
|
||||
byte aSide,
|
||||
byte aFacing,
|
||||
byte aColorIndex,
|
||||
boolean aActive,
|
||||
boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
if (aActive)
|
||||
return new ITexture[]{
|
||||
return new ITexture[] {
|
||||
TextureFactory.of(MACHINE_CASING_MAGIC),
|
||||
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE).extFacing().build(),
|
||||
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).extFacing().glow().build()};
|
||||
return new ITexture[]{
|
||||
TextureFactory.builder()
|
||||
.addIcon(OVERLAY_TELEPORTER_ACTIVE)
|
||||
.extFacing()
|
||||
.build(),
|
||||
TextureFactory.builder()
|
||||
.addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW)
|
||||
.extFacing()
|
||||
.glow()
|
||||
.build()
|
||||
};
|
||||
return new ITexture[] {
|
||||
TextureFactory.of(MACHINE_CASING_MAGIC),
|
||||
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER).extFacing().build(),
|
||||
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).extFacing().glow().build()};
|
||||
TextureFactory.builder()
|
||||
.addIcon(OVERLAY_TELEPORTER_GLOW)
|
||||
.extFacing()
|
||||
.glow()
|
||||
.build()
|
||||
};
|
||||
}
|
||||
if (aActive)
|
||||
return new ITexture[]{
|
||||
return new ITexture[] {
|
||||
TextureFactory.of(MACHINE_CASING_MAGIC),
|
||||
TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE).extFacing().build(),
|
||||
TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).extFacing().glow().build()};
|
||||
return new ITexture[]{
|
||||
TextureFactory.builder()
|
||||
.addIcon(MACHINE_CASING_MAGIC_ACTIVE)
|
||||
.extFacing()
|
||||
.build(),
|
||||
TextureFactory.builder()
|
||||
.addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
|
||||
.extFacing()
|
||||
.glow()
|
||||
.build()
|
||||
};
|
||||
return new ITexture[] {
|
||||
TextureFactory.of(MACHINE_CASING_MAGIC),
|
||||
TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC).extFacing().build(),
|
||||
TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).extFacing().glow().build()};
|
||||
TextureFactory.builder()
|
||||
.addIcon(MACHINE_CASING_MAGIC_GLOW)
|
||||
.extFacing()
|
||||
.glow()
|
||||
.build()
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -180,17 +222,19 @@ public class DE_Fusion_Crafter extends GT_MetaTileEntity_EnhancedMultiBlockBase<
|
||||
if (tInputs.length > 0) {
|
||||
long tVoltage = getMaxInputVoltage();
|
||||
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
|
||||
GT_Recipe tRecipe = EMT_RecipeAdder.sFusionCraftingRecipes.findRecipe(getBaseMetaTileEntity(), false, V[tTier], tFluids, tInputs);
|
||||
if ((tRecipe != null) && (this.mTierCasing >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
|
||||
GT_Recipe tRecipe = EMT_RecipeAdder.sFusionCraftingRecipes.findRecipe(
|
||||
getBaseMetaTileEntity(), false, V[tTier], tFluids, tInputs);
|
||||
if ((tRecipe != null)
|
||||
&& (this.mTierCasing >= tRecipe.mSpecialValue)
|
||||
&& (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
|
||||
calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 2, tVoltage);
|
||||
if (this.mEUt > 0)
|
||||
this.mEUt = (-this.mEUt);
|
||||
if (this.mEUt > 0) this.mEUt = (-this.mEUt);
|
||||
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
this.mMaxProgresstime /= ((mTierCasing - tRecipe.mSpecialValue) + 1);
|
||||
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
||||
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
|
||||
this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
|
||||
this.mOutputItems = new ItemStack[] {tRecipe.getOutput(0), tRecipe.getOutput(1)};
|
||||
this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)};
|
||||
updateSlots();
|
||||
return true;
|
||||
}
|
||||
|
||||
+130
-108
@@ -12,6 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.objects.XSTR;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -21,8 +22,6 @@ import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
|
||||
private static final byte CASING_INDEX = 2;
|
||||
@@ -40,37 +39,51 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return new String[]{
|
||||
"Controller Block for the Large Essentia Generator.",
|
||||
"Produces energy from magical essentia decay.",
|
||||
"Size(WxHxD): 7x4x7, Controller (Bottom, Center)",
|
||||
"Top-Middle 5x1x5 layer are Muffler Hatches",
|
||||
"Middle 5x2x5 layer are Essentia Diffusion Cells",
|
||||
"Everything from here on goes either in the bottom or on the sides",
|
||||
"1x Fluid Input Hatch",
|
||||
"1x Essentia Input Hatch",
|
||||
"1x Dynamo Hatches",
|
||||
"1x Maintenance Hatch",
|
||||
"The outer hull is made out of Magic Containing Casings",
|
||||
"Produces 20x more than the singleblock generator per essentia",
|
||||
"Causes magical and serious conventional pollution",
|
||||
"Needs 1L Lubricant per second or will cause way more conventional pollution",
|
||||
"Needs 10 " + EMTTextHelper.LIGHT_BLUE + "Aqua" + EMTTextHelper.LIGHT_GRAY + " cVis per second or will cause way more magical pollution",
|
||||
"Added by EMT",
|
||||
"Made by bartimaeusnek"
|
||||
return new String[] {
|
||||
"Controller Block for the Large Essentia Generator.",
|
||||
"Produces energy from magical essentia decay.",
|
||||
"Size(WxHxD): 7x4x7, Controller (Bottom, Center)",
|
||||
"Top-Middle 5x1x5 layer are Muffler Hatches",
|
||||
"Middle 5x2x5 layer are Essentia Diffusion Cells",
|
||||
"Everything from here on goes either in the bottom or on the sides",
|
||||
"1x Fluid Input Hatch",
|
||||
"1x Essentia Input Hatch",
|
||||
"1x Dynamo Hatches",
|
||||
"1x Maintenance Hatch",
|
||||
"The outer hull is made out of Magic Containing Casings",
|
||||
"Produces 20x more than the singleblock generator per essentia",
|
||||
"Causes magical and serious conventional pollution",
|
||||
"Needs 1L Lubricant per second or will cause way more conventional pollution",
|
||||
"Needs 10 " + EMTTextHelper.LIGHT_BLUE + "Aqua" + EMTTextHelper.LIGHT_GRAY
|
||||
+ " cVis per second or will cause way more magical pollution",
|
||||
"Added by EMT",
|
||||
"Made by bartimaeusnek"
|
||||
};
|
||||
}
|
||||
|
||||
public int getCurrentEfficiency(ItemStack itemStack) {
|
||||
return this.mEfficiency - (this.getIdealStatus() - this.getRepairStatus()) * this.getMaxEfficiency(itemStack) / 10;
|
||||
return this.mEfficiency
|
||||
- (this.getIdealStatus() - this.getRepairStatus()) * this.getMaxEfficiency(itemStack) / 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
public ITexture[] getTexture(
|
||||
IGregTechTileEntity aBaseMetaTileEntity,
|
||||
byte aSide,
|
||||
byte aFacing,
|
||||
byte aColorIndex,
|
||||
boolean aActive,
|
||||
boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER)};
|
||||
return new ITexture[] {
|
||||
Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
|
||||
new GT_RenderedTexture(
|
||||
aActive
|
||||
? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE
|
||||
: Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER)
|
||||
};
|
||||
}
|
||||
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
|
||||
return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -182,7 +195,8 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
for (int x = -3; x <= 3; x++) {
|
||||
for (int z = -3; z <= 3; z++) {
|
||||
for (int h = 0; h <= 3; h++) {
|
||||
final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, h, zDir + z);
|
||||
final IGregTechTileEntity tTileEntity =
|
||||
aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, h, zDir + z);
|
||||
|
||||
if (!(Math.abs(x) == 3 || Math.abs(z) == 3)) {
|
||||
// Muffler on top.
|
||||
@@ -191,63 +205,64 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
return false;
|
||||
}
|
||||
} else if (h != 0) {
|
||||
//inside Special Blocks
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0])
|
||||
return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 1))
|
||||
return false;
|
||||
} else if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX) || this.addDynamoToMachineList(tTileEntity, CASING_INDEX) || this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX) || this.addInputToMachineList(tTileEntity, CASING_INDEX)))
|
||||
//ground still casings
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0])
|
||||
return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0))
|
||||
return false;
|
||||
// inside Special Blocks
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z)
|
||||
!= EMT_CasingBlock.EMT_GT_BLOCKS[0]) return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 1)) return false;
|
||||
} else if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX)
|
||||
|| this.addDynamoToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addInputToMachineList(tTileEntity, CASING_INDEX)))
|
||||
// ground still casings
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z)
|
||||
!= EMT_CasingBlock.EMT_GT_BLOCKS[0]) return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) return false;
|
||||
|
||||
} else if (h != 0) {
|
||||
//walls
|
||||
if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX) || this.addDynamoToMachineList(tTileEntity, CASING_INDEX) || this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX) || this.addInputToMachineList(tTileEntity, CASING_INDEX)))
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0])
|
||||
return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0))
|
||||
return false;
|
||||
// walls
|
||||
if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX)
|
||||
|| this.addDynamoToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addInputToMachineList(tTileEntity, CASING_INDEX)))
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z)
|
||||
!= EMT_CasingBlock.EMT_GT_BLOCKS[0]) return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) return false;
|
||||
} else if (h == 0) {
|
||||
//top and bottom corners
|
||||
if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX) || this.addDynamoToMachineList(tTileEntity, CASING_INDEX) || this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX) || this.addInputToMachineList(tTileEntity, CASING_INDEX)))
|
||||
if (((xDir + x) != 0) || ((zDir + z) != 0)) //controller
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z) != EMT_CasingBlock.EMT_GT_BLOCKS[0])
|
||||
return false;
|
||||
// top and bottom corners
|
||||
if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX)
|
||||
|| this.addDynamoToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addInputToMachineList(tTileEntity, CASING_INDEX)))
|
||||
if (((xDir + x) != 0) || ((zDir + z) != 0)) // controller
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z)
|
||||
!= EMT_CasingBlock.EMT_GT_BLOCKS[0]) return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0))
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mDynamoHatches.size() != 1)
|
||||
return false;
|
||||
if (this.mDynamoHatches.size() != 1) return false;
|
||||
|
||||
if (this.mInputHatches.size() != 1)
|
||||
return false;
|
||||
if (this.mInputHatches.size() != 1) return false;
|
||||
|
||||
if (this.mMaintenanceHatches.size() != 1)
|
||||
return false;
|
||||
if (this.mMaintenanceHatches.size() != 1) return false;
|
||||
|
||||
/*
|
||||
//repair shit debug shit
|
||||
this.mWrench = true;
|
||||
this.mScrewdriver = true;
|
||||
this.mSoftHammer = true;
|
||||
this.mHardHammer = true;
|
||||
this.mSolderingTool = true;
|
||||
this.mCrowbar = true;
|
||||
*/
|
||||
/*
|
||||
//repair shit debug shit
|
||||
this.mWrench = true;
|
||||
this.mScrewdriver = true;
|
||||
this.mSoftHammer = true;
|
||||
this.mHardHammer = true;
|
||||
this.mSolderingTool = true;
|
||||
this.mCrowbar = true;
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
|
||||
if (aTileEntity instanceof EssentiaHatch)
|
||||
return addEssetiaHatchToList(aTileEntity, aBaseCasingIndex);
|
||||
if (aTileEntity instanceof EssentiaHatch) return addEssetiaHatchToList(aTileEntity, aBaseCasingIndex);
|
||||
return super.addInputToMachineList(aTileEntity, aBaseCasingIndex);
|
||||
}
|
||||
|
||||
@@ -267,22 +282,21 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void make_energy() {
|
||||
AspectList fuel = this.mEssentiaHatches.get(0).getAspects();
|
||||
double cached = 0;
|
||||
|
||||
++tick;
|
||||
|
||||
//make energy
|
||||
// make energy
|
||||
for (final Aspect A : fuel.aspects.keySet()) {
|
||||
if (fuel.getAmount(A) > 0) {
|
||||
double burnvalue = EMTEssentiasOutputs.outputs.get(A.getTag()).doubleValue();
|
||||
cached += (burnvalue / 20D);
|
||||
cached = Math.ceil(cached);
|
||||
|
||||
if (tick % 20 == 0) { //every second consume 1 essentia
|
||||
//consume essentia and remove it from the Aspect List if its 0
|
||||
if (tick % 20 == 0) { // every second consume 1 essentia
|
||||
// consume essentia and remove it from the Aspect List if its 0
|
||||
this.mEssentiaHatches.get(0).getAspects().reduce(A, 1);
|
||||
if (this.mEssentiaHatches.get(0).getAspects().getAmount(A) == 0)
|
||||
this.mEssentiaHatches.get(0).getAspects().remove(A);
|
||||
@@ -291,26 +305,25 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
}
|
||||
|
||||
if (tick % 20 == 0) {
|
||||
//consume lubricant
|
||||
if (has_lube)
|
||||
this.mInputHatches.get(0).getFluid().amount -= 1;
|
||||
// consume lubricant
|
||||
if (has_lube) this.mInputHatches.get(0).getFluid().amount -= 1;
|
||||
|
||||
tick = 0; //reset ticktimer
|
||||
tick = 0; // reset ticktimer
|
||||
}
|
||||
|
||||
//transfer energy into mEU
|
||||
// transfer energy into mEU
|
||||
this.mEUt = (int) Math.ceil(cached);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRecipe(ItemStack arg0) {
|
||||
/*
|
||||
if (!this.getBaseMetaTileEntity().isActive())
|
||||
if (this.mEfficiency > 100)
|
||||
this.mEfficiency -= 8;
|
||||
else
|
||||
this.mEfficiency = 100;
|
||||
*/
|
||||
/*
|
||||
if (!this.getBaseMetaTileEntity().isActive())
|
||||
if (this.mEfficiency > 100)
|
||||
this.mEfficiency -= 8;
|
||||
else
|
||||
this.mEfficiency = 100;
|
||||
*/
|
||||
if (this.mEssentiaHatches.get(0).fuelleft() > 0) {
|
||||
this.mMaxProgresstime = 1;
|
||||
this.mProgresstime = 0;
|
||||
@@ -322,19 +335,18 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
@Override
|
||||
public boolean onRunningTick(ItemStack aStack) {
|
||||
|
||||
if (tick % 20 == 0) {//every second
|
||||
//highers eff to max by 0.16% every running tick = 3,2% every second
|
||||
if (this.mEfficiency < this.getMaxEfficiency(null) - 320)
|
||||
this.mEfficiency += 320;
|
||||
else
|
||||
this.mEfficiency = getMaxEfficiency(null);
|
||||
if (tick % 20 == 0) { // every second
|
||||
// highers eff to max by 0.16% every running tick = 3,2% every second
|
||||
if (this.mEfficiency < this.getMaxEfficiency(null) - 320) this.mEfficiency += 320;
|
||||
else this.mEfficiency = getMaxEfficiency(null);
|
||||
|
||||
//check for Lubricant
|
||||
this.has_lube = this.mInputHatches.get(0).getFluid() != null && this.mInputHatches.get(0).getFluid().isFluidEqual(Materials.Lubricant.getFluid(1L)) && this.mInputHatches.get(0).getFluidAmount() > 0;
|
||||
// check for Lubricant
|
||||
this.has_lube = this.mInputHatches.get(0).getFluid() != null
|
||||
&& this.mInputHatches.get(0).getFluid().isFluidEqual(Materials.Lubricant.getFluid(1L))
|
||||
&& this.mInputHatches.get(0).getFluidAmount() > 0;
|
||||
}
|
||||
|
||||
|
||||
if (tick % 2 == 0) {//every 2nd tick
|
||||
if (tick % 2 == 0) { // every 2nd tick
|
||||
|
||||
final XSTR R = new XSTR();
|
||||
final World WORLD = this.getBaseMetaTileEntity().getWorld();
|
||||
@@ -342,17 +354,27 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
int y = this.getBaseMetaTileEntity().getYCoord();
|
||||
int z = this.getBaseMetaTileEntity().getZCoord();
|
||||
|
||||
//if out of aqua, make much flux but to not stop.
|
||||
// if out of aqua, make much flux but to not stop.
|
||||
boolean outOfcVis = VisNetHandler.drainVis(WORLD, x, y, z, Aspect.WATER, 10) <= 9;
|
||||
|
||||
//Random Change of a bit of Flux Gas.
|
||||
// Random Change of a bit of Flux Gas.
|
||||
final int RANDOMHATCH = R.nextInt(this.mMufflerHatches.size());
|
||||
|
||||
//gets a chanche to release flux gas based on missing efficiency, min 1%
|
||||
// gets a chanche to release flux gas based on missing efficiency, min 1%
|
||||
if ((R.nextInt(getMaxEfficiency(null)) > (this.mEfficiency > 100 ? this.mEfficiency : 100)) || outOfcVis) {
|
||||
x = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getXCoord();
|
||||
y = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getYCoord() + 1;
|
||||
z = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getZCoord();
|
||||
x = this.mMufflerHatches
|
||||
.get(RANDOMHATCH)
|
||||
.getBaseMetaTileEntity()
|
||||
.getXCoord();
|
||||
y = this.mMufflerHatches
|
||||
.get(RANDOMHATCH)
|
||||
.getBaseMetaTileEntity()
|
||||
.getYCoord()
|
||||
+ 1;
|
||||
z = this.mMufflerHatches
|
||||
.get(RANDOMHATCH)
|
||||
.getBaseMetaTileEntity()
|
||||
.getZCoord();
|
||||
WORLD.setBlock(x, y, z, ConfigBlocks.blockFluxGas, R.nextInt(8), 3);
|
||||
}
|
||||
}
|
||||
@@ -402,17 +424,17 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
return old;
|
||||
}
|
||||
|
||||
/* @Override
|
||||
public void explodeMultiblock() {
|
||||
/* @Override
|
||||
public void explodeMultiblock() {
|
||||
|
||||
final World WORLD=this.getBaseMetaTileEntity().getWorld();
|
||||
final int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX * 3;
|
||||
final int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ * 3;
|
||||
final World WORLD=this.getBaseMetaTileEntity().getWorld();
|
||||
final int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX * 3;
|
||||
final int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ * 3;
|
||||
|
||||
for (int x = -3; x <= 3; x++)
|
||||
for (int z = -3; z <= 3; z++)
|
||||
for (int h = 0; h <= 3; h++)
|
||||
WORLD.setBlock(xDir+x, this.getBaseMetaTileEntity().getYCoord()+h, zDir+z, ConfigBlocks.blockFluxGas, 8, 3);
|
||||
super.explodeMultiblock();
|
||||
}*/
|
||||
for (int x = -3; x <= 3; x++)
|
||||
for (int z = -3; z <= 3; z++)
|
||||
for (int h = 0; h <= 3; h++)
|
||||
WORLD.setBlock(xDir+x, this.getBaseMetaTileEntity().getYCoord()+h, zDir+z, ConfigBlocks.blockFluxGas, 8, 3);
|
||||
super.explodeMultiblock();
|
||||
}*/
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package emt.init;
|
||||
|
||||
import static thaumcraft.api.ThaumcraftApi.registerObjectTag;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.block.*;
|
||||
import emt.item.block.ItemBlockElectricCloud;
|
||||
@@ -12,8 +14,6 @@ import net.minecraft.block.Block;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
import static thaumcraft.api.ThaumcraftApi.registerObjectTag;
|
||||
|
||||
public class EMTBlocks {
|
||||
|
||||
public static Block portableNode, essentiaGens, shield, emtMachines, electricCloud;
|
||||
@@ -49,22 +49,76 @@ public class EMTBlocks {
|
||||
|
||||
public static void addAspects() {
|
||||
registerObjectTag(IC2Items.getItem("rubberTrampoline"), new AspectList().add(Aspect.AIR, 5));
|
||||
registerObjectTag(IC2Items.getItem("ironFence"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.METAL, 2).add(Aspect.WEATHER, 1));
|
||||
registerObjectTag(IC2Items.getItem("reinforcedGlass"), new AspectList().add(Aspect.METAL, 2).add(Aspect.COLD, 2));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("ironFence"),
|
||||
new AspectList().add(Aspect.ENERGY, 1).add(Aspect.METAL, 2).add(Aspect.WEATHER, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("reinforcedGlass"),
|
||||
new AspectList().add(Aspect.METAL, 2).add(Aspect.COLD, 2));
|
||||
registerObjectTag(IC2Items.getItem("scaffold"), new AspectList().add(Aspect.TREE, 4));
|
||||
registerObjectTag(IC2Items.getItem("ironScaffold"), new AspectList().add(Aspect.METAL, 4));
|
||||
registerObjectTag(IC2Items.getItem("generator"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 2).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("waterMill"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.WATER, 2).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("solarPanel"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 1).add(Aspect.LIGHT, 2).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("windMill"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.WEATHER, 3).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("batBox"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 3).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("cesuUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 4).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("mfeUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("mfsUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 7).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("ironFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.FIRE, 2).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("electroFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.FIRE, 3).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("macerator"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.MINE, 2).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("extractor"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.CRAFT, 2).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(IC2Items.getItem("compressor"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.VOID, 3).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("generator"),
|
||||
new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 2).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("waterMill"),
|
||||
new AspectList()
|
||||
.add(Aspect.METAL, 2)
|
||||
.add(Aspect.ENERGY, 1)
|
||||
.add(Aspect.WATER, 2)
|
||||
.add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("solarPanel"),
|
||||
new AspectList()
|
||||
.add(Aspect.METAL, 1)
|
||||
.add(Aspect.ENERGY, 1)
|
||||
.add(Aspect.LIGHT, 2)
|
||||
.add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("windMill"),
|
||||
new AspectList().add(Aspect.ENERGY, 1).add(Aspect.WEATHER, 3).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("batBox"),
|
||||
new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 3).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("cesuUnit"),
|
||||
new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 4).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("mfeUnit"),
|
||||
new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("mfsUnit"),
|
||||
new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 7).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("ironFurnace"),
|
||||
new AspectList().add(Aspect.METAL, 2).add(Aspect.FIRE, 2).add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("electroFurnace"),
|
||||
new AspectList()
|
||||
.add(Aspect.METAL, 2)
|
||||
.add(Aspect.ENERGY, 1)
|
||||
.add(Aspect.FIRE, 3)
|
||||
.add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("macerator"),
|
||||
new AspectList()
|
||||
.add(Aspect.METAL, 1)
|
||||
.add(Aspect.ENERGY, 2)
|
||||
.add(Aspect.MINE, 2)
|
||||
.add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("extractor"),
|
||||
new AspectList()
|
||||
.add(Aspect.METAL, 2)
|
||||
.add(Aspect.ENERGY, 1)
|
||||
.add(Aspect.CRAFT, 2)
|
||||
.add(Aspect.MECHANISM, 1));
|
||||
registerObjectTag(
|
||||
IC2Items.getItem("compressor"),
|
||||
new AspectList()
|
||||
.add(Aspect.METAL, 1)
|
||||
.add(Aspect.ENERGY, 2)
|
||||
.add(Aspect.VOID, 3)
|
||||
.add(Aspect.MECHANISM, 1));
|
||||
}
|
||||
}
|
||||
@@ -18,8 +18,7 @@ public class EMTEntities {
|
||||
private static int getUniqueEntityID() {
|
||||
do {
|
||||
startEID++;
|
||||
}
|
||||
while (EntityList.getStringFromID(startEID) != null);
|
||||
} while (EntityList.getStringFromID(startEID) != null);
|
||||
return startEID;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,8 @@ public class EMTItems {
|
||||
public static Item nanoWing;
|
||||
public static Item quantumWing;
|
||||
public static Item quantumArmor;
|
||||
public static ItemArmor.ArmorMaterial featherWingMaterial = EnumHelper.addArmorMaterial("FEATEHRWiNG", 1, new int[]{2, 2, 2, 2}, 6);
|
||||
public static ItemArmor.ArmorMaterial featherWingMaterial =
|
||||
EnumHelper.addArmorMaterial("FEATEHRWiNG", 1, new int[] {2, 2, 2, 2}, 6);
|
||||
|
||||
public static void registerItems() {
|
||||
itemEMTItems = new ItemMaterials();
|
||||
@@ -92,42 +93,54 @@ public class EMTItems {
|
||||
onering = new ItemOneRing();
|
||||
GameRegistry.registerItem(onering, "BaseBaubles");
|
||||
|
||||
quantumArmor = new ItemInfusedQuantumChestplate(InternalName.itemArmorQuantumChestplate, 1).setUnlocalizedName(EMT.MOD_ID + ".quantum");
|
||||
quantumArmor = new ItemInfusedQuantumChestplate(InternalName.itemArmorQuantumChestplate, 1)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".quantum");
|
||||
|
||||
electricGoggles = new ItemElectricGoggles(ItemArmor.ArmorMaterial.IRON, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.electric");
|
||||
electricGoggles = new ItemElectricGoggles(ItemArmor.ArmorMaterial.IRON, 3, 0)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".goggles.electric");
|
||||
GameRegistry.registerItem(electricGoggles, "ElectricGogglesRevealing");
|
||||
|
||||
nanoThaumicHelmet = new ItemNanoGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.nano");
|
||||
nanoThaumicHelmet = new ItemNanoGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".goggles.nano");
|
||||
GameRegistry.registerItem(nanoThaumicHelmet, "NanosuitGogglesRevealing");
|
||||
|
||||
quantumThaumicHelmet = new ItemQuantumGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.quantum");
|
||||
quantumThaumicHelmet = new ItemQuantumGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".goggles.quantum");
|
||||
GameRegistry.registerItem(quantumThaumicHelmet, "QuantumGogglesRevealing");
|
||||
|
||||
solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.solar");
|
||||
solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".goggles.solar");
|
||||
GameRegistry.registerItem(solarHelmetRevealing, "SolarHelmetRevealing");
|
||||
|
||||
electricBootsTraveller = new ItemElectricBootsTraveller(ItemArmor.ArmorMaterial.IRON, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.electric");
|
||||
electricBootsTraveller = new ItemElectricBootsTraveller(ItemArmor.ArmorMaterial.IRON, 3, 3)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.electric");
|
||||
GameRegistry.registerItem(electricBootsTraveller, "ElectricBootsTraveller");
|
||||
|
||||
nanoBootsTraveller = new ItemNanoBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.nano");
|
||||
nanoBootsTraveller = new ItemNanoBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.nano");
|
||||
GameRegistry.registerItem(nanoBootsTraveller, "NanoBootsTraveller");
|
||||
|
||||
quantumBootsTraveller = new ItemQuantumBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.quantum");
|
||||
quantumBootsTraveller = new ItemQuantumBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.quantum");
|
||||
GameRegistry.registerItem(quantumBootsTraveller, "QuantumBootsTraveller");
|
||||
|
||||
electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName(EMT.MOD_ID + ".scribingtools.electric");
|
||||
electricScribingTools =
|
||||
new ItemElectricScribingTools().setUnlocalizedName(EMT.MOD_ID + ".scribingtools.electric");
|
||||
GameRegistry.registerItem(electricScribingTools, "ElectricScribingTools");
|
||||
|
||||
featherWing = new ItemFeatherWing(featherWingMaterial, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.feather");
|
||||
GameRegistry.registerItem(featherWing, "FeatherWing");
|
||||
|
||||
thaumiumWing = new ItemThaumiumReinforcedWing(ThaumcraftApi.armorMatThaumium, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.thaumium");
|
||||
thaumiumWing = new ItemThaumiumReinforcedWing(ThaumcraftApi.armorMatThaumium, 7, 1)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".wing.thaumium");
|
||||
GameRegistry.registerItem(thaumiumWing, "ThaumiumWing");
|
||||
|
||||
nanoWing = new ItemNanoWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.nano");
|
||||
nanoWing =
|
||||
new ItemNanoWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.nano");
|
||||
GameRegistry.registerItem(nanoWing, "NanosuitWing");
|
||||
|
||||
quantumWing = new ItemQuantumWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(EMT.MOD_ID + ".wing.quantum");
|
||||
quantumWing = new ItemQuantumWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1)
|
||||
.setUnlocalizedName(EMT.MOD_ID + ".wing.quantum");
|
||||
GameRegistry.registerItem(quantumWing, "QuantumWing");
|
||||
|
||||
thorHammer = new ItemThorHammer().setUnlocalizedName(EMT.MOD_ID + ".hammer");
|
||||
@@ -184,4 +197,4 @@ public class EMTItems {
|
||||
energyBallFocus = new ItemEnergyBallFocus();
|
||||
GameRegistry.registerItem(energyBallFocus, "EnergyBallFocus");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -4,7 +4,6 @@ import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTResearchAspects;
|
||||
import emt.util.EMTResearchItem;
|
||||
import gregtech.api.GregTech_API;
|
||||
import ic2.api.item.IC2Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -19,269 +18,870 @@ public class EMTResearches {
|
||||
|
||||
public static void addResearchTab() {
|
||||
ResourceLocation background = new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/background.png");
|
||||
ResearchCategories.registerCategory("EMT", new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png"), background);
|
||||
ResearchCategories.registerCategory(
|
||||
"EMT", new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png"), background);
|
||||
}
|
||||
|
||||
public static void addResearch() {
|
||||
/** Research that can't be disabled **/
|
||||
new EMTResearchItem("Electric Magic Tools", 0, 0, 0, new ResourceLocation(EMT.TEXTURE_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().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.diamondChainsaw));
|
||||
new EMTResearchItem("Thaumium Plate", 6, -6, 0, new ItemStack(EMTItems.itemEMTItems, 1, 5)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumPlate));
|
||||
new EMTResearchItem("Macerating Native Ore Clusters", 5, -7, 0, IC2Items.getItem("smallGoldDust")).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""));
|
||||
new EMTResearchItem("The Legend", 5, -5, 0, new ItemStack(EMTItems.taintedThorHammer)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""));
|
||||
new EMTResearchItem("Lightning Summoner", 6, -5, 0, new ItemStack(EMTItems.itemEMTItems, 1, 6)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""));
|
||||
new EMTResearchItem("The One Ring", 6, -7, 0, new ItemStack(EMTItems.onering)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""));
|
||||
new EMTResearchItem("Electric Cloud", 4, -7, 0, new ItemStack(EMTBlocks.electricCloud)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage("2"));
|
||||
new EMTResearchItem("Feather Wings", 0, 2, 0, new ItemStack(EMTItems.featherWing)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem().setPages(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));
|
||||
new EMTResearchItem(
|
||||
"Electric Magic Tools",
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
new ResourceLocation(EMT.TEXTURE_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()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.diamondChainsaw));
|
||||
new EMTResearchItem("Thaumium Plate", 6, -6, 0, new ItemStack(EMTItems.itemEMTItems, 1, 5))
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumPlate));
|
||||
new EMTResearchItem("Macerating Native Ore Clusters", 5, -7, 0, IC2Items.getItem("smallGoldDust"))
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""));
|
||||
new EMTResearchItem("The Legend", 5, -5, 0, new ItemStack(EMTItems.taintedThorHammer))
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""));
|
||||
new EMTResearchItem("Lightning Summoner", 6, -5, 0, new ItemStack(EMTItems.itemEMTItems, 1, 6))
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""));
|
||||
new EMTResearchItem("The One Ring", 6, -7, 0, new ItemStack(EMTItems.onering))
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""));
|
||||
new EMTResearchItem("Electric Cloud", 4, -7, 0, new ItemStack(EMTBlocks.electricCloud))
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage("1"), new ResearchPage("2"));
|
||||
new EMTResearchItem("Feather Wings", 0, 2, 0, new ItemStack(EMTItems.featherWing))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
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 **/
|
||||
if (!EMTConfigHandler.thaumiumDrillResearch) {
|
||||
new EMTResearchItem("Thaumium Drill", EMTResearchAspects.thaumiumDrillResearch, -1, -2, 1, new ItemStack(EMTItems.thaumiumDrill)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumDrill));
|
||||
new EMTResearchItem(
|
||||
"Thaumium Drill",
|
||||
EMTResearchAspects.thaumiumDrillResearch,
|
||||
-1,
|
||||
-2,
|
||||
1,
|
||||
new ItemStack(EMTItems.thaumiumDrill))
|
||||
.setSecondary()
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumDrill));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.thaumiumChainsawResearch) {
|
||||
new EMTResearchItem("Thaumium Chainsaw", EMTResearchAspects.thaumiumChainsawResearch, -2, -2, 1, new ItemStack(EMTItems.thaumiumChainsaw)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumChainsaw));
|
||||
new EMTResearchItem(
|
||||
"Thaumium Chainsaw",
|
||||
EMTResearchAspects.thaumiumChainsawResearch,
|
||||
-2,
|
||||
-2,
|
||||
1,
|
||||
new ItemStack(EMTItems.thaumiumChainsaw))
|
||||
.setSecondary()
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumChainsaw));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.electricGooglesResearch) {
|
||||
new EMTResearchItem("Electric Goggles", EMTResearchAspects.electricGogglesResearch, 1, -2, 1, new ItemStack(EMTItems.electricGoggles)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricGoggles));
|
||||
new EMTResearchItem(
|
||||
"Electric Goggles",
|
||||
EMTResearchAspects.electricGogglesResearch,
|
||||
1,
|
||||
-2,
|
||||
1,
|
||||
new ItemStack(EMTItems.electricGoggles))
|
||||
.setSecondary()
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricGoggles));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.electricGooglesResearch) {
|
||||
if (!EMTConfigHandler.nanoGooglesResearch) {
|
||||
;
|
||||
new EMTResearchItem("Nanosuit Goggles of Revealing", EMTResearchAspects.thaumicNanoHelmet, 2, -2, 2, new ItemStack(EMTItems.nanoThaumicHelmet)).setParents("Electric Goggles").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumicNanoHelmet));
|
||||
new EMTResearchItem(
|
||||
"Nanosuit Goggles of Revealing",
|
||||
EMTResearchAspects.thaumicNanoHelmet,
|
||||
2,
|
||||
-2,
|
||||
2,
|
||||
new ItemStack(EMTItems.nanoThaumicHelmet))
|
||||
.setParents("Electric Goggles")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumicNanoHelmet));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.electricGooglesResearch) {
|
||||
if (!EMTConfigHandler.nanoGooglesResearch) {
|
||||
if (!EMTConfigHandler.quantumGooglesResearch) {
|
||||
new EMTResearchItem("Quantum Goggles of Revealing", EMTResearchAspects.thaumicQuantumHelmet, 3, -2, 3, new ItemStack(EMTItems.quantumThaumicHelmet)).setParents("Nanosuit Goggles of Revealing").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumicQuantumHelmet));
|
||||
new EMTResearchItem(
|
||||
"Quantum Goggles of Revealing",
|
||||
EMTResearchAspects.thaumicQuantumHelmet,
|
||||
3,
|
||||
-2,
|
||||
3,
|
||||
new ItemStack(EMTItems.quantumThaumicHelmet))
|
||||
.setParents("Nanosuit Goggles of Revealing")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumicQuantumHelmet));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.ironOmnitoolResearch) {
|
||||
new EMTResearchItem("Iron Omnitool", -2, 0, 0, new ItemStack(EMTItems.ironOmnitool)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ironOmnitool));
|
||||
new EMTResearchItem("Iron Omnitool", -2, 0, 0, new ItemStack(EMTItems.ironOmnitool))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ironOmnitool));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.ironOmnitoolResearch) {
|
||||
if (!EMTConfigHandler.diamondOmnitoolResearch) {
|
||||
new EMTResearchItem("Diamond Omnitool", EMTResearchAspects.diamondOmnitoolResearch, -4, 0, 1, new ItemStack(EMTItems.diamondOmnitool)).setSecondary().setParents("Iron Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.diamondOmnitool), new ResearchPage(EMTRecipes.ironOmnitoolToDiamond));
|
||||
new EMTResearchItem(
|
||||
"Diamond Omnitool",
|
||||
EMTResearchAspects.diamondOmnitoolResearch,
|
||||
-4,
|
||||
0,
|
||||
1,
|
||||
new ItemStack(EMTItems.diamondOmnitool))
|
||||
.setSecondary()
|
||||
.setParents("Iron Omnitool")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.diamondOmnitool),
|
||||
new ResearchPage(EMTRecipes.ironOmnitoolToDiamond));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.thaumiumDrillResearch && !EMTConfigHandler.thaumiumChainsawResearch) {
|
||||
if (!EMTConfigHandler.thaumiumOmnitoolResearch) {
|
||||
new EMTResearchItem("Thaumium Omnitool", EMTResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(EMTItems.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumOmnitool), new ResearchPage(EMTRecipes.diamondOmnitoolToThaumium));
|
||||
new EMTResearchItem(
|
||||
"Thaumium Omnitool",
|
||||
EMTResearchAspects.thaumiumOmnitoolResearch,
|
||||
-6,
|
||||
0,
|
||||
2,
|
||||
new ItemStack(EMTItems.thaumiumOmnitool))
|
||||
.setParentsHidden("Thaumium Drill", "Thaumium Chainsaw")
|
||||
.setParents("Diamond Omnitool")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.thaumiumOmnitool),
|
||||
new ResearchPage(EMTRecipes.diamondOmnitoolToThaumium));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.explosionFocusResearch) {
|
||||
new EMTResearchItem("Explosion Focus", EMTResearchAspects.laserFocusResearch, 2, 3, 2, new ItemStack(EMTItems.explosionFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.explosionFocus));
|
||||
new EMTResearchItem(
|
||||
"Explosion Focus",
|
||||
EMTResearchAspects.laserFocusResearch,
|
||||
2,
|
||||
3,
|
||||
2,
|
||||
new ItemStack(EMTItems.explosionFocus))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.explosionFocus));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.christmasFocusResearch) {
|
||||
new EMTResearchItem("Kris-tmas Focus", EMTResearchAspects.christmasFocusResearch, 3, 3, 1, new ItemStack(EMTItems.christmasFocus)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.christmasFocus));
|
||||
new EMTResearchItem(
|
||||
"Kris-tmas Focus",
|
||||
EMTResearchAspects.christmasFocusResearch,
|
||||
3,
|
||||
3,
|
||||
1,
|
||||
new ItemStack(EMTItems.christmasFocus))
|
||||
.setSecondary()
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.christmasFocus));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.shieldFocusResearch) {
|
||||
new EMTResearchItem("Shield Focus", EMTResearchAspects.shieldFocusResearch, 4, 3, 2, new ItemStack(EMTItems.shieldFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.shieldFocus));
|
||||
new EMTResearchItem(
|
||||
"Shield Focus",
|
||||
EMTResearchAspects.shieldFocusResearch,
|
||||
4,
|
||||
3,
|
||||
2,
|
||||
new ItemStack(EMTItems.shieldFocus))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.shieldFocus));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.energyBallFocusResearch) {
|
||||
new EMTResearchItem("Energy Ball Focus", EMTResearchAspects.energyBallFocusResearch, 1, 3, 2, new ItemStack(EMTItems.energyBallFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.energyBallFocus));
|
||||
new EMTResearchItem(
|
||||
"Energy Ball Focus",
|
||||
EMTResearchAspects.energyBallFocusResearch,
|
||||
1,
|
||||
3,
|
||||
2,
|
||||
new ItemStack(EMTItems.energyBallFocus))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.energyBallFocus));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.shieldFocusResearch) {
|
||||
if (!EMTConfigHandler.shieldBlockResearch) {
|
||||
new EMTResearchItem("Shield Block", EMTResearchAspects.shieldBlockResearch, 4, 5, 1, new ItemStack(EMTBlocks.shield)).setSecondary().setParents("Shield Focus").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.shieldBlock));
|
||||
new EMTResearchItem(
|
||||
"Shield Block",
|
||||
EMTResearchAspects.shieldBlockResearch,
|
||||
4,
|
||||
5,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.shield))
|
||||
.setSecondary()
|
||||
.setParents("Shield Focus")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.shieldBlock));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.potentiaGeneratorResearch) {
|
||||
new EMTResearchItem("Potentia Generator", EMTResearchAspects.potentiaGeneratorResearch, -2, 3, 3, new ItemStack(EMTBlocks.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.potentiaGenerator));
|
||||
new EMTResearchItem(
|
||||
"Potentia Generator",
|
||||
EMTResearchAspects.potentiaGeneratorResearch,
|
||||
-2,
|
||||
3,
|
||||
3,
|
||||
new ItemStack(EMTBlocks.essentiaGens, 1, 0))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.potentiaGenerator));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.potentiaGeneratorResearch) {
|
||||
if (!EMTConfigHandler.ignisGeneratorResearch) {
|
||||
new EMTResearchItem("Ignis Generator", EMTResearchAspects.ignisGeneratorResearch, -3, 4, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 1)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ignisGenerator));
|
||||
new EMTResearchItem(
|
||||
"Ignis Generator",
|
||||
EMTResearchAspects.ignisGeneratorResearch,
|
||||
-3,
|
||||
4,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.essentiaGens, 1, 1))
|
||||
.setSecondary()
|
||||
.setParents("Potentia Generator")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ignisGenerator));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.potentiaGeneratorResearch) {
|
||||
if (!EMTConfigHandler.auramGeneratorResearch) {
|
||||
new EMTResearchItem("Auram Generator", EMTResearchAspects.auramGeneratorResearch, -1, 4, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 2)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.auramGenerator));
|
||||
new EMTResearchItem(
|
||||
"Auram Generator",
|
||||
EMTResearchAspects.auramGeneratorResearch,
|
||||
-1,
|
||||
4,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.essentiaGens, 1, 2))
|
||||
.setSecondary()
|
||||
.setParents("Potentia Generator")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.auramGenerator));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.potentiaGeneratorResearch) {
|
||||
if (!EMTConfigHandler.arborGeneratorResearch) {
|
||||
new EMTResearchItem("Arbor Generator", EMTResearchAspects.arborGeneratorResearch, -2, 5, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 3)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.arborGenerator));
|
||||
new EMTResearchItem(
|
||||
"Arbor Generator",
|
||||
EMTResearchAspects.arborGeneratorResearch,
|
||||
-2,
|
||||
5,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.essentiaGens, 1, 3))
|
||||
.setSecondary()
|
||||
.setParents("Potentia Generator")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.arborGenerator));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.potentiaGeneratorResearch) {
|
||||
if (!EMTConfigHandler.lucrumGeneratorResearch) {
|
||||
new EMTResearchItem("Lucrum Generator", EMTResearchAspects.lucrumGeneratorResearch, -2, 2, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 5)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.lucrumGenerator));
|
||||
new EMTResearchItem(
|
||||
"Lucrum Generator",
|
||||
EMTResearchAspects.lucrumGeneratorResearch,
|
||||
-2,
|
||||
2,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.essentiaGens, 1, 5))
|
||||
.setSecondary()
|
||||
.setParents("Potentia Generator")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.lucrumGenerator));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.potentiaGeneratorResearch) {
|
||||
if (!EMTConfigHandler.aerGeneratorResearch) {
|
||||
new EMTResearchItem("Aer Generator", EMTResearchAspects.aerGenerator, -2, 6, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.aerGenerator));
|
||||
new EMTResearchItem(
|
||||
"Aer Generator",
|
||||
EMTResearchAspects.aerGenerator,
|
||||
-2,
|
||||
6,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.essentiaGens, 1, 4))
|
||||
.setSecondary()
|
||||
.setParents("Potentia Generator")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.aerGenerator));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.potentiaGeneratorResearch) {
|
||||
if (!EMTConfigHandler.wandChargingSationResearch) {
|
||||
new EMTResearchItem("Industrial Wand Charging Station", EMTResearchAspects.wandCharger, -4, 2, 3, new ItemStack(EMTBlocks.emtMachines, 1, 0)).setParents("Potentia Generator").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandRecharger));
|
||||
new EMTResearchItem(
|
||||
"Industrial Wand Charging Station",
|
||||
EMTResearchAspects.wandCharger,
|
||||
-4,
|
||||
2,
|
||||
3,
|
||||
new ItemStack(EMTBlocks.emtMachines, 1, 0))
|
||||
.setParents("Potentia Generator")
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandRecharger));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.thaumiumChainsawResearch) {
|
||||
if (!EMTConfigHandler.streamChainsawResearch) {
|
||||
new EMTResearchItem("Chainsaw of the Stream", EMTResearchAspects.streamChainsawResearch, -3, -4, 3, new ItemStack(EMTItems.streamChainsaw)).setParents("Thaumium Chainsaw").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.streamChainsaw));
|
||||
new EMTResearchItem(
|
||||
"Chainsaw of the Stream",
|
||||
EMTResearchAspects.streamChainsawResearch,
|
||||
-3,
|
||||
-4,
|
||||
3,
|
||||
new ItemStack(EMTItems.streamChainsaw))
|
||||
.setParents("Thaumium Chainsaw")
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.streamChainsaw));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.thaumiumDrillResearch) {
|
||||
if (!EMTConfigHandler.rockbreakerDrillResearch) {
|
||||
new EMTResearchItem("Drill of the Rockbreaker", EMTResearchAspects.rockbreakerDrillResearch, 0, -4, 3, new ItemStack(EMTItems.rockbreakerDrill)).setParents("Thaumium Drill").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.rockbreakerDrill));
|
||||
new EMTResearchItem(
|
||||
"Drill of the Rockbreaker",
|
||||
EMTResearchAspects.rockbreakerDrillResearch,
|
||||
0,
|
||||
-4,
|
||||
3,
|
||||
new ItemStack(EMTItems.rockbreakerDrill))
|
||||
.setParents("Thaumium Drill")
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.rockbreakerDrill));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.tinyUraniumResearch) {
|
||||
new EMTResearchItem("Tiny Uranium", EMTResearchAspects.tinyUraniumResearch, -5, -5, 1, IC2Items.getItem("Uran238")).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.tinyUranium));
|
||||
new EMTResearchItem(
|
||||
"Tiny Uranium",
|
||||
EMTResearchAspects.tinyUraniumResearch,
|
||||
-5,
|
||||
-5,
|
||||
1,
|
||||
IC2Items.getItem("Uran238"))
|
||||
.setSecondary()
|
||||
.setParentsHidden("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.tinyUranium));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.thorHammerResearch) {
|
||||
new EMTResearchItem("Mjolnir", EMTResearchAspects.thorHammerResearch, -5, 5, 3, new ItemStack(EMTItems.thorHammer)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thorHammer));
|
||||
new EMTResearchItem(
|
||||
"Mjolnir",
|
||||
EMTResearchAspects.thorHammerResearch,
|
||||
-5,
|
||||
5,
|
||||
3,
|
||||
new ItemStack(EMTItems.thorHammer))
|
||||
.setParentsHidden("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thorHammer));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.thorHammerResearch) {
|
||||
if (!EMTConfigHandler.superchargedThorHammerResearch) {
|
||||
new EMTResearchItem("Supercharged Mjolnir", EMTResearchAspects.superchargedThorHammerResearch, -6, 6, 3, new ItemStack(EMTItems.electricThorHammer)).setParents("Mjolnir").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.superchargedThorHammer));
|
||||
new EMTResearchItem(
|
||||
"Supercharged Mjolnir",
|
||||
EMTResearchAspects.superchargedThorHammerResearch,
|
||||
-6,
|
||||
6,
|
||||
3,
|
||||
new ItemStack(EMTItems.electricThorHammer))
|
||||
.setParents("Mjolnir")
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.superchargedThorHammer));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
new EMTResearchItem("Compressed Solars", EMTResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(EMTBlocks.solars[0])).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.compressedSolar), new ResearchPage(EMTRecipes.doubleCompressedSolar), new ResearchPage(EMTRecipes.tripleCompressedSolar));
|
||||
new EMTResearchItem(
|
||||
"Compressed Solars",
|
||||
EMTResearchAspects.compressedSolars,
|
||||
-4,
|
||||
-5,
|
||||
2,
|
||||
new ItemStack(EMTBlocks.solars[0]))
|
||||
.setParentsHidden("Potentia Generator")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.compressedSolar),
|
||||
new ResearchPage(EMTRecipes.doubleCompressedSolar),
|
||||
new ResearchPage(EMTRecipes.tripleCompressedSolar));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.solarHelmetResearch) {
|
||||
new EMTResearchItem("Solar Helmet of Revealing", EMTResearchAspects.solarHelmetRevealing, -2, -5, 1, new ItemStack(EMTItems.solarHelmetRevealing)).setSecondary().setParents("Compressed Solars").setParentsHidden("Quantum Goggles of Revealing").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.solarHelmetRevealing));
|
||||
new EMTResearchItem(
|
||||
"Solar Helmet of Revealing",
|
||||
EMTResearchAspects.solarHelmetRevealing,
|
||||
-2,
|
||||
-5,
|
||||
1,
|
||||
new ItemStack(EMTItems.solarHelmetRevealing))
|
||||
.setSecondary()
|
||||
.setParents("Compressed Solars")
|
||||
.setParentsHidden("Quantum Goggles of Revealing")
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.solarHelmetRevealing));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.electricBootsResearch) {
|
||||
new EMTResearchItem("Electric Boots of the Traveller", EMTResearchAspects.electricBootsTravel, 2, 0, 1, new ItemStack(EMTItems.electricBootsTraveller)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricBootsTravel));
|
||||
new EMTResearchItem(
|
||||
"Electric Boots of the Traveller",
|
||||
EMTResearchAspects.electricBootsTravel,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
new ItemStack(EMTItems.electricBootsTraveller))
|
||||
.setSecondary()
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricBootsTravel));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.electricBootsResearch) {
|
||||
if (!EMTConfigHandler.nanoBootsResearch) {
|
||||
new EMTResearchItem("Nano Boots of the Traveller", EMTResearchAspects.nanoBootsTravel, 4, 0, 2, new ItemStack(EMTItems.nanoBootsTraveller)).setParents("Electric Boots of the Traveller").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.nanoBootsTravel));
|
||||
new EMTResearchItem(
|
||||
"Nano Boots of the Traveller",
|
||||
EMTResearchAspects.nanoBootsTravel,
|
||||
4,
|
||||
0,
|
||||
2,
|
||||
new ItemStack(EMTItems.nanoBootsTraveller))
|
||||
.setParents("Electric Boots of the Traveller")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.nanoBootsTravel));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.electricBootsResearch) {
|
||||
if (!EMTConfigHandler.nanoBootsResearch) {
|
||||
if (!EMTConfigHandler.quantumBootsResearch) {
|
||||
new EMTResearchItem("Quantum Boots of the Traveller", EMTResearchAspects.quantumBootsTravel, 6, 0, 3, new ItemStack(EMTItems.quantumBootsTraveller)).setParents("Nano Boots of the Traveller").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.quantumBootsTravel));
|
||||
new EMTResearchItem(
|
||||
"Quantum Boots of the Traveller",
|
||||
EMTResearchAspects.quantumBootsTravel,
|
||||
6,
|
||||
0,
|
||||
3,
|
||||
new ItemStack(EMTItems.quantumBootsTraveller))
|
||||
.setParents("Nano Boots of the Traveller")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.quantumBootsTravel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.electricScribingToolsResearch) {
|
||||
new EMTResearchItem("Electric Scribing Tools", EMTResearchAspects.electricScribingTools, -6, -5, 1, new ItemStack(EMTItems.electricScribingTools)).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricScribingTools));
|
||||
new EMTResearchItem(
|
||||
"Electric Scribing Tools",
|
||||
EMTResearchAspects.electricScribingTools,
|
||||
-6,
|
||||
-5,
|
||||
1,
|
||||
new ItemStack(EMTItems.electricScribingTools))
|
||||
.setSecondary()
|
||||
.setParentsHidden("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricScribingTools));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.etherealProcessorResearch) {
|
||||
new EMTResearchItem("Etheral Processor", EMTResearchAspects.etherealProcessor, -1, 2, 2, new ItemStack(EMTBlocks.emtMachines, 1, 1)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.etheralProcessor));
|
||||
new EMTResearchItem(
|
||||
"Etheral Processor",
|
||||
EMTResearchAspects.etherealProcessor,
|
||||
-1,
|
||||
2,
|
||||
2,
|
||||
new ItemStack(EMTBlocks.emtMachines, 1, 1))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.etheralProcessor));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.waterSolarsResearch) {
|
||||
new EMTResearchItem("Water Infused Solar Panels", EMTResearchAspects.waterSolars, -7, -7, 1, new ItemStack(EMTBlocks.solars[0], 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.waterSolar), new ResearchPage(EMTRecipes.doubleWaterSolar), new ResearchPage(EMTRecipes.tripleWaterSolar));
|
||||
new EMTResearchItem(
|
||||
"Water Infused Solar Panels",
|
||||
EMTResearchAspects.waterSolars,
|
||||
-7,
|
||||
-7,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.solars[0], 1, 3))
|
||||
.setSecondary()
|
||||
.setParents("Compressed Solars")
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.waterSolar),
|
||||
new ResearchPage(EMTRecipes.doubleWaterSolar),
|
||||
new ResearchPage(EMTRecipes.tripleWaterSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.darkSolarsResearch) {
|
||||
new EMTResearchItem("Entropy Infused Solar Panels", EMTResearchAspects.darkSolars, -8, -6, 1, new ItemStack(EMTBlocks.solars[0], 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.darkSolar), new ResearchPage(EMTRecipes.doubleDarkSolar), new ResearchPage(EMTRecipes.tripleDarkSolar));
|
||||
new EMTResearchItem(
|
||||
"Entropy Infused Solar Panels",
|
||||
EMTResearchAspects.darkSolars,
|
||||
-8,
|
||||
-6,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.solars[0], 1, 6))
|
||||
.setSecondary()
|
||||
.setParents("Compressed Solars")
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.darkSolar),
|
||||
new ResearchPage(EMTRecipes.doubleDarkSolar),
|
||||
new ResearchPage(EMTRecipes.tripleDarkSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.orderSolarsResearch) {
|
||||
new EMTResearchItem("Order Infused Solar Panels", EMTResearchAspects.orderSolars, -6, -8, 1, new ItemStack(EMTBlocks.solars[0], 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.orderSolar), new ResearchPage(EMTRecipes.doubleOrderSolar), new ResearchPage(EMTRecipes.tripleOrderSolar));
|
||||
new EMTResearchItem(
|
||||
"Order Infused Solar Panels",
|
||||
EMTResearchAspects.orderSolars,
|
||||
-6,
|
||||
-8,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.solars[0], 1, 9))
|
||||
.setSecondary()
|
||||
.setParents("Compressed Solars")
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.orderSolar),
|
||||
new ResearchPage(EMTRecipes.doubleOrderSolar),
|
||||
new ResearchPage(EMTRecipes.tripleOrderSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.fireSolarsResearch) {
|
||||
new EMTResearchItem("Fire Infused Solar Panels", EMTResearchAspects.fireSolars, -5, -7, 1, new ItemStack(EMTBlocks.solars[0], 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.fireSolar), new ResearchPage(EMTRecipes.doubleFireSolar), new ResearchPage(EMTRecipes.tripleFireSolar));
|
||||
new EMTResearchItem(
|
||||
"Fire Infused Solar Panels",
|
||||
EMTResearchAspects.fireSolars,
|
||||
-5,
|
||||
-7,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.solars[0], 1, 12))
|
||||
.setSecondary()
|
||||
.setParents("Compressed Solars")
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.fireSolar),
|
||||
new ResearchPage(EMTRecipes.doubleFireSolar),
|
||||
new ResearchPage(EMTRecipes.tripleFireSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.airSolarsResearch) {
|
||||
new EMTResearchItem("Air Infused Solar Panels", EMTResearchAspects.airSolars, -4, -6, 1, new ItemStack(EMTBlocks.solars[0], 1, 15)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.airSolar), new ResearchPage(EMTRecipes.doubleAirSolar), new ResearchPage(EMTRecipes.tripleAirSolar));
|
||||
new EMTResearchItem(
|
||||
"Air Infused Solar Panels",
|
||||
EMTResearchAspects.airSolars,
|
||||
-4,
|
||||
-6,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.solars[0], 1, 15))
|
||||
.setSecondary()
|
||||
.setParents("Compressed Solars")
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.airSolar),
|
||||
new ResearchPage(EMTRecipes.doubleAirSolar),
|
||||
new ResearchPage(EMTRecipes.tripleAirSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.earthSolarsResearch) {
|
||||
new EMTResearchItem("Earth Infused Solar Panels", EMTResearchAspects.earthSolars, -6, -7, 1, new ItemStack(EMTBlocks.solars[1], 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.earthSolar), new ResearchPage(EMTRecipes.doubleEarthSolar), new ResearchPage(EMTRecipes.tripleEarthSolar));
|
||||
new EMTResearchItem(
|
||||
"Earth Infused Solar Panels",
|
||||
EMTResearchAspects.earthSolars,
|
||||
-6,
|
||||
-7,
|
||||
1,
|
||||
new ItemStack(EMTBlocks.solars[1], 1, 2))
|
||||
.setSecondary()
|
||||
.setParents("Compressed Solars")
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.earthSolar),
|
||||
new ResearchPage(EMTRecipes.doubleEarthSolar),
|
||||
new ResearchPage(EMTRecipes.tripleEarthSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.uuMInfusionResearch) {
|
||||
new EMTResearchItem("UU-Matter Infusion", EMTResearchAspects.uuMInfusion, 5, 5, 3, new ItemStack(EMTItems.itemEMTItems, 1, 15)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.uuMCrystal), new ResearchPage(EMTRecipes.charcoalToCoal), new ResearchPage(EMTRecipes.glowstoneDustToBlock), new ResearchPage(EMTRecipes.stoneBricksToIronOre), new ResearchPage(EMTRecipes.arcaneStoneToCopperOre), new ResearchPage(EMTRecipes.arcaneStoneBricksToTinOre), new ResearchPage(EMTRecipes.amberBlockToLeadOre), new ResearchPage(EMTRecipes.amberBricksToUraniumOre), new ResearchPage(EMTRecipes.shardToResin), new ResearchPage(EMTRecipes.shardToRedstone), new ResearchPage(EMTRecipes.shardToLapis), new ResearchPage(EMTRecipes.ironToGold), new ResearchPage(EMTRecipes.goldToDiamond), new ResearchPage(EMTRecipes.diamondToUranium), new ResearchPage(EMTRecipes.uraniumToIridium));
|
||||
new EMTResearchItem(
|
||||
"UU-Matter Infusion",
|
||||
EMTResearchAspects.uuMInfusion,
|
||||
5,
|
||||
5,
|
||||
3,
|
||||
new ItemStack(EMTItems.itemEMTItems, 1, 15))
|
||||
.setParentsHidden("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.uuMCrystal),
|
||||
new ResearchPage(EMTRecipes.charcoalToCoal),
|
||||
new ResearchPage(EMTRecipes.glowstoneDustToBlock),
|
||||
new ResearchPage(EMTRecipes.stoneBricksToIronOre),
|
||||
new ResearchPage(EMTRecipes.arcaneStoneToCopperOre),
|
||||
new ResearchPage(EMTRecipes.arcaneStoneBricksToTinOre),
|
||||
new ResearchPage(EMTRecipes.amberBlockToLeadOre),
|
||||
new ResearchPage(EMTRecipes.amberBricksToUraniumOre),
|
||||
new ResearchPage(EMTRecipes.shardToResin),
|
||||
new ResearchPage(EMTRecipes.shardToRedstone),
|
||||
new ResearchPage(EMTRecipes.shardToLapis),
|
||||
new ResearchPage(EMTRecipes.ironToGold),
|
||||
new ResearchPage(EMTRecipes.goldToDiamond),
|
||||
new ResearchPage(EMTRecipes.diamondToUranium),
|
||||
new ResearchPage(EMTRecipes.uraniumToIridium));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.portableNodeResarch) {
|
||||
new EMTResearchItem("Portable Node", EMTResearchAspects.portableNode, 2, 5, 3, new ItemStack(EMTBlocks.portableNode)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.portableNode));
|
||||
new EMTResearchItem(
|
||||
"Portable Node",
|
||||
EMTResearchAspects.portableNode,
|
||||
2,
|
||||
5,
|
||||
3,
|
||||
new ItemStack(EMTBlocks.portableNode))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.portableNode));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.electricHoeGrowthResearch) {
|
||||
new EMTResearchItem("Electric Hoe of Growth", EMTResearchAspects.electricHoeGrowth, -1, -4, 2, new ItemStack(EMTItems.electricHoeGrowth)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricHoeGrowth));
|
||||
new EMTResearchItem(
|
||||
"Electric Hoe of Growth",
|
||||
EMTResearchAspects.electricHoeGrowth,
|
||||
-1,
|
||||
-4,
|
||||
2,
|
||||
new ItemStack(EMTItems.electricHoeGrowth))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.electricHoeGrowth));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.chargeFocusResearch) {
|
||||
new EMTResearchItem("Wand Focus: Charging", EMTResearchAspects.chargeFocus, 5, 3, 2, new ItemStack(EMTItems.chargeFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.chargeFocus));
|
||||
new EMTResearchItem(
|
||||
"Wand Focus: Charging",
|
||||
EMTResearchAspects.chargeFocus,
|
||||
5,
|
||||
3,
|
||||
2,
|
||||
new ItemStack(EMTItems.chargeFocus))
|
||||
.setParents("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.chargeFocus));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.wandChargeFocusResearch) {
|
||||
new EMTResearchItem("Wand Focus: Wand Charging", EMTResearchAspects.wandChargeFocus, 7, 3, 3, new ItemStack(EMTItems.wandChargeFocus)).setParents("Wand Focus: Charging").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandChargeFocus));
|
||||
new EMTResearchItem(
|
||||
"Wand Focus: Wand Charging",
|
||||
EMTResearchAspects.wandChargeFocus,
|
||||
7,
|
||||
3,
|
||||
3,
|
||||
new ItemStack(EMTItems.wandChargeFocus))
|
||||
.setParents("Wand Focus: Charging")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandChargeFocus));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.inventoryChargingRing) {
|
||||
new EMTResearchItem("Inventory Charging Ring", EMTResearchAspects.inventoryChargingRing, 0, -5, 3, new ItemStack(EMTItems.emtBauble, 1, 1)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.inventoryChargingRing));
|
||||
new EMTResearchItem(
|
||||
"Inventory Charging Ring",
|
||||
EMTResearchAspects.inventoryChargingRing,
|
||||
0,
|
||||
-5,
|
||||
3,
|
||||
new ItemStack(EMTItems.emtBauble, 1, 1))
|
||||
.setParentsHidden("Electric Magic Tools")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.inventoryChargingRing));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.armorChargingRing) {
|
||||
new EMTResearchItem("Armor Charging Ring", EMTResearchAspects.armorChargingRing, 0, -7, 3, new ItemStack(EMTItems.emtBauble, 1, 0)).setSecondary().setParents("Inventory Charging Ring").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.armorChargingRing));
|
||||
new EMTResearchItem(
|
||||
"Armor Charging Ring",
|
||||
EMTResearchAspects.armorChargingRing,
|
||||
0,
|
||||
-7,
|
||||
3,
|
||||
new ItemStack(EMTItems.emtBauble, 1, 0))
|
||||
.setSecondary()
|
||||
.setParents("Inventory Charging Ring")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.armorChargingRing));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.thaumiumWingResearch) {
|
||||
new EMTResearchItem("Thaumium Reinforced Wings", EMTResearchAspects.thaumiumWing, 0, 4, 0, new ItemStack(EMTItems.thaumiumWing)).setSecondary().setParents("Feather Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumWing), new ResearchPage(EMTRecipes.thaumiumWings));
|
||||
new EMTResearchItem(
|
||||
"Thaumium Reinforced Wings",
|
||||
EMTResearchAspects.thaumiumWing,
|
||||
0,
|
||||
4,
|
||||
0,
|
||||
new ItemStack(EMTItems.thaumiumWing))
|
||||
.setSecondary()
|
||||
.setParents("Feather Wings")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(
|
||||
new ResearchPage(""),
|
||||
new ResearchPage(EMTRecipes.thaumiumWing),
|
||||
new ResearchPage(EMTRecipes.thaumiumWings));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.nanoWingResearch && !EMTConfigHandler.thaumiumWingResearch) {
|
||||
new EMTResearchItem("Nanosuit Wings", EMTResearchAspects.nanoWing, 0, 6, 2, new ItemStack(EMTItems.nanoWing)).setParents("Thaumium Reinforced Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.nanoWings));
|
||||
new EMTResearchItem(
|
||||
"Nanosuit Wings", EMTResearchAspects.nanoWing, 0, 6, 2, new ItemStack(EMTItems.nanoWing))
|
||||
.setParents("Thaumium Reinforced Wings")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.nanoWings));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.quantumWingsResearch && !EMTConfigHandler.thaumiumWingResearch && !EMTConfigHandler.nanoWingResearch) {
|
||||
new EMTResearchItem("Quantum Wings", EMTResearchAspects.quantumWing, 0, 8, 3, new ItemStack(EMTItems.quantumWing)).setParents("Nanosuit Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.quantumWings));
|
||||
if (!EMTConfigHandler.quantumWingsResearch
|
||||
&& !EMTConfigHandler.thaumiumWingResearch
|
||||
&& !EMTConfigHandler.nanoWingResearch) {
|
||||
new EMTResearchItem(
|
||||
"Quantum Wings",
|
||||
EMTResearchAspects.quantumWing,
|
||||
0,
|
||||
8,
|
||||
3,
|
||||
new ItemStack(EMTItems.quantumWing))
|
||||
.setParents("Nanosuit Wings")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.quantumWings));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.infusedQuantumChestplate && !EMTConfigHandler.thaumiumWingResearch && !EMTConfigHandler.nanoWingResearch && !EMTConfigHandler.quantumWingsResearch) {
|
||||
new EMTResearchItem("Infused Quantum Armor", EMTResearchAspects.quantumWing, 0, 10, 4, new ItemStack(EMTItems.quantumArmor)).setParents("Quantum Wings").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.infusedQuantumArmor));
|
||||
if (!EMTConfigHandler.infusedQuantumChestplate
|
||||
&& !EMTConfigHandler.thaumiumWingResearch
|
||||
&& !EMTConfigHandler.nanoWingResearch
|
||||
&& !EMTConfigHandler.quantumWingsResearch) {
|
||||
new EMTResearchItem(
|
||||
"Infused Quantum Armor",
|
||||
EMTResearchAspects.quantumWing,
|
||||
0,
|
||||
10,
|
||||
4,
|
||||
new ItemStack(EMTItems.quantumArmor))
|
||||
.setParents("Quantum Wings")
|
||||
.setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.infusedQuantumArmor));
|
||||
}
|
||||
/***********************************/
|
||||
}
|
||||
|
||||
@@ -13,9 +13,8 @@ public class EMTTiles {
|
||||
|
||||
public static void registerTileEntities() {
|
||||
|
||||
|
||||
//Essentia Gens
|
||||
//legacy support
|
||||
// Essentia Gens
|
||||
// legacy support
|
||||
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentitypotentiagenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityignisgenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityauramgenerator");
|
||||
@@ -23,16 +22,16 @@ public class EMTTiles {
|
||||
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityaergenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentitylucrumgenerator");
|
||||
|
||||
//new TEs will be called TileEntityEssentiaGenerator
|
||||
// new TEs will be called TileEntityEssentiaGenerator
|
||||
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "TileEntityEssentiaGenerator");
|
||||
|
||||
//Machinery
|
||||
// Machinery
|
||||
GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge");
|
||||
GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator");
|
||||
GameRegistry.registerTileEntity(EssentiaFiller.class, "EssentiaFillerTE");
|
||||
|
||||
//Solars
|
||||
//legacy support
|
||||
// Solars
|
||||
// legacy support
|
||||
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitycompressedsolar");
|
||||
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublecompressedsolar");
|
||||
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplecompressedsolar");
|
||||
@@ -55,10 +54,10 @@ public class EMTTiles {
|
||||
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleearthsolar");
|
||||
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleearthsolar");
|
||||
|
||||
//new TEs will be called TileEntityXCompressedSolar
|
||||
// new TEs will be called TileEntityXCompressedSolar
|
||||
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "TileEntityXCompressedSolar");
|
||||
|
||||
//Random Stuff
|
||||
// Random Stuff
|
||||
GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode");
|
||||
GameRegistry.registerTileEntity(TileElectricCloud.class, "tileEntityElectricCloud");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package emt.init;
|
||||
|
||||
import static thaumcraft.api.aspects.Aspect.*;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.util.EMTResearchItem;
|
||||
import gregtech.api.enums.ItemList;
|
||||
@@ -7,6 +9,10 @@ import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
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;
|
||||
@@ -23,73 +29,95 @@ import thaumcraft.api.crafting.ShapedArcaneRecipe;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import static thaumcraft.api.aspects.Aspect.*;
|
||||
|
||||
public class EMT_GTNH_Recipes_And_Researches implements Runnable {
|
||||
|
||||
|
||||
private static LinkedHashMap<String, IArcaneRecipe> arcaneRecipeLinkedHashMap = new LinkedHashMap<>();
|
||||
private static LinkedHashMap<String, InfusionRecipe> infusionRecipeLinkedHashMap = new LinkedHashMap<>();
|
||||
private static LinkedHashMap<String, CrucibleRecipe> cruciblRecipeLinkedHashMap = 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);
|
||||
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() {
|
||||
|
||||
// ItemStack glue =new ItemStack(EMTItems.itemEMTItems,1,8);
|
||||
// HashSet<ShapelessRecipes> recipesHashSet = new HashSet<>();
|
||||
// recipesHashSet.add(new ShapelessRecipes(glue, Arrays.asList(GT_ModHandler.getModItem("TConstruct","materials",1,36),GT_ModHandler.getModItem("TConstruct","materials",1,36))));
|
||||
// recipesHashSet.add(new ShapelessRecipes(glue, Collections.singletonList(GT_ModHandler.getModItem("TConstruct", "materials", 2, 36))));
|
||||
// for ( ShapelessRecipes sr : recipesHashSet)
|
||||
// CraftingManager.getInstance().getRecipeList().add(sr);
|
||||
//
|
||||
// //Rubber ball recipes
|
||||
// GT_Values.RA.addAlloySmelterRecipe(Materials.RubberTreeSap.getDust(4),ItemList.Shape_Mold_Ball.get(0),new ItemStack(EMTItems.itemEMTItems,1,10),200,16);
|
||||
// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Items.paper,12),new ItemStack(EMTItems.itemEMTItems,1,10)},Materials.Glue.getMolten(6912),new ItemStack(EMTItems.itemEMTItems,1,9),600,30);
|
||||
// GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0),Materials.Rubber.getMolten(576),new ItemStack(EMTItems.itemEMTItems,1,10),100,30);
|
||||
// GT_Values.RA.addPulveriserRecipe(new ItemStack(EMTItems.itemEMTItems,1,10),new ItemStack[]{Materials.Rubber.getDust(4)},null,300,2);
|
||||
// GT_Values.RA.addFormingPressRecipe(Materials.Rubber.getPlates(4),ItemList.Shape_Mold_Ball.get(0),new ItemStack(EMTItems.itemEMTItems,1,10),100,30);
|
||||
// ItemStack glue =new ItemStack(EMTItems.itemEMTItems,1,8);
|
||||
// HashSet<ShapelessRecipes> recipesHashSet = new HashSet<>();
|
||||
// recipesHashSet.add(new ShapelessRecipes(glue,
|
||||
// Arrays.asList(GT_ModHandler.getModItem("TConstruct","materials",1,36),GT_ModHandler.getModItem("TConstruct","materials",1,36))));
|
||||
// recipesHashSet.add(new ShapelessRecipes(glue,
|
||||
// Collections.singletonList(GT_ModHandler.getModItem("TConstruct", "materials", 2, 36))));
|
||||
// for ( ShapelessRecipes sr : recipesHashSet)
|
||||
// CraftingManager.getInstance().getRecipeList().add(sr);
|
||||
//
|
||||
// //Rubber ball recipes
|
||||
//
|
||||
// GT_Values.RA.addAlloySmelterRecipe(Materials.RubberTreeSap.getDust(4),ItemList.Shape_Mold_Ball.get(0),new
|
||||
// ItemStack(EMTItems.itemEMTItems,1,10),200,16);
|
||||
// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Items.paper,12),new
|
||||
// ItemStack(EMTItems.itemEMTItems,1,10)},Materials.Glue.getMolten(6912),new
|
||||
// ItemStack(EMTItems.itemEMTItems,1,9),600,30);
|
||||
//
|
||||
// GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0),Materials.Rubber.getMolten(576),new
|
||||
// ItemStack(EMTItems.itemEMTItems,1,10),100,30);
|
||||
// GT_Values.RA.addPulveriserRecipe(new ItemStack(EMTItems.itemEMTItems,1,10),new
|
||||
// ItemStack[]{Materials.Rubber.getDust(4)},null,300,2);
|
||||
// GT_Values.RA.addFormingPressRecipe(Materials.Rubber.getPlates(4),ItemList.Shape_Mold_Ball.get(0),new
|
||||
// ItemStack(EMTItems.itemEMTItems,1,10),100,30);
|
||||
|
||||
EMTResearches.addResearchTab();
|
||||
runArcaneRecipes();
|
||||
runResreaches();
|
||||
}
|
||||
|
||||
private void runInfusionRecipes() {
|
||||
}
|
||||
private void runInfusionRecipes() {}
|
||||
|
||||
private void runKettleRecipes() {
|
||||
|
||||
}
|
||||
private void runKettleRecipes() {}
|
||||
|
||||
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)
|
||||
));
|
||||
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);
|
||||
@@ -98,9 +126,28 @@ public class EMT_GTNH_Recipes_And_Researches implements Runnable {
|
||||
|
||||
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.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);
|
||||
}
|
||||
|
||||
@@ -121,7 +168,8 @@ public class EMT_GTNH_Recipes_And_Researches implements Runnable {
|
||||
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!");
|
||||
throw new UnsupportedOperationException(
|
||||
"The Recipe must start with at least one String for the first row!");
|
||||
int i = 0;
|
||||
rowcolm = new int[3];
|
||||
do {
|
||||
@@ -137,14 +185,14 @@ public class EMT_GTNH_Recipes_And_Researches implements Runnable {
|
||||
int k = 0;
|
||||
for (int j = i; j < recipe.length; j += 2) {
|
||||
k++;
|
||||
if (recipe[j] instanceof Character)
|
||||
translation.put((Character) recipe[j], recipe[j + 1]);
|
||||
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))
|
||||
if (this.research.length() > 0
|
||||
&& !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), this.research))
|
||||
return false;
|
||||
else {
|
||||
for (int y = 0; y < rowcolm.length; y++) {
|
||||
@@ -155,22 +203,31 @@ public class EMT_GTNH_Recipes_And_Researches implements Runnable {
|
||||
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;
|
||||
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(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;
|
||||
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 (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;
|
||||
@@ -212,5 +269,4 @@ public class EMT_GTNH_Recipes_And_Researches implements Runnable {
|
||||
return research;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,8 +7,7 @@ import emt.util.EMTEssentiasOutputs;
|
||||
public class Registry {
|
||||
private static final EMT_GT_Loader gtloader = new EMT_GT_Loader();
|
||||
|
||||
public static void registerPreInit() {
|
||||
}
|
||||
public static void registerPreInit() {}
|
||||
|
||||
public static void registerInit() {
|
||||
EMTBlocks.registerBlocks();
|
||||
@@ -23,7 +22,7 @@ public class Registry {
|
||||
EMTBlocks.addAspects();
|
||||
gtloader.runlate();
|
||||
EMTRecipes.registerLateRecipes();
|
||||
//new EMT_GTNH_Recipes_And_Researches().run();
|
||||
// new EMT_GTNH_Recipes_And_Researches().run();
|
||||
EMTRecipes.registerUUMInfusionRecipes();
|
||||
EMTResearches.register();
|
||||
Solars.registerReverseRecipes();
|
||||
|
||||
@@ -22,6 +22,8 @@ public class ItemBase extends Item {
|
||||
}
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
return (EMTTextHelper.GREEN + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim();
|
||||
return (EMTTextHelper.GREEN
|
||||
+ StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name"))
|
||||
.trim();
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@ package emt.item;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import java.util.List;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -14,8 +14,6 @@ import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.IScribeTools;
|
||||
import thaumcraft.common.items.ItemInkwell;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemElectricScribingTools extends ItemInkwell implements IElectricItem, IScribeTools {
|
||||
|
||||
public static int maxCharge = 400;
|
||||
|
||||
@@ -8,6 +8,8 @@ import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -17,9 +19,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
|
||||
|
||||
public static int wornTick;
|
||||
@@ -89,8 +88,15 @@ public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
|
||||
int energyLeft = EMTConfigHandler.armorBaubleProduction;
|
||||
for (int i = 0; i < ((EntityPlayer) player).inventory.armorInventory.length; i++) {
|
||||
if (energyLeft > 0) {
|
||||
if ((((EntityPlayer) player).inventory.armorInventory[i] != null) && (((EntityPlayer) player).inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.armorInventory[i], energyLeft, 4, false, false);
|
||||
if ((((EntityPlayer) player).inventory.armorInventory[i] != null)
|
||||
&& (((EntityPlayer) player).inventory.armorInventory[i].getItem()
|
||||
instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(
|
||||
((EntityPlayer) player).inventory.armorInventory[i],
|
||||
energyLeft,
|
||||
4,
|
||||
false,
|
||||
false);
|
||||
energyLeft -= sentPacket;
|
||||
}
|
||||
}
|
||||
@@ -104,8 +110,15 @@ public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
|
||||
int energyLeft = EMTConfigHandler.inventoryBaubleProdution;
|
||||
for (int i = 0; i < ((EntityPlayer) player).inventory.mainInventory.length; i++) {
|
||||
if (energyLeft > 0) {
|
||||
if ((((EntityPlayer) player).inventory.mainInventory[i] != null) && (((EntityPlayer) player).inventory.mainInventory[i].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.mainInventory[i], energyLeft, 4, false, false);
|
||||
if ((((EntityPlayer) player).inventory.mainInventory[i] != null)
|
||||
&& (((EntityPlayer) player).inventory.mainInventory[i].getItem()
|
||||
instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(
|
||||
((EntityPlayer) player).inventory.mainInventory[i],
|
||||
energyLeft,
|
||||
4,
|
||||
false,
|
||||
false);
|
||||
energyLeft -= sentPacket;
|
||||
}
|
||||
}
|
||||
@@ -117,12 +130,10 @@ public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEquipped(ItemStack stack, EntityLivingBase player) {
|
||||
}
|
||||
public void onEquipped(ItemStack stack, EntityLivingBase player) {}
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
|
||||
}
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) {}
|
||||
|
||||
@Override
|
||||
public boolean canEquip(ItemStack stack, EntityLivingBase player) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package emt.item;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -24,8 +25,6 @@ import net.minecraftforge.event.entity.player.ArrowNockEvent;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.lib.utils.InventoryUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemMaterials extends Item {
|
||||
|
||||
public IIcon[] icon = new IIcon[20];
|
||||
@@ -152,7 +151,8 @@ public class ItemMaterials extends Item {
|
||||
float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f);
|
||||
float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f);
|
||||
double playerX = player.prevPosX + ((player.posX - player.prevPosX) * f);
|
||||
double playerY = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset;
|
||||
double playerY =
|
||||
(player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset;
|
||||
double playerZ = player.prevPosZ + ((player.posZ - player.prevPosZ) * f);
|
||||
Vec3 playerLoc = Vec3.createVectorHelper(playerX, playerY, playerZ);
|
||||
float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F);
|
||||
@@ -199,24 +199,27 @@ public class ItemMaterials extends Item {
|
||||
}
|
||||
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
if (stack.getItemDamage() == 6)
|
||||
return 72000;
|
||||
if (stack.getItemDamage() == 6) return 72000;
|
||||
return super.getMaxItemUseDuration(stack);
|
||||
}
|
||||
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
if (stack.getItemDamage() == 6)
|
||||
return EnumAction.bow;
|
||||
if (stack.getItemDamage() == 6) return EnumAction.bow;
|
||||
return EnumAction.none;
|
||||
}
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
|
||||
super.onUpdate(stack, world, entity, par4, par5);
|
||||
if ((!entity.worldObj.isRemote) && ((stack.getItemDamage() == 13)) && ((entity instanceof EntityLivingBase)) && (!((EntityLivingBase) entity).isEntityUndead()) && (!((EntityLivingBase) entity).isPotionActive(Config.potionTaintPoisonID)) && (world.rand.nextInt(4321) <= stack.stackSize)) {
|
||||
if ((!entity.worldObj.isRemote)
|
||||
&& ((stack.getItemDamage() == 13))
|
||||
&& ((entity instanceof EntityLivingBase))
|
||||
&& (!((EntityLivingBase) entity).isEntityUndead())
|
||||
&& (!((EntityLivingBase) entity).isPotionActive(Config.potionTaintPoisonID))
|
||||
&& (world.rand.nextInt(4321) <= stack.stackSize)) {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Config.potionTaintPoisonID, 120, 0, false));
|
||||
if ((entity instanceof EntityPlayer)) {
|
||||
InventoryUtils.consumeInventoryItem((EntityPlayer) entity, stack.getItem(), stack.getItemDamage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -18,12 +20,9 @@ import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
|
||||
public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRunicArmor {
|
||||
private static final String NBT_TAG_FORGE_DATA = "EMT";
|
||||
@@ -60,9 +59,10 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) {
|
||||
String colourCode = ""+ EnumChatFormatting.DARK_RED;
|
||||
list.add(colourCode+"The Ring whispers to you, promising power. But at what cost? Long-term usage is NOT advised.");
|
||||
list.add(colourCode+"Can RUIN your game if you don't understand what this does. READ THE QUEST!!");
|
||||
String colourCode = "" + EnumChatFormatting.DARK_RED;
|
||||
list.add(colourCode
|
||||
+ "The Ring whispers to you, promising power. But at what cost? Long-term usage is NOT advised.");
|
||||
list.add(colourCode + "Can RUIN your game if you don't understand what this does. READ THE QUEST!!");
|
||||
super.addInformation(itemStack, player, list, par4);
|
||||
}
|
||||
|
||||
@@ -96,10 +96,8 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
|
||||
// getCompoundTag already returns the contents of "ForgeData" TagCompound. Changed this to
|
||||
// save our value in EMT Sub-Tag
|
||||
if (tPlayerNBT.hasKey(NBT_TAG_FORGE_DATA))
|
||||
forgeTag = tPlayerNBT.getCompoundTag(NBT_TAG_FORGE_DATA);
|
||||
else
|
||||
tPlayerNBT.setTag(NBT_TAG_FORGE_DATA, forgeTag);
|
||||
if (tPlayerNBT.hasKey(NBT_TAG_FORGE_DATA)) forgeTag = tPlayerNBT.getCompoundTag(NBT_TAG_FORGE_DATA);
|
||||
else tPlayerNBT.setTag(NBT_TAG_FORGE_DATA, forgeTag);
|
||||
|
||||
return forgeTag;
|
||||
}
|
||||
@@ -110,8 +108,7 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getTagCompound().hasKey(NBT_TAG_WARP)) {
|
||||
tWarpLevel = stack.getTagCompound().getInteger(NBT_TAG_WARP);
|
||||
if (increment)
|
||||
stack.getTagCompound().setInteger(NBT_TAG_WARP, ++tWarpLevel);
|
||||
if (increment) stack.getTagCompound().setInteger(NBT_TAG_WARP, ++tWarpLevel);
|
||||
}
|
||||
} else {
|
||||
tWarpTag.setInteger(NBT_TAG_WARP, 0);
|
||||
@@ -129,14 +126,13 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
}
|
||||
|
||||
// Stop doing this 20 times per second...
|
||||
if (random.nextInt(20) > 0)
|
||||
return;
|
||||
if (random.nextInt(20) > 0) return;
|
||||
|
||||
/* Why dump to a new tag when you can just grab the tag and work with it?
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
((EntityPlayer) player).writeToNBT(tag);
|
||||
NBTTagCompound forgeTag = tag.getCompoundTag("ForgeData");
|
||||
*/
|
||||
/* Why dump to a new tag when you can just grab the tag and work with it?
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
((EntityPlayer) player).writeToNBT(tag);
|
||||
NBTTagCompound forgeTag = tag.getCompoundTag("ForgeData");
|
||||
*/
|
||||
|
||||
// Retrieve Players NBT Data
|
||||
|
||||
@@ -145,24 +141,27 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
int corruption = 0;
|
||||
|
||||
// get corruption levels, init to 0 if not existing yet
|
||||
if (forgeTag.hasKey(NBT_TAG_MIND_CORRUPTION))
|
||||
corruption = forgeTag.getInteger(NBT_TAG_MIND_CORRUPTION);
|
||||
else
|
||||
forgeTag.setInteger(NBT_TAG_MIND_CORRUPTION, 0);
|
||||
if (forgeTag.hasKey(NBT_TAG_MIND_CORRUPTION)) corruption = forgeTag.getInteger(NBT_TAG_MIND_CORRUPTION);
|
||||
else forgeTag.setInteger(NBT_TAG_MIND_CORRUPTION, 0);
|
||||
|
||||
if (!player.worldObj.isRemote) {
|
||||
//EMT.LOGGER.info( String.format( "Total Corruption: %d ItemWarpLevel: %d", corruption, getItemWarpLevel( stack, false ) ));
|
||||
// EMT.LOGGER.info( String.format( "Total Corruption: %d ItemWarpLevel: %d", corruption, getItemWarpLevel(
|
||||
// stack, false ) ));
|
||||
|
||||
if (corruption == 0) {
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever " + EMTTextHelper.PURPLE + "tainted. " + EMTTextHelper.RED + EMTTextHelper.ITALIC + "Beware of wearing the ring. The tainting will only " + EMTTextHelper.RED + EMTTextHelper.ITALIC + "increase, and strange things will start happening."));
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(
|
||||
EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever "
|
||||
+ EMTTextHelper.PURPLE + "tainted. " + EMTTextHelper.RED + EMTTextHelper.ITALIC
|
||||
+ "Beware of wearing the ring. The tainting will only " + EMTTextHelper.RED
|
||||
+ EMTTextHelper.ITALIC + "increase, and strange things will start happening."));
|
||||
}
|
||||
// First effect should become active after ~5 Minutes
|
||||
else if (corruption > 300 && corruption < 1400 && random.nextInt(100) == 0) {
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring somehow feels heavy"));
|
||||
if (random.nextBoolean())
|
||||
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false));
|
||||
else
|
||||
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring somehow feels heavy"));
|
||||
if (random.nextBoolean()) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false));
|
||||
else player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
|
||||
} else if (corruption >= 1400 && corruption < 3800 && random.nextInt(100) == 0) {
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
player.addPotionEffect(new PotionEffect(Potion.poison.id, 500, 2, false));
|
||||
@@ -174,40 +173,54 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false));
|
||||
}
|
||||
|
||||
if (corruption >= 300) { //worn more than 5 minutes
|
||||
if (random.nextInt(100) == 0) { //every 100 seconds
|
||||
if (corruption >= 300) { // worn more than 5 minutes
|
||||
if (random.nextInt(100) == 0) { // every 100 seconds
|
||||
getItemWarpLevel(stack, true);
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple"));
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(
|
||||
EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple"));
|
||||
}
|
||||
if (random.nextInt(300) == 0) { // randomly every 5 minutes
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 1, false); // adds 1 perm warp
|
||||
ThaumcraftApiHelper.addStickyWarpToPlayer(
|
||||
(EntityPlayer) player, random.nextInt(1)); // adds 0-1 sticky warp
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(
|
||||
EMTTextHelper.PURPLE + "Your body suddenly starts to glow purple"));
|
||||
}
|
||||
if (corruption >= 3600) { // if you wear it for more than an hour total
|
||||
if (random.nextInt(300) == 0) {
|
||||
ThaumcraftApiHelper.addWarpToPlayer(
|
||||
(EntityPlayer) player, 5 + random.nextInt(5), false); // adds 5-10 perm warp
|
||||
ThaumcraftApiHelper.addStickyWarpToPlayer(
|
||||
(EntityPlayer) player, 5 + random.nextInt(5)); // adds 5-10 sticky warp
|
||||
ThaumcraftApiHelper.addWarpToPlayer(
|
||||
(EntityPlayer) player,
|
||||
10 + random.nextInt(40),
|
||||
true); // adds 10-50 temp warp, but this is ultra easy to remove
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(
|
||||
new ChatComponentText(
|
||||
EMTTextHelper.PURPLE
|
||||
+ "Your body resonates with the Ring and suddenly starts to glow purple ominously"));
|
||||
}
|
||||
}
|
||||
if (random.nextInt(300) == 0) { //randomly every 5 minutes
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 1, false); //adds 1 perm warp
|
||||
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, random.nextInt(1)); //adds 0-1 sticky warp
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "Your body suddenly starts to glow purple"));
|
||||
}
|
||||
if (corruption >= 3600) { //if you wear it for more than an hour total
|
||||
if (random.nextInt(300) == 0) {
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5), false); //adds 5-10 perm warp
|
||||
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5)); //adds 5-10 sticky warp
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 10 + random.nextInt(40), true); //adds 10-50 temp warp, but this is ultra easy to remove
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "Your body resonates with the Ring and suddenly starts to glow purple ominously"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
forgeTag.setInteger(NBT_TAG_MIND_CORRUPTION, ++corruption);
|
||||
//tag.setTag( NBT_TAG_FORGE_DATA, forgeTag);
|
||||
//((EntityPlayer) player).readFromNBT(tag);
|
||||
// tag.setTag( NBT_TAG_FORGE_DATA, forgeTag);
|
||||
// ((EntityPlayer) player).readFromNBT(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEquipped(ItemStack stack, EntityLivingBase player) {
|
||||
// This purges all corruption once the ring is put on / a second ring is equipped?
|
||||
/*
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
((EntityPlayer) player).writeToNBT(tag);
|
||||
tag.getCompoundTag( NBT_TAG_FORGE_DATA ).setInteger( NBT_TAG_MIND_CORRUPTION, 0);
|
||||
((EntityPlayer) player).readFromNBT(tag);
|
||||
*/
|
||||
/*
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
((EntityPlayer) player).writeToNBT(tag);
|
||||
tag.getCompoundTag( NBT_TAG_FORGE_DATA ).setInteger( NBT_TAG_MIND_CORRUPTION, 0);
|
||||
((EntityPlayer) player).readFromNBT(tag);
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -216,11 +229,11 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
if (!((EntityPlayer) player).capabilities.isCreativeMode)
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
|
||||
/* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt!
|
||||
((EntityPlayer) player).writeToNBT(tag);
|
||||
tag.removeTag( NBT_TAG_FORGE_DATA );
|
||||
((EntityPlayer) player).readFromNBT(tag);
|
||||
*/
|
||||
/* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt!
|
||||
((EntityPlayer) player).writeToNBT(tag);
|
||||
tag.removeTag( NBT_TAG_FORGE_DATA );
|
||||
((EntityPlayer) player).readFromNBT(tag);
|
||||
*/
|
||||
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 1, false));
|
||||
}
|
||||
|
||||
@@ -231,7 +244,8 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
|
||||
@Override
|
||||
public boolean canUnequip(ItemStack stack, EntityLivingBase player) {
|
||||
// So, how this was written, you basically could not unequip the ring for 600 ticks after you equipped it, but afterwards you could?
|
||||
// So, how this was written, you basically could not unequip the ring for 600 ticks after you equipped it, but
|
||||
// afterwards you could?
|
||||
// Let's make it a random chance to remove it instead...
|
||||
|
||||
// NBTTagCompound tag = getOrSetForgeTag((EntityPlayer) player);
|
||||
@@ -239,9 +253,13 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
boolean tRet = false;
|
||||
if (random.nextInt(5) == 0) {
|
||||
tRet = true;
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.GREEN + "You removed the Ring. Maybe you should think twice before using it next time?"));
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(EMTTextHelper.GREEN
|
||||
+ "You removed the Ring. Maybe you should think twice before using it next time?"));
|
||||
} else
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "Nooo, don't remove me! I give you great power!"));
|
||||
((EntityPlayer) player)
|
||||
.addChatMessage(new ChatComponentText(
|
||||
EMTTextHelper.PURPLE + "Nooo, don't remove me! I give you great power!"));
|
||||
|
||||
return tRet;
|
||||
}
|
||||
@@ -250,5 +268,4 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
public int getRunicCharge(ItemStack itemStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -29,9 +30,8 @@ import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemElectricBootsTraveller extends ItemArmor implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
|
||||
public class ItemElectricBootsTraveller extends ItemArmor
|
||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
|
||||
|
||||
public int maxCharge = 100000;
|
||||
public int energyPerDamage = 1000;
|
||||
@@ -68,13 +68,15 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IRunicArmor
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
|
||||
public ArmorProperties getProperties(
|
||||
EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
|
||||
if (source.isUnblockable()) {
|
||||
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
|
||||
} else {
|
||||
double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
|
||||
int energyPerDamage = getEnergyPerDamage();
|
||||
double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
|
||||
double damageLimit =
|
||||
energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
|
||||
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
|
||||
}
|
||||
}
|
||||
@@ -117,8 +119,10 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IRunicArmor
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
|
||||
if ((player.worldObj.isRemote) && (!player.isSneaking())) {
|
||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) {
|
||||
Thaumcraft.instance.entityEventHandler.prevStep.put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
|
||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(
|
||||
Integer.valueOf(player.getEntityId()))) {
|
||||
Thaumcraft.instance.entityEventHandler.prevStep.put(
|
||||
Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
|
||||
}
|
||||
player.stepHeight = 1.0F;
|
||||
}
|
||||
@@ -134,10 +138,10 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IRunicArmor
|
||||
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
|
||||
if (event.entityLiving instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this;
|
||||
boolean hasArmor = player.getCurrentArmor(0) != null
|
||||
&& player.getCurrentArmor(0).getItem() == this;
|
||||
|
||||
if (hasArmor)
|
||||
player.motionY += jumpBonus;
|
||||
if (hasArmor) player.motionY += jumpBonus;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,17 +159,24 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IRunicArmor
|
||||
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();
|
||||
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);
|
||||
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() ));
|
||||
// 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);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ import ic2.core.audio.PositionSpec;
|
||||
import ic2.core.init.InternalName;
|
||||
import ic2.core.item.armor.ItemArmorElectric;
|
||||
import ic2.core.util.StackUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -33,10 +36,6 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor {
|
||||
|
||||
public static AudioSource audioSource;
|
||||
@@ -172,11 +171,13 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
if (currentItem == IC2Items.getItem("electricJetpack").getItem()) {
|
||||
IC2.platform.messagePlayer(player, "Jetpack enabled.", new Object[0]);
|
||||
nbt.setByte("wing", JETPACK);
|
||||
//int charge = (int) ElectricItem.manager.getCharge(itemStack);
|
||||
//if (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < 30000) {
|
||||
// ElectricItem.manager.use(itemStack, 30000 - ElectricItem.manager.getCharge(currentStack), player);
|
||||
//}
|
||||
nbt.setInteger("jetpackCharge", (int) (ElectricItem.manager.getCharge(currentStack)/* + charge - (int) ElectricItem.manager.getCharge(itemStack))*/));
|
||||
// int charge = (int) ElectricItem.manager.getCharge(itemStack);
|
||||
// if (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < 30000) {
|
||||
// ElectricItem.manager.use(itemStack, 30000 - ElectricItem.manager.getCharge(currentStack),
|
||||
// player);
|
||||
// }
|
||||
nbt.setInteger("jetpackCharge", (int) (ElectricItem.manager.getCharge(
|
||||
currentStack) /* + charge - (int) ElectricItem.manager.getCharge(itemStack))*/));
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
|
||||
} else if (currentItem == EMTItems.thaumiumWing) {
|
||||
IC2.platform.messagePlayer(player, "Thaumium wings enabled.", new Object[0]);
|
||||
@@ -185,20 +186,28 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
} else if (currentItem == EMTItems.nanoWing) {
|
||||
IC2.platform.messagePlayer(player, "Nano wings enabled.", new Object[0]);
|
||||
nbt.setByte("wing", NANO);
|
||||
//int charge = (int) ElectricItem.manager.getCharge(itemStack);
|
||||
//if (ElectricItem.manager.getCharge(currentStack) < ItemNanoWing.maxCharge) {
|
||||
// ElectricItem.manager.use(itemStack, ItemNanoWing.maxCharge - ElectricItem.manager.getCharge(currentStack), player);
|
||||
//}
|
||||
nbt.setInteger("NWCharge", (int) (ElectricItem.manager.getCharge(player.inventory.getCurrentItem())/* + charge - (int) ElectricItem.manager.getCharge(itemStack)*/));
|
||||
// int charge = (int) ElectricItem.manager.getCharge(itemStack);
|
||||
// if (ElectricItem.manager.getCharge(currentStack) < ItemNanoWing.maxCharge) {
|
||||
// ElectricItem.manager.use(itemStack, ItemNanoWing.maxCharge -
|
||||
// ElectricItem.manager.getCharge(currentStack), player);
|
||||
// }
|
||||
nbt.setInteger(
|
||||
"NWCharge",
|
||||
(int)
|
||||
(ElectricItem.manager.getCharge(
|
||||
player.inventory
|
||||
.getCurrentItem()) /* + charge - (int) ElectricItem.manager.getCharge(itemStack)*/));
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
|
||||
} else if (currentItem == EMTItems.quantumWing) {
|
||||
IC2.platform.messagePlayer(player, "Quantum wings enabled.", new Object[0]);
|
||||
nbt.setByte("wing", QUANTUM);
|
||||
//int charge = (int) ElectricItem.manager.getCharge(itemStack);
|
||||
//if (ElectricItem.manager.getCharge(currentStack) < ItemQuantumWing.maxCharge) {
|
||||
// ElectricItem.manager.use(itemStack, ItemQuantumWing.maxCharge - ElectricItem.manager.getCharge(currentStack), player);
|
||||
//}
|
||||
nbt.setInteger("QWCharge", (int) (ElectricItem.manager.getCharge(currentStack)/* + charge - (int) ElectricItem.manager.getCharge(itemStack)*/));
|
||||
// int charge = (int) ElectricItem.manager.getCharge(itemStack);
|
||||
// if (ElectricItem.manager.getCharge(currentStack) < ItemQuantumWing.maxCharge) {
|
||||
// ElectricItem.manager.use(itemStack, ItemQuantumWing.maxCharge -
|
||||
// ElectricItem.manager.getCharge(currentStack), player);
|
||||
// }
|
||||
nbt.setInteger("QWCharge", (int) (ElectricItem.manager.getCharge(
|
||||
currentStack) /* + charge - (int) ElectricItem.manager.getCharge(itemStack)*/));
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
|
||||
}
|
||||
}
|
||||
@@ -209,18 +218,19 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
if (wing == JETPACK) {
|
||||
IC2.platform.messagePlayer(player, "Jetpack disabled.", new Object[0]);
|
||||
nbt.setByte("wing", NONE);
|
||||
ItemStack charged = new ItemStack(IC2Items.getItem("electricJetpack").getItem());
|
||||
ItemStack charged =
|
||||
new ItemStack(IC2Items.getItem("electricJetpack").getItem());
|
||||
if (nbt.getInteger("jetpackCharge") > 0)
|
||||
ElectricItem.manager.charge(charged, nbt.getInteger("jetpackCharge"), 1, true, false);
|
||||
else
|
||||
ElectricItem.manager.charge(charged, 0, 1, true, false);
|
||||
else ElectricItem.manager.charge(charged, 0, 1, true, false);
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, charged);
|
||||
}
|
||||
|
||||
if (wing == THAUMIUM) {
|
||||
IC2.platform.messagePlayer(player, "Thaumium wings disabled.", new Object[0]);
|
||||
nbt.setByte("wing", NONE);
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, new ItemStack(EMTItems.thaumiumWing));
|
||||
player.inventory.setInventorySlotContents(
|
||||
player.inventory.currentItem, new ItemStack(EMTItems.thaumiumWing));
|
||||
}
|
||||
|
||||
if (wing == NANO) {
|
||||
@@ -229,8 +239,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
ItemStack charged = new ItemStack(EMTItems.nanoWing);
|
||||
if (nbt.getInteger("NWCharge") > 0)
|
||||
ElectricItem.manager.charge(charged, nbt.getInteger("NWCharge"), 3, true, false);
|
||||
else
|
||||
ElectricItem.manager.charge(charged, 0, 3, true, false);
|
||||
else ElectricItem.manager.charge(charged, 0, 3, true, false);
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, charged);
|
||||
}
|
||||
|
||||
@@ -240,8 +249,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
ItemStack charged = new ItemStack(EMTItems.quantumWing);
|
||||
if (nbt.getInteger("QWCharge") > 0)
|
||||
ElectricItem.manager.charge(charged, nbt.getInteger("QWCharge"), 3, true, false);
|
||||
else
|
||||
ElectricItem.manager.charge(charged, 0, 3, true, false);
|
||||
else ElectricItem.manager.charge(charged, 0, 3, true, false);
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, charged);
|
||||
}
|
||||
}
|
||||
@@ -249,16 +257,14 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
nbt.setBoolean("unequip", false);
|
||||
}
|
||||
|
||||
if ((IC2.keyboard.isJumpKeyDown(player) && wing == JETPACK) || (hoverMode && player.motionY < -0.029999999329447746D)) {
|
||||
if ((IC2.keyboard.isJumpKeyDown(player) && wing == JETPACK)
|
||||
|| (hoverMode && player.motionY < -0.029999999329447746D)) {
|
||||
jetpackUsed = useJetpack(player, hoverMode, itemStack);
|
||||
}
|
||||
|
||||
if (wing == THAUMIUM)
|
||||
useWings(player, itemStack, world, 0.15f, 0.7f, 0.5f, 0, false);
|
||||
if (wing == NANO)
|
||||
useWings(player, itemStack, world, 0.25f, 0.6f, 0.3f, 5, true);
|
||||
if (wing == QUANTUM)
|
||||
useWings(player, itemStack, world, 0.33f, 0.5f, 0.2f, 7, true);
|
||||
if (wing == THAUMIUM) useWings(player, itemStack, world, 0.15f, 0.7f, 0.5f, 0, false);
|
||||
if (wing == NANO) useWings(player, itemStack, world, 0.25f, 0.6f, 0.3f, 5, true);
|
||||
if (wing == QUANTUM) useWings(player, itemStack, world, 0.33f, 0.5f, 0.2f, 7, true);
|
||||
|
||||
if (IC2.platform.isSimulating() && toggleTimer > 0) {
|
||||
toggleTimer = (byte) (toggleTimer - 1);
|
||||
@@ -268,7 +274,13 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
if (lastJetpackUsed != jetpackUsed) {
|
||||
if (jetpackUsed) {
|
||||
if (audioSource == null) {
|
||||
audioSource = IC2.audioManager.createSource(player, PositionSpec.Backpack, "Tools/Jetpack/JetpackLoop.ogg", true, false, IC2.audioManager.getDefaultVolume());
|
||||
audioSource = IC2.audioManager.createSource(
|
||||
player,
|
||||
PositionSpec.Backpack,
|
||||
"Tools/Jetpack/JetpackLoop.ogg",
|
||||
true,
|
||||
false,
|
||||
IC2.audioManager.getDefaultVolume());
|
||||
}
|
||||
if (audioSource != null) {
|
||||
audioSource.play();
|
||||
@@ -340,10 +352,8 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
|
||||
@Override
|
||||
public int getItemEnchantability() {
|
||||
if (EMTConfigHandler.enchanting == false)
|
||||
return 0;
|
||||
else
|
||||
return 4;
|
||||
if (EMTConfigHandler.enchanting == false) return 0;
|
||||
else return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -407,7 +417,8 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
}
|
||||
|
||||
if (((float) ElectricItem.manager.getCharge(stack) / (float) jetpackMaxCharge) <= dropPercentage) {
|
||||
power = (float) (power * (ElectricItem.manager.getCharge(stack) / (float) jetpackMaxCharge) * dropPercentage);
|
||||
power = (float)
|
||||
(power * (ElectricItem.manager.getCharge(stack) / (float) jetpackMaxCharge) * dropPercentage);
|
||||
}
|
||||
|
||||
if (IC2.keyboard.isForwardKeyDown(player)) {
|
||||
@@ -464,7 +475,15 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
return true;
|
||||
}
|
||||
|
||||
void useWings(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount, boolean isElectric) {
|
||||
void useWings(
|
||||
EntityPlayer player,
|
||||
ItemStack stack,
|
||||
World world,
|
||||
float motionY,
|
||||
float motionXZ,
|
||||
float f1,
|
||||
int amount,
|
||||
boolean isElectric) {
|
||||
NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack);
|
||||
boolean isJumping = IC2.keyboard.isJumpKeyDown(player);
|
||||
nbt.setBoolean("isJumping", isJumping);
|
||||
@@ -473,10 +492,8 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
byte f = nbt.getByte("f");
|
||||
|
||||
nbt.setBoolean("isHolding", true);
|
||||
if (IC2.keyboard.isSneakKeyDown(player))
|
||||
nbt.setByte("f", (byte) (0));
|
||||
else
|
||||
nbt.setByte("f", (byte) (f + 1));
|
||||
if (IC2.keyboard.isSneakKeyDown(player)) nbt.setByte("f", (byte) (0));
|
||||
else nbt.setByte("f", (byte) (f + 1));
|
||||
|
||||
if (f > 7) {
|
||||
nbt.setByte("f", (byte) 7);
|
||||
@@ -499,7 +516,14 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0);
|
||||
world.spawnParticle(
|
||||
"cloud",
|
||||
player.posX - 1 + (world.rand.nextInt(100) / 50d),
|
||||
player.posY - 1,
|
||||
player.posZ - 1 + (world.rand.nextInt(100) / 50d),
|
||||
0,
|
||||
-0.5,
|
||||
0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,7 +543,10 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
int playerY = MathHelper.floor_double(player.posY);
|
||||
int playerZ = MathHelper.floor_double(player.posZ);
|
||||
|
||||
if ((world.getBiomeGenForCoords(playerX, playerZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky(playerX, playerY, playerZ) && world.isRaining() && !player.capabilities.isCreativeMode) {
|
||||
if ((world.getBiomeGenForCoords(playerX, playerZ)).canSpawnLightningBolt()
|
||||
&& world.canBlockSeeTheSky(playerX, playerY, playerZ)
|
||||
&& world.isRaining()
|
||||
&& !player.capabilities.isCreativeMode) {
|
||||
player.motionY += -0.05;
|
||||
}
|
||||
}
|
||||
@@ -537,4 +564,4 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
public int getRunicCharge(ItemStack itemStack) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -26,9 +27,8 @@ import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemElectricGoggles extends ItemArmor implements IRunicArmor, IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor {
|
||||
public class ItemElectricGoggles extends ItemArmor
|
||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor {
|
||||
|
||||
public double maxCharge = 100000;
|
||||
public double transferLimit = 100;
|
||||
@@ -53,8 +53,7 @@ public class ItemElectricGoggles extends ItemArmor implements IRunicArmor, IElec
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
}
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
@@ -113,13 +112,15 @@ public class ItemElectricGoggles extends ItemArmor implements IRunicArmor, IElec
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
|
||||
public ArmorProperties getProperties(
|
||||
EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
|
||||
if (source.isUnblockable()) {
|
||||
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
|
||||
} else {
|
||||
double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
|
||||
int energyPerDamage = getEnergyPerDamage();
|
||||
double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
|
||||
double damageLimit =
|
||||
energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
|
||||
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@ import emt.EMT;
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.util.Keyboard;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -13,12 +17,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
public class ItemQuantumGoggles extends ItemNanoGoggles {
|
||||
|
||||
private static final Map<Integer, Integer> potionCost = new HashMap();
|
||||
|
||||
@@ -5,6 +5,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -12,9 +14,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
|
||||
|
||||
private static final Map potionCost = new HashMap();
|
||||
@@ -76,13 +75,16 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
|
||||
return;
|
||||
}
|
||||
|
||||
if (worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY + 1, (int) player.posZ) && !worldObj.isRaining()) {
|
||||
if (worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY + 1, (int) player.posZ)
|
||||
&& !worldObj.isRaining()) {
|
||||
double enerj = worldObj.isDaytime() ? (double) genDay : (double) genNight;
|
||||
|
||||
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
|
||||
if (enerj > 0) {
|
||||
if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], enerj, 4, false, false);
|
||||
if ((player.inventory.armorInventory[i] != null)
|
||||
&& (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket =
|
||||
ElectricItem.manager.charge(player.inventory.armorInventory[i], enerj, 4, false, false);
|
||||
enerj -= sentPacket;
|
||||
}
|
||||
} else {
|
||||
@@ -91,8 +93,10 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
|
||||
}
|
||||
for (int j = 0; j < player.inventory.mainInventory.length; j++) {
|
||||
if (enerj > 0) {
|
||||
if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], enerj, 4, false, false);
|
||||
if ((player.inventory.mainInventory[j] != null)
|
||||
&& (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket =
|
||||
ElectricItem.manager.charge(player.inventory.mainInventory[j], enerj, 4, false, false);
|
||||
enerj -= sentPacket;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -66,7 +66,8 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
useWings(player, stack, world, 0.11f, 0.9f, 0.9f, 0);
|
||||
}
|
||||
|
||||
public void useWings(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount) {
|
||||
public void useWings(
|
||||
EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount) {
|
||||
NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
|
||||
|
||||
boolean isJmuping = nbtData.getBoolean("isJumping");
|
||||
@@ -77,12 +78,9 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
if (isJmuping) {
|
||||
byte f = nbtData.getByte("f");
|
||||
nbtData.setBoolean("isHolding", true);
|
||||
if (IC2.keyboard.isSneakKeyDown(player))
|
||||
nbtData.setByte("f", (byte) (0));
|
||||
else
|
||||
nbtData.setByte("f", (byte) (f + 1));
|
||||
if (f > 7)
|
||||
nbtData.setByte("f", (byte) 7);
|
||||
if (IC2.keyboard.isSneakKeyDown(player)) nbtData.setByte("f", (byte) (0));
|
||||
else nbtData.setByte("f", (byte) (f + 1));
|
||||
if (f > 7) nbtData.setByte("f", (byte) 7);
|
||||
} else if (isHolding) {
|
||||
byte f = nbtData.getByte("f");
|
||||
nbtData.setBoolean("isHolding", false);
|
||||
@@ -95,7 +93,14 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
}
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0);
|
||||
world.spawnParticle(
|
||||
"cloud",
|
||||
player.posX - 1 + (world.rand.nextInt(100) / 50d),
|
||||
player.posY - 1,
|
||||
player.posZ - 1 + (world.rand.nextInt(100) / 50d),
|
||||
0,
|
||||
-0.5,
|
||||
0);
|
||||
}
|
||||
}
|
||||
nbtData.setByte("f", (byte) 0);
|
||||
@@ -110,7 +115,10 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
}
|
||||
|
||||
if (EMTConfigHandler.impactOfRain) {
|
||||
if ((world.getBiomeGenForCoords((int) player.posX, (int) player.posZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky((int) player.posX, (int) player.posY, (int) player.posZ) && world.isRaining() && !player.capabilities.isCreativeMode) {
|
||||
if ((world.getBiomeGenForCoords((int) player.posX, (int) player.posZ)).canSpawnLightningBolt()
|
||||
&& world.canBlockSeeTheSky((int) player.posX, (int) player.posY, (int) player.posZ)
|
||||
&& world.isRaining()
|
||||
&& !player.capabilities.isCreativeMode) {
|
||||
player.motionY += -0.03;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -19,8 +20,6 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectricItem, ISpecialArmor, IMetalArmor {
|
||||
|
||||
public static int maxCharge = 1000000;
|
||||
@@ -104,13 +103,15 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
|
||||
public ArmorProperties getProperties(
|
||||
EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
|
||||
if (source.isUnblockable()) {
|
||||
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 3);
|
||||
} else {
|
||||
double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
|
||||
int energyPerDamage = getEnergyPerDamage();
|
||||
double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
|
||||
double damageLimit =
|
||||
energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
|
||||
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -13,8 +14,6 @@ import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisDiscountGear, IRepairable {
|
||||
|
||||
public ItemThaumiumReinforcedWing(ArmorMaterial material, int par3, int par4) {
|
||||
|
||||
@@ -29,6 +29,8 @@ public class ItemBlockElectricCloud extends ItemBlock {
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
return EMTTextHelper.PURPLE + EMTTextHelper.BOLD + StatCollector.translateToLocal(getUnlocalizedName() + ".name");
|
||||
return EMTTextHelper.PURPLE
|
||||
+ EMTTextHelper.BOLD
|
||||
+ StatCollector.translateToLocal(getUnlocalizedName() + ".name");
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import emt.util.EMTTextHelper;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
@@ -12,8 +13,6 @@ import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
|
||||
public ItemBlockEssentiaGenerators(Block block) {
|
||||
@@ -63,46 +62,95 @@ public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
|
||||
switch (is.getItemDamage()) {
|
||||
case 0:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()) / 20 / 20)) + " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()))) + " EU");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating")
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Integer.toString(
|
||||
(int) (EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()) / 20 / 20))
|
||||
+ " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output")
|
||||
+ EMTTextHelper.LIGHT_GRAY + "128 EU/t @ "
|
||||
+ getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN
|
||||
+ StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()))) + " EU");
|
||||
break;
|
||||
|
||||
case 1:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()) / 20 / 20)) + " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) + " EU");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating")
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()) / 20 / 20))
|
||||
+ " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output")
|
||||
+ EMTTextHelper.LIGHT_GRAY + "128 EU/t @ "
|
||||
+ getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN
|
||||
+ StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) + " EU");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()) / 20 / 20)) + " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()))) + " EU");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating")
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()) / 20 / 20))
|
||||
+ " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output")
|
||||
+ EMTTextHelper.LIGHT_GRAY + "128 EU/t @ "
|
||||
+ getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN
|
||||
+ StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()))) + " EU");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag()) / 20 / 20)) + " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) + " EU");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating")
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag()) / 20 / 20))
|
||||
+ " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output")
|
||||
+ EMTTextHelper.LIGHT_GRAY + "128 EU/t @ "
|
||||
+ getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN
|
||||
+ StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) + " EU");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()) / 20 / 20)) + " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()))) + " EU");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating")
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()) / 20 / 20))
|
||||
+ " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output")
|
||||
+ EMTTextHelper.LIGHT_GRAY + "128 EU/t @ "
|
||||
+ getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN
|
||||
+ StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()))) + " EU");
|
||||
break;
|
||||
|
||||
case 5:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating") + EMTTextHelper.LIGHT_GRAY + Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()) / 20 / 20)) + " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output") + EMTTextHelper.LIGHT_GRAY + "128 EU/t @ " + getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": " + EMTTextHelper.LIGHT_GRAY + Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()))) + " EU");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Generating")
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Integer.toString((int) (EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()) / 20 / 20))
|
||||
+ " EU/t");
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.Output")
|
||||
+ EMTTextHelper.LIGHT_GRAY + "128 EU/t @ "
|
||||
+ getOutputAmperage(EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag())) + " A");
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN
|
||||
+ StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()))) + " EU");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
list.add(EMTTextHelper.YELLOW + StatCollector.translateToLocal("emt.Storage") + EMTTextHelper.LIGHT_GRAY + Double.toString(EMTConfigHandler.EssentiaGeneratorStorage) + " EU");
|
||||
} else
|
||||
list.add(StatCollector.translateToLocal("emt.PressShift"));
|
||||
list.add(EMTTextHelper.YELLOW + StatCollector.translateToLocal("emt.Storage") + EMTTextHelper.LIGHT_GRAY
|
||||
+ Double.toString(EMTConfigHandler.EssentiaGeneratorStorage) + " EU");
|
||||
} else list.add(StatCollector.translateToLocal("emt.PressShift"));
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
package emt.item.block;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBlockMachines extends ItemBlock {
|
||||
|
||||
public ItemBlockMachines(Block id) {
|
||||
@@ -54,6 +53,5 @@ public class ItemBlockMachines extends ItemBlock {
|
||||
p_77624_3_.add("Added by bartimaeusnek");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
package emt.item.block;
|
||||
|
||||
import static emt.util.EMTTextHelper.localize;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.block.BlockBaseContainer;
|
||||
import emt.tile.solar.Solars;
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import java.io.StringReader;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
@@ -15,11 +19,6 @@ import net.minecraft.util.StringTranslate;
|
||||
import org.apache.commons.io.input.ReaderInputStream;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.util.List;
|
||||
|
||||
import static emt.util.EMTTextHelper.localize;
|
||||
|
||||
public class ItemBlockSolars extends ItemBlock {
|
||||
|
||||
int instance;
|
||||
@@ -33,7 +32,8 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack) {
|
||||
final String solarName = Solars.getNameFromSolar(this.instance, itemstack.getItemDamage());
|
||||
final String unlocalizedName = "tile." + EMT.MOD_ID + "." + Solars.getUnlocalizedName(this.instance, itemstack.getItemDamage());
|
||||
final String unlocalizedName =
|
||||
"tile." + EMT.MOD_ID + "." + Solars.getUnlocalizedName(this.instance, itemstack.getItemDamage());
|
||||
final String unlocalizedKey = unlocalizedName + ".name";
|
||||
if (!StatCollector.canTranslate(unlocalizedKey))
|
||||
StringTranslate.inject(new ReaderInputStream(new StringReader(unlocalizedKey + "=" + solarName)));
|
||||
@@ -63,81 +63,149 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
list.add(EMTConfigHandler.tripleCompressedSolarOutput + localize("tooltip.EMT.euPerTick"));
|
||||
break;
|
||||
}
|
||||
case 3: {//aqua
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
case 3: { // aqua
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
break;
|
||||
}
|
||||
|
||||
case 6: {//dark
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
case 6: { // dark
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 7: {
|
||||
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 9: {//ordo
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
case 9: { // ordo
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
|
||||
case 11: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 12: {//fire
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether"));
|
||||
case 12: { // fire
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " "
|
||||
+ localize("tooltip.EMT.output.double.lava"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " "
|
||||
+ localize("tooltip.EMT.output.double.nether"));
|
||||
break;
|
||||
}
|
||||
case 13: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " "
|
||||
+ localize("tooltip.EMT.output.double.lava"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " "
|
||||
+ localize("tooltip.EMT.output.double.nether"));
|
||||
break;
|
||||
}
|
||||
case 14: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " "
|
||||
+ localize("tooltip.EMT.output.double.lava"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " "
|
||||
+ localize("tooltip.EMT.output.double.nether"));
|
||||
break;
|
||||
}
|
||||
case 15: {//aer
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
case 15: { // aer
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@@ -148,28 +216,43 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
} else if (instance == 1) {
|
||||
switch (itemstack.getItemDamage()) {
|
||||
case 0: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
break;
|
||||
}
|
||||
case 2: {//terra
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
case 2: { // terra
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@@ -180,39 +263,65 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
} else {
|
||||
switch (te.aspect) {
|
||||
case 1:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
case 2:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + (0.75F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
case 3:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
break;
|
||||
case 4:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
break;
|
||||
case 5:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (3F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + (6F * te.output) + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (3F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (6F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.thunder"));
|
||||
break;
|
||||
case 6:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " " + localize("tooltip.EMT.output.double.lava"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " "
|
||||
+ localize("tooltip.EMT.output.double.lava"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " "
|
||||
+ localize("tooltip.EMT.output.double.nether"));
|
||||
break;
|
||||
default:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.OutputMax") + " " + EMTTextHelper.LIGHT_GRAY + te.calculateMaxVoltAmp()[0] + "EU/t @ " + te.calculateMaxVoltAmp()[1] + "A");
|
||||
} else
|
||||
list.add(StatCollector.translateToLocal("emt.PressShift"));
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.OutputMax") + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.calculateMaxVoltAmp()[0] + "EU/t @ " + te.calculateMaxVoltAmp()[1]
|
||||
+ "A");
|
||||
} else list.add(StatCollector.translateToLocal("emt.PressShift"));
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package emt.item.focus;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
@@ -15,8 +16,6 @@ import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
|
||||
public IIcon ornament;
|
||||
@@ -75,20 +74,20 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, MovingObjectPosition paramMovingObjectPosition) {
|
||||
if (isUseItem(paramItemStack))
|
||||
paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
|
||||
public ItemStack onFocusRightClick(
|
||||
ItemStack paramItemStack,
|
||||
World paramWorld,
|
||||
EntityPlayer paramEntityPlayer,
|
||||
MovingObjectPosition paramMovingObjectPosition) {
|
||||
if (isUseItem(paramItemStack)) paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
|
||||
return paramItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
|
||||
|
||||
}
|
||||
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {}
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {
|
||||
}
|
||||
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
@@ -116,4 +115,4 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package emt.item.focus;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import java.util.Map.Entry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
@@ -12,11 +13,15 @@ import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class ItemChargeFocus extends ItemBaseFocus {
|
||||
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10);
|
||||
private static final AspectList visCost = new AspectList()
|
||||
.add(Aspect.FIRE, 10)
|
||||
.add(Aspect.WATER, 10)
|
||||
.add(Aspect.AIR, 10)
|
||||
.add(Aspect.EARTH, 10)
|
||||
.add(Aspect.ORDER, 10)
|
||||
.add(Aspect.ENTROPY, 10);
|
||||
|
||||
public ItemChargeFocus() {
|
||||
super("charge");
|
||||
@@ -31,7 +36,8 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
AspectList actualCost = new AspectList();
|
||||
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet())
|
||||
actualCost.add(e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
actualCost.add(
|
||||
e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
return visCost;
|
||||
}
|
||||
|
||||
@@ -41,7 +47,7 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[]{FocusUpgradeType.potency, FocusUpgradeType.frugal};
|
||||
return new FocusUpgradeType[] {FocusUpgradeType.potency, FocusUpgradeType.frugal};
|
||||
}
|
||||
|
||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
||||
@@ -49,16 +55,21 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) {
|
||||
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)) {
|
||||
if (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
if (!world.isRemote) {
|
||||
|
||||
int energyLeft = (int) (EMTConfigHandler.chargeFocusProduction * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
int energyLeft = (int) (EMTConfigHandler.chargeFocusProduction
|
||||
* Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
|
||||
if (energyLeft > 0) {
|
||||
if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false);
|
||||
if ((player.inventory.armorInventory[i] != null)
|
||||
&& (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(
|
||||
player.inventory.armorInventory[i], energyLeft, 4, false, false);
|
||||
energyLeft -= sentPacket;
|
||||
}
|
||||
} else {
|
||||
@@ -67,8 +78,10 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
}
|
||||
for (int j = 0; j < player.inventory.mainInventory.length; j++) {
|
||||
if (energyLeft > 0) {
|
||||
if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false);
|
||||
if ((player.inventory.mainInventory[j] != null)
|
||||
&& (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) {
|
||||
double sentPacket = ElectricItem.manager.charge(
|
||||
player.inventory.mainInventory[j], energyLeft, 4, false, false);
|
||||
energyLeft -= sentPacket;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -11,7 +11,8 @@ import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class ItemChristmasFocus extends ItemBaseFocus {
|
||||
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 500).add(Aspect.AIR, 500);
|
||||
private static final AspectList visCost =
|
||||
new AspectList().add(Aspect.ORDER, 500).add(Aspect.AIR, 500);
|
||||
|
||||
public ItemChristmasFocus() {
|
||||
super("christmas");
|
||||
@@ -33,13 +34,15 @@ public class ItemChristmasFocus extends ItemBaseFocus {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
public ItemStack onFocusRightClick(
|
||||
ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
if ((mop != null) && (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)) {
|
||||
int x = mop.blockX;
|
||||
int y = mop.blockY + 1;
|
||||
int z = mop.blockZ;
|
||||
if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
if (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
if (!world.isRemote) {
|
||||
EntitySnowman snowman;
|
||||
snowman = new EntitySnowman(world);
|
||||
|
||||
@@ -41,12 +41,15 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
|
||||
return stack;
|
||||
}
|
||||
|
||||
float rotX = (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)) * 100;
|
||||
float rotX = (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI)
|
||||
* MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI))
|
||||
* 100;
|
||||
float rotY = (-MathHelper.sin(player.rotationPitch / 180.0F * (float) Math.PI)) * 100;
|
||||
float rotZ = (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)) * 100;
|
||||
float rotZ = (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)
|
||||
* MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI))
|
||||
* 100;
|
||||
world.spawnEntityInWorld(new EntityEnergyBall(world, player, rotX, rotY, rotZ));
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,8 @@ import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200);
|
||||
private static final AspectList visCost =
|
||||
new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200);
|
||||
|
||||
public ItemExplosionFocus() {
|
||||
super("explosion");
|
||||
@@ -33,9 +34,11 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) {
|
||||
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)) {
|
||||
if (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
if (!world.isRemote) {
|
||||
EntityLaser laser;
|
||||
laser = new EntityLaser(world, player, 1);
|
||||
@@ -47,7 +50,7 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[]{FocusUpgradeType.potency, FocusUpgradeType.frugal};
|
||||
return new FocusUpgradeType[] {FocusUpgradeType.potency, FocusUpgradeType.frugal};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,6 +60,4 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package emt.item.focus;
|
||||
|
||||
import emt.entity.EntityShield;
|
||||
import ic2.core.IC2;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
@@ -11,10 +12,9 @@ import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
public class ItemShieldFocus extends ItemBaseFocus {
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.AIR, 5);
|
||||
private static final AspectList visCost =
|
||||
new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.AIR, 5);
|
||||
|
||||
public ItemShieldFocus() {
|
||||
super("shield");
|
||||
@@ -46,16 +46,20 @@ public class ItemShieldFocus extends ItemBaseFocus {
|
||||
for (PotionEffect effect : new LinkedList<PotionEffect>(player.getActivePotionEffects())) {
|
||||
IC2.platform.removePotion(player, effect.getPotionID());
|
||||
}
|
||||
if (!player.capabilities.isCreativeMode && !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
if (!player.capabilities.isCreativeMode
|
||||
&& !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
player.stopUsingItem();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition paramMovingObjectPosition) {
|
||||
public ItemStack onFocusRightClick(
|
||||
ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition paramMovingObjectPosition) {
|
||||
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))) {
|
||||
if (!world.isRemote
|
||||
&& (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true))) {
|
||||
EntityShield shield = new EntityShield(world, player);
|
||||
world.spawnEntityInWorld(shield);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package emt.item.focus;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import java.util.Map.Entry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
@@ -9,11 +10,15 @@ import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
|
||||
AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10);
|
||||
AspectList visCost = new AspectList()
|
||||
.add(Aspect.FIRE, 10)
|
||||
.add(Aspect.WATER, 10)
|
||||
.add(Aspect.AIR, 10)
|
||||
.add(Aspect.EARTH, 10)
|
||||
.add(Aspect.ORDER, 10)
|
||||
.add(Aspect.ENTROPY, 10);
|
||||
|
||||
public ItemWandChargingFocus() {
|
||||
super("chargeWand");
|
||||
@@ -38,12 +43,13 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
AspectList actualCost = new AspectList();
|
||||
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet())
|
||||
actualCost.add(e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
actualCost.add(
|
||||
e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
return visCost;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[]{FocusUpgradeType.potency, FocusUpgradeType.frugal};
|
||||
return new FocusUpgradeType[] {FocusUpgradeType.potency, FocusUpgradeType.frugal};
|
||||
}
|
||||
|
||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
||||
@@ -58,7 +64,10 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
|
||||
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)))) {
|
||||
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);
|
||||
|
||||
@@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -20,8 +21,6 @@ import thaumcraft.common.blocks.BlockCustomPlant;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
|
||||
|
||||
public IIcon icon;
|
||||
@@ -65,14 +64,25 @@ public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) {
|
||||
public boolean onItemUse(
|
||||
ItemStack stack,
|
||||
EntityPlayer player,
|
||||
World world,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
int par7,
|
||||
float par8,
|
||||
float par9,
|
||||
float par10) {
|
||||
if (stack.hasTagCompound()) {
|
||||
stack.stackTagCompound.setBoolean("Unbreakable", true);
|
||||
}
|
||||
boolean did = false;
|
||||
for (int x1 = -1; x1 <= 1; x1++) {
|
||||
for (int z1 = -1; z1 <= 1; z1++) {
|
||||
if (ElectricItem.manager.canUse(stack, 25) && super.onItemUse(stack, player, world, x + x1, y, z + z1, par7, par8, par9, par10)) {
|
||||
if (ElectricItem.manager.canUse(stack, 25)
|
||||
&& super.onItemUse(stack, player, world, x + x1, y, z + z1, par7, par8, par9, par10)) {
|
||||
ElectricItem.manager.use(stack, 25, player);
|
||||
Thaumcraft.proxy.blockSparkle(world, x + x1, y, z + z1, 8401408, 2);
|
||||
if (!did) {
|
||||
@@ -100,7 +110,8 @@ public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
|
||||
Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 3);
|
||||
}
|
||||
if (did) {
|
||||
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wand", 0.75F, 0.9F + world.rand.nextFloat() * 0.2F);
|
||||
world.playSoundEffect(
|
||||
x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wand", 0.75F, 0.9F + world.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
if (stack.hasTagCompound()) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -22,8 +23,6 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
|
||||
|
||||
private final int hitCost = 5000;
|
||||
@@ -69,7 +68,8 @@ public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
|
||||
list.add(EMTTextHelper.localize("tooltip.EMT.hammer.electric").replace("%player%", player.getCommandSenderName()));
|
||||
list.add(EMTTextHelper.localize("tooltip.EMT.hammer.electric")
|
||||
.replace("%player%", player.getCommandSenderName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -19,8 +20,6 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemThorHammer extends ItemSword implements IRepairable {
|
||||
|
||||
public ItemThorHammer() {
|
||||
|
||||
@@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -15,8 +16,6 @@ import org.lwjgl.input.Keyboard;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.common.entities.projectile.EntityAlumentum;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemThorHammerBroken extends ItemSword implements IRepairable {
|
||||
|
||||
public ItemThorHammerBroken() {
|
||||
|
||||
@@ -8,6 +8,9 @@ import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.util.StackUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockTorch;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -31,10 +34,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
|
||||
public int maxCharge = 50000;
|
||||
@@ -57,14 +56,17 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
ElectricItem.manager.use(stack, cost, entityLiving);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack stack) {
|
||||
return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack);
|
||||
return Items.diamond_axe.canHarvestBlock(block, stack)
|
||||
|| Items.diamond_sword.canHarvestBlock(block, stack)
|
||||
|| Items.shears.canHarvestBlock(block, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,7 +75,8 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F) {
|
||||
if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F) {
|
||||
return efficiencyOnProperMaterial;
|
||||
} else {
|
||||
return super.getDigSpeed(stack, block, meta);
|
||||
@@ -102,7 +105,17 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
public boolean onItemUse(
|
||||
ItemStack stack,
|
||||
EntityPlayer player,
|
||||
World world,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
int side,
|
||||
float xOffset,
|
||||
float yOffset,
|
||||
float zOffset) {
|
||||
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
|
||||
ItemStack torchStack = player.inventory.mainInventory[i];
|
||||
if (torchStack == null) {
|
||||
@@ -170,7 +183,13 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
if (block instanceof IShearable) {
|
||||
IShearable target = (IShearable) block;
|
||||
if (target.isShearable(itemstack, player.worldObj, x, y, z)) {
|
||||
ArrayList<ItemStack> drops = target.onSheared(itemstack, player.worldObj, x, y, z, EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack));
|
||||
ArrayList<ItemStack> drops = target.onSheared(
|
||||
itemstack,
|
||||
player.worldObj,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack));
|
||||
Random rand = new Random();
|
||||
|
||||
for (ItemStack stack : drops) {
|
||||
@@ -178,7 +197,8 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
double xOffset = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
||||
double yOffset = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
||||
double zOffset = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
||||
EntityItem entityitem = new EntityItem(player.worldObj, (double) x + xOffset, (double) y + yOffset, (double) z + zOffset, stack);
|
||||
EntityItem entityitem = new EntityItem(
|
||||
player.worldObj, (double) x + xOffset, (double) y + yOffset, (double) z + zOffset, stack);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
player.worldObj.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
@@ -201,8 +221,15 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
}
|
||||
if (entity instanceof IShearable) {
|
||||
IShearable target = (IShearable) entity;
|
||||
if (target.isShearable(itemstack, entity.worldObj, (int) entity.posX, (int) entity.posY, (int) entity.posZ)) {
|
||||
ArrayList<ItemStack> drops = target.onSheared(itemstack, entity.worldObj, (int) entity.posX, (int) entity.posY, (int) entity.posZ, EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack));
|
||||
if (target.isShearable(
|
||||
itemstack, entity.worldObj, (int) entity.posX, (int) entity.posY, (int) entity.posZ)) {
|
||||
ArrayList<ItemStack> drops = target.onSheared(
|
||||
itemstack,
|
||||
entity.worldObj,
|
||||
(int) entity.posX,
|
||||
(int) entity.posY,
|
||||
(int) entity.posZ,
|
||||
EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack));
|
||||
|
||||
Random rand = new Random();
|
||||
for (ItemStack stack : drops) {
|
||||
@@ -225,7 +252,6 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
if (!nbt.hasKey("shearsMode")) {
|
||||
nbt.setBoolean("shearsMode", true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -16,9 +18,6 @@ import thaumcraft.common.lib.network.fx.PacketFXBlockBubble;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
|
||||
|
||||
public static ArrayList oreDictLogs = new ArrayList();
|
||||
@@ -50,9 +49,21 @@ public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) {
|
||||
public boolean onItemUse(
|
||||
ItemStack itemstack,
|
||||
EntityPlayer player,
|
||||
World world,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
int par7,
|
||||
float par8,
|
||||
float par9,
|
||||
float par10) {
|
||||
Block bi = world.getBlock(x, y, z);
|
||||
if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z)) && ElectricItem.manager.getCharge(itemstack) > cost) {
|
||||
if ((!player.isSneaking())
|
||||
&& (Utils.isWoodLog(world, x, y, z))
|
||||
&& ElectricItem.manager.getCharge(itemstack) > cost) {
|
||||
if (!world.isRemote) {
|
||||
if (BlockUtils.breakFurthestBlock(world, x, y, z, bi, player)) {
|
||||
world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F);
|
||||
@@ -75,7 +86,9 @@ public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
|
||||
if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z))) {
|
||||
if (!world.isRemote) {
|
||||
BlockUtils.breakFurthestBlock(world, x, y, z, bi, player);
|
||||
PacketHandler.INSTANCE.sendToAllAround(new PacketFXBlockBubble(x, y, z, new Color(0.33F, 0.33F, 1.0F).getRGB()), new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32.0D));
|
||||
PacketHandler.INSTANCE.sendToAllAround(
|
||||
new PacketFXBlockBubble(x, y, z, new Color(0.33F, 0.33F, 1.0F).getRGB()),
|
||||
new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32.0D));
|
||||
|
||||
world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@ public class ItemThaumiumChainsaw extends ItemDiamondChainsaw {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
ElectricItem.manager.use(stack, cost, entityLiving);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -27,14 +30,43 @@ import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.entities.EntityFollowingItem;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
|
||||
private static final Block[] isEffective = {Blocks.nether_brick, Blocks.netherrack, Blocks.glowstone, Blocks.iron_block, Blocks.gold_block, Blocks.diamond_block, Blocks.lapis_block, Blocks.redstone_block, Blocks.redstone_ore, Blocks.emerald_ore, Blocks.emerald_block, Blocks.stonebrick, Blocks.glass, Blocks.stone, Blocks.gold_ore, Blocks.iron_ore, Blocks.coal_ore, Blocks.cobblestone,
|
||||
Blocks.diamond_ore, Blocks.lapis_ore, Blocks.dirt, Blocks.gravel, Blocks.sand, Blocks.sandstone, Blocks.soul_sand, Blocks.clay, Blocks.grass, Blocks.snow_layer, Blocks.snow, Blocks.farmland, Blocks.hardened_clay, Blocks.stained_hardened_clay, Blocks.mossy_cobblestone};
|
||||
private static final Block[] isEffective = {
|
||||
Blocks.nether_brick,
|
||||
Blocks.netherrack,
|
||||
Blocks.glowstone,
|
||||
Blocks.iron_block,
|
||||
Blocks.gold_block,
|
||||
Blocks.diamond_block,
|
||||
Blocks.lapis_block,
|
||||
Blocks.redstone_block,
|
||||
Blocks.redstone_ore,
|
||||
Blocks.emerald_ore,
|
||||
Blocks.emerald_block,
|
||||
Blocks.stonebrick,
|
||||
Blocks.glass,
|
||||
Blocks.stone,
|
||||
Blocks.gold_ore,
|
||||
Blocks.iron_ore,
|
||||
Blocks.coal_ore,
|
||||
Blocks.cobblestone,
|
||||
Blocks.diamond_ore,
|
||||
Blocks.lapis_ore,
|
||||
Blocks.dirt,
|
||||
Blocks.gravel,
|
||||
Blocks.sand,
|
||||
Blocks.sandstone,
|
||||
Blocks.soul_sand,
|
||||
Blocks.clay,
|
||||
Blocks.grass,
|
||||
Blocks.snow_layer,
|
||||
Blocks.snow,
|
||||
Blocks.farmland,
|
||||
Blocks.hardened_clay,
|
||||
Blocks.stained_hardened_clay,
|
||||
Blocks.mossy_cobblestone
|
||||
};
|
||||
public int searchCost = 1000;
|
||||
public int hitCost = 400;
|
||||
int side;
|
||||
@@ -71,7 +103,8 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
|
||||
@Override
|
||||
public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player) {
|
||||
MovingObjectPosition movingobjectposition = BlockUtils.getTargetBlock(((Entity) (player)).worldObj, player, true);
|
||||
MovingObjectPosition movingobjectposition =
|
||||
BlockUtils.getTargetBlock(((Entity) (player)).worldObj, player, true);
|
||||
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectType.BLOCK) {
|
||||
side = movingobjectposition.sideHit;
|
||||
}
|
||||
@@ -79,7 +112,8 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) {
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) {
|
||||
if (EMTConfigHandler.toolsInBore == false) {
|
||||
cost = 350;
|
||||
} else {
|
||||
@@ -120,14 +154,24 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
world.setBlockToAir(x + xx, y + yy, z + zz);
|
||||
ArrayList ret = bl.getDrops(world, x + xx, y + yy, z + zz, md, fortune);
|
||||
boolean creative = false;
|
||||
if ((entityLiving instanceof EntityPlayer) && ((EntityPlayer) entityLiving).capabilities.isCreativeMode) {
|
||||
if ((entityLiving instanceof EntityPlayer)
|
||||
&& ((EntityPlayer) entityLiving).capabilities.isCreativeMode) {
|
||||
creative = true;
|
||||
}
|
||||
if (ret.size() <= 0 || creative || ((Entity) (entityLiving)).worldObj.isRemote) {
|
||||
continue;
|
||||
}
|
||||
ItemStack is;
|
||||
for (Iterator i$ = ret.iterator(); i$.hasNext(); world.spawnEntityInWorld(new EntityFollowingItem(world, (double) x + (double) xx + 0.5D, (double) y + (double) yy + 0.5D, (double) z + (double) zz + 0.5D, is, entityLiving, 3))) {
|
||||
for (Iterator i$ = ret.iterator();
|
||||
i$.hasNext();
|
||||
world.spawnEntityInWorld(new EntityFollowingItem(
|
||||
world,
|
||||
(double) x + (double) xx + 0.5D,
|
||||
(double) y + (double) yy + 0.5D,
|
||||
(double) z + (double) zz + 0.5D,
|
||||
is,
|
||||
entityLiving,
|
||||
3))) {
|
||||
is = (ItemStack) i$.next();
|
||||
}
|
||||
}
|
||||
@@ -137,11 +181,25 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
public boolean onItemUse(
|
||||
ItemStack stack,
|
||||
EntityPlayer player,
|
||||
World world,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
int side,
|
||||
float xOffset,
|
||||
float yOffset,
|
||||
float zOffset) {
|
||||
if (!player.isSneaking()) {
|
||||
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
|
||||
ItemStack torchStack = player.inventory.mainInventory[i];
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) {
|
||||
if (torchStack == null
|
||||
|| !torchStack
|
||||
.getUnlocalizedName()
|
||||
.toLowerCase(Locale.US)
|
||||
.contains("torch")) {
|
||||
continue;
|
||||
}
|
||||
Item item = torchStack.getItem();
|
||||
@@ -150,7 +208,8 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
}
|
||||
int oldMeta = torchStack.getItemDamage();
|
||||
int oldSize = torchStack.stackSize;
|
||||
boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
|
||||
boolean result =
|
||||
torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
|
||||
if (player.capabilities.isCreativeMode) {
|
||||
torchStack.setItemDamage(oldMeta);
|
||||
torchStack.stackSize = oldSize;
|
||||
@@ -165,7 +224,13 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
} else {
|
||||
ElectricItem.manager.use(stack, searchCost, player);
|
||||
if (!world.isRemote) {
|
||||
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F);
|
||||
world.playSoundEffect(
|
||||
x + 0.5D,
|
||||
y + 0.5D,
|
||||
z + 0.5D,
|
||||
"thaumcraft:wandfail",
|
||||
0.2F,
|
||||
0.2F + world.rand.nextFloat() * 0.2F);
|
||||
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, xOffset, zOffset);
|
||||
}
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
@@ -178,7 +243,9 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
}
|
||||
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
|
||||
if (!((Entity) (player)).worldObj.isRemote && (!(entity instanceof EntityPlayer) || MinecraftServer.getServer().isPVPEnabled())) {
|
||||
if (!((Entity) (player)).worldObj.isRemote
|
||||
&& (!(entity instanceof EntityPlayer)
|
||||
|| MinecraftServer.getServer().isPVPEnabled())) {
|
||||
entity.setFire(2);
|
||||
}
|
||||
return super.onLeftClickEntity(stack, player, entity);
|
||||
|
||||
@@ -6,6 +6,7 @@ import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -18,8 +19,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
|
||||
|
||||
public int maxCharge = 100000;
|
||||
@@ -59,7 +58,8 @@ public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
if (EMTConfigHandler.toolsInBore == false) {
|
||||
cost = 250;
|
||||
} else {
|
||||
@@ -71,7 +71,8 @@ public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack stack) {
|
||||
return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.canHarvestBlock(block, stack);
|
||||
return Items.diamond_pickaxe.canHarvestBlock(block, stack)
|
||||
|| Items.diamond_shovel.canHarvestBlock(block, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,7 +81,8 @@ public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
if (Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) {
|
||||
if (Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) {
|
||||
return efficiencyOnProperMaterial;
|
||||
} else {
|
||||
return super.getDigSpeed(stack, block, meta);
|
||||
|
||||
@@ -36,7 +36,8 @@ public class ItemOmnitoolDiamond extends ItemOmnitoolIron {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
if (!EMTConfigHandler.toolsInBore) {
|
||||
cost = 200;
|
||||
} else {
|
||||
|
||||
@@ -6,6 +6,8 @@ import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -21,9 +23,6 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
|
||||
|
||||
public int maxCharge = 50000;
|
||||
@@ -62,7 +61,8 @@ public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
if (!EMTConfigHandler.toolsInBore) {
|
||||
cost = 100;
|
||||
} else {
|
||||
@@ -74,7 +74,11 @@ public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack stack) {
|
||||
return Items.iron_axe.canHarvestBlock(block, stack) || Items.iron_sword.canHarvestBlock(block, stack) || Items.iron_pickaxe.canHarvestBlock(block, stack) || Items.iron_shovel.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack);
|
||||
return Items.iron_axe.canHarvestBlock(block, stack)
|
||||
|| Items.iron_sword.canHarvestBlock(block, stack)
|
||||
|| Items.iron_pickaxe.canHarvestBlock(block, stack)
|
||||
|| Items.iron_shovel.canHarvestBlock(block, stack)
|
||||
|| Items.shears.canHarvestBlock(block, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,7 +87,11 @@ public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F || Items.shears.getDigSpeed(stack, block, meta) > 1.0F) {
|
||||
if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.shears.getDigSpeed(stack, block, meta) > 1.0F) {
|
||||
return efficiencyOnProperMaterial;
|
||||
} else {
|
||||
return super.getDigSpeed(stack, block, meta);
|
||||
@@ -99,10 +107,21 @@ public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
public boolean onItemUse(
|
||||
ItemStack stack,
|
||||
EntityPlayer player,
|
||||
World world,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
int side,
|
||||
float xOffset,
|
||||
float yOffset,
|
||||
float zOffset) {
|
||||
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
|
||||
ItemStack torchStack = player.inventory.mainInventory[i];
|
||||
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) {
|
||||
if (torchStack == null
|
||||
|| !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) {
|
||||
continue;
|
||||
}
|
||||
Item item = torchStack.getItem();
|
||||
|
||||
@@ -36,7 +36,8 @@ public class ItemOmnitoolThaumium extends ItemOmnitoolDiamond {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
if (!EMTConfigHandler.toolsInBore) {
|
||||
cost = 300;
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package emt.nei;
|
||||
|
||||
import static emt.nei.NEI_Config.isAdded;
|
||||
|
||||
import codechicken.nei.recipe.GuiCraftingRecipe;
|
||||
import codechicken.nei.recipe.GuiUsageRecipe;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
@@ -8,18 +10,16 @@ import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.util.GT_Recipe;
|
||||
import gregtech.nei.GT_NEI_DefaultHandler;
|
||||
|
||||
import static emt.nei.NEI_Config.isAdded;
|
||||
|
||||
public class FusionCraftingHandler extends GT_NEI_DefaultHandler {
|
||||
// TODO: BETTER GUI <3
|
||||
public FusionCraftingHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) {
|
||||
super(aRecipeMap);
|
||||
if (!isAdded) {
|
||||
FMLInterModComms.sendRuntimeMessage(
|
||||
GT_Values.GT,
|
||||
"NEIPlugins",
|
||||
"register-crafting-handler",
|
||||
"emt@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
|
||||
GT_Values.GT,
|
||||
"NEIPlugins",
|
||||
"register-crafting-handler",
|
||||
"emt@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
|
||||
GuiCraftingRecipe.craftinghandlers.add(this);
|
||||
GuiUsageRecipe.usagehandlers.add(this);
|
||||
}
|
||||
|
||||
@@ -10,18 +10,26 @@ public class PacketEMTKeys implements IMessage, IMessageHandler<PacketEMTKeys, I
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketEMTKeys message, MessageContext ctx) {
|
||||
if (ctx.getServerHandler().playerEntity.inventory.armorInventory[2] != null && ctx.getServerHandler().playerEntity.inventory.armorInventory[2].getItem() == EMTItems.quantumArmor) {
|
||||
ctx.getServerHandler().playerEntity.inventory.armorInventory[2].stackTagCompound.setBoolean("unequip", true);
|
||||
if (ctx.getServerHandler().playerEntity.inventory.armorInventory[2] != null
|
||||
&& ctx.getServerHandler()
|
||||
.playerEntity
|
||||
.inventory
|
||||
.armorInventory[2]
|
||||
.getItem()
|
||||
== EMTItems.quantumArmor) {
|
||||
ctx.getServerHandler()
|
||||
.playerEntity
|
||||
.inventory
|
||||
.armorInventory[2]
|
||||
.stackTagCompound
|
||||
.setBoolean("unequip", true);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
|
||||
}
|
||||
public void fromBytes(ByteBuf buf) {}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
}
|
||||
public void toBytes(ByteBuf buf) {}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package emt.network;
|
||||
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
@@ -58,7 +57,8 @@ public class PacketNodeInfo implements IMessage, IMessageHandler<PacketNodeInfo,
|
||||
if (tileEntity instanceof IGregTechTileEntity) {
|
||||
IGregTechTileEntity gtTile = (IGregTechTileEntity) tileEntity;
|
||||
if (gtTile.getMetaTileEntity() instanceof GT_MetaTileEntity_ResearchCompleter) {
|
||||
GT_MetaTileEntity_ResearchCompleter researchCompleter = (GT_MetaTileEntity_ResearchCompleter) gtTile.getMetaTileEntity();
|
||||
GT_MetaTileEntity_ResearchCompleter researchCompleter =
|
||||
(GT_MetaTileEntity_ResearchCompleter) gtTile.getMetaTileEntity();
|
||||
researchCompleter.setNodeValues(message.nodeDistance, message.nodeColor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,14 +26,12 @@ public class ClientProxy extends CommonProxy {
|
||||
Render empty = new Render() {
|
||||
|
||||
@Override
|
||||
public void doRender(Entity e, double x, double y, double z, float f1, float f2) {
|
||||
}
|
||||
public void doRender(Entity e, double x, double y, double z, float f1, float f2) {}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser());
|
||||
|
||||
@@ -34,7 +34,8 @@ public class CommonProxy implements IGuiHandler {
|
||||
switch (ID) {
|
||||
case 0:
|
||||
if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) {
|
||||
return new ContainerIndustrialWandRecharge(player.inventory, (TileEntityIndustrialWandRecharge) entity);
|
||||
return new ContainerIndustrialWandRecharge(
|
||||
player.inventory, (TileEntityIndustrialWandRecharge) entity);
|
||||
}
|
||||
case 1:
|
||||
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
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 com.gtnewhorizon.structurelib.structure.IStructureDefinition;
|
||||
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.network.PacketNodeInfo;
|
||||
import gregtech.api.GregTech_API;
|
||||
@@ -16,6 +18,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMul
|
||||
import gregtech.api.render.TextureFactory;
|
||||
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -31,13 +34,8 @@ import thaumcraft.common.lib.research.ResearchManager;
|
||||
import thaumcraft.common.lib.research.ResearchNoteData;
|
||||
import thaumcraft.common.tiles.TileNode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
|
||||
import static gregtech.api.enums.Textures.BlockIcons.*;
|
||||
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
|
||||
|
||||
public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_ResearchCompleter> {
|
||||
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;
|
||||
@@ -51,7 +49,7 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
protected int mCasing;
|
||||
protected boolean endFound;
|
||||
|
||||
//For displaying beam
|
||||
// For displaying beam
|
||||
private int lastNodeDistance;
|
||||
private int lastNodeColor;
|
||||
private int syncTimer;
|
||||
@@ -60,42 +58,52 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
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();
|
||||
|
||||
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);
|
||||
@@ -123,7 +131,7 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
super.loadNBTData(aNBT);
|
||||
}
|
||||
|
||||
//For client beam animation
|
||||
// For client beam animation
|
||||
public void setNodeValues(int nodeDistance, int nodeColor) {
|
||||
this.lastNodeDistance = nodeDistance;
|
||||
this.lastNodeColor = nodeColor;
|
||||
@@ -139,7 +147,19 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
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);
|
||||
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;
|
||||
@@ -152,7 +172,7 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
@Override
|
||||
public boolean onRunningTick(ItemStack aStack) {
|
||||
float progressAmount = ((float) this.mProgresstime) / this.mMaxProgresstime;
|
||||
int requiredVis = (int)Math.ceil(progressAmount * recipeAspectCost - aspectsAbsorbed);
|
||||
int requiredVis = (int) Math.ceil(progressAmount * recipeAspectCost - aspectsAbsorbed);
|
||||
syncTimer--;
|
||||
|
||||
IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
|
||||
@@ -161,7 +181,7 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
int i = 1;
|
||||
|
||||
//Loop through node spaces and drain them from front to back
|
||||
// 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;
|
||||
@@ -169,7 +189,7 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
TileEntity tileEntity = aBaseMetaTileEntity.getWorld().getTileEntity(nodeX, nodeY, nodeZ);
|
||||
|
||||
if (tileEntity instanceof TileNode) {
|
||||
TileNode aNode = (TileNode)tileEntity;
|
||||
TileNode aNode = (TileNode) tileEntity;
|
||||
AspectList aspectsBase = aNode.getAspectsBase();
|
||||
|
||||
for (Aspect aspect : aspectsBase.getAspects()) {
|
||||
@@ -188,8 +208,7 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
}
|
||||
}
|
||||
|
||||
if (aspectsBase.visSize() <= 0)
|
||||
aBaseMetaTileEntity.getWorld().setBlockToAir(nodeX, nodeY, nodeZ);
|
||||
if (aspectsBase.visSize() <= 0) aBaseMetaTileEntity.getWorld().setBlockToAir(nodeX, nodeY, nodeZ);
|
||||
else {
|
||||
aNode.markDirty();
|
||||
aBaseMetaTileEntity.getWorld().markBlockForUpdate(nodeX, nodeY, nodeZ);
|
||||
@@ -198,11 +217,9 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
i++;
|
||||
}
|
||||
|
||||
if (syncTimer <= 0)
|
||||
sendClientAnimationUpdate(aBaseMetaTileEntity, lastNodeDistance, lastNodeColor);
|
||||
if (syncTimer <= 0) sendClientAnimationUpdate(aBaseMetaTileEntity, lastNodeDistance, lastNodeColor);
|
||||
|
||||
if (requiredVis > 0)
|
||||
this.criticalStopMachine();
|
||||
if (requiredVis > 0) this.criticalStopMachine();
|
||||
|
||||
return super.onRunningTick(aStack);
|
||||
}
|
||||
@@ -232,13 +249,12 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
|
||||
for (ItemStack stack : tInputList) {
|
||||
if (GT_Utility.isStackValid(stack) && stack.stackSize > 0) {
|
||||
if (stack.getItem() == ConfigItems.itemResearchNotes && !stack.stackTagCompound.getBoolean("complete")) {
|
||||
if (stack.getItem() == ConfigItems.itemResearchNotes
|
||||
&& !stack.stackTagCompound.getBoolean("complete")) {
|
||||
ResearchNoteData noteData = ResearchManager.getData(stack);
|
||||
if (noteData == null)
|
||||
continue;
|
||||
if (noteData == null) continue;
|
||||
ResearchItem researchItem = ResearchCategories.getResearch(noteData.key);
|
||||
if (researchItem == null)
|
||||
continue;
|
||||
if (researchItem == null) continue;
|
||||
|
||||
this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
@@ -250,13 +266,13 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
this.mEUt = -this.mEUt;
|
||||
}
|
||||
|
||||
//Create a completed version of the note to output
|
||||
this.mOutputItems = new ItemStack[]{GT_Utility.copyAmount(1L, stack)};
|
||||
// Create a completed version of the note to output
|
||||
this.mOutputItems = new ItemStack[] {GT_Utility.copyAmount(1L, 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.recipeAspectCost = (int) Math.ceil(researchItem.tags.visSize() * NODE_COST_MULTIPLIER);
|
||||
|
||||
this.lastNodeDistance = 0;
|
||||
this.lastNodeColor = 0;
|
||||
@@ -277,17 +293,18 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
mCasing = 0;
|
||||
endFound = false;
|
||||
|
||||
//check front
|
||||
if (!checkPiece(STRUCTURE_PIECE_FIRST, 1, 1, 0))
|
||||
return false;
|
||||
// check front
|
||||
if (!checkPiece(STRUCTURE_PIECE_FIRST, 1, 1, 0)) return false;
|
||||
|
||||
//check middle pieces
|
||||
// check middle pieces
|
||||
while (!endFound && mLength++ < MAX_LENGTH) {
|
||||
if (!checkPiece(STRUCTURE_PIECE_LATER, 1, 1, -(mLength - 1)))
|
||||
return false;
|
||||
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;
|
||||
return endFound
|
||||
&& mLength >= 3
|
||||
&& checkPiece(STRUCTURE_PIECE_LAST, 0, 1, -(mLength - 1))
|
||||
&& mCasing >= mLength * 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -324,18 +341,41 @@ public class GT_MetaTileEntity_ResearchCompleter extends GT_MetaTileEntity_Enhan
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
public ITexture[] getTexture(
|
||||
IGregTechTileEntity aBaseMetaTileEntity,
|
||||
byte aSide,
|
||||
byte aFacing,
|
||||
byte aColorIndex,
|
||||
boolean aActive,
|
||||
boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
if (aActive) return new ITexture[]{
|
||||
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()};
|
||||
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)};
|
||||
return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,28 +18,67 @@ public class TileElectricCloud extends TileEntity {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (worldObj.isRemote && FMLCommonHandler.instance().getSide().isClient() && FMLClientHandler.instance().getClient().renderViewEntity != null)
|
||||
fx();
|
||||
if (worldObj.isRemote
|
||||
&& FMLCommonHandler.instance().getSide().isClient()
|
||||
&& FMLClientHandler.instance().getClient().renderViewEntity != null) fx();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void fx() {
|
||||
if (worldObj.rand.nextInt(4) == 0) {
|
||||
Thaumcraft.proxy.wispFX3(worldObj, xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, xCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, yCoord + 0.5F, zCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, 0.25F, 1, true, -0.02F);
|
||||
Thaumcraft.proxy.wispFX3(
|
||||
worldObj,
|
||||
xCoord + 0.5F,
|
||||
yCoord + 0.5F,
|
||||
zCoord + 0.5F,
|
||||
xCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F,
|
||||
yCoord + 0.5F,
|
||||
zCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F,
|
||||
0.25F,
|
||||
1,
|
||||
true,
|
||||
-0.02F);
|
||||
}
|
||||
|
||||
if (worldObj.rand.nextInt(12) == 0) {
|
||||
Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
|
||||
Thaumcraft.proxy.nodeBolt(
|
||||
worldObj,
|
||||
xCoord + 0.5f,
|
||||
yCoord + 0.5f,
|
||||
zCoord + 0.5f,
|
||||
xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f,
|
||||
yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f,
|
||||
zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
|
||||
if (worldObj.rand.nextInt(2) == 0) {
|
||||
Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
|
||||
Thaumcraft.proxy.nodeBolt(
|
||||
worldObj,
|
||||
xCoord + 0.5f,
|
||||
yCoord + 0.5f,
|
||||
zCoord + 0.5f,
|
||||
xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f,
|
||||
yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f,
|
||||
zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
|
||||
}
|
||||
if (worldObj.rand.nextInt(4) == 0) {
|
||||
Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
|
||||
Thaumcraft.proxy.nodeBolt(
|
||||
worldObj,
|
||||
xCoord + 0.5f,
|
||||
yCoord + 0.5f,
|
||||
zCoord + 0.5f,
|
||||
xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f,
|
||||
yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f,
|
||||
zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
if (worldObj.rand.nextInt(3) == 0) {
|
||||
FXWisp wisp = new FXWisp(worldObj, xCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), yCoord + 0.5, zCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), 0.4f + worldObj.rand.nextInt(40) / 100f, 1);
|
||||
FXWisp wisp = new FXWisp(
|
||||
worldObj,
|
||||
xCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f),
|
||||
yCoord + 0.5,
|
||||
zCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f),
|
||||
0.4f + worldObj.rand.nextInt(40) / 100f,
|
||||
1);
|
||||
wisp.setGravity(-0.02F);
|
||||
wisp.setRBGColorF(worldObj.rand.nextInt(20) / 100f, worldObj.rand.nextInt(20) / 100f, 1);
|
||||
wisp.setAlphaF(1);
|
||||
|
||||
@@ -6,8 +6,7 @@ import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityEMT
|
||||
extends TileEntity {
|
||||
public class TileEntityEMT extends TileEntity {
|
||||
public int facing;
|
||||
public boolean isOn;
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class TileEntityEtherealMacerator extends TileEntityEMT implements ISidedInventory, IWrenchable {
|
||||
|
||||
private static final int[] slots_top = new int[]{0};
|
||||
private static final int[] slots_bottom = new int[]{2, 1};
|
||||
private static final int[] slots_sides = new int[]{1};
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {2, 1};
|
||||
private static final int[] slots_sides = new int[] {1};
|
||||
public int maceratingSpeed = EMTConfigHandler.etherealProcessorBaseSpeed;
|
||||
public int cookTime;
|
||||
private ItemStack[] slots = new ItemStack[3];
|
||||
@@ -135,12 +135,9 @@ public class TileEntityEtherealMacerator extends TileEntityEMT implements ISided
|
||||
return false;
|
||||
} else {
|
||||
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]);
|
||||
if (itemstack == null)
|
||||
return false;
|
||||
if (this.slots[2] == null)
|
||||
return true;
|
||||
if (!this.slots[2].isItemEqual(itemstack))
|
||||
return false;
|
||||
if (itemstack == null) return false;
|
||||
if (this.slots[2] == null) return true;
|
||||
if (!this.slots[2].isItemEqual(itemstack)) return false;
|
||||
int result = slots[2].stackSize + (itemstack.stackSize * 2);
|
||||
return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize());
|
||||
}
|
||||
@@ -171,7 +168,9 @@ public class TileEntityEtherealMacerator extends TileEntityEMT implements ISided
|
||||
if (this.worldObj.rand.nextInt(EMTConfigHandler.etherealProcessorBonus) == 0) {
|
||||
if (this.slots[1] == null) {
|
||||
this.setInventorySlotContents(1, new ItemStack(ConfigItems.itemNugget, 1, 6));
|
||||
} else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6)) && this.isOverLimit(1) == false && this.isOverLimit(2) == false) {
|
||||
} else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6))
|
||||
&& this.isOverLimit(1) == false
|
||||
&& this.isOverLimit(2) == false) {
|
||||
slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2);
|
||||
}
|
||||
}
|
||||
@@ -179,21 +178,21 @@ public class TileEntityEtherealMacerator extends TileEntityEMT implements ISided
|
||||
}
|
||||
|
||||
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) {
|
||||
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
|
||||
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this
|
||||
? false
|
||||
: par1EntityPlayer.getDistanceSq(
|
||||
(double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D)
|
||||
<= 64.0D;
|
||||
}
|
||||
|
||||
public void openChest() {
|
||||
}
|
||||
public void openChest() {}
|
||||
|
||||
public void closeChest() {
|
||||
}
|
||||
public void closeChest() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
if (slot != 0)
|
||||
return false;
|
||||
if (FurnaceRecipes.smelting().getSmeltingResult(stack) != null)
|
||||
return true;
|
||||
if (slot != 0) return false;
|
||||
if (FurnaceRecipes.smelting().getSmeltingResult(stack) != null) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -211,12 +210,9 @@ public class TileEntityEtherealMacerator extends TileEntityEMT implements ISided
|
||||
|
||||
public boolean isOverLimit(int i) {
|
||||
if (slots[i] != null) {
|
||||
if (slots[i].stackSize >= 63)
|
||||
return true;
|
||||
else if (slots[i].stackSize < 63)
|
||||
return false;
|
||||
else
|
||||
return false;
|
||||
if (slots[i].stackSize >= 63) return true;
|
||||
else if (slots[i].stackSize < 63) return false;
|
||||
else return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -232,7 +228,6 @@ public class TileEntityEtherealMacerator extends TileEntityEMT implements ISided
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -246,9 +241,7 @@ public class TileEntityEtherealMacerator extends TileEntityEMT implements ISided
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFacing(short facing) {
|
||||
|
||||
}
|
||||
public void setFacing(short facing) {}
|
||||
|
||||
@Override
|
||||
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
|
||||
@@ -276,12 +269,8 @@ public class TileEntityEtherealMacerator extends TileEntityEMT implements ISided
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
|
||||
}
|
||||
public void openInventory() {}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
||||
}
|
||||
public void closeInventory() {}
|
||||
}
|
||||
@@ -73,7 +73,8 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements I
|
||||
ItemStack wand = getStackInSlot(0);
|
||||
if (wand != null && wand.getItem() instanceof ItemWandCasting) {
|
||||
ItemWandCasting wandItem = (ItemWandCasting) wand.getItem();
|
||||
if (ic2EnergySink.useEnergy(EMTConfigHandler.wandChargerConsumption) && wandItem.getAspectsWithRoom(wand) != null) {
|
||||
if (ic2EnergySink.useEnergy(EMTConfigHandler.wandChargerConsumption)
|
||||
&& wandItem.getAspectsWithRoom(wand) != null) {
|
||||
wandItem.addVis(wand, Aspect.ORDER, 1, true);
|
||||
wandItem.addVis(wand, Aspect.FIRE, 1, true);
|
||||
wandItem.addVis(wand, Aspect.ENTROPY, 1, true);
|
||||
@@ -168,12 +169,10 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
}
|
||||
public void openInventory() {}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
}
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) {
|
||||
@@ -186,9 +185,7 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFacing(short facing) {
|
||||
|
||||
}
|
||||
public void setFacing(short facing) {}
|
||||
|
||||
@Override
|
||||
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
|
||||
|
||||
@@ -28,9 +28,13 @@ import thaumcraft.api.aspects.*;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource;
|
||||
|
||||
public class TileEntityBaseGenerator
|
||||
extends TileEntityEMT
|
||||
implements IInventory, IAspectContainer, IEssentiaTransport, IHasWorldObjectAndCoords, IEnergyConnected, IBasicEnergyContainer {
|
||||
public class TileEntityBaseGenerator extends TileEntityEMT
|
||||
implements IInventory,
|
||||
IAspectContainer,
|
||||
IEssentiaTransport,
|
||||
IHasWorldObjectAndCoords,
|
||||
IEnergyConnected,
|
||||
IBasicEnergyContainer {
|
||||
public DefinitelyNotAIC2Source energySource = new DefinitelyNotAIC2Source(this, 100000L, 2);
|
||||
public Aspect aspect;
|
||||
public double generating;
|
||||
@@ -86,18 +90,15 @@ public class TileEntityBaseGenerator
|
||||
this.side = !this.worldObj.isRemote;
|
||||
this.dead = false;
|
||||
this.timer += 1L;
|
||||
if (this.timer <= Long.MAX_VALUE - 1)
|
||||
this.timer = 0L;
|
||||
if (this.timer <= Long.MAX_VALUE - 1) this.timer = 0L;
|
||||
storeFuel();
|
||||
fillfrompipe();
|
||||
createEnergy();
|
||||
inputintoGTnet();
|
||||
}
|
||||
|
||||
|
||||
public void storeFuel() {
|
||||
if (!side)
|
||||
return;
|
||||
if (!side) return;
|
||||
|
||||
if (this.fuel < this.maxfuel) {
|
||||
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
|
||||
@@ -106,9 +107,23 @@ public class TileEntityBaseGenerator
|
||||
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));
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -119,21 +134,24 @@ public class TileEntityBaseGenerator
|
||||
}
|
||||
|
||||
public void fillfrompipe() {
|
||||
if (!side)
|
||||
return;
|
||||
if (!side) return;
|
||||
|
||||
if (this.fuel == this.maxfuel)
|
||||
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]);
|
||||
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;
|
||||
}
|
||||
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]))) {
|
||||
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]));
|
||||
}
|
||||
}
|
||||
@@ -186,8 +204,7 @@ public class TileEntityBaseGenerator
|
||||
super.writeToNBT(tag);
|
||||
tag.setInteger("fuel", this.fuel);
|
||||
tag.setLong("estore", this.energySource.getEnergyStored());
|
||||
if (aspect != null)
|
||||
tag.setString("aspect", this.aspect.getTag());
|
||||
if (aspect != null) tag.setString("aspect", this.aspect.getTag());
|
||||
}
|
||||
|
||||
public int getSizeInventory() {
|
||||
@@ -206,8 +223,7 @@ public class TileEntityBaseGenerator
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {
|
||||
}
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {}
|
||||
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
@@ -221,11 +237,9 @@ public class TileEntityBaseGenerator
|
||||
return true;
|
||||
}
|
||||
|
||||
public void openInventory() {
|
||||
}
|
||||
public void openInventory() {}
|
||||
|
||||
public void closeInventory() {
|
||||
}
|
||||
public void closeInventory() {}
|
||||
|
||||
public int gaugeEnergyScaled(int i) {
|
||||
return this.mpshownstroage * 1000 * i / this.maxstorage;
|
||||
@@ -243,8 +257,7 @@ public class TileEntityBaseGenerator
|
||||
return new AspectList().add(this.aspect, this.fuel);
|
||||
}
|
||||
|
||||
public void setAspects(AspectList aspects) {
|
||||
}
|
||||
public void setAspects(AspectList aspects) {}
|
||||
|
||||
public boolean doesContainerAccept(Aspect tag) {
|
||||
return tag.equals(this.aspect);
|
||||
@@ -294,8 +307,7 @@ public class TileEntityBaseGenerator
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setSuction(Aspect aspect, int amount) {
|
||||
}
|
||||
public void setSuction(Aspect aspect, int amount) {}
|
||||
|
||||
public Aspect getSuctionType(ForgeDirection face) {
|
||||
return this.aspect;
|
||||
@@ -333,8 +345,7 @@ public class TileEntityBaseGenerator
|
||||
}
|
||||
|
||||
public void inputintoGTnet() {
|
||||
if (!side)
|
||||
return;
|
||||
if (!side) return;
|
||||
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
@@ -399,7 +410,8 @@ public class TileEntityBaseGenerator
|
||||
}
|
||||
|
||||
public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
return decreaseStoredEnergyUnits(aVoltage * aAmperage, this.energySource.getEnergyStored() > aVoltage * aAmperage);
|
||||
return decreaseStoredEnergyUnits(
|
||||
aVoltage * aAmperage, this.energySource.getEnergyStored() > aVoltage * aAmperage);
|
||||
}
|
||||
|
||||
public long getAverageElectricInput() {
|
||||
@@ -701,15 +713,18 @@ public class TileEntityBaseGenerator
|
||||
}
|
||||
|
||||
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);
|
||||
GT_Values.NW.sendPacketToAllPlayersInRange(
|
||||
this.worldObj,
|
||||
new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
||||
this.xCoord,
|
||||
this.zCoord);
|
||||
}
|
||||
|
||||
public long getTimer() {
|
||||
return this.timer;
|
||||
}
|
||||
|
||||
public void setLightValue(byte aLightValue) {
|
||||
}
|
||||
public void setLightValue(byte aLightValue) {}
|
||||
|
||||
public boolean isInvalidTileEntity() {
|
||||
return this.tileEntityInvalid;
|
||||
@@ -723,7 +738,6 @@ public class TileEntityBaseGenerator
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean outputsEnergyTo(byte b, boolean b1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,7 @@ import emt.tile.DefinitelyNotAIC2Source;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public abstract class TileEntityCompressedGenerator
|
||||
extends TileEntityBaseGenerator {
|
||||
public abstract class TileEntityCompressedGenerator extends TileEntityBaseGenerator {
|
||||
public TileEntityCompressedGenerator(Aspect aspect) {
|
||||
super();
|
||||
this.energySource = new DefinitelyNotAIC2Source(this, 1000000L, 3);
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
package emt.tile.solar;
|
||||
|
||||
import static thaumcraft.api.aspects.Aspect.*;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.Materials;
|
||||
import java.util.LinkedHashMap;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import static thaumcraft.api.aspects.Aspect.*;
|
||||
|
||||
//Solar Factory
|
||||
// Solar Factory
|
||||
public enum Solars {
|
||||
//compability to older versions
|
||||
// compability to older versions
|
||||
Compressed(EMTConfigHandler.compressedSolarOutput, null, 0, 0, "solar.compressed"),
|
||||
Double_Compressed(EMTConfigHandler.doubleCompressedSolarOutput, null, 0, 1, "solar.doublecompressed"),
|
||||
Triple_Compressed(EMTConfigHandler.tripleCompressedSolarOutput, null, 0, 2, "solar.triplecompressed"),
|
||||
@@ -37,45 +36,72 @@ public enum Solars {
|
||||
Double_Compressed_Terra(EMTConfigHandler.doubleCompressedSolarOutput, EARTH, 1, 3, "solar.doubleearth"),
|
||||
Triple_Compressed_Terra(EMTConfigHandler.tripleCompressedSolarOutput, EARTH, 1, 4, "solar.tripleearth"),
|
||||
|
||||
//New Solars
|
||||
// New Solars
|
||||
Quadruple_Compressed(EMTConfigHandler.quadrupleCompressedSolarOutput, null, 2, 0, "Quadruple_Compressed_Solar"),
|
||||
Quadruple_Compressed_Ordo(EMTConfigHandler.quadrupleCompressedSolarOutput, ORDER, 2, 1, "Quadruple_Compressed_Ordo_Solar"),
|
||||
Quadruple_Compressed_Perditio(EMTConfigHandler.quadrupleCompressedSolarOutput, ENTROPY, 2, 2, "Quadruple_Compressed_Perditio_Solar"),
|
||||
Quadruple_Compressed_Aer(EMTConfigHandler.quadrupleCompressedSolarOutput, AIR, 2, 3, "Quadruple_Compressed_Aer_Solar"),
|
||||
Quadruple_Compressed_Terra(EMTConfigHandler.quadrupleCompressedSolarOutput, EARTH, 2, 4, "Quadruple_Compressed_Terra_Solar"),
|
||||
Quadruple_Compressed_Aqua(EMTConfigHandler.quadrupleCompressedSolarOutput, WATER, 2, 5, "Quadruple_Compressed_Aqua_Solar"),
|
||||
Quadruple_Compressed_Ignis(EMTConfigHandler.quadrupleCompressedSolarOutput, FIRE, 2, 6, "Quadruple_Compressed_Ignis_Solar"),
|
||||
Quadruple_Compressed_Ordo(
|
||||
EMTConfigHandler.quadrupleCompressedSolarOutput, ORDER, 2, 1, "Quadruple_Compressed_Ordo_Solar"),
|
||||
Quadruple_Compressed_Perditio(
|
||||
EMTConfigHandler.quadrupleCompressedSolarOutput, ENTROPY, 2, 2, "Quadruple_Compressed_Perditio_Solar"),
|
||||
Quadruple_Compressed_Aer(
|
||||
EMTConfigHandler.quadrupleCompressedSolarOutput, AIR, 2, 3, "Quadruple_Compressed_Aer_Solar"),
|
||||
Quadruple_Compressed_Terra(
|
||||
EMTConfigHandler.quadrupleCompressedSolarOutput, EARTH, 2, 4, "Quadruple_Compressed_Terra_Solar"),
|
||||
Quadruple_Compressed_Aqua(
|
||||
EMTConfigHandler.quadrupleCompressedSolarOutput, WATER, 2, 5, "Quadruple_Compressed_Aqua_Solar"),
|
||||
Quadruple_Compressed_Ignis(
|
||||
EMTConfigHandler.quadrupleCompressedSolarOutput, FIRE, 2, 6, "Quadruple_Compressed_Ignis_Solar"),
|
||||
Quintuple_Compressed(EMTConfigHandler.quintupleCompressedSolarOutput, null, 2, 7, "Quintuple_Compressed_Solar"),
|
||||
Quintuple_Compressed_Ordo(EMTConfigHandler.quintupleCompressedSolarOutput, ORDER, 2, 8, "Quintuple_Compressed_Ordo_Solar"),
|
||||
Quintuple_Compressed_Perditio(EMTConfigHandler.quintupleCompressedSolarOutput, ENTROPY, 2, 9, "Quintuple_Compressed_Perditio_Solar"),
|
||||
Quintuple_Compressed_Aer(EMTConfigHandler.quintupleCompressedSolarOutput, AIR, 2, 10, "Quintuple_Compressed_Aer_Solar"),
|
||||
Quintuple_Compressed_Terra(EMTConfigHandler.quintupleCompressedSolarOutput, EARTH, 2, 11, "Quintuple_Compressed_Terra_Solar"),
|
||||
Quintuple_Compressed_Aqua(EMTConfigHandler.quintupleCompressedSolarOutput, WATER, 2, 12, "Quintuple_Compressed_Aqua_Solar"),
|
||||
Quintuple_Compressed_Ignis(EMTConfigHandler.quintupleCompressedSolarOutput, FIRE, 2, 13, "Quintuple_Compressed_Ignis_Solar"),
|
||||
Quintuple_Compressed_Ordo(
|
||||
EMTConfigHandler.quintupleCompressedSolarOutput, ORDER, 2, 8, "Quintuple_Compressed_Ordo_Solar"),
|
||||
Quintuple_Compressed_Perditio(
|
||||
EMTConfigHandler.quintupleCompressedSolarOutput, ENTROPY, 2, 9, "Quintuple_Compressed_Perditio_Solar"),
|
||||
Quintuple_Compressed_Aer(
|
||||
EMTConfigHandler.quintupleCompressedSolarOutput, AIR, 2, 10, "Quintuple_Compressed_Aer_Solar"),
|
||||
Quintuple_Compressed_Terra(
|
||||
EMTConfigHandler.quintupleCompressedSolarOutput, EARTH, 2, 11, "Quintuple_Compressed_Terra_Solar"),
|
||||
Quintuple_Compressed_Aqua(
|
||||
EMTConfigHandler.quintupleCompressedSolarOutput, WATER, 2, 12, "Quintuple_Compressed_Aqua_Solar"),
|
||||
Quintuple_Compressed_Ignis(
|
||||
EMTConfigHandler.quintupleCompressedSolarOutput, FIRE, 2, 13, "Quintuple_Compressed_Ignis_Solar"),
|
||||
Sextuple_Compressed(EMTConfigHandler.sextupleCompressedSolarOutput, null, 2, 14, "Sextuple_Compressed_Solar"),
|
||||
Sextuple_Compressed_Ordo(EMTConfigHandler.sextupleCompressedSolarOutput, ORDER, 2, 15, "Sextuple_Compressed_Ordo_Solar"),
|
||||
Sextuple_Compressed_Perditio(EMTConfigHandler.sextupleCompressedSolarOutput, ENTROPY, 3, 0, "Sextuple_Compressed_Perditio_Solar"),
|
||||
Sextuple_Compressed_Ordo(
|
||||
EMTConfigHandler.sextupleCompressedSolarOutput, ORDER, 2, 15, "Sextuple_Compressed_Ordo_Solar"),
|
||||
Sextuple_Compressed_Perditio(
|
||||
EMTConfigHandler.sextupleCompressedSolarOutput, ENTROPY, 3, 0, "Sextuple_Compressed_Perditio_Solar"),
|
||||
Sextuple_Compressed_Aer(EMTConfigHandler.sextupleCompressedSolarOutput, AIR, 3, 1, "Sextuple_Compressed_Aer_Solar"),
|
||||
Sextuple_Compressed_Terra(EMTConfigHandler.sextupleCompressedSolarOutput, EARTH, 3, 2, "Sextuple_Compressed_Terra_Solar"),
|
||||
Sextuple_Compressed_Aqua(EMTConfigHandler.sextupleCompressedSolarOutput, WATER, 3, 3, "Sextuple_Compressed_Aqua_Solar"),
|
||||
Sextuple_Compressed_Ignis(EMTConfigHandler.sextupleCompressedSolarOutput, FIRE, 3, 4, "Sextuple_Compressed_Ignis_Solar"),
|
||||
Sextuple_Compressed_Terra(
|
||||
EMTConfigHandler.sextupleCompressedSolarOutput, EARTH, 3, 2, "Sextuple_Compressed_Terra_Solar"),
|
||||
Sextuple_Compressed_Aqua(
|
||||
EMTConfigHandler.sextupleCompressedSolarOutput, WATER, 3, 3, "Sextuple_Compressed_Aqua_Solar"),
|
||||
Sextuple_Compressed_Ignis(
|
||||
EMTConfigHandler.sextupleCompressedSolarOutput, FIRE, 3, 4, "Sextuple_Compressed_Ignis_Solar"),
|
||||
Septuple_Compressed(EMTConfigHandler.septupleCompressedSolarOutput, null, 3, 5, "Septuple_Compressed_Solar"),
|
||||
Septuple_Compressed_Ordo(EMTConfigHandler.septupleCompressedSolarOutput, ORDER, 3, 6, "Septuple_Compressed_Ordo_Solar"),
|
||||
Septuple_Compressed_Perditio(EMTConfigHandler.septupleCompressedSolarOutput, ENTROPY, 3, 7, "Septuple_Compressed_Perditio_Solar"),
|
||||
Septuple_Compressed_Ordo(
|
||||
EMTConfigHandler.septupleCompressedSolarOutput, ORDER, 3, 6, "Septuple_Compressed_Ordo_Solar"),
|
||||
Septuple_Compressed_Perditio(
|
||||
EMTConfigHandler.septupleCompressedSolarOutput, ENTROPY, 3, 7, "Septuple_Compressed_Perditio_Solar"),
|
||||
Septuple_Compressed_Aer(EMTConfigHandler.septupleCompressedSolarOutput, AIR, 3, 8, "Septuple_Compressed_Aer_Solar"),
|
||||
Septuple_Compressed_Terra(EMTConfigHandler.septupleCompressedSolarOutput, EARTH, 3, 9, "Septuple_Compressed_Terra_Solar"),
|
||||
Septuple_Compressed_Aqua(EMTConfigHandler.septupleCompressedSolarOutput, WATER, 3, 10, "Septuple_Compressed_Aqua_Solar"),
|
||||
Septuple_Compressed_Ignis(EMTConfigHandler.septupleCompressedSolarOutput, FIRE, 3, 11, "Septuple_Compressed_Ignis_Solar"),
|
||||
Septuple_Compressed_Terra(
|
||||
EMTConfigHandler.septupleCompressedSolarOutput, EARTH, 3, 9, "Septuple_Compressed_Terra_Solar"),
|
||||
Septuple_Compressed_Aqua(
|
||||
EMTConfigHandler.septupleCompressedSolarOutput, WATER, 3, 10, "Septuple_Compressed_Aqua_Solar"),
|
||||
Septuple_Compressed_Ignis(
|
||||
EMTConfigHandler.septupleCompressedSolarOutput, FIRE, 3, 11, "Septuple_Compressed_Ignis_Solar"),
|
||||
Octuple_Compressed(EMTConfigHandler.octupleCompressedSolarOutput, null, 3, 12, "Octuple_Compressed_Solar"),
|
||||
Octuple_Compressed_Ordo(EMTConfigHandler.octupleCompressedSolarOutput, ORDER, 3, 13, "Octuple_Compressed_Ordo_Solar"),
|
||||
Octuple_Compressed_Perditio(EMTConfigHandler.octupleCompressedSolarOutput, ENTROPY, 3, 14, "Octuple_Compressed_Perditio_Solar"),
|
||||
Octuple_Compressed_Ordo(
|
||||
EMTConfigHandler.octupleCompressedSolarOutput, ORDER, 3, 13, "Octuple_Compressed_Ordo_Solar"),
|
||||
Octuple_Compressed_Perditio(
|
||||
EMTConfigHandler.octupleCompressedSolarOutput, ENTROPY, 3, 14, "Octuple_Compressed_Perditio_Solar"),
|
||||
Octuple_Compressed_Aer(EMTConfigHandler.octupleCompressedSolarOutput, AIR, 3, 15, "Octuple_Compressed_Aer_Solar"),
|
||||
Octuple_Compressed_Terra(EMTConfigHandler.octupleCompressedSolarOutput, EARTH, 4, 0, "Octuple_Compressed_Terra_Solar"),
|
||||
Octuple_Compressed_Aqua(EMTConfigHandler.octupleCompressedSolarOutput, WATER, 4, 1, "Octuple_Compressed_Aqua_Solar"),
|
||||
Octuple_Compressed_Ignis(EMTConfigHandler.octupleCompressedSolarOutput, FIRE, 4, 2, "Octuple_Compressed_Ignis_Solar"),
|
||||
Octuple_Compressed_Terra(
|
||||
EMTConfigHandler.octupleCompressedSolarOutput, EARTH, 4, 0, "Octuple_Compressed_Terra_Solar"),
|
||||
Octuple_Compressed_Aqua(
|
||||
EMTConfigHandler.octupleCompressedSolarOutput, WATER, 4, 1, "Octuple_Compressed_Aqua_Solar"),
|
||||
Octuple_Compressed_Ignis(
|
||||
EMTConfigHandler.octupleCompressedSolarOutput, FIRE, 4, 2, "Octuple_Compressed_Ignis_Solar"),
|
||||
;
|
||||
|
||||
private final static LinkedHashMap<Long, Solars> cachemap = new LinkedHashMap<>();
|
||||
private static final LinkedHashMap<Long, Solars> cachemap = new LinkedHashMap<>();
|
||||
final int instance, meta;
|
||||
final Aspect aspect;
|
||||
final String guiname;
|
||||
@@ -96,8 +122,7 @@ public enum Solars {
|
||||
@Nullable
|
||||
private static Solars getBaseSolar(double output) {
|
||||
for (Solars s : Solars.values()) {
|
||||
if (s.output == output && s.aspect == null)
|
||||
return s;
|
||||
if (s.output == output && s.aspect == null) return s;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -105,8 +130,18 @@ public enum Solars {
|
||||
public static void registerReverseRecipes() {
|
||||
for (Solars s : Solars.values()) {
|
||||
if (s.aspect != null) {
|
||||
//ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt
|
||||
GT_Values.RA.addChemicalBathRecipe(new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta), Materials.Chlorine.getGas(1000), new ItemStack(EMTBlocks.solars[getBaseSolar(s.output).instance], 1, getBaseSolar(s.output).meta), null, null, null, 30, 30);
|
||||
// ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack
|
||||
// aOutput3, int[] aChances, int aDuration, int aEUt
|
||||
GT_Values.RA.addChemicalBathRecipe(
|
||||
new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta),
|
||||
Materials.Chlorine.getGas(1000),
|
||||
new ItemStack(
|
||||
EMTBlocks.solars[getBaseSolar(s.output).instance], 1, getBaseSolar(s.output).meta),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
30,
|
||||
30);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ import net.minecraftforge.fluids.IFluidHandler;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
|
||||
public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IWrenchable, IHasWorldObjectAndCoords, IEnergyConnected, IBasicEnergyContainer {
|
||||
public class TileEntitySolarBase extends TileEntityEMT
|
||||
implements IInventory, IWrenchable, IHasWorldObjectAndCoords, IEnergyConnected, IBasicEnergyContainer {
|
||||
|
||||
private static final byte NOTHING = 0;
|
||||
private static final byte ORDO = 1;
|
||||
@@ -67,7 +68,6 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
this.meta = meta;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* DO NOT CALL THIS ITS USED INTERNALLY ONLY
|
||||
*/
|
||||
@@ -76,34 +76,28 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
private static byte getByteFromAspect(Aspect aspect) {
|
||||
if (aspect == null)
|
||||
return NOTHING;
|
||||
if (aspect.equals(Aspect.ORDER))
|
||||
return ORDO;
|
||||
else if (aspect.equals(Aspect.ENTROPY))
|
||||
return PERDITIO;
|
||||
else if (aspect.equals(Aspect.AIR))
|
||||
return AER;
|
||||
else if (aspect.equals(Aspect.EARTH))
|
||||
return TERRA;
|
||||
else if (aspect.equals(Aspect.WATER))
|
||||
return AQUA;
|
||||
else if (aspect.equals(Aspect.FIRE))
|
||||
return IGNIS;
|
||||
if (aspect == null) return NOTHING;
|
||||
if (aspect.equals(Aspect.ORDER)) return ORDO;
|
||||
else if (aspect.equals(Aspect.ENTROPY)) return PERDITIO;
|
||||
else if (aspect.equals(Aspect.AIR)) return AER;
|
||||
else if (aspect.equals(Aspect.EARTH)) return TERRA;
|
||||
else if (aspect.equals(Aspect.WATER)) return AQUA;
|
||||
else if (aspect.equals(Aspect.FIRE)) return IGNIS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int getTierFromCapacity(long capacity) {
|
||||
for (int i = 0; i < GT_Values.V.length; i++) {
|
||||
if (capacity / 1000 < GT_Values.V[i])
|
||||
return i;
|
||||
if (capacity / 1000 < GT_Values.V[i]) return i;
|
||||
}
|
||||
return GT_Values.V.length - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
this.side = !this.worldObj.isRemote ? FMLCommonHandler.instance().getEffectiveSide().isServer() : FMLCommonHandler.instance().getSide().isServer();
|
||||
this.side = !this.worldObj.isRemote
|
||||
? FMLCommonHandler.instance().getEffectiveSide().isServer()
|
||||
: FMLCommonHandler.instance().getSide().isServer();
|
||||
this.dead = false;
|
||||
this.timer = +1L;
|
||||
inputintoGTnet();
|
||||
@@ -133,48 +127,36 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
public float calc_multi() {
|
||||
switch (aspect) {
|
||||
case ORDO: {
|
||||
if (this.worldObj.isDaytime())
|
||||
return 2F;
|
||||
if (this.worldObj.isDaytime()) return 2F;
|
||||
else return 0.75F;
|
||||
}
|
||||
case PERDITIO: {
|
||||
if (this.worldObj.isDaytime())
|
||||
return 0.75F;
|
||||
if (this.worldObj.isDaytime()) return 0.75F;
|
||||
else return 2F;
|
||||
}
|
||||
case AER: {
|
||||
if (this.yCoord < 5)
|
||||
return 1F;
|
||||
else if (this.yCoord > 220)
|
||||
return 3F;
|
||||
else
|
||||
return (float) ((41D / 43D) + ((2D / 215D) * (double) this.yCoord));
|
||||
if (this.yCoord < 5) return 1F;
|
||||
else if (this.yCoord > 220) return 3F;
|
||||
else return (float) ((41D / 43D) + ((2D / 215D) * (double) this.yCoord));
|
||||
}
|
||||
case TERRA: {
|
||||
if (this.yCoord < 5)
|
||||
return 3F;
|
||||
else if (this.yCoord > 220)
|
||||
return 1F;
|
||||
else
|
||||
return (float) ((-2D) / 215D * (double) this.yCoord + 131D / 43D);
|
||||
if (this.yCoord < 5) return 3F;
|
||||
else if (this.yCoord > 220) return 1F;
|
||||
else return (float) ((-2D) / 215D * (double) this.yCoord + 131D / 43D);
|
||||
}
|
||||
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
|
||||
return 1F;
|
||||
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 return 1F;
|
||||
}
|
||||
case IGNIS: {
|
||||
float mult = 1F;
|
||||
|
||||
if (VisNetHandler.drainVis(worldObj, xCoord, yCoord, zCoord, Aspect.FIRE, 10) >= 10)
|
||||
mult *= 3F;
|
||||
if (this.worldObj.provider.dimensionId == (-1))
|
||||
mult *= 2F;
|
||||
if (VisNetHandler.drainVis(worldObj, xCoord, yCoord, zCoord, Aspect.FIRE, 10) >= 10) mult *= 3F;
|
||||
if (this.worldObj.provider.dimensionId == (-1)) mult *= 2F;
|
||||
|
||||
return mult;
|
||||
}
|
||||
@@ -223,7 +205,9 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
switch (aspect) {
|
||||
case ORDO:
|
||||
case PERDITIO: {
|
||||
if ((this.worldObj.canBlockSeeTheSky(this.xCoord, this.yCoord + 1, this.zCoord)) && (!this.worldObj.isRaining()) && (!this.worldObj.isThundering())) {
|
||||
if ((this.worldObj.canBlockSeeTheSky(this.xCoord, this.yCoord + 1, this.zCoord))
|
||||
&& (!this.worldObj.isRaining())
|
||||
&& (!this.worldObj.isThundering())) {
|
||||
isActive = true;
|
||||
if (side) {
|
||||
this.energySource.addEnergy(this.output * calc_multi());
|
||||
@@ -280,7 +264,6 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
subtag.setByte("aspect", this.aspect);
|
||||
subtag.setDouble("Output", this.output);
|
||||
nbttagcompound.setTag("solarstats", subtag);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -317,8 +300,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {
|
||||
}
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {}
|
||||
|
||||
public boolean hasCustomInventoryName() {
|
||||
return true;
|
||||
@@ -336,11 +318,9 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
return true;
|
||||
}
|
||||
|
||||
public void openInventory() {
|
||||
}
|
||||
public void openInventory() {}
|
||||
|
||||
public void closeInventory() {
|
||||
}
|
||||
public void closeInventory() {}
|
||||
|
||||
public int gaugeEnergyScaled(long i) {
|
||||
return (int) ((this.mp_storage * 1000 * i) / this.maxstorage);
|
||||
@@ -362,8 +342,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFacing(short facing) {
|
||||
}
|
||||
public void setFacing(short facing) {}
|
||||
|
||||
@Override
|
||||
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
|
||||
@@ -381,8 +360,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
public void inputintoGTnet() {
|
||||
if (!side)
|
||||
return;
|
||||
if (!side) return;
|
||||
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
@@ -419,32 +397,31 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
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 voltAmp[1] = (1L + (generating / GT_Values.V[energySource.getSourceTier()]));
|
||||
return voltAmp;
|
||||
}
|
||||
|
||||
public long getOutputAmperage() {
|
||||
return calculateMaxVoltAmp()[1];
|
||||
// long ret;
|
||||
// if (this.energySource.getSourceTier() <= 4) {
|
||||
// if (this.generating <= GT_Values.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]);
|
||||
// } else
|
||||
// ret = (long) (1L + (this.generating / GT_Values.V[this.energySource.getSourceTier() - 2]));
|
||||
// } else {
|
||||
// if (this.generating <= GT_Values.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]);
|
||||
// } else
|
||||
// ret = (long) (1L + (this.generating / GT_Values.V[this.energySource.getSourceTier() - 1]));
|
||||
// }
|
||||
// return ret;
|
||||
// long ret;
|
||||
// if (this.energySource.getSourceTier() <= 4) {
|
||||
// if (this.generating <= GT_Values.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]);
|
||||
// } else
|
||||
// ret = (long) (1L + (this.generating / GT_Values.V[this.energySource.getSourceTier() - 2]));
|
||||
// } else {
|
||||
// if (this.generating <= GT_Values.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]);
|
||||
// } else
|
||||
// ret = (long) (1L + (this.generating / GT_Values.V[this.energySource.getSourceTier() - 1]));
|
||||
// }
|
||||
// return ret;
|
||||
}
|
||||
|
||||
public long getOutputVoltage() {
|
||||
@@ -473,7 +450,8 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
return decreaseStoredEnergyUnits(aVoltage * aAmperage, this.energySource.getEnergyStored() > aVoltage * aAmperage);
|
||||
return decreaseStoredEnergyUnits(
|
||||
aVoltage * aAmperage, this.energySource.getEnergyStored() > aVoltage * aAmperage);
|
||||
}
|
||||
|
||||
public long getAverageElectricInput() {
|
||||
@@ -775,15 +753,18 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
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);
|
||||
GT_Values.NW.sendPacketToAllPlayersInRange(
|
||||
this.worldObj,
|
||||
new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
|
||||
this.xCoord,
|
||||
this.zCoord);
|
||||
}
|
||||
|
||||
public long getTimer() {
|
||||
return this.timer;
|
||||
}
|
||||
|
||||
public void setLightValue(byte aLightValue) {
|
||||
}
|
||||
public void setLightValue(byte aLightValue) {}
|
||||
|
||||
public boolean isInvalidTileEntity() {
|
||||
return this.tileEntityInvalid;
|
||||
|
||||
@@ -31,11 +31,21 @@ public class EMTClientEventHandler {
|
||||
if (e.side == Side.CLIENT) {
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
Item curItem = player.inventory.getCurrentItem() == null ? null : player.inventory.getCurrentItem().getItem();
|
||||
Item curItem = player.inventory.getCurrentItem() == null
|
||||
? null
|
||||
: player.inventory.getCurrentItem().getItem();
|
||||
|
||||
if (curItem == EMTItems.diamondChainsaw || curItem == EMTItems.streamChainsaw || curItem == EMTItems.thaumiumChainsaw) {
|
||||
if (curItem == EMTItems.diamondChainsaw
|
||||
|| curItem == EMTItems.streamChainsaw
|
||||
|| curItem == EMTItems.thaumiumChainsaw) {
|
||||
if (audio == null)
|
||||
audio = IC2.audioManager.createSource(player, PositionSpec.Hand, "Tools/Chainsaw/ChainsawIdle.ogg", true, false, IC2.audioManager.getDefaultVolume());
|
||||
audio = IC2.audioManager.createSource(
|
||||
player,
|
||||
PositionSpec.Hand,
|
||||
"Tools/Chainsaw/ChainsawIdle.ogg",
|
||||
true,
|
||||
false,
|
||||
IC2.audioManager.getDefaultVolume());
|
||||
if (audio != null) {
|
||||
audio.updatePosition();
|
||||
audio.play();
|
||||
@@ -46,7 +56,12 @@ public class EMTClientEventHandler {
|
||||
audio.stop();
|
||||
audio.remove();
|
||||
audio = null;
|
||||
IC2.audioManager.playOnce(player, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume());
|
||||
IC2.audioManager.playOnce(
|
||||
player,
|
||||
PositionSpec.Hand,
|
||||
"Tools/Chainsaw/ChainsawStop.ogg",
|
||||
true,
|
||||
IC2.audioManager.getDefaultVolume());
|
||||
}
|
||||
|
||||
lastItem = curItem;
|
||||
|
||||
@@ -2,12 +2,11 @@ package emt.util;
|
||||
|
||||
import emt.gthandler.common.loader.EMT_GT_Loader;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
/**
|
||||
* TODO: Need to rewrite...
|
||||
@@ -18,6 +17,7 @@ public class EMTConfigHandler {
|
||||
* Sections
|
||||
**/
|
||||
public static final String RANDOM = "Random Configs";
|
||||
|
||||
public static final String RESEARCH = "Research";
|
||||
public static final String VALUES = "Numeric Values";
|
||||
public static final String OUTPUTS = "Essentia Generator Outputs";
|
||||
@@ -33,6 +33,7 @@ public class EMTConfigHandler {
|
||||
* Values
|
||||
**/
|
||||
public static double wandChargerConsumption;
|
||||
|
||||
public static double compressedSolarOutput;
|
||||
public static double doubleCompressedSolarOutput;
|
||||
public static double nanoBootsSpeed;
|
||||
@@ -57,6 +58,7 @@ public class EMTConfigHandler {
|
||||
* Essentias
|
||||
**/
|
||||
public static double fireOutput;
|
||||
|
||||
public static double waterOutput;
|
||||
public static double airOutput;
|
||||
public static double earthOutput;
|
||||
@@ -68,6 +70,7 @@ public class EMTConfigHandler {
|
||||
* random stuff
|
||||
**/
|
||||
public static boolean impactOfRain;
|
||||
|
||||
public static boolean capesOn;
|
||||
public static boolean toolsInBore;
|
||||
public static boolean nightVisionOff;
|
||||
@@ -81,12 +84,14 @@ public class EMTConfigHandler {
|
||||
* Loot chance
|
||||
**/
|
||||
public static int chanceOneRing;
|
||||
|
||||
public static int chanceTaintedMjolnir;
|
||||
|
||||
/**
|
||||
* Researches
|
||||
**/
|
||||
public static boolean thaumiumDrillResearch;
|
||||
|
||||
public static boolean thaumiumChainsawResearch;
|
||||
public static boolean thaumiumOmnitoolResearch;
|
||||
public static boolean rockbreakerDrillResearch;
|
||||
@@ -137,7 +142,6 @@ public class EMTConfigHandler {
|
||||
public static boolean infusedQuantumChestplate;
|
||||
public static boolean aerGeneratorResearch;
|
||||
|
||||
|
||||
public static void init(File file) {
|
||||
config = new Configuration(file);
|
||||
syncConfig();
|
||||
@@ -146,21 +150,72 @@ public class EMTConfigHandler {
|
||||
public static void syncConfig() {
|
||||
|
||||
config.addCustomCategoryComment(VALUES, "The only way to change some numbers that my machines uses.");
|
||||
config.addCustomCategoryComment(RESEARCH, "The only way to disable some researches. " + "Be careful, if you disable some researches, " + "all researches linked to it will be removed too. " + "Really, don't touch that unless you know exactly what you are doing.");
|
||||
config.addCustomCategoryComment(
|
||||
RESEARCH,
|
||||
"The only way to disable some researches. " + "Be careful, if you disable some researches, "
|
||||
+ "all researches linked to it will be removed too. "
|
||||
+ "Really, don't touch that unless you know exactly what you are doing.");
|
||||
config.addCustomCategoryComment(OUTPUTS, "Change outputs linked to different Essentias here");
|
||||
config.addCustomCategoryComment(RANDOM, "Options that don't fit into the other categories.");
|
||||
|
||||
capesOn = config.get(RANDOM, "Enable capes", true, "This config option is to enable or disable capes for people who have them. " + "Seriously, you shouldn't touch that unless you have another cape and " + "it conflicts with it.").getBoolean(capesOn);
|
||||
toolsInBore = config.get(RANDOM, "Tools for Arcane Bore", false, "This will augment the durablilty of the tools, and will also decrease the EU cost to 1. " + "The tools should have the same number of uses than before.").getBoolean(toolsInBore);
|
||||
nightVisionOff = config.get(RANDOM, "Disable nightvision helmets", false, "This was added because of mods making you totally blind if using nightvision. For example, enable that when in the Deep Dark.").getBoolean(nightVisionOff);
|
||||
enchanting = config.get(RANDOM, "Enable enchanting tools", false, "Warning: the enchantability is low.").getBoolean(enchanting);
|
||||
smoke = config.get(RANDOM, "Disable smoke effect for boots", false, "This effect only appears when the player isn't on the ground").getBoolean(smoke);
|
||||
oneRingSpawn = config.get(RANDOM, "Disable One Ring in dungeon chests", true, "There is a recipe to get this item.").getBoolean(oneRingSpawn);
|
||||
chanceTaintedMjolnir = config.get(RANDOM, "Tainted Mjolnir spawning change", 25, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt();
|
||||
chanceOneRing = config.get(RANDOM, "One Ring spawning chance", 15, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt();
|
||||
removeAmberAndCinnabarMacerating = config.get(RANDOM, "Clear Amber/Cinnabar Macerating", true, "This is here because of conflicts between mods that add the same input and different outputs").getBoolean(removeAmberAndCinnabarMacerating);
|
||||
impactOfRain = config.get(RANDOM, "Impact of rain", true, "The impact of rain on all wings").getBoolean(impactOfRain);
|
||||
etherealMaceratorWhiteList.addAll(Arrays.asList(config.get(RANDOM, "White List for Ethereal Processor", new String[]{"ore", "cluster"}, "The allowed ore dictionary prefix for Ethereal Processor.").getStringList()));
|
||||
capesOn = config.get(
|
||||
RANDOM,
|
||||
"Enable capes",
|
||||
true,
|
||||
"This config option is to enable or disable capes for people who have them. "
|
||||
+ "Seriously, you shouldn't touch that unless you have another cape and "
|
||||
+ "it conflicts with it.")
|
||||
.getBoolean(capesOn);
|
||||
toolsInBore = config.get(
|
||||
RANDOM,
|
||||
"Tools for Arcane Bore",
|
||||
false,
|
||||
"This will augment the durablilty of the tools, and will also decrease the EU cost to 1. "
|
||||
+ "The tools should have the same number of uses than before.")
|
||||
.getBoolean(toolsInBore);
|
||||
nightVisionOff = config.get(
|
||||
RANDOM,
|
||||
"Disable nightvision helmets",
|
||||
false,
|
||||
"This was added because of mods making you totally blind if using nightvision. For example, enable that when in the Deep Dark.")
|
||||
.getBoolean(nightVisionOff);
|
||||
enchanting = config.get(RANDOM, "Enable enchanting tools", false, "Warning: the enchantability is low.")
|
||||
.getBoolean(enchanting);
|
||||
smoke = config.get(
|
||||
RANDOM,
|
||||
"Disable smoke effect for boots",
|
||||
false,
|
||||
"This effect only appears when the player isn't on the ground")
|
||||
.getBoolean(smoke);
|
||||
oneRingSpawn = config.get(
|
||||
RANDOM, "Disable One Ring in dungeon chests", true, "There is a recipe to get this item.")
|
||||
.getBoolean(oneRingSpawn);
|
||||
chanceTaintedMjolnir = config.get(
|
||||
RANDOM,
|
||||
"Tainted Mjolnir spawning change",
|
||||
25,
|
||||
"If you have a lot of mods adding dungeon loot, you should definetely increase this")
|
||||
.getInt();
|
||||
chanceOneRing = config.get(
|
||||
RANDOM,
|
||||
"One Ring spawning chance",
|
||||
15,
|
||||
"If you have a lot of mods adding dungeon loot, you should definetely increase this")
|
||||
.getInt();
|
||||
removeAmberAndCinnabarMacerating = config.get(
|
||||
RANDOM,
|
||||
"Clear Amber/Cinnabar Macerating",
|
||||
true,
|
||||
"This is here because of conflicts between mods that add the same input and different outputs")
|
||||
.getBoolean(removeAmberAndCinnabarMacerating);
|
||||
impactOfRain = config.get(RANDOM, "Impact of rain", true, "The impact of rain on all wings")
|
||||
.getBoolean(impactOfRain);
|
||||
etherealMaceratorWhiteList.addAll(Arrays.asList(config.get(
|
||||
RANDOM,
|
||||
"White List for Ethereal Processor",
|
||||
new String[] {"ore", "cluster"},
|
||||
"The allowed ore dictionary prefix for Ethereal Processor.")
|
||||
.getStringList()));
|
||||
|
||||
// DEFAULTS - Aer - 15,000 Aqua - 5,000 Ignis - 20,000 Ordo - 16,000 Perditio - 10,000 Terra - 2,000
|
||||
airOutput = config.get(OUTPUTS, "Aer Output", 15000).getDouble(airOutput);
|
||||
@@ -171,66 +226,201 @@ public class EMTConfigHandler {
|
||||
earthOutput = config.get(OUTPUTS, "Terra Output", 2000).getDouble(earthOutput);
|
||||
outputCap = config.get(OUTPUTS, "Output Cap", -1).getDouble(outputCap);
|
||||
|
||||
EssentiaGeneratorStorage = config.get(VALUES, "Essentia Generator Storage", 1000000, "This is the number you have to modify if you want to change the size of the " + "internal buffer of the Essentia Generator").getDouble(EssentiaGeneratorStorage);
|
||||
EMT_GT_Loader.aIDoffset = config.get(VALUES, "aID offset for Gregetch Machinery", (13000 - GT_Values.VN.length - 1), "This Mod will use " + Integer.toString(GT_Values.VN.length + 1) + " IDs, do not change if you dont know what you are doing!").getInt(13000 - GT_Values.VN.length - 1);
|
||||
EssentiaGeneratorStorage = config.get(
|
||||
VALUES,
|
||||
"Essentia Generator Storage",
|
||||
1000000,
|
||||
"This is the number you have to modify if you want to change the size of the "
|
||||
+ "internal buffer of the Essentia Generator")
|
||||
.getDouble(EssentiaGeneratorStorage);
|
||||
EMT_GT_Loader.aIDoffset = config.get(
|
||||
VALUES,
|
||||
"aID offset for Gregetch Machinery",
|
||||
(13000 - GT_Values.VN.length - 1),
|
||||
"This Mod will use " + Integer.toString(GT_Values.VN.length + 1)
|
||||
+ " IDs, do not change if you dont know what you are doing!")
|
||||
.getInt(13000 - GT_Values.VN.length - 1);
|
||||
|
||||
wandChargerConsumption = config.get(VALUES, "Wand Charging Station Consumption", 50000, "This is the number you have to modify if you want to make the Industrial Wand Charging " + "Station use more or less EU to charge 1 unit of Vis on your wand.").getDouble(wandChargerConsumption);
|
||||
compressedSolarOutput = config.get(VALUES, "Compressed Solar Panel Output", 10, "This is the number you have to modify if you want to make the Compressed Solar Panel yield " + "more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(compressedSolarOutput);
|
||||
doubleCompressedSolarOutput = config.get(VALUES, "Double Compressed Solar Panel Output", 100, "This is the number you have to modify if you want to make the Double Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(doubleCompressedSolarOutput);
|
||||
tripleCompressedSolarOutput = config.get(VALUES, "Triple Compressed Solar Panel Output", 1000, "This is the number you have to modify if you want to make the Triple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(tripleCompressedSolarOutput);
|
||||
quadrupleCompressedSolarOutput = config.get(VALUES, "Quadruple Compressed Solar Panel Output", 10000, "This is the number you have to modify if you want to make the Quadruple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(quadrupleCompressedSolarOutput);
|
||||
quintupleCompressedSolarOutput = config.get(VALUES, "Quintouple Compressed Solar Panel Output", 100000, "This is the number you have to modify if you want to make the Quintouple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(quintupleCompressedSolarOutput);
|
||||
sextupleCompressedSolarOutput = config.get(VALUES, "Sextouple Compressed Solar Panel Output", 1000000, "This is the number you have to modify if you want to make the Sextouple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(sextupleCompressedSolarOutput);
|
||||
septupleCompressedSolarOutput = config.get(VALUES, "Septouple Compressed Solar Panel Output", 10000000, "This is the number you have to modify if you want to make the Septouple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(septupleCompressedSolarOutput);
|
||||
octupleCompressedSolarOutput = config.get(VALUES, "Octtouple Compressed Solar Panel Output", 100000000, "This is the number you have to modify if you want to make the Octtouple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(octupleCompressedSolarOutput);
|
||||
wandChargerConsumption = config.get(
|
||||
VALUES,
|
||||
"Wand Charging Station Consumption",
|
||||
50000,
|
||||
"This is the number you have to modify if you want to make the Industrial Wand Charging "
|
||||
+ "Station use more or less EU to charge 1 unit of Vis on your wand.")
|
||||
.getDouble(wandChargerConsumption);
|
||||
compressedSolarOutput = config.get(
|
||||
VALUES,
|
||||
"Compressed Solar Panel Output",
|
||||
10,
|
||||
"This is the number you have to modify if you want to make the Compressed Solar Panel yield "
|
||||
+ "more or less EU per tick. Really, you shouldn't touch that, "
|
||||
+ "since it's pretty balanced as it is.")
|
||||
.getDouble(compressedSolarOutput);
|
||||
doubleCompressedSolarOutput = config.get(
|
||||
VALUES,
|
||||
"Double Compressed Solar Panel Output",
|
||||
100,
|
||||
"This is the number you have to modify if you want to make the Double Compressed Solar Panel "
|
||||
+ "yield more or less EU per tick. Really, you shouldn't touch that, "
|
||||
+ "since it's pretty balanced as it is.")
|
||||
.getDouble(doubleCompressedSolarOutput);
|
||||
tripleCompressedSolarOutput = config.get(
|
||||
VALUES,
|
||||
"Triple Compressed Solar Panel Output",
|
||||
1000,
|
||||
"This is the number you have to modify if you want to make the Triple Compressed Solar Panel "
|
||||
+ "yield more or less EU per tick. Really, you shouldn't touch that, "
|
||||
+ "since it's pretty balanced as it is.")
|
||||
.getDouble(tripleCompressedSolarOutput);
|
||||
quadrupleCompressedSolarOutput = config.get(
|
||||
VALUES,
|
||||
"Quadruple Compressed Solar Panel Output",
|
||||
10000,
|
||||
"This is the number you have to modify if you want to make the Quadruple Compressed Solar Panel "
|
||||
+ "yield more or less EU per tick. Really, you shouldn't touch that, "
|
||||
+ "since it's pretty balanced as it is.")
|
||||
.getDouble(quadrupleCompressedSolarOutput);
|
||||
quintupleCompressedSolarOutput = config.get(
|
||||
VALUES,
|
||||
"Quintouple Compressed Solar Panel Output",
|
||||
100000,
|
||||
"This is the number you have to modify if you want to make the Quintouple Compressed Solar Panel "
|
||||
+ "yield more or less EU per tick. Really, you shouldn't touch that, "
|
||||
+ "since it's pretty balanced as it is.")
|
||||
.getDouble(quintupleCompressedSolarOutput);
|
||||
sextupleCompressedSolarOutput = config.get(
|
||||
VALUES,
|
||||
"Sextouple Compressed Solar Panel Output",
|
||||
1000000,
|
||||
"This is the number you have to modify if you want to make the Sextouple Compressed Solar Panel "
|
||||
+ "yield more or less EU per tick. Really, you shouldn't touch that, "
|
||||
+ "since it's pretty balanced as it is.")
|
||||
.getDouble(sextupleCompressedSolarOutput);
|
||||
septupleCompressedSolarOutput = config.get(
|
||||
VALUES,
|
||||
"Septouple Compressed Solar Panel Output",
|
||||
10000000,
|
||||
"This is the number you have to modify if you want to make the Septouple Compressed Solar Panel "
|
||||
+ "yield more or less EU per tick. Really, you shouldn't touch that, "
|
||||
+ "since it's pretty balanced as it is.")
|
||||
.getDouble(septupleCompressedSolarOutput);
|
||||
octupleCompressedSolarOutput = config.get(
|
||||
VALUES,
|
||||
"Octtouple Compressed Solar Panel Output",
|
||||
100000000,
|
||||
"This is the number you have to modify if you want to make the Octtouple Compressed Solar Panel "
|
||||
+ "yield more or less EU per tick. Really, you shouldn't touch that, "
|
||||
+ "since it's pretty balanced as it is.")
|
||||
.getDouble(octupleCompressedSolarOutput);
|
||||
|
||||
nanoBootsSpeed = config.get(VALUES, "Nano Boots of the Traveller Speed", 0.25, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsSpeed);
|
||||
quantumBootsSpeed = config.get(VALUES, "Quantum Boots of the Traveller Speed", 0.5, "Watch out, that goes up REALLY quickly.").getDouble(quantumBootsSpeed);
|
||||
nanoBootsJump = config.get(VALUES, "Nano Boots of the Traveller jump", 0.6, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump);
|
||||
quantumBootsJump = config.get(VALUES, "Quantum Boots of the Traveller jump", 0.9, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump);
|
||||
etherealProcessorBaseSpeed = config.get(VALUES, "Etheral Processor speed", 400, "Default is 400, the double of a regular furnace").getInt();
|
||||
etherealProcessorBonus = config.get(VALUES, "Ethereal Processor Bonus", 10, "This number is the chance of getting a Thaumium Ingot as a bonus when " + "processing an item in the machine. It is 1 out of the number you will enter. " + "The default is 1/10 chance.").getInt();
|
||||
chargeFocusProduction = config.get(VALUES, "Wand Focus: Charge production", 64, "Default is 64").getInt();
|
||||
armorBaubleProduction = config.get(VALUES, "Armor Charging Ring production", 32, "Default is 32").getInt();
|
||||
inventoryBaubleProdution = config.get(VALUES, "Inventory Charging Ring production", 32, "Default is 32").getInt();
|
||||
wandChargeFocusCost = config.get(VALUES, "Wand Focus: Wand Charging Cost", 40000, "Default is 40000").getInt();
|
||||
nanoBootsSpeed = config.get(
|
||||
VALUES, "Nano Boots of the Traveller Speed", 0.25, "Watch out, that goes up REALLY quickly.")
|
||||
.getDouble(nanoBootsSpeed);
|
||||
quantumBootsSpeed = config.get(
|
||||
VALUES, "Quantum Boots of the Traveller Speed", 0.5, "Watch out, that goes up REALLY quickly.")
|
||||
.getDouble(quantumBootsSpeed);
|
||||
nanoBootsJump = config.get(
|
||||
VALUES, "Nano Boots of the Traveller jump", 0.6, "Watch out, that goes up REALLY quickly.")
|
||||
.getDouble(nanoBootsJump);
|
||||
quantumBootsJump = config.get(
|
||||
VALUES, "Quantum Boots of the Traveller jump", 0.9, "Watch out, that goes up REALLY quickly.")
|
||||
.getDouble(nanoBootsJump);
|
||||
etherealProcessorBaseSpeed = config.get(
|
||||
VALUES, "Etheral Processor speed", 400, "Default is 400, the double of a regular furnace")
|
||||
.getInt();
|
||||
etherealProcessorBonus = config.get(
|
||||
VALUES,
|
||||
"Ethereal Processor Bonus",
|
||||
10,
|
||||
"This number is the chance of getting a Thaumium Ingot as a bonus when "
|
||||
+ "processing an item in the machine. It is 1 out of the number you will enter. "
|
||||
+ "The default is 1/10 chance.")
|
||||
.getInt();
|
||||
chargeFocusProduction = config.get(VALUES, "Wand Focus: Charge production", 64, "Default is 64")
|
||||
.getInt();
|
||||
armorBaubleProduction = config.get(VALUES, "Armor Charging Ring production", 32, "Default is 32")
|
||||
.getInt();
|
||||
inventoryBaubleProdution = config.get(VALUES, "Inventory Charging Ring production", 32, "Default is 32")
|
||||
.getInt();
|
||||
wandChargeFocusCost = config.get(VALUES, "Wand Focus: Wand Charging Cost", 40000, "Default is 40000")
|
||||
.getInt();
|
||||
|
||||
nanoBootsMinDrop = config.get(VALUES, "Nano Boots of the Traveller minimum drop", 6.0, "The distance allowed to fall without any damage").getDouble(nanoBootsMinDrop);
|
||||
nanoBootsMaxDrop = config.get(VALUES, "Nano Boots of the Traveller maximum healthy drop", 35.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(nanoBootsMaxDrop);
|
||||
quantumBootsMinDrop = config.get(VALUES, "Quantum Boots of the Traveller minimum drop", 10.0, "The distance allowed to fall without any damage").getDouble(quantumBootsMinDrop);
|
||||
quantumBootsMaxDrop = config.get(VALUES, "Quantum Boots of the Traveller maximum healthy drop", 100.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(quantumBootsMaxDrop);
|
||||
nanoBootsMinDrop = config.get(
|
||||
VALUES,
|
||||
"Nano Boots of the Traveller minimum drop",
|
||||
6.0,
|
||||
"The distance allowed to fall without any damage")
|
||||
.getDouble(nanoBootsMinDrop);
|
||||
nanoBootsMaxDrop = config.get(
|
||||
VALUES,
|
||||
"Nano Boots of the Traveller maximum healthy drop",
|
||||
35.0,
|
||||
"Energy amount drained will tripled if player drops more than this amount of blocks")
|
||||
.getDouble(nanoBootsMaxDrop);
|
||||
quantumBootsMinDrop = config.get(
|
||||
VALUES,
|
||||
"Quantum Boots of the Traveller minimum drop",
|
||||
10.0,
|
||||
"The distance allowed to fall without any damage")
|
||||
.getDouble(quantumBootsMinDrop);
|
||||
quantumBootsMaxDrop = config.get(
|
||||
VALUES,
|
||||
"Quantum Boots of the Traveller maximum healthy drop",
|
||||
100.0,
|
||||
"Energy amount drained will tripled if player drops more than this amount of blocks")
|
||||
.getDouble(quantumBootsMaxDrop);
|
||||
|
||||
thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Drill", false).getBoolean(thaumiumDrillResearch);
|
||||
thaumiumChainsawResearch = config.get(RESEARCH, "Thaumium Chainsaw", false).getBoolean(thaumiumChainsawResearch);
|
||||
thaumiumChainsawResearch =
|
||||
config.get(RESEARCH, "Thaumium Chainsaw", false).getBoolean(thaumiumChainsawResearch);
|
||||
thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Omnitool", false).getBoolean(thaumiumOmnitoolResearch);
|
||||
rockbreakerDrillResearch = config.get(RESEARCH, "Drill of the Rockbreaker", false).getBoolean(rockbreakerDrillResearch);
|
||||
streamChainsawResearch = config.get(RESEARCH, "Chainsaw of the Stream", false).getBoolean(streamChainsawResearch);
|
||||
electricGooglesResearch = config.get(RESEARCH, "Electric Googles of Revealing", false).getBoolean(electricGooglesResearch);
|
||||
nanoGooglesResearch = config.get(RESEARCH, "Nanosuit Googles of Revealing", false).getBoolean(nanoGooglesResearch);
|
||||
quantumGooglesResearch = config.get(RESEARCH, "Quantum Googles of Revealing", false).getBoolean(quantumGooglesResearch);
|
||||
rockbreakerDrillResearch =
|
||||
config.get(RESEARCH, "Drill of the Rockbreaker", false).getBoolean(rockbreakerDrillResearch);
|
||||
streamChainsawResearch =
|
||||
config.get(RESEARCH, "Chainsaw of the Stream", false).getBoolean(streamChainsawResearch);
|
||||
electricGooglesResearch =
|
||||
config.get(RESEARCH, "Electric Googles of Revealing", false).getBoolean(electricGooglesResearch);
|
||||
nanoGooglesResearch =
|
||||
config.get(RESEARCH, "Nanosuit Googles of Revealing", false).getBoolean(nanoGooglesResearch);
|
||||
quantumGooglesResearch =
|
||||
config.get(RESEARCH, "Quantum Googles of Revealing", false).getBoolean(quantumGooglesResearch);
|
||||
ironOmnitoolResearch = config.get(RESEARCH, "Omnitool", false).getBoolean(ironOmnitoolResearch);
|
||||
diamondOmnitoolResearch = config.get(RESEARCH, "Diamond Omnitool", false).getBoolean(diamondOmnitoolResearch);
|
||||
diamondOmnitoolResearch =
|
||||
config.get(RESEARCH, "Diamond Omnitool", false).getBoolean(diamondOmnitoolResearch);
|
||||
explosionFocusResearch = config.get(RESEARCH, "Explosion Focus", false).getBoolean(explosionFocusResearch);
|
||||
christmasFocusResearch = config.get(RESEARCH, "Kris-tmas Focus", false).getBoolean(christmasFocusResearch);
|
||||
energyBallFocusResearch = config.get(RESEARCH, "EnergyBall Focus", false).getBoolean(christmasFocusResearch);
|
||||
energyBallFocusResearch =
|
||||
config.get(RESEARCH, "EnergyBall Focus", false).getBoolean(christmasFocusResearch);
|
||||
shieldFocusResearch = config.get(RESEARCH, "Shield Focus", false).getBoolean(shieldFocusResearch);
|
||||
shieldBlockResearch = config.get(RESEARCH, "Shield Block", false).getBoolean(shieldBlockResearch);
|
||||
potentiaGeneratorResearch = config.get(RESEARCH, "Potentia Generator", false).getBoolean(potentiaGeneratorResearch);
|
||||
potentiaGeneratorResearch =
|
||||
config.get(RESEARCH, "Potentia Generator", false).getBoolean(potentiaGeneratorResearch);
|
||||
ignisGeneratorResearch = config.get(RESEARCH, "Ignis Generator", false).getBoolean(ignisGeneratorResearch);
|
||||
auramGeneratorResearch = config.get(RESEARCH, "Auram Generator", false).getBoolean(auramGeneratorResearch);
|
||||
arborGeneratorResearch = config.get(RESEARCH, "Arbor Generator", false).getBoolean(arborGeneratorResearch);
|
||||
lucrumGeneratorResearch = config.get(RESEARCH, "Lucrum Generator", false).getBoolean(lucrumGeneratorResearch);
|
||||
wandChargingSationResearch = config.get(RESEARCH, "Industrial Wand Charging Station", false).getBoolean(wandChargingSationResearch);
|
||||
tinyUraniumResearch = config.get(RESEARCH, "Tiny Piles of Uranium", false).getBoolean(tinyUraniumResearch);
|
||||
lucrumGeneratorResearch =
|
||||
config.get(RESEARCH, "Lucrum Generator", false).getBoolean(lucrumGeneratorResearch);
|
||||
wandChargingSationResearch =
|
||||
config.get(RESEARCH, "Industrial Wand Charging Station", false).getBoolean(wandChargingSationResearch);
|
||||
tinyUraniumResearch =
|
||||
config.get(RESEARCH, "Tiny Piles of Uranium", false).getBoolean(tinyUraniumResearch);
|
||||
thorHammerResearch = config.get(RESEARCH, "Mjolnir", false).getBoolean(thorHammerResearch);
|
||||
superchargedThorHammerResearch = config.get(RESEARCH, "Supercharged Mjolnir", false).getBoolean(superchargedThorHammerResearch);
|
||||
compressedSolarsResearch = config.get(RESEARCH, "Compressed Solars", false).getBoolean(compressedSolarsResearch);
|
||||
solarHelmetResearch = config.get(RESEARCH, "Solar Helmet of Revealing", false).getBoolean(solarHelmetResearch);
|
||||
electricBootsResearch = config.get(RESEARCH, "Electric Boots of the Traveller", false).getBoolean(electricBootsResearch);
|
||||
nanoBootsResearch = config.get(RESEARCH, "Nano Boots of the Traveller", false).getBoolean(nanoBootsResearch);
|
||||
quantumBootsResearch = config.get(RESEARCH, "Quantum Boots of the Traveller", false).getBoolean(quantumBootsResearch);
|
||||
electricScribingToolsResearch = config.get(RESEARCH, "Electric Scribing Tools", false).getBoolean(electricScribingToolsResearch);
|
||||
etherealProcessorResearch = config.get(RESEARCH, "Ethereal Processor", false).getBoolean(etherealProcessorResearch);
|
||||
superchargedThorHammerResearch =
|
||||
config.get(RESEARCH, "Supercharged Mjolnir", false).getBoolean(superchargedThorHammerResearch);
|
||||
compressedSolarsResearch =
|
||||
config.get(RESEARCH, "Compressed Solars", false).getBoolean(compressedSolarsResearch);
|
||||
solarHelmetResearch =
|
||||
config.get(RESEARCH, "Solar Helmet of Revealing", false).getBoolean(solarHelmetResearch);
|
||||
electricBootsResearch =
|
||||
config.get(RESEARCH, "Electric Boots of the Traveller", false).getBoolean(electricBootsResearch);
|
||||
nanoBootsResearch =
|
||||
config.get(RESEARCH, "Nano Boots of the Traveller", false).getBoolean(nanoBootsResearch);
|
||||
quantumBootsResearch =
|
||||
config.get(RESEARCH, "Quantum Boots of the Traveller", false).getBoolean(quantumBootsResearch);
|
||||
electricScribingToolsResearch =
|
||||
config.get(RESEARCH, "Electric Scribing Tools", false).getBoolean(electricScribingToolsResearch);
|
||||
etherealProcessorResearch =
|
||||
config.get(RESEARCH, "Ethereal Processor", false).getBoolean(etherealProcessorResearch);
|
||||
waterSolarsResearch = config.get(RESEARCH, "Water Solar Panels", false).getBoolean(waterSolarsResearch);
|
||||
darkSolarsResearch = config.get(RESEARCH, "Entropy Solar Panels", false).getBoolean(darkSolarsResearch);
|
||||
orderSolarsResearch = config.get(RESEARCH, "Order Solar Panels", false).getBoolean(orderSolarsResearch);
|
||||
@@ -240,15 +430,21 @@ public class EMTConfigHandler {
|
||||
saxumGenResearch = config.get(RESEARCH, "Saxum Generator", false).getBoolean(saxumGenResearch);
|
||||
uuMInfusionResearch = config.get(RESEARCH, "UU-Mater Infusion", false).getBoolean(uuMInfusionResearch);
|
||||
portableNodeResarch = config.get(RESEARCH, "Portable Node", false).getBoolean(portableNodeResarch);
|
||||
electricHoeGrowthResearch = config.get(RESEARCH, "Electric Hoe of Growth", false).getBoolean(electricHoeGrowthResearch);
|
||||
chargeFocusResearch = config.get(RESEARCH, "Wand Focus: Charging", false).getBoolean(chargeFocusResearch);
|
||||
wandChargeFocusResearch = config.get(RESEARCH, "Wand Focus: Wand Charging", false).getBoolean(wandChargeFocusResearch);
|
||||
inventoryChargingRing = config.get(RESEARCH, "Inventory Charging Ring", false).getBoolean(inventoryChargingRing);
|
||||
electricHoeGrowthResearch =
|
||||
config.get(RESEARCH, "Electric Hoe of Growth", false).getBoolean(electricHoeGrowthResearch);
|
||||
chargeFocusResearch =
|
||||
config.get(RESEARCH, "Wand Focus: Charging", false).getBoolean(chargeFocusResearch);
|
||||
wandChargeFocusResearch =
|
||||
config.get(RESEARCH, "Wand Focus: Wand Charging", false).getBoolean(wandChargeFocusResearch);
|
||||
inventoryChargingRing =
|
||||
config.get(RESEARCH, "Inventory Charging Ring", false).getBoolean(inventoryChargingRing);
|
||||
armorChargingRing = config.get(RESEARCH, "Armor Charging Ring", false).getBoolean(armorChargingRing);
|
||||
thaumiumWingResearch = config.get(RESEARCH, "Thaumium Reinforced Wings", false).getBoolean(thaumiumWingResearch);
|
||||
thaumiumWingResearch =
|
||||
config.get(RESEARCH, "Thaumium Reinforced Wings", false).getBoolean(thaumiumWingResearch);
|
||||
nanoWingResearch = config.get(RESEARCH, "Nanosuit Wings", false).getBoolean(nanoWingResearch);
|
||||
quantumWingsResearch = config.get(RESEARCH, "Quantum Wings", false).getBoolean(quantumWingsResearch);
|
||||
infusedQuantumChestplate = config.get(RESEARCH, "Infused Quantum Chestplate", false).getBoolean(infusedQuantumChestplate);
|
||||
infusedQuantumChestplate =
|
||||
config.get(RESEARCH, "Infused Quantum Chestplate", false).getBoolean(infusedQuantumChestplate);
|
||||
aerGeneratorResearch = config.get(RESEARCH, "Aer Generator", false).getBoolean(aerGeneratorResearch);
|
||||
|
||||
if (config.hasChanged()) {
|
||||
|
||||
@@ -5,55 +5,178 @@ import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
public class EMTCraftingAspects {
|
||||
|
||||
public static AspectList thaumiumDrillCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.MINE, 16).add(Aspect.ENERGY, 16);
|
||||
public static AspectList thaumiumChainsawCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.WEAPON, 16).add(Aspect.ENERGY, 16);
|
||||
public static AspectList thaumicQuantumHelmetCrafting = new AspectList().add(Aspect.ARMOR, 25).add(Aspect.SENSES, 25).add(Aspect.ENERGY, 25);
|
||||
public static AspectList diamondOmnitoolCrafting = new AspectList().add(Aspect.ORDER, 15).add(Aspect.AIR, 15);
|
||||
public static AspectList thaumiumOmnitoolCrafting = new AspectList().add(Aspect.TOOL, 25).add(Aspect.MINE, 25).add(Aspect.ENERGY, 25).add(Aspect.WEAPON, 25);
|
||||
public static AspectList thaumicNanoHelmetCrafting = new AspectList().add(Aspect.ARMOR, 16).add(Aspect.SENSES, 16).add(Aspect.ENERGY, 16);
|
||||
public static AspectList laserFocusCrafting = new AspectList().add(Aspect.FIRE, 30).add(Aspect.MOTION, 16).add(Aspect.WEAPON, 30).add(Aspect.DEATH, 16);
|
||||
public static AspectList christmasFocusCrafting = new AspectList().add(Aspect.ORDER, 20).add(Aspect.AIR, 20);
|
||||
public static AspectList shieldFocusCrafting = new AspectList().add(Aspect.AIR, 16).add(Aspect.ARMOR, 20).add(Aspect.CRYSTAL, 16).add(Aspect.TRAP, 20).add(Aspect.LIFE, 16);
|
||||
public static AspectList electricGogglesCrafting = new AspectList().add(Aspect.AIR, 20).add(Aspect.ORDER, 20).add(Aspect.WATER, 20);
|
||||
public static AspectList potentiaGeneratorCrafting = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.MAGIC, 32).add(Aspect.METAL, 32).add(Aspect.EXCHANGE, 32);
|
||||
public static AspectList ignisGeneratorCrafting = new AspectList().add(Aspect.FIRE, 16).add(Aspect.EXCHANGE, 8);
|
||||
public static AspectList auramGeneratorCrafting = new AspectList().add(Aspect.AURA, 16).add(Aspect.EXCHANGE, 8);
|
||||
public static AspectList arborGeneratorCrafting = new AspectList().add(Aspect.TREE, 16).add(Aspect.EXCHANGE, 8);
|
||||
public static AspectList streamChaisnawCrafting = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.TREE, 48).add(Aspect.TOOL, 32).add(Aspect.WATER, 32);
|
||||
public static AspectList rockbreakerDrillCrafting = new AspectList().add(Aspect.TOOL, 32).add(Aspect.ENERGY, 48).add(Aspect.MINE, 32);
|
||||
public static AspectList shieldBlockCrafting = new AspectList().add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1);
|
||||
public static AspectList tinyUraniumCrafting = new AspectList().add(Aspect.FIRE, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1).add(Aspect.EARTH, 1).add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1);
|
||||
public static AspectList thorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.WEATHER, 48).add(Aspect.ELDRITCH, 32);
|
||||
public static AspectList superchargedThorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.ENERGY, 64).add(Aspect.BEAST, 32);
|
||||
public static AspectList wandCharger = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.CRAFT, 48).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64);
|
||||
public static AspectList compressedSolars = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8);
|
||||
public static AspectList solarHelmetRevealing = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.AIR, 32).add(Aspect.LIGHT, 25);
|
||||
public static AspectList electricBootsTravel = new AspectList().add(Aspect.ENERGY, 16).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 32);
|
||||
public static AspectList nanoBootsTravel = new AspectList().add(Aspect.ENERGY, 25).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 48);
|
||||
public static AspectList quantumBootsTravel = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 64);
|
||||
public static AspectList electricScribingTools = new AspectList().add(Aspect.AIR, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16);
|
||||
public static AspectList etherealProcessor = new AspectList().add(Aspect.MECHANISM, 16).add(Aspect.MAGIC, 16).add(Aspect.CRAFT, 16);
|
||||
public static AspectList waterSolars = new AspectList().add(Aspect.WATER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList darkSolars = new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList orderSolars = new AspectList().add(Aspect.ORDER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList fireSolars = new AspectList().add(Aspect.FIRE, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList airSolars = new AspectList().add(Aspect.AIR, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList earthSolars = new AspectList().add(Aspect.EARTH, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList uuMatterInfusions = new AspectList().add(Aspect.FIRE, 32).add(Aspect.WATER, 32).add(Aspect.AIR, 32).add(Aspect.EARTH, 32).add(Aspect.ORDER, 32).add(Aspect.ENTROPY, 32);
|
||||
public static AspectList lesserUUMInfusions = new AspectList().add(Aspect.FIRE, 16).add(Aspect.WATER, 16).add(Aspect.AIR, 16).add(Aspect.EARTH, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16);
|
||||
public static AspectList cheapUUMInfusions = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8);
|
||||
public static AspectList cheapestUUMInfusions = new AspectList().add(Aspect.FIRE, 4).add(Aspect.WATER, 4).add(Aspect.AIR, 4).add(Aspect.EARTH, 4).add(Aspect.ORDER, 4).add(Aspect.ENTROPY, 4);
|
||||
public static AspectList portableNode = new AspectList().add(Aspect.MAGIC, 32).add(Aspect.AURA, 32).add(Aspect.GREED, 32);
|
||||
public static AspectList electricHoeGrowth = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.PLANT, 25).add(Aspect.CROP, 32).add(Aspect.MAGIC, 48);
|
||||
public static AspectList chargeFocus = new AspectList().add(Aspect.EXCHANGE, 25).add(Aspect.ENERGY, 32).add(Aspect.MECHANISM, 32);
|
||||
public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.AURA, 32).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64);
|
||||
public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.CRYSTAL, 32).add(Aspect.MAGIC, 48);
|
||||
public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.ARMOR, 32).add(Aspect.MAGIC, 48);
|
||||
public static AspectList thaumiumWing = new AspectList().add(Aspect.FIRE, 48).add(Aspect.WATER, 48).add(Aspect.AIR, 48).add(Aspect.EARTH, 48).add(Aspect.ORDER, 48).add(Aspect.ENTROPY, 48);
|
||||
public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32);
|
||||
public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 48);
|
||||
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);
|
||||
public static AspectList thaumiumDrillCrafting =
|
||||
new AspectList().add(Aspect.TOOL, 16).add(Aspect.MINE, 16).add(Aspect.ENERGY, 16);
|
||||
public static AspectList thaumiumChainsawCrafting =
|
||||
new AspectList().add(Aspect.TOOL, 16).add(Aspect.WEAPON, 16).add(Aspect.ENERGY, 16);
|
||||
public static AspectList thaumicQuantumHelmetCrafting =
|
||||
new AspectList().add(Aspect.ARMOR, 25).add(Aspect.SENSES, 25).add(Aspect.ENERGY, 25);
|
||||
public static AspectList diamondOmnitoolCrafting =
|
||||
new AspectList().add(Aspect.ORDER, 15).add(Aspect.AIR, 15);
|
||||
public static AspectList thaumiumOmnitoolCrafting = new AspectList()
|
||||
.add(Aspect.TOOL, 25)
|
||||
.add(Aspect.MINE, 25)
|
||||
.add(Aspect.ENERGY, 25)
|
||||
.add(Aspect.WEAPON, 25);
|
||||
public static AspectList thaumicNanoHelmetCrafting =
|
||||
new AspectList().add(Aspect.ARMOR, 16).add(Aspect.SENSES, 16).add(Aspect.ENERGY, 16);
|
||||
public static AspectList laserFocusCrafting = new AspectList()
|
||||
.add(Aspect.FIRE, 30)
|
||||
.add(Aspect.MOTION, 16)
|
||||
.add(Aspect.WEAPON, 30)
|
||||
.add(Aspect.DEATH, 16);
|
||||
public static AspectList christmasFocusCrafting =
|
||||
new AspectList().add(Aspect.ORDER, 20).add(Aspect.AIR, 20);
|
||||
public static AspectList shieldFocusCrafting = new AspectList()
|
||||
.add(Aspect.AIR, 16)
|
||||
.add(Aspect.ARMOR, 20)
|
||||
.add(Aspect.CRYSTAL, 16)
|
||||
.add(Aspect.TRAP, 20)
|
||||
.add(Aspect.LIFE, 16);
|
||||
public static AspectList electricGogglesCrafting =
|
||||
new AspectList().add(Aspect.AIR, 20).add(Aspect.ORDER, 20).add(Aspect.WATER, 20);
|
||||
public static AspectList potentiaGeneratorCrafting = new AspectList()
|
||||
.add(Aspect.ENERGY, 32)
|
||||
.add(Aspect.MAGIC, 32)
|
||||
.add(Aspect.METAL, 32)
|
||||
.add(Aspect.EXCHANGE, 32);
|
||||
public static AspectList ignisGeneratorCrafting =
|
||||
new AspectList().add(Aspect.FIRE, 16).add(Aspect.EXCHANGE, 8);
|
||||
public static AspectList auramGeneratorCrafting =
|
||||
new AspectList().add(Aspect.AURA, 16).add(Aspect.EXCHANGE, 8);
|
||||
public static AspectList arborGeneratorCrafting =
|
||||
new AspectList().add(Aspect.TREE, 16).add(Aspect.EXCHANGE, 8);
|
||||
public static AspectList streamChaisnawCrafting = new AspectList()
|
||||
.add(Aspect.ENERGY, 48)
|
||||
.add(Aspect.TREE, 48)
|
||||
.add(Aspect.TOOL, 32)
|
||||
.add(Aspect.WATER, 32);
|
||||
public static AspectList rockbreakerDrillCrafting =
|
||||
new AspectList().add(Aspect.TOOL, 32).add(Aspect.ENERGY, 48).add(Aspect.MINE, 32);
|
||||
public static AspectList shieldBlockCrafting =
|
||||
new AspectList().add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1);
|
||||
public static AspectList tinyUraniumCrafting = new AspectList()
|
||||
.add(Aspect.FIRE, 1)
|
||||
.add(Aspect.WATER, 1)
|
||||
.add(Aspect.AIR, 1)
|
||||
.add(Aspect.EARTH, 1)
|
||||
.add(Aspect.ORDER, 1)
|
||||
.add(Aspect.ENTROPY, 1);
|
||||
public static AspectList thorHammerCrafting =
|
||||
new AspectList().add(Aspect.WEAPON, 48).add(Aspect.WEATHER, 48).add(Aspect.ELDRITCH, 32);
|
||||
public static AspectList superchargedThorHammerCrafting =
|
||||
new AspectList().add(Aspect.WEAPON, 48).add(Aspect.ENERGY, 64).add(Aspect.BEAST, 32);
|
||||
public static AspectList wandCharger = new AspectList()
|
||||
.add(Aspect.ENERGY, 48)
|
||||
.add(Aspect.CRAFT, 48)
|
||||
.add(Aspect.EXCHANGE, 48)
|
||||
.add(Aspect.GREED, 64);
|
||||
public static AspectList compressedSolars = new AspectList()
|
||||
.add(Aspect.FIRE, 8)
|
||||
.add(Aspect.WATER, 8)
|
||||
.add(Aspect.AIR, 8)
|
||||
.add(Aspect.EARTH, 8)
|
||||
.add(Aspect.ORDER, 8)
|
||||
.add(Aspect.ENTROPY, 8);
|
||||
public static AspectList solarHelmetRevealing =
|
||||
new AspectList().add(Aspect.ENERGY, 32).add(Aspect.AIR, 32).add(Aspect.LIGHT, 25);
|
||||
public static AspectList electricBootsTravel =
|
||||
new AspectList().add(Aspect.ENERGY, 16).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 32);
|
||||
public static AspectList nanoBootsTravel =
|
||||
new AspectList().add(Aspect.ENERGY, 25).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 48);
|
||||
public static AspectList quantumBootsTravel =
|
||||
new AspectList().add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 64);
|
||||
public static AspectList electricScribingTools =
|
||||
new AspectList().add(Aspect.AIR, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16);
|
||||
public static AspectList etherealProcessor =
|
||||
new AspectList().add(Aspect.MECHANISM, 16).add(Aspect.MAGIC, 16).add(Aspect.CRAFT, 16);
|
||||
public static AspectList waterSolars =
|
||||
new AspectList().add(Aspect.WATER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList darkSolars =
|
||||
new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList orderSolars =
|
||||
new AspectList().add(Aspect.ORDER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList fireSolars =
|
||||
new AspectList().add(Aspect.FIRE, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList airSolars =
|
||||
new AspectList().add(Aspect.AIR, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList earthSolars =
|
||||
new AspectList().add(Aspect.EARTH, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16);
|
||||
public static AspectList uuMatterInfusions = new AspectList()
|
||||
.add(Aspect.FIRE, 32)
|
||||
.add(Aspect.WATER, 32)
|
||||
.add(Aspect.AIR, 32)
|
||||
.add(Aspect.EARTH, 32)
|
||||
.add(Aspect.ORDER, 32)
|
||||
.add(Aspect.ENTROPY, 32);
|
||||
public static AspectList lesserUUMInfusions = new AspectList()
|
||||
.add(Aspect.FIRE, 16)
|
||||
.add(Aspect.WATER, 16)
|
||||
.add(Aspect.AIR, 16)
|
||||
.add(Aspect.EARTH, 16)
|
||||
.add(Aspect.ORDER, 16)
|
||||
.add(Aspect.ENTROPY, 16);
|
||||
public static AspectList cheapUUMInfusions = new AspectList()
|
||||
.add(Aspect.FIRE, 8)
|
||||
.add(Aspect.WATER, 8)
|
||||
.add(Aspect.AIR, 8)
|
||||
.add(Aspect.EARTH, 8)
|
||||
.add(Aspect.ORDER, 8)
|
||||
.add(Aspect.ENTROPY, 8);
|
||||
public static AspectList cheapestUUMInfusions = new AspectList()
|
||||
.add(Aspect.FIRE, 4)
|
||||
.add(Aspect.WATER, 4)
|
||||
.add(Aspect.AIR, 4)
|
||||
.add(Aspect.EARTH, 4)
|
||||
.add(Aspect.ORDER, 4)
|
||||
.add(Aspect.ENTROPY, 4);
|
||||
public static AspectList portableNode =
|
||||
new AspectList().add(Aspect.MAGIC, 32).add(Aspect.AURA, 32).add(Aspect.GREED, 32);
|
||||
public static AspectList electricHoeGrowth = new AspectList()
|
||||
.add(Aspect.ENERGY, 32)
|
||||
.add(Aspect.PLANT, 25)
|
||||
.add(Aspect.CROP, 32)
|
||||
.add(Aspect.MAGIC, 48);
|
||||
public static AspectList chargeFocus =
|
||||
new AspectList().add(Aspect.EXCHANGE, 25).add(Aspect.ENERGY, 32).add(Aspect.MECHANISM, 32);
|
||||
public static AspectList wandChargeFocus = new AspectList()
|
||||
.add(Aspect.ENERGY, 48)
|
||||
.add(Aspect.AURA, 32)
|
||||
.add(Aspect.EXCHANGE, 48)
|
||||
.add(Aspect.GREED, 64);
|
||||
public static AspectList inventoryChargingRing =
|
||||
new AspectList().add(Aspect.ENERGY, 64).add(Aspect.CRYSTAL, 32).add(Aspect.MAGIC, 48);
|
||||
public static AspectList armorChargingRing =
|
||||
new AspectList().add(Aspect.ENERGY, 64).add(Aspect.ARMOR, 32).add(Aspect.MAGIC, 48);
|
||||
public static AspectList thaumiumWing = new AspectList()
|
||||
.add(Aspect.FIRE, 48)
|
||||
.add(Aspect.WATER, 48)
|
||||
.add(Aspect.AIR, 48)
|
||||
.add(Aspect.EARTH, 48)
|
||||
.add(Aspect.ORDER, 48)
|
||||
.add(Aspect.ENTROPY, 48);
|
||||
public static AspectList nanoWing = new AspectList()
|
||||
.add(Aspect.FLIGHT, 48)
|
||||
.add(Aspect.AIR, 32)
|
||||
.add(Aspect.MECHANISM, 48)
|
||||
.add(Aspect.ENERGY, 32);
|
||||
public static AspectList quantumWing = new AspectList()
|
||||
.add(Aspect.FLIGHT, 48)
|
||||
.add(Aspect.AIR, 32)
|
||||
.add(Aspect.MECHANISM, 48)
|
||||
.add(Aspect.ENERGY, 32)
|
||||
.add(Aspect.ARMOR, 48);
|
||||
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);
|
||||
}
|
||||
@@ -8,23 +8,22 @@ public class EMTCreativeTab extends CreativeTabs {
|
||||
|
||||
public EMTCreativeTab(String tabLabel) {
|
||||
super(tabLabel);
|
||||
//setBackgroundImageName("emt.png");
|
||||
// setBackgroundImageName("emt.png");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return EMTItems.electricThorHammer;
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public boolean hasSearchBar() {
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
@Override
|
||||
public boolean hasSearchBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSearchbarWidth() {
|
||||
return 60;
|
||||
}*/
|
||||
@Override
|
||||
public int getSearchbarWidth() {
|
||||
return 60;
|
||||
}*/
|
||||
}
|
||||
@@ -9,10 +9,14 @@ public class EMTDungeonChestGenerator {
|
||||
|
||||
public static void generateLoot() {
|
||||
if (!EMTConfigHandler.thorHammerResearch) {
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(EMTItems.taintedThorHammer), 0, 1, EMTConfigHandler.chanceTaintedMjolnir));
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST)
|
||||
.addItem(new WeightedRandomChestContent(
|
||||
new ItemStack(EMTItems.taintedThorHammer), 0, 1, EMTConfigHandler.chanceTaintedMjolnir));
|
||||
}
|
||||
if (!EMTConfigHandler.oneRingSpawn) {
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(EMTItems.onering), 0, 1, EMTConfigHandler.chanceOneRing));
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST)
|
||||
.addItem(new WeightedRandomChestContent(
|
||||
new ItemStack(EMTItems.onering), 0, 1, EMTConfigHandler.chanceOneRing));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package emt.util;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class EMTEssentiasOutputs {
|
||||
|
||||
@@ -25,8 +24,7 @@ public class EMTEssentiasOutputs {
|
||||
public static void addOutputs() {
|
||||
Collection<Aspect> aspectCollection = Aspect.aspects.values();
|
||||
for (Aspect aspect : aspectCollection) {
|
||||
if (!aspect.isPrimal())
|
||||
addOutput(aspect);
|
||||
if (!aspect.isPrimal()) addOutput(aspect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ public class EMTEventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingHurt(LivingHurtEvent e) {
|
||||
if (!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall)
|
||||
return;
|
||||
if (!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall) return;
|
||||
|
||||
ItemStack s = ((EntityPlayer) e.entityLiving).inventory.armorInventory[2];
|
||||
|
||||
@@ -50,8 +49,7 @@ public class EMTEventHandler {
|
||||
}
|
||||
|
||||
if (e.player.motionY > 0) {
|
||||
if (e.player.fallDistance > 0)
|
||||
e.player.fallDistance -= e.player.motionY;
|
||||
if (e.player.fallDistance > 0) e.player.fallDistance -= e.player.motionY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +62,8 @@ public class EMTEventHandler {
|
||||
}
|
||||
}
|
||||
if (event.entityLiving instanceof EntityTaintChicken) {
|
||||
event.entityLiving.entityDropItem(new ItemStack(EMTItems.itemEMTItems, event.entityLiving.worldObj.rand.nextInt(3), 13), 1);
|
||||
event.entityLiving.entityDropItem(
|
||||
new ItemStack(EMTItems.itemEMTItems, event.entityLiving.worldObj.rand.nextInt(3), 13), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +87,6 @@ public class EMTEventHandler {
|
||||
((EntityLiving) e.entityLiving).setAttackTarget(null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,5 +115,4 @@ public class EMTEventHandler {
|
||||
|
||||
e.world.setBlock(e.x, e.y, e.z, EMTBlocks.electricCloud);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
package emt.util;
|
||||
|
||||
import ic2.api.item.ElectricItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class EMTRandomHelper {
|
||||
|
||||
|
||||
Loaded 100 of 107 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user