mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-25 22:34:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be6fc768f8 | ||
|
|
9a1a1bbf3f | ||
|
|
a97a032210 | ||
|
|
956fb3dca8 | ||
|
|
cf16727366 | ||
|
|
93a0751493 | ||
|
|
14115778d0 | ||
|
|
cb5ba100bf | ||
|
|
6c0f4cffa0 | ||
|
|
91fb7afded | ||
|
|
96d86b67f9 | ||
|
|
0e82f8617b | ||
|
|
cb086bbb11 | ||
|
|
3fa79927a4 | ||
|
|
9ad8b01686 | ||
|
|
3467c41bef | ||
|
|
ac7b3e0b7d | ||
|
|
31cd1cb543 | ||
|
|
860162cb6f | ||
|
|
16c7a830a6 | ||
|
|
dccd62b33a | ||
|
|
03e9deebdc | ||
|
|
62438e890a | ||
|
|
37bb2991a3 | ||
|
|
d4ec5b5ec3 | ||
|
|
56e8993f03 | ||
|
|
e2f20373e6 | ||
|
|
b7d30223a0 | ||
|
|
7b5782af5d |
No files matched your search
@@ -25,6 +25,7 @@
|
||||
*.classpath
|
||||
*.project
|
||||
*.lock
|
||||
*.log
|
||||
|
||||
#Specific files
|
||||
MCFPost.txt
|
||||
|
||||
@@ -19,4 +19,10 @@ Before posting to the issue tracker, make sure you meet the following criteria:
|
||||
- You've gone through the effort to isolate EMT from other mods that aren't related to the issue.
|
||||
- You've gone through the effort to find what conditions are necessary to reproduce the issue.
|
||||
- The issue is subtle enough and has been around long enough that you think we might have missed it.
|
||||
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
|
||||
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
|
||||
|
||||
|
||||
# Fork
|
||||
This mod was forked by the GT:NH Team to continue the development of the 1.7.10 Branch.
|
||||
The up-to-date Master branch can be found on our Jenkins:
|
||||
http://jenkins.usrv.de
|
||||
+3
-1
@@ -24,7 +24,9 @@ archivesBaseName = config.mod_name
|
||||
minecraft {
|
||||
version = config.mc_version + "-" + config.forge_version + "-" + config.mc_version
|
||||
runDir = "run"
|
||||
|
||||
replaceIn "EMT.java"
|
||||
replace "@version@", config.mod_version
|
||||
|
||||
if (project.hasProperty('mappings_version'))
|
||||
mappings = project.mappings_version
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package_group=emt
|
||||
mc_version=1.7.10
|
||||
forge_version=10.13.4.1614
|
||||
mod_version=1.2.6.4
|
||||
mod_version=1.2.7.0
|
||||
mod_name=ElectroMagicTools
|
||||
Binary file not shown.
BIN
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
@API(apiVersion = "1.7.10-1.0.1.5", owner = "Baubles", provides = "Baubles|API") package baubles.api;
|
||||
|
||||
import cpw.mods.fml.common.API;
|
||||
import cpw.mods.fml.common.API;
|
||||
+89
-75
@@ -9,20 +9,24 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.common.eventhandler.EventBus;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import emt.command.CommandOutputs;
|
||||
import emt.init.EMTEntities;
|
||||
import emt.init.Registry;
|
||||
import emt.init.EMTResearches;
|
||||
import emt.init.Registry;
|
||||
import emt.network.PacketEMTKeys;
|
||||
import emt.proxy.CommonProxy;
|
||||
import emt.util.*;
|
||||
import emt.util.EMTClientEventHandler;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTCreativeTab;
|
||||
import emt.util.EMTDungeonChestGenerator;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import emt.util.EMTEventHandler;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -33,75 +37,85 @@ import org.apache.logging.log4j.Logger;
|
||||
guiFactory = EMT.GUI_FACTORY,
|
||||
dependencies = EMT.DEPENDS
|
||||
)
|
||||
public class EMT {
|
||||
public static final String NAME = "Electro-Magic Tools";
|
||||
public static final String MOD_ID = "EMT";
|
||||
public static final String VERSION = "1.2.6.4";
|
||||
public static final String TEXTURE_PATH = "emt";
|
||||
public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory";
|
||||
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
|
||||
public static final String COMMON_PROXY = "emt.proxy.CommonProxy";
|
||||
public static final String CHANNEL = "EMT";
|
||||
public static final String DEPENDS = "required-after:Thaumcraft ; required-after:IC2";
|
||||
|
||||
@SidedProxy(
|
||||
clientSide = CLIENT_PROXY,
|
||||
serverSide = COMMON_PROXY
|
||||
)
|
||||
public static CommonProxy proxy;
|
||||
public static final CreativeTabs TAB = new EMTCreativeTab(MOD_ID + ".creativeTab");
|
||||
public static final Logger LOGGER = LogManager.getLogger(NAME);
|
||||
public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(CHANNEL);
|
||||
|
||||
@Instance(MOD_ID)
|
||||
public static EMT instance;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
LOGGER.info("Starting planning the world domination");
|
||||
EMTConfigHandler.init(event.getSuggestedConfigurationFile());
|
||||
FMLCommonHandler.instance().bus().register(new EMTEventHandler());
|
||||
if(FMLCommonHandler.instance().getSide().isClient())
|
||||
FMLCommonHandler.instance().bus().register(new EMTClientEventHandler());
|
||||
Registry.register();
|
||||
EMTEssentiasOutputs.addPrimalOutputs();
|
||||
EMTEssentiasOutputs.addOutputs();
|
||||
registerPackets();
|
||||
LOGGER.info("Planning complete");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
LOGGER.info("Gathering allies");
|
||||
LOGGER.info("Loading the proxies");
|
||||
proxy.load();
|
||||
LOGGER.info("Making mobs drop additional items");
|
||||
MinecraftForge.EVENT_BUS.register(new EMTEventHandler());
|
||||
if(FMLCommonHandler.instance().getSide().isClient())
|
||||
MinecraftForge.EVENT_BUS.register(new EMTClientEventHandler());
|
||||
LOGGER.info("Adding dungeon loot");
|
||||
EMTDungeonChestGenerator.generateLoot();
|
||||
LOGGER.info("Registering entities");
|
||||
EMTEntities.registerEMTEntities();
|
||||
LOGGER.info("Registering the GUI Handler");
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);
|
||||
LOGGER.info("Allies gathered.");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
LOGGER.info("Starting the world takeover");
|
||||
Registry.registerLate();
|
||||
EMTResearches.register();
|
||||
LOGGER.info("World takeover complete. Enjoy!");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onFMLServerStart(FMLServerStartingEvent event) {
|
||||
event.registerServerCommand(new CommandOutputs());
|
||||
}
|
||||
|
||||
public void registerPackets() {
|
||||
INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER);
|
||||
}
|
||||
public class EMT
|
||||
{
|
||||
public static final String NAME = "Electro-Magic Tools";
|
||||
public static final String MOD_ID = "EMT";
|
||||
public static final String VERSION = "@version@";
|
||||
public static final String TEXTURE_PATH = "emt";
|
||||
public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory";
|
||||
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
|
||||
public static final String COMMON_PROXY = "emt.proxy.CommonProxy";
|
||||
public static final String CHANNEL = "EMT";
|
||||
public static final String DEPENDS = "required-after:Thaumcraft ; required-after:IC2; required-after:gregtech";
|
||||
@SidedProxy(clientSide="emt.proxy.ClientProxy", serverSide="emt.proxy.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
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");
|
||||
@Mod.Instance("EMT")
|
||||
public static EMT instance;
|
||||
|
||||
public boolean isSimulating()
|
||||
{
|
||||
return !FMLCommonHandler.instance().getEffectiveSide().isClient();
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
LOGGER.info("Starting planning the world domination|start preinit");
|
||||
EMTConfigHandler.init(event.getSuggestedConfigurationFile());
|
||||
FMLCommonHandler.instance().bus().register(new EMTEventHandler());
|
||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||
FMLCommonHandler.instance().bus().register(new EMTClientEventHandler());
|
||||
}
|
||||
Registry.registerPreInit();
|
||||
EMTEssentiasOutputs.addPrimalOutputs();
|
||||
EMTEssentiasOutputs.addOutputs();
|
||||
registerPackets();
|
||||
LOGGER.info("Planning complete|end preinit");
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void load(FMLInitializationEvent event)
|
||||
{
|
||||
LOGGER.info("Execute the plan|start init");
|
||||
Registry.registerInit();
|
||||
//LOGGER.info("Gathering allies");
|
||||
//LOGGER.info("Loading the proxies");
|
||||
proxy.load();
|
||||
//LOGGER.info("Making mobs drop additional items");
|
||||
MinecraftForge.EVENT_BUS.register(new EMTEventHandler());
|
||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||
MinecraftForge.EVENT_BUS.register(new EMTClientEventHandler());
|
||||
}
|
||||
//LOGGER.info("Adding dungeon loot");
|
||||
EMTDungeonChestGenerator.generateLoot();
|
||||
//LOGGER.info("Registering entities");
|
||||
EMTEntities.registerEMTEntities();
|
||||
//LOGGER.info("Registering the GUI Handler");
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);
|
||||
LOGGER.info("Allies gathered.|end init");
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
LOGGER.info("Starting the world takeover|start postinit");
|
||||
Registry.registerLate();
|
||||
EMTResearches.register();
|
||||
LOGGER.info("World takeover complete. Enjoy!|end postinit");
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onFMLServerStart(FMLServerStartingEvent event)
|
||||
{
|
||||
event.registerServerCommand(new CommandOutputs());
|
||||
}
|
||||
|
||||
public void registerPackets()
|
||||
{
|
||||
INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER);
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import emt.EMT;
|
||||
import emt.tile.TileEntityEMT;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package emt.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -8,12 +7,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.TileElectricCloud;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -21,10 +15,6 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXSparkle;
|
||||
import thaumcraft.client.fx.particles.FXWisp;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.lib.world.ThaumcraftWorldGenerator;
|
||||
import thaumcraft.common.tiles.TileNitor;
|
||||
|
||||
public class BlockElectricCloud extends BlockBase {
|
||||
public IIcon icon;
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -17,12 +18,12 @@ import net.minecraft.world.World;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
|
||||
private static int subtypes=6;
|
||||
|
||||
public BlockEssentiaGenerators(String name) {
|
||||
super(name, Material.iron, soundTypeMetal, 5, 4.0F);
|
||||
super(name, Material.iron, soundTypeMetal, subtypes, 4.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -31,7 +32,7 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
super.registerBlockIcons(ir);
|
||||
this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top");
|
||||
|
||||
for (int meta = 0; meta < 5; meta++) {
|
||||
for (int meta = 0; meta < subtypes; meta++) {
|
||||
iconSets[meta].top = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
|
||||
iconSets[meta].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
|
||||
iconSets[meta].side = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/side");
|
||||
@@ -42,6 +43,7 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/auramfront");
|
||||
iconSets[3].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/arborfront");
|
||||
iconSets[4].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
|
||||
iconSets[5].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -51,6 +53,7 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
list.add(new ItemStack(id, 1, 2));
|
||||
list.add(new ItemStack(id, 1, 3));
|
||||
list.add(new ItemStack(id, 1, 4));
|
||||
list.add(new ItemStack(id, 1, 5));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,6 +69,8 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
return new TileEntityArborGenerator();
|
||||
case 4:
|
||||
return new TileEntityAerGenerator();
|
||||
case 5:
|
||||
return new TileEntityLucrumGenerator();
|
||||
}
|
||||
return super.createTileEntity(world, meta);
|
||||
}
|
||||
@@ -84,4 +89,19 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
if (world.isRemote) {
|
||||
return true;
|
||||
}
|
||||
TileEntity tileentity = world.getTileEntity(i, j, k);
|
||||
if (tileentity != null) {
|
||||
player.openGui(emt.EMT.instance, 1, world, i, j, k);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -5,18 +5,14 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.TileEntityPortableNode;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.blocks.BlockAiry;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockPortableNode extends BlockAiry {
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package emt.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.generator.TileEntityBaseGenerator;
|
||||
import emt.tile.generator.TileEntityReflexionGen;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockReflectedGen
|
||||
extends BlockBaseContainer
|
||||
{
|
||||
private int subtypes;
|
||||
public static short Set;
|
||||
|
||||
public BlockReflectedGen(String name, short Set)
|
||||
{
|
||||
super(name, Material.iron, soundTypeMetal, 16, 4.0F);
|
||||
this.Set = Set;
|
||||
if (Set * 16 < TileEntityReflexionGen.L.size()) {
|
||||
this.subtypes = 16;
|
||||
} else {
|
||||
this.subtypes = (-(TileEntityReflexionGen.L.size() - Set * 16));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister ir)
|
||||
{
|
||||
super.registerBlockIcons(ir);
|
||||
this.blockIcon = ir.registerIcon("emt:machines/top");
|
||||
for (int meta = 0; meta < this.subtypes; meta++)
|
||||
{
|
||||
this.iconSets[meta].top = ir.registerIcon("emt:essentiagenerator/top");
|
||||
this.iconSets[meta].bottom = ir.registerIcon("emt:essentiagenerator/top");
|
||||
this.iconSets[meta].side = ir.registerIcon("emt:essentiagenerator/side");
|
||||
}
|
||||
for (int i = 0; i < this.subtypes; i++) {
|
||||
this.iconSets[i].frontOff = ir.registerIcon("emt:essentiagenerator/side");
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item id, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int i = 0; i < this.subtypes; i++) {
|
||||
list.add(new ItemStack(id, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
public TileEntity createTileEntity(World world, int meta)
|
||||
{
|
||||
if (meta + Set * 16 < TileEntityReflexionGen.L.size()) {
|
||||
return TileEntityReflexionGen.Gens[(meta + 16 * Set)];
|
||||
}
|
||||
return TileEntityReflexionGen.Gens[(meta + 16 * (Set - 1))];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
TileEntityBaseGenerator te = (TileEntityBaseGenerator)world.getTileEntity(x, y, z);
|
||||
if (te.isActive)
|
||||
{
|
||||
int color = te.aspect.getColor();
|
||||
float r = (color >> 16 & 0xFF) / 255.0F;
|
||||
float g = (color >> 8 & 0xFF) / 255.0F;
|
||||
float b = (color & 0xFF) / 255.0F;
|
||||
|
||||
EntitySmokeFX fx = new EntitySmokeFX(world, x + 0.5F, y + 1.1D, z + 0.5F, 0.0D, 0.1D, 0.0D, 3.0F);
|
||||
fx.setRBGColorF(r, g, b);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
if (world.isRemote) {
|
||||
return true;
|
||||
}
|
||||
TileEntity tileentity = world.getTileEntity(i, j, k);
|
||||
if (tileentity != null) {
|
||||
player.openGui(EMT.instance, 1, world, i, j, k);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,6 @@ package emt.block;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.block.BlockBaseContainer.IconSet;
|
||||
import emt.tile.TileEntityEMT;
|
||||
import emt.tile.solar.air.TileEntityAirSolar;
|
||||
import emt.tile.solar.air.TileEntityDoubleAirSolar;
|
||||
import emt.tile.solar.air.TileEntityTripleAirSolar;
|
||||
@@ -34,7 +32,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
package emt.client;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package emt.client.gui;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.client.gui.container.ConainerGenerator;
|
||||
import emt.tile.generator.TileEntityBaseGenerator;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GuiGenerator extends GuiContainer {
|
||||
|
||||
private static ResourceLocation tex = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/generator.png");
|
||||
|
||||
TileEntityBaseGenerator tileentity;
|
||||
private boolean allowUserInput;
|
||||
private int xSize;
|
||||
private int ySize;
|
||||
|
||||
public GuiGenerator(InventoryPlayer invPlayer, TileEntityBaseGenerator entity) {
|
||||
super(new ConainerGenerator(invPlayer, entity));
|
||||
this.tileentity = entity;
|
||||
this.allowUserInput = false;
|
||||
this.xSize = 194;
|
||||
this.ySize = 168;
|
||||
}
|
||||
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
String formatPanelName = I18n.format(this.tileentity.getInventoryName(), new Object[0]);
|
||||
int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2;
|
||||
this.fontRendererObj.drawStringWithShadow(formatPanelName, nmPos, 7, 6618118);
|
||||
|
||||
String storageString = I18n.format("emt.Storage", new Object[0]);
|
||||
String fuel=I18n.format("emt.Fuel", new Object[0]);
|
||||
if (this.tileentity.maxstorage<1000)
|
||||
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.storage/1000) + "/" + (this.tileentity.maxstorage/1000) +"kEU", 36, 22, 0);
|
||||
else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.storage/1000000) + "/" + (this.tileentity.maxstorage/1000000) +"MEU", 36, 22, 0);
|
||||
else if (1000000000 <= this.tileentity.maxstorage)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.storage/1000000000) + "/" + (this.tileentity.maxstorage/1000000000) +"GEU", 36, 22, 0);
|
||||
if(this.tileentity.isActive)
|
||||
this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating/20/20)+" EU/t", 36, 35, 0);
|
||||
else
|
||||
this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+"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);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
|
||||
{
|
||||
// GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.renderEngine.bindTexture(tex);
|
||||
|
||||
int h = (this.width - this.xSize) / 2;
|
||||
int k = (this.height - this.ySize) / 2;
|
||||
drawTexturedModalRect(h, k, 0, 0, this.xSize, this.ySize);
|
||||
if (this.tileentity.storage > 0)
|
||||
{
|
||||
int l = this.tileentity.gaugeEnergyScaled(33);
|
||||
drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14);
|
||||
}
|
||||
|
||||
if (this.tileentity.fuel > 0)
|
||||
{
|
||||
int l = this.tileentity.gaugeFuelScaled(33);
|
||||
drawTexturedModalRect(h + 18, k + 42, 195, 0, l, 14);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package emt.client.gui.container;
|
||||
|
||||
import emt.tile.generator.TileEntityBaseGenerator;
|
||||
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.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ConainerGenerator
|
||||
extends Container
|
||||
{
|
||||
private TileEntityBaseGenerator tileentity;
|
||||
public int storage;
|
||||
public int fuel;
|
||||
public int generating;
|
||||
|
||||
public ConainerGenerator(InventoryPlayer inventoryplayer, TileEntityBaseGenerator tileentity)
|
||||
{
|
||||
this.storage = 0;
|
||||
this.fuel = 0;
|
||||
this.tileentity = tileentity;
|
||||
/* for (int j = 0; j < 4; j++) {
|
||||
addSlotToContainer(new Slot(this.tileentity, j, 17 + j * 18, 59));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int k = 0; k < 9; k++) {
|
||||
addSlotToContainer(new Slot(inventoryplayer, k + i * 9 + 9, 17 + k * 18, 86 + i * 18));
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < 9; j++) {
|
||||
addSlotToContainer(new Slot(inventoryplayer, j, 17 + j * 18, 144));
|
||||
}
|
||||
|
||||
addSlotToContainer(new Slot(this.tileentity, 5, 17 + 7 * 18, 59));*/
|
||||
}
|
||||
|
||||
public void addCraftingToCrafters(ICrafting icrafting)
|
||||
{
|
||||
super.addCraftingToCrafters(icrafting);
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) this.tileentity.generating);
|
||||
icrafting.sendProgressBarUpdate(this, 1, this.tileentity.storage);
|
||||
icrafting.sendProgressBarUpdate(this, 2, this.tileentity.fuel);
|
||||
}
|
||||
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++)
|
||||
{
|
||||
ICrafting icrafting = (ICrafting)this.crafters.get(i);
|
||||
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) this.tileentity.generating);
|
||||
icrafting.sendProgressBarUpdate(this, 1, this.tileentity.storage);
|
||||
icrafting.sendProgressBarUpdate(this, 2, this.tileentity.fuel);
|
||||
}
|
||||
|
||||
this.generating = (int) this.tileentity.generating;
|
||||
this.tileentity.storage = ((int)this.tileentity.energySource.getEnergyStored());
|
||||
}
|
||||
|
||||
public void updateProgressBar(int i, int j)
|
||||
{
|
||||
if (i == 0) {
|
||||
this.tileentity.generating = j;
|
||||
}
|
||||
if (i == 1) {
|
||||
if (j<this.tileentity.maxstorage)
|
||||
this.tileentity.storage = j;
|
||||
else
|
||||
this.tileentity.storage=this.tileentity.maxstorage;
|
||||
}
|
||||
if (i == 2) {
|
||||
this.tileentity.fuel=j;
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
|
||||
{
|
||||
int slot = par2;
|
||||
ItemStack stack = null;
|
||||
|
||||
Slot slotObject = (Slot)this.inventorySlots.get(par2);
|
||||
if ((slotObject != null) && (slotObject.getHasStack()))
|
||||
{
|
||||
ItemStack stackInSlot = slotObject.getStack();
|
||||
stack = stackInSlot.copy();
|
||||
if ((slot >= 0) && (slot <= 3))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 4, 40, true)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if ((slot >= 4) && (slot < 31))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 0, 4, false)) {
|
||||
if (!mergeItemStack(stackInSlot, 31, 40, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((slot >= 31) && (slot < 39))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 0, 30, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!mergeItemStack(stackInSlot, 0, 30, false)) {
|
||||
return null;
|
||||
}
|
||||
if (stackInSlot.stackSize == 0) {
|
||||
slotObject.putStack(null);
|
||||
} else {
|
||||
slotObject.onSlotChanged();
|
||||
}
|
||||
if (stack.stackSize != stackInSlot.stackSize) {
|
||||
slotObject.onPickupFromSlot(par1EntityPlayer, stackInSlot);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
public boolean canInteractWith(EntityPlayer entityplayer)
|
||||
{
|
||||
return this.tileentity.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
|
||||
public class ContainerIndustrialWandRecharge extends Container {
|
||||
|
||||
|
||||
@@ -2,17 +2,11 @@ package emt.client.model;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBow;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelSpecialArmor extends ModelBiped {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package emt.client.model;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ModelWings extends ModelBiped {
|
||||
|
||||
|
||||
@@ -6,11 +6,9 @@ import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.entity.EntityLaser;
|
||||
import emt.entity.EntityShield;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@@ -14,7 +14,6 @@ import net.minecraft.entity.monster.EntitySnowman;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
package emt.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.util.EMTRandomHelper.Bolt;
|
||||
import emt.util.EMTRandomHelper.Point;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
package emt.entity;
|
||||
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
package emt.entity;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ic2.core.IC2;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.command.IEntitySelector;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityShield extends Entity {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package emt.init;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.block.BlockReflectedGen;
|
||||
import emt.tile.generator.TileEntityReflexionGen;
|
||||
import java.util.List;
|
||||
|
||||
public class EMTAutogeneratedGens
|
||||
implements Runnable
|
||||
{
|
||||
public static BlockReflectedGen[] BRG;
|
||||
public static TileEntityReflexionGen TFG = new TileEntityReflexionGen();
|
||||
private static short sets;
|
||||
|
||||
public void run()
|
||||
{
|
||||
sets = (short)(TileEntityReflexionGen.L.size() / 16);
|
||||
if (TileEntityReflexionGen.L.size() % 16 != 0) {
|
||||
sets = (short)(sets + 1);
|
||||
}
|
||||
BRG = new BlockReflectedGen[sets];
|
||||
for (short i = 0; i < sets; i = (short)(i + 1)) {
|
||||
BRG[i] = new BlockReflectedGen("EGenerator", i);
|
||||
}
|
||||
for (int i = 0; i < TileEntityReflexionGen.L.size(); i++) {
|
||||
GameRegistry.registerTileEntity(TileEntityReflexionGen.GensS[i], "tileentity" + TileEntityReflexionGen.L.get(i));
|
||||
}
|
||||
for (short i = 0; i < sets; i = (short)(i + 1)) {
|
||||
GameRegistry.registerBlock(BRG[i], "EGenerator.Set." + Short.toString(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,16 +8,12 @@ import emt.block.BlockPortableNode;
|
||||
import emt.block.BlockShield;
|
||||
import emt.block.BlockSolars;
|
||||
import emt.item.block.ItemBlockElectricCloud;
|
||||
import emt.item.block.ItemBlockEssentiaGenerator;
|
||||
import emt.item.block.ItemBlockEssentiaGenerators;
|
||||
import emt.item.block.ItemBlockMachines;
|
||||
import emt.item.block.ItemBlockSolars;
|
||||
import ic2.api.item.IC2Items;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import static thaumcraft.api.ThaumcraftApi.*;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
@@ -9,7 +9,6 @@ import emt.entity.EntityShield;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityList.EntityEggInfo;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
||||
public class EMTEntities {
|
||||
|
||||
|
||||
@@ -37,8 +37,6 @@ import emt.item.tool.drill.ItemThaumiumDrill;
|
||||
import emt.item.tool.omnitool.ItemOmnitoolDiamond;
|
||||
import emt.item.tool.omnitool.ItemOmnitoolIron;
|
||||
import emt.item.tool.omnitool.ItemOmnitoolThaumium;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -113,13 +111,13 @@ public class EMTItems {
|
||||
solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.solar");
|
||||
GameRegistry.registerItem(solarHelmetRevealing, "SolarHelmetRevealing");
|
||||
|
||||
electricBootsTraveller = new ItemElectricBootsTraveller(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(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(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");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package emt.init;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
@@ -8,32 +7,28 @@ import emt.util.EMTCraftingAspects;
|
||||
import emt.util.EMTResearchAspects;
|
||||
|
||||
import static emt.util.EMTRandomHelper.*;
|
||||
import ic2.api.item.ElectricItem;
|
||||
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.api.recipe.IRecipeInput;
|
||||
import ic2.api.recipe.RecipeInputItemStack;
|
||||
import ic2.api.recipe.Recipes;
|
||||
import ic2.core.BasicMachineRecipeManager;
|
||||
import ic2.core.Ic2Items;
|
||||
import ic2.core.item.ItemFluidCell;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
||||
import static thaumcraft.api.ThaumcraftApi.*;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.crafting.CrucibleRecipe;
|
||||
import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.crafting.ShapedArcaneRecipe;
|
||||
import thaumcraft.api.crafting.ShapelessArcaneRecipe;
|
||||
import thaumcraft.common.blocks.ItemJarFilled;
|
||||
import thaumcraft.common.blocks.ItemJarNode;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
@@ -160,6 +155,9 @@ public class EMTRecipes {
|
||||
|
||||
public static void registerLateRecipes() {
|
||||
/** Infusion Recipes **/
|
||||
lucrumGenerator = addInfusionCraftingRecipe("Lucrum Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 5), 10, new AspectList().add(Aspect.GREED, 64).add(Aspect.EXCHANGE, 128), new ItemStack(EMTBlocks.essentiaGens, 1, 0),
|
||||
new ItemStack[] {new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block)});
|
||||
|
||||
thaumiumDrill = addInfusionCraftingRecipe("Thaumium Drill", getChargedItem(EMTItems.thaumiumDrill, 10), 5, EMTCraftingAspects.thaumiumDrillCrafting, new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE),
|
||||
new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron") });
|
||||
|
||||
@@ -458,6 +456,7 @@ public class EMTRecipes {
|
||||
public static InfusionRecipe armorChargingRing;
|
||||
public static InfusionRecipe nanoWings;
|
||||
public static InfusionRecipe quantumWings;
|
||||
public static InfusionRecipe lucrumGenerator;
|
||||
|
||||
public static ShapelessArcaneRecipe diamondOmnitool;
|
||||
public static ShapelessArcaneRecipe tinyUranium;
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package emt.init;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.client.EMTKeys;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTResearchAspects;
|
||||
import emt.util.EMTResearchItem;
|
||||
import ic2.api.item.IC2Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
|
||||
public class EMTResearches {
|
||||
@@ -125,6 +122,12 @@ public class EMTResearches {
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
@@ -9,6 +9,7 @@ import emt.tile.generator.TileEntityAerGenerator;
|
||||
import emt.tile.generator.TileEntityArborGenerator;
|
||||
import emt.tile.generator.TileEntityAuramGenerator;
|
||||
import emt.tile.generator.TileEntityIgnisGenerator;
|
||||
import emt.tile.generator.TileEntityLucrumGenerator;
|
||||
import emt.tile.generator.TileEntityPotentiaGenerator;
|
||||
import emt.tile.solar.air.TileEntityAirSolar;
|
||||
import emt.tile.solar.air.TileEntityDoubleAirSolar;
|
||||
@@ -34,18 +35,24 @@ import emt.tile.solar.water.TileEntityWaterSolar;
|
||||
|
||||
public class EMTTiles {
|
||||
|
||||
public static void registerTiles() {
|
||||
GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode");
|
||||
public static void registerTileEntities() {
|
||||
|
||||
//Essentia Gens
|
||||
GameRegistry.registerTileEntity(TileEntityPotentiaGenerator.class, "tileentitypotentiagenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityIgnisGenerator.class, "tileentityignisgenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityAuramGenerator.class, "tileentityauramgenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityArborGenerator.class, "tileentityarborgenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityAerGenerator.class, "tileentityaergenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityLucrumGenerator.class, "tileentitylucrumgenerator");
|
||||
|
||||
//Machinery
|
||||
GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge");
|
||||
GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator");
|
||||
|
||||
//Solars
|
||||
GameRegistry.registerTileEntity(TileEntityCompressedSolar.class, "tileentitycompressedsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityDoubleCompressedSolar.class, "tileentitydoublecompressedsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityTripleCompressedSolar.class, "tileentitytriplecompressedsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator");
|
||||
GameRegistry.registerTileEntity(TileEntityWaterSolar.class, "tileentitywatersolar");
|
||||
GameRegistry.registerTileEntity(TileEntityDoubleWaterSolar.class, "tileentitydoublewatersolar");
|
||||
GameRegistry.registerTileEntity(TileEntityTripleWaterSolar.class, "tileentitytriplewatersolar");
|
||||
@@ -64,6 +71,9 @@ public class EMTTiles {
|
||||
GameRegistry.registerTileEntity(TileEntityEarthSolar.class, "tileentityearthsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar");
|
||||
|
||||
//Random Stuff
|
||||
GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode");
|
||||
GameRegistry.registerTileEntity(TileElectricCloud.class, "tileEntityElectricCloud");
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,22 @@
|
||||
package emt.init;
|
||||
|
||||
public class Registry {
|
||||
public static void register() {
|
||||
EMTBlocks.registerBlocks();
|
||||
EMTItems.registerItems();
|
||||
EMTTiles.registerTiles();
|
||||
EMTRecipes.registerEarlyRecipes();
|
||||
}
|
||||
|
||||
public static void registerLate() {
|
||||
EMTBlocks.addAspects();
|
||||
EMTRecipes.registerLateRecipes();
|
||||
EMTRecipes.registerUUMInfusionRecipes();
|
||||
}
|
||||
public class Registry
|
||||
{
|
||||
public static void registerPreInit() {}
|
||||
|
||||
public static void registerInit()
|
||||
{
|
||||
EMTBlocks.registerBlocks();
|
||||
EMTItems.registerItems();
|
||||
EMTTiles.registerTileEntities();
|
||||
EMTRecipes.registerEarlyRecipes();
|
||||
}
|
||||
|
||||
public static void registerLate()
|
||||
{
|
||||
EMTBlocks.addAspects();
|
||||
EMTRecipes.registerLateRecipes();
|
||||
EMTRecipes.registerUUMInfusionRecipes();
|
||||
// new EMTAutogeneratedGens().run();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package emt.item;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
@@ -3,14 +3,12 @@ package emt.item;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -23,7 +21,6 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.ArrowNockEvent;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.lib.utils.InventoryUtils;
|
||||
|
||||
|
||||
@@ -16,17 +16,25 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class ItemOneRing extends ItemBase implements IBauble {
|
||||
|
||||
public IIcon[] icon = new IIcon[16];
|
||||
public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear
|
||||
{
|
||||
private static final String NBT_TAG_FORGE_DATA = "EMT";
|
||||
private static final String NBT_TAG_MIND_CORRUPTION = "MindCorruption";
|
||||
private static final String NBT_TAG_WARP = "warp";
|
||||
public IIcon[] icon = new IIcon[16];
|
||||
public Random random = new Random();
|
||||
|
||||
public int getWarp(ItemStack itemstack, EntityPlayer player)
|
||||
{
|
||||
return getItemWarpLevel(itemstack, false);
|
||||
}
|
||||
|
||||
public ItemOneRing() {
|
||||
super("bauble");
|
||||
this.setHasSubtypes(true);
|
||||
@@ -74,65 +82,122 @@ public class ItemOneRing extends ItemBase implements IBauble {
|
||||
}
|
||||
}
|
||||
|
||||
private NBTTagCompound getOrSetForgeTag(EntityPlayer pPlayer)
|
||||
{
|
||||
NBTTagCompound tPlayerNBT = pPlayer.getEntityData();
|
||||
NBTTagCompound forgeTag = new NBTTagCompound();
|
||||
|
||||
// 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 );
|
||||
|
||||
return forgeTag;
|
||||
}
|
||||
|
||||
private int getItemWarpLevel(ItemStack stack, boolean increment)
|
||||
{
|
||||
NBTTagCompound tWarpTag = new NBTTagCompound();
|
||||
int tWarpLevel = 0;
|
||||
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);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tWarpTag.setInteger( NBT_TAG_WARP, 0 );
|
||||
stack.setTagCompound( tWarpTag );
|
||||
}
|
||||
|
||||
return tWarpLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack stack, EntityLivingBase player) {
|
||||
if (!player.isInvisible()) {
|
||||
player.setInvisible(true);
|
||||
((EntityPlayer) player).capabilities.disableDamage = true;
|
||||
}
|
||||
|
||||
// Stop doing this 20 times per second...
|
||||
if ( random.nextInt(20) > 0)
|
||||
return;
|
||||
|
||||
/* 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
|
||||
|
||||
NBTTagCompound forgeTag = getOrSetForgeTag((EntityPlayer)player);
|
||||
|
||||
int corruption = 0;
|
||||
|
||||
if (forgeTag.hasKey("MindCorruption"))
|
||||
corruption = forgeTag.getInteger("MindCorruption");
|
||||
// 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("MindCorruption", 0);
|
||||
|
||||
((EntityPlayer) player).capabilities.disableDamage = true;
|
||||
forgeTag.setInteger( NBT_TAG_MIND_CORRUPTION, 0);
|
||||
|
||||
if (!player.worldObj.isRemote) {
|
||||
if (corruption <= 0) {
|
||||
//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."));
|
||||
}
|
||||
else if (corruption > 6000 && corruption < 24000 && random.nextInt(2000) == 0) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false));
|
||||
// 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));
|
||||
}
|
||||
else if (corruption >= 6000 && corruption < 24000 && random.nextInt(2000) == 0) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
|
||||
}
|
||||
else if (corruption >= 24000 && corruption < 72000 && random.nextInt(2000) == 0) {
|
||||
else if (corruption >= 1400 && corruption < 3800 && random.nextInt(100) == 0) {
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
|
||||
player.attackEntityFrom(DamageSource.magic, 5);
|
||||
player.addPotionEffect(new PotionEffect(Potion.poison.id, 500, 2, false));
|
||||
}
|
||||
else if (corruption >= 72000 && corruption < 120000 && random.nextInt(4000) == 0) {
|
||||
else if (corruption >= 3800 && corruption < 6500 && random.nextInt(100) == 0) {
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
|
||||
player.motionY += 2d;
|
||||
}
|
||||
else if (corruption >= 120000 && random.nextInt(10000) == 0) {
|
||||
else if (corruption >= 6500 && random.nextInt(10000) == 0) {
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false));
|
||||
}
|
||||
|
||||
player.addPotionEffect(new PotionEffect(Potion.wither.id, 5000, 4, false));
|
||||
}
|
||||
else if (corruption + 100 >= Integer.MAX_VALUE) { // =3333333
|
||||
player.isDead = true;
|
||||
}
|
||||
if (corruption >= 300)
|
||||
{
|
||||
if ( random.nextInt( 100 ) == 0)
|
||||
{
|
||||
getItemWarpLevel( stack, true );
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple"));
|
||||
}
|
||||
}
|
||||
}
|
||||
forgeTag.setInteger("MindCorruption", ++corruption);
|
||||
tag.setTag("ForgeData", forgeTag);
|
||||
((EntityPlayer) player).readFromNBT(tag);
|
||||
forgeTag.setInteger( NBT_TAG_MIND_CORRUPTION, ++corruption);
|
||||
//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("ForgeData").setInteger("MindCorruption", 0);
|
||||
tag.getCompoundTag( NBT_TAG_FORGE_DATA ).setInteger( NBT_TAG_MIND_CORRUPTION, 0);
|
||||
((EntityPlayer) player).readFromNBT(tag);
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,11 +205,13 @@ public class ItemOneRing extends ItemBase implements IBauble {
|
||||
player.setInvisible(false);
|
||||
if (!((EntityPlayer) player).capabilities.isCreativeMode)
|
||||
((EntityPlayer) player).capabilities.disableDamage = false;
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
|
||||
/* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt!
|
||||
((EntityPlayer) player).writeToNBT(tag);
|
||||
tag.removeTag("ForgeData");
|
||||
tag.removeTag( NBT_TAG_FORGE_DATA );
|
||||
((EntityPlayer) player).readFromNBT(tag);
|
||||
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
|
||||
*/
|
||||
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 1, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -154,8 +221,22 @@ public class ItemOneRing extends ItemBase implements IBauble {
|
||||
|
||||
@Override
|
||||
public boolean canUnequip(ItemStack stack, EntityLivingBase player) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
((EntityPlayer) player).writeToNBT(tag);
|
||||
return tag.getCompoundTag("ForgeData").getInteger("MindCorruption") > 600 ? true : false;
|
||||
// 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);
|
||||
// return (tag.getCompoundTag( NBT_TAG_FORGE_DATA ).getInteger( NBT_TAG_MIND_CORRUPTION ) > 600);
|
||||
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?"));
|
||||
}
|
||||
else
|
||||
( (EntityPlayer) player ).addChatMessage( new ChatComponentText( EMTTextHelper.PURPLE + "Nooo, don't remove me! I give you great power!" ) );
|
||||
|
||||
return tRet;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -4,13 +4,12 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
import ic2.api.util.Keys;
|
||||
import ic2.core.item.ElectricItemManager;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -34,15 +33,14 @@ import java.util.List;
|
||||
public class ItemElectricBootsTraveller extends ItemArmor implements IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
|
||||
|
||||
public int maxCharge = 100000;
|
||||
public int energyPerDamage = 100;
|
||||
public int energyPerDamage = 1000;
|
||||
public int visDiscount = 2;
|
||||
public float speedBonus = 0.055F;
|
||||
public float jumpBonus = 0.3F;
|
||||
public double transferLimit = 100;
|
||||
public boolean speedBoostActive = false;
|
||||
|
||||
public ItemElectricBootsTraveller(int par3, int par4) {
|
||||
super(ArmorMaterial.DIAMOND, par3, par4);
|
||||
public ItemElectricBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||
super(material, par3, par4);
|
||||
this.setMaxDamage(27);
|
||||
this.setMaxStackSize(1);
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
@@ -71,13 +69,13 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
|
||||
@Override
|
||||
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);
|
||||
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;
|
||||
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit);
|
||||
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,11 +95,11 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
|
||||
}
|
||||
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 1.1000000000000001D;
|
||||
return 0.5D;
|
||||
}
|
||||
|
||||
private double getBaseAbsorptionRatio() {
|
||||
return 0.14999999999999999D;
|
||||
return 0.15D;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,11 +114,6 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
if (Keys.instance.isBoostKeyDown(player) && Keys.instance.isModeSwitchKeyDown(player))
|
||||
{
|
||||
speedBoostActive = !speedBoostActive;
|
||||
}
|
||||
|
||||
if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
|
||||
if ((player.worldObj.isRemote) && (!player.isSneaking())) {
|
||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) {
|
||||
@@ -128,7 +121,8 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
|
||||
}
|
||||
player.stepHeight = 1.0F;
|
||||
}
|
||||
if (speedBoostActive && ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)) {
|
||||
|
||||
if (((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)) {
|
||||
player.moveFlying(0F, 1F, speedBonus);
|
||||
player.jumpMovementFactor = jumpBonus;
|
||||
}
|
||||
@@ -146,17 +140,49 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
|
||||
}
|
||||
}
|
||||
|
||||
// make the boots worth upgrading
|
||||
public float getMaxHealthyDropDist()
|
||||
{
|
||||
return 20.0F;
|
||||
}
|
||||
|
||||
public float getMinimumDropDist()
|
||||
{
|
||||
return 4.0f;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingFall(LivingFallEvent event) {
|
||||
if (event.entity instanceof EntityPlayer) {
|
||||
EntityPlayer entity = (EntityPlayer) event.entity;
|
||||
if ((entity.inventory.armorInventory[0] != null) && (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) {
|
||||
ItemStack stack = entity.inventory.armorInventory[0];
|
||||
if (ElectricItem.manager.use(stack, energyPerDamage, entity))
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void onLivingFall(LivingFallEvent event)
|
||||
{
|
||||
if( ( EMT.instance.isSimulating() ) && ( ( event.entity instanceof EntityLivingBase ) ) )
|
||||
{
|
||||
if( event.entity instanceof EntityPlayer )
|
||||
{
|
||||
EntityPlayer entity = (EntityPlayer) event.entity;
|
||||
if( ( entity.inventory.armorInventory[0] != null ) && ( entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller ) )
|
||||
{
|
||||
ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller)entity.inventory.armorInventory[0].getItem();
|
||||
ItemStack stack = entity.inventory.armorInventory[0];
|
||||
|
||||
// Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty
|
||||
if ( tUsedBoots.getMinimumDropDist() > event.distance )
|
||||
{
|
||||
event.setCanceled( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
float tEnergyDemand = tUsedBoots.energyPerDamage * (( ( event.distance > tUsedBoots.getMaxHealthyDropDist() ) ? event.distance * 3 : event.distance ) - 4.0F);
|
||||
if( tEnergyDemand <= ElectricItem.manager.getCharge( stack ) )
|
||||
{
|
||||
//EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance, tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() ));
|
||||
ElectricItem.manager.discharge( stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false );
|
||||
event.setCanceled( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
|
||||
@@ -10,14 +10,36 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
|
||||
|
||||
public ItemNanoBootsTraveller(int par3, int par4) {
|
||||
super(par3, par4);
|
||||
public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||
super(material, par3, par4);
|
||||
maxCharge = 1000000;
|
||||
speedBonus = (float) EMTConfigHandler.nanoBootsSpeed;
|
||||
jumpBonus = (float) EMTConfigHandler.nanoBootsJump;
|
||||
visDiscount = 4;
|
||||
transferLimit = 1000;
|
||||
energyPerDamage = 500;
|
||||
transferLimit = 1600;
|
||||
energyPerDamage = 5000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxHealthyDropDist()
|
||||
{
|
||||
return (float) EMTConfigHandler.nanoBootsMaxDrop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinimumDropDist()
|
||||
{
|
||||
return (float) EMTConfigHandler.nanoBootsMinDrop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 0.9D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -10,14 +10,36 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
|
||||
|
||||
public ItemQuantumBootsTraveller(int par3, int par4) {
|
||||
super(par3, par4);
|
||||
public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||
super(material, par3, par4);
|
||||
maxCharge = 10000000;
|
||||
speedBonus = (float) EMTConfigHandler.quantumBootsSpeed;
|
||||
jumpBonus = (float) EMTConfigHandler.quantumBootsJump;
|
||||
visDiscount = 5;
|
||||
transferLimit = 10000;
|
||||
energyPerDamage = 1000;
|
||||
transferLimit = 12000;
|
||||
energyPerDamage = 20000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxHealthyDropDist()
|
||||
{
|
||||
return (float) EMTConfigHandler.quantumBootsMaxDrop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinimumDropDist()
|
||||
{
|
||||
return (float) EMTConfigHandler.quantumBootsMinDrop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 1D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -1,68 +1,39 @@
|
||||
package emt.item.armor.chestplate;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.EventBus;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.client.model.ModelSpecialArmor;
|
||||
import emt.client.model.ModelWings;
|
||||
import emt.init.EMTItems;
|
||||
import emt.item.armor.wings.ItemNanoWing;
|
||||
import emt.item.armor.wings.ItemQuantumWing;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTRandomHelper;
|
||||
import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.api.item.IElectricItemManager;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.IC2Achievements;
|
||||
import ic2.core.IC2Potion;
|
||||
import ic2.core.Ic2Items;
|
||||
import ic2.core.Platform;
|
||||
import ic2.core.audio.AudioManager;
|
||||
import ic2.core.audio.AudioSource;
|
||||
import ic2.core.audio.PositionSpec;
|
||||
import ic2.core.init.InternalName;
|
||||
import ic2.core.init.MainConfig;
|
||||
import ic2.core.item.ItemTinCan;
|
||||
import ic2.core.item.armor.ItemArmorElectric;
|
||||
import ic2.core.util.ConfigUtil;
|
||||
import ic2.core.util.Keyboard;
|
||||
import ic2.core.util.StackUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.FoodStats;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import net.minecraftforge.common.ISpecialArmor.ArmorProperties;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
|
||||
@@ -85,7 +56,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric {
|
||||
private static boolean lastJetpackUsed = false;
|
||||
|
||||
public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) {
|
||||
super(internalName, InternalName.quantum, armorType, 20000000, 12000.0D, 4);
|
||||
super(internalName, InternalName.quantum, armorType, 20000000D, 18000.0D, 4);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
}
|
||||
@@ -404,6 +375,11 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
|
||||
|
||||
@@ -3,7 +3,6 @@ package emt.item.armor.goggles;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
@@ -32,7 +31,7 @@ public class ItemElectricGoggles extends ItemArmor implements IElectricItem, IVi
|
||||
public double maxCharge = 100000;
|
||||
public double transferLimit = 100;
|
||||
public int tier = 2;
|
||||
public int energyPerDamage = 100;
|
||||
public int energyPerDamage = 1000;
|
||||
public int visDiscount = 5;
|
||||
|
||||
public ItemElectricGoggles(ArmorMaterial material, int par3, int par4) {
|
||||
@@ -148,7 +147,7 @@ public class ItemElectricGoggles extends ItemArmor implements IElectricItem, IVi
|
||||
}
|
||||
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 1.1000000000000001D;
|
||||
return 0.5D;
|
||||
}
|
||||
|
||||
public int getEnergyPerDamage() {
|
||||
@@ -156,7 +155,7 @@ public class ItemElectricGoggles extends ItemArmor implements IElectricItem, IVi
|
||||
}
|
||||
|
||||
private double getBaseAbsorptionRatio() {
|
||||
return 0.14999999999999999D;
|
||||
return 0.15D;
|
||||
}
|
||||
|
||||
/* IC2 API METHODS */
|
||||
|
||||
@@ -3,16 +3,11 @@ package emt.item.armor.goggles;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IC2Items;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemNanoGoggles extends ItemElectricGoggles {
|
||||
@@ -25,8 +20,8 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
|
||||
visDiscount = 6;
|
||||
tier = 3;
|
||||
maxCharge = 1000000;
|
||||
energyPerDamage = 1000;
|
||||
transferLimit = 100;
|
||||
energyPerDamage = 5000;
|
||||
transferLimit = 1600;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -40,23 +35,18 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/thaumicnanohelmet.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 0.9D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
if (EMTConfigHandler.nightVisionOff == false) {
|
||||
if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) {
|
||||
|
||||
int x = MathHelper.floor_double(player.posX);
|
||||
int z = MathHelper.floor_double(player.posZ);
|
||||
int y = MathHelper.floor_double(player.posY);
|
||||
|
||||
int lightlevel = player.worldObj.getBlockLightValue(x, y, z);
|
||||
if (lightlevel >= 0)
|
||||
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3));
|
||||
ElectricItem.manager.use(itemStack, 1 / 1000, player);
|
||||
}
|
||||
else {
|
||||
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true));
|
||||
}
|
||||
}
|
||||
IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack);
|
||||
}
|
||||
}
|
||||
@@ -3,23 +3,21 @@ package emt.item.armor.goggles;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.util.Keyboard;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
public class ItemQuantumGoggles extends ItemNanoGoggles {
|
||||
|
||||
@@ -33,8 +31,8 @@ public class ItemQuantumGoggles extends ItemNanoGoggles {
|
||||
maxCharge = 10000000;
|
||||
tier = 4;
|
||||
visDiscount = 8;
|
||||
transferLimit = 10000;
|
||||
energyPerDamage = 1000;
|
||||
transferLimit = 12000;
|
||||
energyPerDamage = 20000;
|
||||
|
||||
potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000));
|
||||
potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000));
|
||||
@@ -53,47 +51,49 @@ public class ItemQuantumGoggles extends ItemNanoGoggles {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
int refill = player.getAir();
|
||||
if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) {
|
||||
player.setAir(refill + 200);
|
||||
ElectricItem.manager.use(itemStack, 1000, null);
|
||||
}
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 1D;
|
||||
}
|
||||
|
||||
Iterator i$ = (new LinkedList(player.getActivePotionEffects())).iterator();
|
||||
do {
|
||||
if (!i$.hasNext()) {
|
||||
break;
|
||||
}
|
||||
{
|
||||
PotionEffect effect = (PotionEffect) i$.next();
|
||||
int id = effect.getPotionID();
|
||||
Integer cost = (Integer) potionCost.get(Integer.valueOf(id));
|
||||
if (cost != null) {
|
||||
cost = Integer.valueOf(cost.intValue() * (effect.getAmplifier() + 1));
|
||||
if (ElectricItem.manager.canUse(itemStack, cost.intValue())) {
|
||||
ElectricItem.manager.use(itemStack, cost.intValue(), null);
|
||||
ItemStack milk = (new ItemStack(Items.milk_bucket));
|
||||
player.curePotionEffects(milk);
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
// MUAHAHAHA
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
try {
|
||||
Field f;
|
||||
f = Keyboard.class.getDeclaredField("playerKeys");
|
||||
f.setAccessible(true);
|
||||
Map<EntityPlayer, Set<Enum>> playerKeys = (Map<EntityPlayer, Set<Enum>>) f.get(IC2.keyboard);
|
||||
|
||||
Enum hub = null;
|
||||
Set<Enum> set = playerKeys.get(player);
|
||||
|
||||
if (set != null) {
|
||||
for (Enum e : set) {
|
||||
if (e.ordinal() == 6) {
|
||||
hub = e;
|
||||
}
|
||||
}
|
||||
set.remove(hub);
|
||||
}
|
||||
}
|
||||
while (true);
|
||||
|
||||
if (EMTConfigHandler.nightVisionOff == false) {
|
||||
if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) {
|
||||
int x = MathHelper.floor_double(player.posX);
|
||||
int z = MathHelper.floor_double(player.posZ);
|
||||
int y = MathHelper.floor_double(player.posY);
|
||||
int lightlevel = player.worldObj.getBlockLightValue(x, y, z);
|
||||
if (lightlevel >= 0)
|
||||
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3));
|
||||
ElectricItem.manager.use(itemStack, 1 / 1000, player);
|
||||
}
|
||||
else {
|
||||
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true));
|
||||
IC2Items.getItem("quantumHelmet").getItem().onArmorTick(world, player, itemStack);
|
||||
|
||||
if (hub != null) {
|
||||
set.add(hub);
|
||||
}
|
||||
} catch (NoSuchFieldException e) {
|
||||
e.printStackTrace();
|
||||
} catch (SecurityException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,35 +3,28 @@ package emt.item.armor.goggles;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
|
||||
public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
|
||||
|
||||
private int ticker;
|
||||
/*private int ticker;
|
||||
private int generating;
|
||||
private int genDay;
|
||||
private int genNight;
|
||||
private boolean sunIsUp;
|
||||
private boolean skyIsVisible;
|
||||
private boolean noSunWorld;
|
||||
private boolean dampPlace;
|
||||
private boolean dampPlace;*/
|
||||
private int genDay;
|
||||
private int genNight;
|
||||
|
||||
private static final Map potionCost = new HashMap();
|
||||
|
||||
@@ -41,14 +34,14 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
|
||||
this.setMaxDamage(27);
|
||||
this.setMaxStackSize(1);
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
this.maxCharge = 1000000;
|
||||
this.genDay = 256;
|
||||
this.genNight = 128;
|
||||
// this.maxCharge = 20000000; //REALLY?
|
||||
this.genDay = 65536;
|
||||
this.genNight = 4096;
|
||||
maxCharge = 20000000;
|
||||
visDiscount = 7;
|
||||
tier = 4;
|
||||
transferLimit = 20000;
|
||||
energyPerDamage = 10000;
|
||||
transferLimit = 18000;
|
||||
energyPerDamage = 20000;
|
||||
|
||||
potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000));
|
||||
potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000));
|
||||
@@ -66,120 +59,47 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/solarrevealinghelmet.png";
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 1D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) {
|
||||
if (EMTConfigHandler.nightVisionOff == false) {
|
||||
if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) {
|
||||
|
||||
int x = MathHelper.floor_double(player.posX);
|
||||
int z = MathHelper.floor_double(player.posZ);
|
||||
int y = MathHelper.floor_double(player.posY);
|
||||
|
||||
int lightlevel = player.worldObj.getBlockLightValue(x, y, z);
|
||||
if (lightlevel >= 0)
|
||||
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3));
|
||||
ElectricItem.manager.use(itemStack, 1 / 1000, player);
|
||||
}
|
||||
else {
|
||||
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true));
|
||||
}
|
||||
}
|
||||
|
||||
int refill = player.getAir();
|
||||
if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) {
|
||||
player.setAir(refill + 200);
|
||||
ElectricItem.manager.use(itemStack, 1000, null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator i$ = (new LinkedList(player.getActivePotionEffects())).iterator();
|
||||
do {
|
||||
if (!i$.hasNext()) {
|
||||
break;
|
||||
}
|
||||
{
|
||||
PotionEffect effect = (PotionEffect) i$.next();
|
||||
int id = effect.getPotionID();
|
||||
Integer cost = (Integer) potionCost.get(Integer.valueOf(id));
|
||||
if (cost != null) {
|
||||
cost = Integer.valueOf(cost.intValue() * (effect.getAmplifier() + 1));
|
||||
if (ElectricItem.manager.canUse(itemStack, cost.intValue())) {
|
||||
ElectricItem.manager.use(itemStack, cost.intValue(), null);
|
||||
ItemStack milk = (new ItemStack(Items.milk_bucket));
|
||||
player.curePotionEffects(milk);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (true);
|
||||
super.onArmorTick(worldObj, player, itemStack);
|
||||
|
||||
if (worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
checkForSun(player);
|
||||
if (this.generating > 0) {
|
||||
int energyLeft = this.generating;
|
||||
|
||||
if(worldObj.canBlockSeeTheSky((int)player.posX, (int)player.posY + 1, (int)player.posZ) && !worldObj.isRaining()) {
|
||||
double enerj = (worldObj.isDaytime() ? (double)genDay : (double) genNight) / 12000D;
|
||||
|
||||
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
|
||||
if (energyLeft > 0) {
|
||||
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], energyLeft, 4, false, false);
|
||||
energyLeft -= sentPacket;
|
||||
double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], enerj ,4, false, false);
|
||||
enerj -= sentPacket;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < player.inventory.mainInventory.length; j++) {
|
||||
if (energyLeft > 0) {
|
||||
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], energyLeft, 4, false, false);
|
||||
energyLeft -= sentPacket;
|
||||
double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], enerj, 4, false, false);
|
||||
enerj -= sentPacket;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int checkForSun(EntityPlayer player) {
|
||||
if (this.ticker++ % tickRate() == 0) {
|
||||
updateVisibility(player);
|
||||
}
|
||||
if ((this.sunIsUp) && (this.skyIsVisible)) {
|
||||
this.generating = (0 + this.genDay);
|
||||
return this.generating;
|
||||
}
|
||||
if (this.skyIsVisible) {
|
||||
this.generating = (0 + this.genNight);
|
||||
return this.generating;
|
||||
}
|
||||
this.generating = 0;
|
||||
return this.generating;
|
||||
}
|
||||
|
||||
public void updateVisibility(EntityPlayer player) {
|
||||
this.dampPlace = (player.worldObj.getWorldChunkManager().getBiomeGenAt((int) player.posX, (int) player.posZ).getIntRainfall() > 0);
|
||||
this.noSunWorld = player.worldObj.provider.hasNoSky;
|
||||
Boolean rainWeather = Boolean.valueOf((this.dampPlace) && ((player.worldObj.isRaining()) || (player.worldObj.isThundering())));
|
||||
if ((!player.worldObj.isDaytime()) || (rainWeather.booleanValue())) {
|
||||
this.sunIsUp = false;
|
||||
}
|
||||
else {
|
||||
this.sunIsUp = true;
|
||||
}
|
||||
if ((!player.worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY + 1, (int) player.posZ)) || (this.noSunWorld)) {
|
||||
this.skyIsVisible = false;
|
||||
}
|
||||
else {
|
||||
this.skyIsVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static int tickRate() {
|
||||
return 128;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,13 @@
|
||||
package emt.item.armor.wings;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.util.StackUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.client.model.ModelWings;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -20,7 +16,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemFeatherWing extends ItemArmor {
|
||||
|
||||
@@ -3,13 +3,11 @@ package emt.item.armor.wings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.item.armor.wings.ItemThaumiumReinforcedWing;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -27,8 +25,8 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
||||
|
||||
public static int maxCharge = 1000000;
|
||||
public int tier = 3;
|
||||
public double transferLimit = 1000;
|
||||
public int energyPerDamage = 100;
|
||||
public double transferLimit = 1600;
|
||||
public int energyPerDamage = 5000;
|
||||
|
||||
public ItemNanoWing(ArmorMaterial material, int par3, int par4) {
|
||||
super(material, par3, par4);
|
||||
@@ -136,11 +134,11 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
||||
}
|
||||
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 1.5999999999999991D;
|
||||
return 0.9D;
|
||||
}
|
||||
|
||||
private double getBaseAbsorptionRatio() {
|
||||
return 0.17999999999999999D;
|
||||
return 0.25D;
|
||||
}
|
||||
|
||||
/* IC2 API METHODS */
|
||||
@@ -157,7 +155,7 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
||||
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 2;
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,15 +3,10 @@ package emt.item.armor.wings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemQuantumWing extends ItemNanoWing {
|
||||
@@ -24,8 +19,8 @@ public class ItemQuantumWing extends ItemNanoWing {
|
||||
this.setMaxDamage(27);
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
visDiscount = 6;
|
||||
transferLimit = 10000;
|
||||
energyPerDamage = 1000;
|
||||
transferLimit = 12000;
|
||||
energyPerDamage = 20000;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,27 +51,11 @@ public class ItemQuantumWing extends ItemNanoWing {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
|
||||
ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
public double getDamageAbsorptionRatio() {
|
||||
return 2.099990000000001D;
|
||||
}
|
||||
|
||||
private double getBaseAbsorptionRatio() {
|
||||
return 0.20999999999999999D;
|
||||
}
|
||||
@Override
|
||||
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;
|
||||
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit);
|
||||
}
|
||||
|
||||
return 1D;
|
||||
}
|
||||
}
|
||||
@@ -3,21 +3,15 @@ package emt.item.armor.wings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.util.StackUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package emt.item.block;
|
||||
|
||||
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 ItemBlockEssentiaGenerator extends ItemBlock {
|
||||
|
||||
public ItemBlockEssentiaGenerator(Block id) {
|
||||
super(id);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,22 @@
|
||||
package emt.item.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
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;
|
||||
|
||||
import emt.tile.generator.TileEntityAerGenerator;
|
||||
import emt.tile.generator.TileEntityArborGenerator;
|
||||
import emt.tile.generator.TileEntityAuramGenerator;
|
||||
import emt.tile.generator.TileEntityIgnisGenerator;
|
||||
import emt.tile.generator.TileEntityPotentiaGenerator;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
|
||||
public ItemBlockEssentiaGenerators(Block id) {
|
||||
super(id);
|
||||
public ItemBlockEssentiaGenerators(Block block) {
|
||||
super(block);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -40,6 +39,9 @@ public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
case 4:
|
||||
name = "aer";
|
||||
break;
|
||||
case 5:
|
||||
name = "lucrum";
|
||||
break;
|
||||
default:
|
||||
name = "nothing";
|
||||
}
|
||||
@@ -50,4 +52,45 @@ public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
public int getMetadata(int meta) {
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack is, EntityPlayer player, List list, boolean flag) {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
|
||||
switch (is.getItemDamage()) {
|
||||
case 0:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
case 1:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) +" EU");
|
||||
break;
|
||||
case 2:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
case 3:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
case 4:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
case 5:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
list.add(StatCollector.translateToLocal("emt.Storage")+Double.toString(EMTConfigHandler.EssentiaGeneratorStorage)+" EU");
|
||||
} else
|
||||
list.add(StatCollector.translateToLocal("emt.PressShift"));
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,16 @@
|
||||
package emt.item.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import static emt.util.EMTTextHelper.localize;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import emt.block.BlockBaseContainer;
|
||||
import emt.block.BlockSolars;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBlockSolars extends ItemBlock {
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package emt.item.focus;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
@@ -11,7 +10,6 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.IWandFocus;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.monster.EntitySnowman;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class ItemChristmasFocus extends ItemBaseFocus {
|
||||
|
||||
@@ -2,18 +2,11 @@ package emt.item.focus;
|
||||
|
||||
import emt.entity.EntityEnergyBall;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.core.item.armor.ItemArmorElectric;
|
||||
import ic2.core.item.armor.ItemArmorIC2;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityLargeFireball;
|
||||
import net.minecraft.entity.projectile.EntitySmallFireball;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
|
||||
public class ItemEnergyBallFocus extends ItemBaseFocus {
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ package emt.item.focus;
|
||||
import emt.entity.EntityLaser;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
@@ -1,22 +1,12 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import emt.EMT;
|
||||
import emt.entity.EntityShield;
|
||||
import emt.init.EMTBlocks;
|
||||
import ic2.core.IC2;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
@@ -8,7 +8,6 @@ import ic2.api.item.IElectricItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
@@ -18,7 +17,6 @@ import net.minecraft.world.World;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.blocks.BlockCustomPlant;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.items.equipment.ItemElementalHoe;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
|
||||
import java.util.List;
|
||||
@@ -126,7 +124,7 @@ public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
|
||||
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -180,7 +180,7 @@ public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
|
||||
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack) {
|
||||
return 2;
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,12 +7,9 @@ import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.audio.AudioSource;
|
||||
import ic2.core.audio.PositionSpec;
|
||||
import ic2.core.util.StackUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockTorch;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
@@ -35,7 +32,6 @@ import net.minecraftforge.event.ForgeEventFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
|
||||
|
||||
@@ -5,13 +5,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.audio.AudioSource;
|
||||
import ic2.core.audio.PositionSpec;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -4,12 +4,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.audio.AudioSource;
|
||||
import ic2.core.audio.PositionSpec;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -4,14 +4,12 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTRandomHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package emt.network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import emt.init.EMTItems;
|
||||
|
||||
public class PacketEMTKeys implements IMessage, IMessageHandler<PacketEMTKeys, IMessage> {
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
package emt.proxy;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderFireball;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowMan;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import emt.client.EMTKeys;
|
||||
import emt.client.renderer.RenderLaser;
|
||||
|
||||
@@ -2,11 +2,14 @@ package emt.proxy;
|
||||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import emt.client.gui.GuiEtherealMacerator;
|
||||
import emt.client.gui.GuiGenerator;
|
||||
import emt.client.gui.GuiIndustrialWandRecharger;
|
||||
import emt.client.gui.container.ConainerGenerator;
|
||||
import emt.client.gui.container.ContainerEtheralMacerator;
|
||||
import emt.client.gui.container.ContainerIndustrialWandRecharge;
|
||||
import emt.tile.TileEntityEtherealMacerator;
|
||||
import emt.tile.TileEntityIndustrialWandRecharge;
|
||||
import emt.tile.generator.TileEntityBaseGenerator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
@@ -34,6 +37,9 @@ public class CommonProxy implements IGuiHandler {
|
||||
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
|
||||
return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
|
||||
}
|
||||
else if (entity != null && entity instanceof TileEntityBaseGenerator) {
|
||||
return new ConainerGenerator(player.inventory, (TileEntityBaseGenerator) entity);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -52,6 +58,9 @@ public class CommonProxy implements IGuiHandler {
|
||||
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
|
||||
return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
|
||||
}
|
||||
else if (entity != null && entity instanceof TileEntityBaseGenerator) {
|
||||
return new GuiGenerator(player.inventory, (TileEntityBaseGenerator) entity);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class TileElectricCloud extends TileEntity {
|
||||
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);
|
||||
wisp.setGravity(-0.02F);
|
||||
wisp.setRBGColorF(worldObj.rand.nextInt(40) / 100f, 0, 1);
|
||||
wisp.setRBGColorF(worldObj.rand.nextInt(20) / 100f, worldObj.rand.nextInt(20) / 100f, 1);
|
||||
wisp.setAlphaF(1);
|
||||
ParticleEngine.instance.addEffect(worldObj, wisp);
|
||||
}
|
||||
|
||||
@@ -5,48 +5,49 @@ import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class TileEntityEMT extends TileEntity {
|
||||
|
||||
public int facing;
|
||||
public boolean isOn;
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tagCompound) {
|
||||
super.readFromNBT(tagCompound);
|
||||
|
||||
facing = tagCompound.getInteger("facing");
|
||||
isOn = tagCompound.getBoolean("isOn");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeToNBT(tagCompound);
|
||||
|
||||
tagCompound.setInteger("facing", facing);
|
||||
tagCompound.setBoolean("isOn", isOn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
writeToNBT(nbt);
|
||||
S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbt);
|
||||
return packet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
NBTTagCompound nbt = pkt.func_148857_g();
|
||||
readFromNBT(nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
super.markDirty();
|
||||
if (worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
public class TileEntityEMT
|
||||
extends TileEntity
|
||||
{
|
||||
public int facing;
|
||||
public boolean isOn;
|
||||
|
||||
public void readFromNBT(NBTTagCompound tagCompound)
|
||||
{
|
||||
super.readFromNBT(tagCompound);
|
||||
|
||||
this.facing = tagCompound.getInteger("facing");
|
||||
this.isOn = tagCompound.getBoolean("isOn");
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound tagCompound)
|
||||
{
|
||||
tagCompound.setInteger("facing", this.facing);
|
||||
tagCompound.setBoolean("isOn", this.isOn);
|
||||
super.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
public final Packet getDescriptionPacket()
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
writeToNBT(nbt);
|
||||
S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
|
||||
return packet;
|
||||
}
|
||||
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
|
||||
{
|
||||
NBTTagCompound nbt = pkt.func_148857_g();
|
||||
readFromNBT(nbt);
|
||||
}
|
||||
|
||||
public void markDirty()
|
||||
{
|
||||
super.markDirty();
|
||||
if (this.worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityAerGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityAerGenerator() {
|
||||
aspect = Aspect.AIR;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
}
|
||||
public class TileEntityAerGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityAerGenerator()
|
||||
{
|
||||
super(Aspect.AIR);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityArborGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityArborGenerator() {
|
||||
aspect = Aspect.TREE;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
public class TileEntityArborGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityArborGenerator()
|
||||
{
|
||||
super(Aspect.TREE);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityAuramGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityAuramGenerator() {
|
||||
aspect = Aspect.AURA;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
public class TileEntityAuramGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityAuramGenerator()
|
||||
{
|
||||
super(Aspect.AURA);
|
||||
}
|
||||
}
|
||||
@@ -1,87 +1,844 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import emt.tile.TileEntityEMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
|
||||
import gregtech.api.interfaces.tileentity.IEnergyConnected;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
||||
import gregtech.api.net.GT_Packet_Block_Event;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.aspects.IAspectContainer;
|
||||
import thaumcraft.api.aspects.IAspectSource;
|
||||
import thaumcraft.common.lib.events.EssentiaHandler;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource;
|
||||
|
||||
public abstract class TileEntityBaseGenerator extends TileEntityEMT {
|
||||
|
||||
public BasicSource energySource = new BasicSource(this, 1000000000, 3);
|
||||
public Aspect aspect;
|
||||
public double output;
|
||||
public int tick = 0;
|
||||
public boolean isActive = false;
|
||||
Random rnd = new Random();
|
||||
|
||||
public TileEntityBaseGenerator() {
|
||||
output = 2000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (tick > 0)
|
||||
tick--;
|
||||
|
||||
if (tick == 0) {
|
||||
energySource.updateEntity();
|
||||
isActive = false;
|
||||
createEnergy();
|
||||
tick = 20;
|
||||
}
|
||||
}
|
||||
|
||||
public void createEnergy() {
|
||||
int count = 0;
|
||||
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
|
||||
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
|
||||
for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) {
|
||||
TileEntity tile = this.worldObj.getTileEntity(x, y, z);
|
||||
if (tile != null && tile instanceof IAspectSource) {
|
||||
IAspectSource as = (IAspectSource) tile;
|
||||
if (as.doesContainerContainAmount(aspect, 1)) {
|
||||
if (as.takeFromContainer(aspect, 1)) {
|
||||
isActive = true;
|
||||
PacketHandler.INSTANCE.sendToAllAround(new PacketFXEssentiaSource(xCoord, yCoord, zCoord, (byte) (xCoord - x), (byte) (yCoord - y), (byte) (zCoord - z), aspect.getColor()), new cpw.mods.fml.common.network.NetworkRegistry.TargetPoint(this.getWorldObj().provider.dimensionId, xCoord, yCoord, zCoord, 32.0D));
|
||||
energySource.addEnergy(output / 30D);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
energySource.onChunkUnload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
energySource.invalidate();
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
super.readFromNBT(tag);
|
||||
energySource.readFromNBT(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
super.writeToNBT(tag);
|
||||
energySource.writeToNBT(tag);
|
||||
}
|
||||
public class TileEntityBaseGenerator
|
||||
extends TileEntityEMT
|
||||
implements IInventory, IAspectContainer, IEssentiaTransport, IHasWorldObjectAndCoords, IEnergyConnected, IBasicEnergyContainer
|
||||
{
|
||||
public BasicSource energySource = new BasicSource(this, 100000.0D, 2);
|
||||
public Aspect aspect;
|
||||
public double generating;
|
||||
public int tick = 0;
|
||||
public boolean isActive = false;
|
||||
public int tier;
|
||||
public int storage;
|
||||
public int maxstorage;
|
||||
public int maxfuel;
|
||||
public int fuel;
|
||||
public int refuel;
|
||||
public long timer = 0L;
|
||||
public boolean dead = true;
|
||||
public byte color;
|
||||
|
||||
public TileEntityBaseGenerator(Aspect aspect)
|
||||
{
|
||||
this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage);
|
||||
this.maxstorage = ((int)this.energySource.getCapacity());
|
||||
this.maxfuel = 64;
|
||||
this.fuel = 0;
|
||||
this.storage = 0;
|
||||
this.refuel = 1;
|
||||
this.aspect = aspect;
|
||||
this.generating = ((Double)EMTEssentiasOutputs.outputs.get(aspect.getTag())).doubleValue();
|
||||
this.color = -1;
|
||||
}
|
||||
|
||||
public void updateEntity()
|
||||
{
|
||||
this.dead = false;
|
||||
this.timer = 1L;
|
||||
storeFuel();
|
||||
fillfrompipe();
|
||||
createEnergy();
|
||||
inputintoGTnet();
|
||||
this.energySource.updateEntity();
|
||||
}
|
||||
|
||||
public void inputintoGTnet()
|
||||
{
|
||||
for (byte i = 0; i < 6; i = (byte)(i + 1)) {
|
||||
if (getIGregTechTileEntityAtSide(i) != null)
|
||||
{
|
||||
IGregTechTileEntity aBaseMetaTileEntity = getIGregTechTileEntityAtSide(i);
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage()))
|
||||
{
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits(i, getOutputVoltage(), tEU);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void storeFuel()
|
||||
{
|
||||
if (this.fuel < this.maxfuel) {
|
||||
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
|
||||
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
|
||||
for (int z = this.zCoord - 4; z < this.zCoord + 4; z++)
|
||||
{
|
||||
TileEntity tile = this.worldObj.getTileEntity(x, y, z);
|
||||
if ((tile != null) && ((tile instanceof IAspectSource)))
|
||||
{
|
||||
IAspectSource as = (IAspectSource)tile;
|
||||
if ((as.doesContainerContainAmount(this.aspect, this.refuel)) &&
|
||||
(as.takeFromContainer(this.aspect, this.refuel)))
|
||||
{
|
||||
PacketHandler.INSTANCE.sendToAllAround(new PacketFXEssentiaSource(this.xCoord, this.yCoord, this.zCoord, (byte)(this.xCoord - x), (byte)(this.yCoord - y), (byte)(this.zCoord - z), this.aspect.getColor()), new NetworkRegistry.TargetPoint(getWorldObj().provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, 32.0D));
|
||||
addToContainer(this.aspect, this.refuel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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]);
|
||||
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]))) {
|
||||
addToContainer(this.aspect, pipe.takeEssentia(this.aspect, 1, ForgeDirection.VALID_DIRECTIONS[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getInventoryName()
|
||||
{
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia." + this.aspect.getTag() + ".name");
|
||||
}
|
||||
|
||||
public void createEnergy()
|
||||
{
|
||||
if (this.fuel > 0)
|
||||
{
|
||||
if (this.storage + this.generating / 20.0D / 20.0D < this.maxstorage)
|
||||
{
|
||||
this.isActive = true;
|
||||
if (FMLCommonHandler.instance().getEffectiveSide().isServer())
|
||||
{
|
||||
this.energySource.addEnergy(this.generating / 20.0D / 20.0D);
|
||||
this.storage = ((int)this.energySource.getEnergyStored());
|
||||
}
|
||||
this.tick += 1;
|
||||
if (this.tick == 400)
|
||||
{
|
||||
this.fuel -= 1;
|
||||
this.tick = 0;
|
||||
}
|
||||
}
|
||||
else if (this.storage == this.maxstorage)
|
||||
{
|
||||
this.isActive = false;
|
||||
}
|
||||
else if ((this.storage + this.generating / 20.0D / 20.0D > this.maxstorage) && (this.storage != this.maxstorage))
|
||||
{
|
||||
this.isActive = true;
|
||||
if (FMLCommonHandler.instance().getEffectiveSide().isServer())
|
||||
{
|
||||
this.energySource.setEnergyStored(this.maxstorage);
|
||||
this.storage = this.maxstorage;
|
||||
}
|
||||
this.tick += 1;
|
||||
if (this.tick == 400)
|
||||
{
|
||||
this.fuel -= 1;
|
||||
this.tick = 0;
|
||||
}
|
||||
this.isActive = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.isActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void onChunkUnload()
|
||||
{
|
||||
this.energySource.onChunkUnload();
|
||||
}
|
||||
|
||||
public void invalidate()
|
||||
{
|
||||
this.energySource.invalidate();
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound tag)
|
||||
{
|
||||
super.readFromNBT(tag);
|
||||
this.energySource.readFromNBT(tag);
|
||||
if (tag.getInteger("storage") > this.storage) {
|
||||
this.storage = tag.getInteger("storage");
|
||||
}
|
||||
if (tag.getInteger("fuel") > this.fuel) {
|
||||
this.fuel = tag.getInteger("fuel");
|
||||
}
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound tag)
|
||||
{
|
||||
tag.setInteger("storage", this.storage);
|
||||
tag.setInteger("fuel", this.fuel);
|
||||
super.writeToNBT(tag);
|
||||
this.energySource.writeToNBT(tag);
|
||||
}
|
||||
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
public ItemStack getStackInSlot(int i)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public ItemStack getStackInSlotOnClosing(int p_70304_1_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {}
|
||||
|
||||
public boolean hasCustomInventoryName()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getInventoryStackLimit()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean isUseableByPlayer(EntityPlayer p_70300_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void openInventory() {}
|
||||
|
||||
public void closeInventory() {}
|
||||
|
||||
public int gaugeEnergyScaled(int i)
|
||||
{
|
||||
return this.storage * i / this.maxstorage;
|
||||
}
|
||||
|
||||
public int gaugeFuelScaled(int i)
|
||||
{
|
||||
return this.fuel * i / this.maxfuel;
|
||||
}
|
||||
|
||||
public boolean isItemValidForSlot(int i, ItemStack Stack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public AspectList getAspects()
|
||||
{
|
||||
return new AspectList().add(this.aspect, this.fuel);
|
||||
}
|
||||
|
||||
public void setAspects(AspectList aspects) {}
|
||||
|
||||
public boolean doesContainerAccept(Aspect tag)
|
||||
{
|
||||
if (!tag.equals(this.aspect)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public int addToContainer(Aspect tag, int amount)
|
||||
{
|
||||
if ((!tag.equals(this.aspect)) || (amount < 0)) {
|
||||
return amount;
|
||||
}
|
||||
if (amount + this.fuel < this.maxfuel)
|
||||
{
|
||||
this.fuel += amount;
|
||||
return 0;
|
||||
}
|
||||
this.fuel += amount - (amount - (this.maxfuel - this.fuel));
|
||||
return amount - (this.maxfuel - this.fuel);
|
||||
}
|
||||
|
||||
public boolean takeFromContainer(Aspect tag, int amount)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean takeFromContainer(AspectList ot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean doesContainerContainAmount(Aspect tag, int amount)
|
||||
{
|
||||
return (tag.equals(this.aspect)) && (amount <= this.fuel);
|
||||
}
|
||||
|
||||
public boolean doesContainerContain(AspectList ot)
|
||||
{
|
||||
return ot.aspects.containsKey(this.aspect);
|
||||
}
|
||||
|
||||
public int containerContains(Aspect tag)
|
||||
{
|
||||
return tag == this.aspect ? this.fuel : 0;
|
||||
}
|
||||
|
||||
public boolean isConnectable(ForgeDirection face)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean canInputFrom(ForgeDirection face)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean canOutputTo(ForgeDirection face)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setSuction(Aspect aspect, int amount) {}
|
||||
|
||||
public Aspect getSuctionType(ForgeDirection face)
|
||||
{
|
||||
return this.aspect;
|
||||
}
|
||||
|
||||
public int getSuctionAmount(ForgeDirection face)
|
||||
{
|
||||
return 128;
|
||||
}
|
||||
|
||||
public int takeEssentia(Aspect aspect, int amount, ForgeDirection face)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int addEssentia(Aspect aspect, int amount, ForgeDirection face)
|
||||
{
|
||||
if (amount < this.maxfuel - this.fuel) {
|
||||
return amount;
|
||||
}
|
||||
return this.maxfuel - addToContainer(aspect, amount);
|
||||
}
|
||||
|
||||
public Aspect getEssentiaType(ForgeDirection face)
|
||||
{
|
||||
return this.aspect;
|
||||
}
|
||||
|
||||
public int getEssentiaAmount(ForgeDirection face)
|
||||
{
|
||||
return this.fuel;
|
||||
}
|
||||
|
||||
public int getMinimumSuction()
|
||||
{
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
public boolean renderExtendedTube()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public byte getColorization()
|
||||
{
|
||||
return this.color;
|
||||
}
|
||||
|
||||
public byte setColorization(byte aColor)
|
||||
{
|
||||
this.color = aColor;
|
||||
return this.color;
|
||||
}
|
||||
|
||||
public boolean isUniversalEnergyStored(long aEnergyAmount)
|
||||
{
|
||||
return aEnergyAmount < this.energySource.getEnergyStored();
|
||||
}
|
||||
|
||||
public long getUniversalEnergyStored()
|
||||
{
|
||||
return (long) this.energySource.getEnergyStored();
|
||||
}
|
||||
|
||||
public long getUniversalEnergyCapacity()
|
||||
{
|
||||
return (long) this.energySource.getCapacity();
|
||||
}
|
||||
|
||||
public long getOutputAmperage()
|
||||
{
|
||||
if (this.generating / 20.0D / 20.0D <= GT_Values.V[this.energySource.getSourceTier()]) {
|
||||
return 1L;
|
||||
}
|
||||
if (this.generating / 20.0D / 20.0D % GT_Values.V[this.energySource.getSourceTier()] == 0.0D) {
|
||||
return (long) (this.generating / 20.0D / 20.0D / GT_Values.V[this.energySource.getSourceTier()]);
|
||||
}
|
||||
return (long) (1L + (this.generating / 20.0D / 20.0D / GT_Values.V[this.energySource.getSourceTier()]));
|
||||
}
|
||||
|
||||
public long getOutputVoltage()
|
||||
{
|
||||
return GT_Values.V[this.energySource.getSourceTier()];
|
||||
}
|
||||
|
||||
public long getInputAmperage()
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public long getInputVoltage()
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy)
|
||||
{
|
||||
if (this.energySource.getEnergyStored() > aEnergy)
|
||||
{
|
||||
this.energySource.drawEnergy(aEnergy);
|
||||
this.storage = ((int)this.energySource.getEnergyStored());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage)
|
||||
{
|
||||
return decreaseStoredEnergyUnits(aVoltage * aAmperage, this.energySource.getEnergyStored() > aVoltage * aAmperage);
|
||||
}
|
||||
|
||||
public long getAverageElectricInput()
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public long getAverageElectricOutput()
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public long getStoredEU()
|
||||
{
|
||||
return (long) this.energySource.getEnergyStored();
|
||||
}
|
||||
|
||||
public long getEUCapacity()
|
||||
{
|
||||
return (long) this.energySource.getCapacity();
|
||||
}
|
||||
|
||||
public long getStoredSteam()
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public long getSteamCapacity()
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage)
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public boolean inputEnergyFrom(byte aSide)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean outputsEnergyTo(byte aSide)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean energyStateReady()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public World getWorld()
|
||||
{
|
||||
return this.worldObj;
|
||||
}
|
||||
|
||||
public int getXCoord()
|
||||
{
|
||||
return this.xCoord;
|
||||
}
|
||||
|
||||
public short getYCoord()
|
||||
{
|
||||
return (short)this.yCoord;
|
||||
}
|
||||
|
||||
public int getZCoord()
|
||||
{
|
||||
return this.zCoord;
|
||||
}
|
||||
|
||||
public boolean isServerSide()
|
||||
{
|
||||
return FMLCommonHandler.instance().getEffectiveSide().isServer();
|
||||
}
|
||||
|
||||
public boolean isClientSide()
|
||||
{
|
||||
return FMLCommonHandler.instance().getEffectiveSide().isClient();
|
||||
}
|
||||
|
||||
public int getRandomNumber(int aRange)
|
||||
{
|
||||
return this.worldObj.rand.nextInt(aRange);
|
||||
}
|
||||
|
||||
public TileEntity getTileEntity(int aX, int aY, int aZ)
|
||||
{
|
||||
return this.worldObj.getTileEntity(aX, aY, aZ);
|
||||
}
|
||||
|
||||
public TileEntity getTileEntityOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return this.worldObj.getTileEntity(aX + this.xCoord, aY + this.yCoord, aZ + this.zCoord);
|
||||
}
|
||||
|
||||
public TileEntity getTileEntityAtSide(byte aSide)
|
||||
{
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);int tY = getOffsetY(aSide, 1);int tZ = getOffsetZ(aSide, 1);
|
||||
return this.worldObj.getTileEntity(tX, tY, tZ);
|
||||
}
|
||||
|
||||
public TileEntity getTileEntityAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
if (aDistance == 1) {
|
||||
return getTileEntityAtSide(aSide);
|
||||
}
|
||||
return getTileEntity(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
}
|
||||
|
||||
public IInventory getIInventory(int aX, int aY, int aZ)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public IInventory getIInventoryOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public IInventory getIInventoryAtSide(byte aSide)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public IInventory getIInventoryAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public IFluidHandler getITankContainer(int aX, int aY, int aZ)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public IFluidHandler getITankContainerOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public IFluidHandler getITankContainerAtSide(byte aSide)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public IFluidHandler getITankContainerAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public IGregTechTileEntity getIGregTechTileEntity(int aX, int aY, int aZ)
|
||||
{
|
||||
TileEntity tTileEntity = getTileEntity(aX, aY, aZ);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity)tTileEntity;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public IGregTechTileEntity getIGregTechTileEntityOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return getIGregTechTileEntity(aX + this.xCoord, aY + this.yCoord, aZ + this.zCoord);
|
||||
}
|
||||
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSide(byte aSide)
|
||||
{
|
||||
TileEntity tTileEntity = getTileEntityAtSide(aSide);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity)tTileEntity;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
TileEntity tTileEntity = getTileEntityAtSideAndDistance(aSide, aDistance);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity)tTileEntity;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Block getBlock(int aX, int aY, int aZ)
|
||||
{
|
||||
return this.worldObj.getBlock(aX, aY, aZ);
|
||||
}
|
||||
|
||||
public Block getBlockOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return getBlock(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
|
||||
}
|
||||
|
||||
public Block getBlockAtSide(byte aSide)
|
||||
{
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);int tY = getOffsetY(aSide, 1);int tZ = getOffsetZ(aSide, 1);
|
||||
return this.worldObj.getBlock(tX, tY, tZ);
|
||||
}
|
||||
|
||||
public Block getBlockAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
if (aDistance == 1) {
|
||||
return getBlockAtSide(aSide);
|
||||
}
|
||||
return getBlock(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
}
|
||||
|
||||
public byte getMetaID(int aX, int aY, int aZ)
|
||||
{
|
||||
return (byte)this.worldObj.getBlockMetadata(aX, aY, aZ);
|
||||
}
|
||||
|
||||
public byte getMetaIDOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
|
||||
}
|
||||
|
||||
public byte getMetaIDAtSide(byte aSide)
|
||||
{
|
||||
int tX = getOffsetX(aSide, 1);int tY = getOffsetY(aSide, 1);int tZ = getOffsetZ(aSide, 1);
|
||||
return (byte)this.worldObj.getBlockMetadata(tX, tY, tZ);
|
||||
}
|
||||
|
||||
public byte getMetaIDAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
if (aDistance == 1) {
|
||||
return getMetaIDAtSide(aSide);
|
||||
}
|
||||
return getMetaID(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
}
|
||||
|
||||
public byte getLightLevel(int aX, int aY, int aZ)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public byte getLightLevelOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public byte getLightLevelAtSide(byte aSide)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public byte getLightLevelAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean getOpacity(int aX, int aY, int aZ)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean getOpacityOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean getOpacityAtSide(byte aSide)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean getOpacityAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean getSky(int aX, int aY, int aZ)
|
||||
{
|
||||
boolean sky = true;
|
||||
do
|
||||
{
|
||||
if (!this.worldObj.getBlock(aX, ++aY, aZ).equals(Blocks.air)) {
|
||||
sky = false;
|
||||
}
|
||||
} while ((sky) && (aY < 256));
|
||||
return sky;
|
||||
}
|
||||
|
||||
public boolean getSkyOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return getSky(aX + this.xCoord, aY + this.yCoord, aZ + this.zCoord);
|
||||
}
|
||||
|
||||
public boolean getSkyAtSide(byte aSide)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean getSkyAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean getAir(int aX, int aY, int aZ)
|
||||
{
|
||||
return this.worldObj.getBlock(aX, aY, aZ).equals(Blocks.air);
|
||||
}
|
||||
|
||||
public boolean getAirOffset(int aX, int aY, int aZ)
|
||||
{
|
||||
return getAir(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
|
||||
}
|
||||
|
||||
public boolean getAirAtSide(byte aSide)
|
||||
{
|
||||
return getAirAtSideAndDistance(aSide, 1);
|
||||
}
|
||||
|
||||
public boolean getAirAtSideAndDistance(byte aSide, int aDistance)
|
||||
{
|
||||
return getAir(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
}
|
||||
|
||||
public BiomeGenBase getBiome()
|
||||
{
|
||||
return this.worldObj.getBiomeGenForCoords(this.xCoord, this.zCoord);
|
||||
}
|
||||
|
||||
public BiomeGenBase getBiome(int aX, int aZ)
|
||||
{
|
||||
return this.worldObj.getBiomeGenForCoords(aX, aZ);
|
||||
}
|
||||
|
||||
public int getOffsetX(byte aSide, int aMultiplier)
|
||||
{
|
||||
return this.xCoord + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier;
|
||||
}
|
||||
|
||||
public short getOffsetY(byte aSide, int aMultiplier)
|
||||
{
|
||||
return (short)(this.yCoord + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier);
|
||||
}
|
||||
|
||||
public int getOffsetZ(byte aSide, int aMultiplier)
|
||||
{
|
||||
return this.zCoord + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier;
|
||||
}
|
||||
|
||||
public boolean isDead()
|
||||
{
|
||||
return this.dead;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
public long getTimer()
|
||||
{
|
||||
return this.timer;
|
||||
}
|
||||
|
||||
public void setLightValue(byte aLightValue) {}
|
||||
|
||||
public boolean isInvalidTileEntity()
|
||||
{
|
||||
return this.tileEntityInvalid;
|
||||
}
|
||||
|
||||
public boolean openGUI(EntityPlayer aPlayer, int aID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean openGUI(EntityPlayer aPlayer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public abstract class TileEntityCompressedGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityCompressedGenerator(Aspect aspect)
|
||||
{
|
||||
super(aspect);
|
||||
this.energySource = new BasicSource(this, 1000000.0D, 3);
|
||||
this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage * 10.0D);
|
||||
this.maxfuel *= 10;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityIgnisGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityIgnisGenerator() {
|
||||
aspect = Aspect.FIRE;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
public class TileEntityIgnisGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityIgnisGenerator()
|
||||
{
|
||||
super(Aspect.FIRE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityLucrumGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityLucrumGenerator()
|
||||
{
|
||||
super(Aspect.GREED);
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityPotentiaGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityPotentiaGenerator() {
|
||||
aspect = Aspect.ENERGY;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
public class TileEntityPotentiaGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityPotentiaGenerator()
|
||||
{
|
||||
super(Aspect.ENERGY);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityReflexionGen
|
||||
{
|
||||
public static List L = new ArrayList(EMTEssentiasOutputs.outputs.keySet());
|
||||
public static Class<? extends TileEntity>[] GensS = new Class[L.size()];
|
||||
public static TileEntityBaseGenerator[] Gens = new TileEntityBaseGenerator[L.size()];
|
||||
|
||||
public TileEntityReflexionGen()
|
||||
{
|
||||
for (int i = 0; i < L.size(); i++)
|
||||
{
|
||||
GensS[i] = TileEntityBaseGenerator.class;
|
||||
Gens[i] = new TileEntityBaseGenerator((Aspect)Aspect.aspects.get(L.get(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import emt.tile.TileEntityEMT;
|
||||
|
||||
public abstract class TileEntitySolarBase extends TileEntityEMT implements IWrenchable {
|
||||
|
||||
public BasicSource energySource = new BasicSource(this, 10000, 4);
|
||||
public BasicSource energySource;
|
||||
public static Random random = new Random();
|
||||
public boolean initialized;
|
||||
public boolean theSunIsVisible;
|
||||
|
||||
@@ -10,6 +10,8 @@ import net.minecraft.item.ItemStack;
|
||||
public class TileEntityAirSolar extends TileEntitySolarBase {
|
||||
|
||||
public TileEntityAirSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 3);
|
||||
output = EMTConfigHandler.compressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import net.minecraft.item.ItemStack;
|
||||
public class TileEntityDoubleAirSolar extends TileEntityAirSolar {
|
||||
|
||||
public TileEntityDoubleAirSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 4);
|
||||
output = EMTConfigHandler.doubleCompressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@ import net.minecraft.item.ItemStack;
|
||||
public class TileEntityTripleAirSolar extends TileEntityAirSolar {
|
||||
|
||||
public TileEntityTripleAirSolar() {
|
||||
super();
|
||||
output = EMTConfigHandler.tripleCompressedSolarOutput;
|
||||
energySource = new BasicSource(this, 40000, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,12 +3,15 @@ package emt.tile.solar.compressed;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityCompressedSolar extends TileEntitySolarBase {
|
||||
|
||||
public TileEntityCompressedSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 3);
|
||||
output = EMTConfigHandler.compressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,15 @@ package emt.tile.solar.compressed;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityDoubleCompressedSolar extends TileEntitySolarBase {
|
||||
|
||||
public TileEntityDoubleCompressedSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 4);
|
||||
output = EMTConfigHandler.doubleCompressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,13 +3,16 @@ package emt.tile.solar.compressed;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityTripleCompressedSolar extends TileEntitySolarBase {
|
||||
|
||||
public TileEntityTripleCompressedSolar() {
|
||||
super();
|
||||
output = EMTConfigHandler.tripleCompressedSolarOutput;
|
||||
energySource = new BasicSource(this, 40000, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,12 +3,15 @@ package emt.tile.solar.dark;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityDarkSolar extends TileEntitySolarBase {
|
||||
|
||||
public TileEntityDarkSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 3);
|
||||
output = EMTConfigHandler.compressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,15 @@ package emt.tile.solar.dark;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityDoubleDarkSolar extends TileEntityDarkSolar {
|
||||
|
||||
public TileEntityDoubleDarkSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 4);
|
||||
output = EMTConfigHandler.doubleCompressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,16 @@ package emt.tile.solar.dark;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityTripleDarkSolar extends TileEntityDarkSolar {
|
||||
|
||||
public TileEntityTripleDarkSolar() {
|
||||
super();
|
||||
output = EMTConfigHandler.tripleCompressedSolarOutput;
|
||||
energySource = new BasicSource(this, 40000, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,12 +2,15 @@ package emt.tile.solar.earth;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityDoubleEarthSolar extends TileEntityEarthSolar {
|
||||
|
||||
public TileEntityDoubleEarthSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 4);
|
||||
output = EMTConfigHandler.doubleCompressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,15 @@ package emt.tile.solar.earth;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityEarthSolar extends TileEntitySolarBase {
|
||||
|
||||
public TileEntityEarthSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 3);
|
||||
output = EMTConfigHandler.compressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,16 @@ package emt.tile.solar.earth;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityTripleEarthSolar extends TileEntityEarthSolar {
|
||||
|
||||
public TileEntityTripleEarthSolar() {
|
||||
super();
|
||||
output = EMTConfigHandler.tripleCompressedSolarOutput;
|
||||
energySource = new BasicSource(this, 40000, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,12 +2,15 @@ package emt.tile.solar.fire;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityDoubleFireSolar extends TileEntityFireSolar {
|
||||
|
||||
public TileEntityDoubleFireSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 4);
|
||||
output = EMTConfigHandler.doubleCompressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,15 @@ package emt.tile.solar.fire;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityFireSolar extends TileEntitySolarBase {
|
||||
|
||||
public TileEntityFireSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 3);
|
||||
output = EMTConfigHandler.compressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,16 @@ package emt.tile.solar.fire;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityTripleFireSolar extends TileEntityFireSolar {
|
||||
|
||||
public TileEntityTripleFireSolar() {
|
||||
super();
|
||||
output = EMTConfigHandler.tripleCompressedSolarOutput;
|
||||
energySource = new BasicSource(this, 40000, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,12 +2,15 @@ package emt.tile.solar.order;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityDoubleOrderSolar extends TileEntityOrderSolar {
|
||||
|
||||
public TileEntityDoubleOrderSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 4);
|
||||
output = EMTConfigHandler.doubleCompressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,15 @@ package emt.tile.solar.order;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityOrderSolar extends TileEntitySolarBase {
|
||||
|
||||
public TileEntityOrderSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 3);
|
||||
output = EMTConfigHandler.compressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,16 @@ package emt.tile.solar.order;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityTripleOrderSolar extends TileEntityOrderSolar {
|
||||
|
||||
public TileEntityTripleOrderSolar() {
|
||||
super();
|
||||
output = EMTConfigHandler.tripleCompressedSolarOutput;
|
||||
energySource = new BasicSource(this, 40000, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,12 +2,15 @@ package emt.tile.solar.water;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityDoubleWaterSolar extends TileEntityWaterSolar {
|
||||
|
||||
public TileEntityDoubleWaterSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 4);
|
||||
output = EMTConfigHandler.doubleCompressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,16 @@ package emt.tile.solar.water;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityTripleWaterSolar extends TileEntityWaterSolar {
|
||||
|
||||
public TileEntityTripleWaterSolar() {
|
||||
super();
|
||||
output = EMTConfigHandler.tripleCompressedSolarOutput;
|
||||
energySource = new BasicSource(this, 40000, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,12 +3,15 @@ package emt.tile.solar.water;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.tile.solar.TileEntitySolarBase;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TileEntityWaterSolar extends TileEntitySolarBase {
|
||||
|
||||
public TileEntityWaterSolar() {
|
||||
super();
|
||||
energySource = new BasicSource(this, 10000, 3);
|
||||
output = EMTConfigHandler.compressedSolarOutput;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,12 +8,9 @@ import emt.EMT;
|
||||
import emt.client.EMTKeys;
|
||||
import emt.init.EMTItems;
|
||||
import emt.network.PacketEMTKeys;
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.Ic2Items;
|
||||
import ic2.core.audio.AudioSource;
|
||||
import ic2.core.audio.PositionSpec;
|
||||
import ic2.core.item.tool.ItemElectricToolChainsaw;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
Loaded 100 of 109 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user