Lots of things. Read the description.

-Redid item and block unlocalized names to include the MODID
-Revamped the ConfigGUI
-Localize everything except Thaumonomicon titles
-Fix config GUI refreshing config on change.
-Fix custom mob drops
-Make some tooltips easier to read
-Organize Item/Block registry order to make things flow
This commit is contained in:
TehNut committed 2014-09-27 20:16:22 -07:00
1 parent 121203da31
commit cc08a6a8cb
121 files changed
+6705 -6529

No files matched your search

@@ -9,9 +9,10 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
@@ -21,8 +22,10 @@ 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.network.NetworkRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import tombenpotter.emt.common.commands.CommandOutputs;
import tombenpotter.emt.common.module.base.EMTEntityRegistry;
import tombenpotter.emt.common.module.ic2.recipes.EMTInitRecipes;
@@ -31,69 +34,73 @@ import tombenpotter.emt.common.module.ic2.recipes.UuMInfusionRecipes;
import tombenpotter.emt.common.util.*;
import tombenpotter.emt.proxies.CommonProxy;
@Mod(modid = ElectroMagicTools.modid, name = "Electro-MagicTools", version = "1.1.4", guiFactory = "tombenpotter.emt.client.gui.config.EMTGuiFactory", dependencies = "required-after:Thaumcraft ; required-after:IC2")
import static tombenpotter.emt.common.util.TextHelper.localize;
@Mod(modid = ModInformation.modid, name = ModInformation.name, version = ModInformation.version, guiFactory = ModInformation.guiFactory, dependencies = ModInformation.depend)
public class ElectroMagicTools {
@SidedProxy(clientSide = "tombenpotter.emt.proxies.ClientProxy", serverSide = "tombenpotter.emt.proxies.CommonProxy")
public static CommonProxy proxy;
@Instance(ElectroMagicTools.modid)
public static ElectroMagicTools instance;
public static final String modid = "Electro-MagicTools";
public static final String texturePath = "electromagictools";
@SidedProxy(clientSide = ModInformation.clientProxy, serverSide = ModInformation.commonProxy)
public static CommonProxy proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
FMLLog.info("[EMT] Electro-Magic Tools : Starting planning the world domination");
public static CreativeTabs tabEMT = new CreativeTabEMT(ModInformation.modid + ".creativeTab");
public static Logger logger = LogManager.getLogger(ModInformation.name);
FMLLog.info("[EMT] Electro-Magic Tools : Creating/Reading the config file");
Config.config = new Configuration(event.getSuggestedConfigurationFile());
Config.create();
@Instance(ModInformation.modid)
public static ElectroMagicTools instance;
RegistryHandler.registerIc2Registrys();
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
ElectroMagicTools.logger.info(localize("console.EMT.preInit.begin"));
EssentiasOutputs.addPrimalOutputs();
EssentiasOutputs.addOutputs();
ElectroMagicTools.logger.info(localize("console.EMT.preInit.configRead"));
ConfigHandler.init(event.getSuggestedConfigurationFile());
FMLLog.info("[EMT] Electro-Magic Tools : Planning complete");
}
FMLCommonHandler.instance().bus().register(new EventHandlerEMT());
RegistryHandler.registerIc2Registrys();
@EventHandler
public void load(FMLInitializationEvent event) {
FMLLog.info("[EMT] Electro-Magic Tools : Starting gathering allies");
EssentiasOutputs.addPrimalOutputs();
EssentiasOutputs.addOutputs();
FMLLog.info("[EMT] Electro-Magic Tools : Loading the proxies");
proxy.load();
FMLLog.info("[EMT] Electro-Magic Tools : Making mobs drop additional items");
MinecraftForge.EVENT_BUS.register(new EMTEventHandler());
FMLLog.info("[EMT] Electro-Magic Tools : Generating loot in dungeon chests");
DungeonChestGenerator.generateLoot();
FMLLog.info("[EMT] Electro-Magic Tools : Adding the Init recipes");
EMTInitRecipes.add();
FMLLog.info("[EMT] Electro-Magic Tools : Registering entities");
EMTEntityRegistry.registerEMTEntities();
FMLLog.info("[EMT] Electro-Magic Tools : Registering the GUI Handler");
NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);
ElectroMagicTools.logger.info(localize("console.EMT.preInit.end"));
}
FMLLog.info("[EMT] Electro-Magic Tools : Allies gathered.");
}
@EventHandler
public void load(FMLInitializationEvent event) {
ElectroMagicTools.logger.info(localize("console.EMT.init.begin"));
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
FMLLog.info("[EMT] Electro-Magic Tools : Starting the world takeover");
ElectroMagicTools.logger.info(localize("console.EMT.init.loadProxies"));
proxy.load();
ElectroMagicTools.logger.info(localize("console.EMT.init.mobDrops"));
MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
ElectroMagicTools.logger.info(localize("console.EMT.init.loot"));
DungeonChestGenerator.generateLoot();
ElectroMagicTools.logger.info(localize("console.EMT.init.recipes"));
EMTInitRecipes.add();
ElectroMagicTools.logger.info(localize("console.EMT.init.entities"));
EMTEntityRegistry.registerEMTEntities();
ElectroMagicTools.logger.info(localize("console.EMT.init.guiHandler"));
NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);
FMLLog.info("[EMT] Electro-Magic Tools : Adding PostInit recipes");
EMTPostInitRecipes.add();
FMLLog.info("[EMT] Electro-Magic Tools : Adding the UU-Matter Infusion recipes");
UuMInfusionRecipes.add();
ElectroMagicTools.logger.info(localize("console.EMT.init.end"));
}
RegistryHandler.registerIc2PostRegistrys();
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
ElectroMagicTools.logger.info(localize("console.EMT.postInit.begin"));
FMLLog.info("[EMT] Electro-Magic Tools : World takeover complete. Enjoy!");
}
ElectroMagicTools.logger.info(localize("console.EMT.postInit.recipes"));
EMTPostInitRecipes.add();
ElectroMagicTools.logger.info(localize("console.EMT.postInit.uumatter"));
UuMInfusionRecipes.add();
@EventHandler
public void onFMLServerStart(FMLServerStartingEvent event) {
event.registerServerCommand(new CommandOutputs());
}
RegistryHandler.registerIc2PostRegistrys();
ElectroMagicTools.logger.info(localize("console.EMT.postInit.end"));
}
@EventHandler
public void onFMLServerStart(FMLServerStartingEvent event) {
event.registerServerCommand(new CommandOutputs());
}
}
@@ -0,0 +1,14 @@
package tombenpotter.emt;
public class ModInformation {
public static final String name = "Electro-Magic Tools";
public static final String modid = "EMT";
public static final String version = "1.1.4";
public static final String texturePath = "electromagictools";
public static final String guiFactory = "tombenpotter.emt.client.gui.config.EMTGuiFactory";
public static final String clientProxy = "tombenpotter.emt.proxies.ClientProxy";
public static final String commonProxy = "tombenpotter.emt.proxies.CommonProxy";
public static final String channel = "ElectroMagicTools";
public static final String depend = "required-after:Thaumcraft ; required-after:IC2";
}
@@ -9,36 +9,38 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.client.gui;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEtherealMacerator;
import tombenpotter.emt.client.gui.container.ContainerEtheralMacerator;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.client.gui.container.ContainerEtheralMacerator;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEtherealMacerator;
import tombenpotter.emt.common.util.TextHelper;
public class GuiEtherealMacerator extends GuiContainer {
public GuiEtherealMacerator(InventoryPlayer inventory, TileEntityEtherealMacerator te) {
super(new ContainerEtheralMacerator(inventory, te));
xSize = 176;
ySize = 165;
}
public GuiEtherealMacerator(InventoryPlayer inventory, TileEntityEtherealMacerator te) {
super(new ContainerEtheralMacerator(inventory, te));
xSize = 176;
ySize = 165;
}
public static final ResourceLocation texture = new ResourceLocation(ElectroMagicTools.texturePath, "textures/guis/etherealmacerator.png");
public static final ResourceLocation texture = new ResourceLocation(ModInformation.texturePath, "textures/guis/etherealmacerator.png");
@Override
public void drawGuiContainerBackgroundLayer(float f, int j, int i) {
GL11.glColor4f(1F, 1F, 1F, 1F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
@Override
public void drawGuiContainerBackgroundLayer(float f, int j, int i) {
GL11.glColor4f(1F, 1F, 1F, 1F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
this.fontRendererObj.drawString("Ethereal Processor", 6, 6, 4210752);
this.fontRendererObj.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752);
}
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.etherealMacerator.title"), 6, 6, 4210752);
this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
}
@@ -9,36 +9,38 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.client.gui;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.module.ic2.tile.TileEntityIndustrialWandRecharge;
import tombenpotter.emt.client.gui.container.ContainerIndustrialWandRecharge;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.client.gui.container.ContainerIndustrialWandRecharge;
import tombenpotter.emt.common.module.ic2.tile.TileEntityIndustrialWandRecharge;
import tombenpotter.emt.common.util.TextHelper;
public class GuiIndustrialWandRecharger extends GuiContainer {
public GuiIndustrialWandRecharger(InventoryPlayer inventory, TileEntityIndustrialWandRecharge te) {
super(new ContainerIndustrialWandRecharge(inventory, te));
xSize = 176;
ySize = 165;
}
public GuiIndustrialWandRecharger(InventoryPlayer inventory, TileEntityIndustrialWandRecharge te) {
super(new ContainerIndustrialWandRecharge(inventory, te));
xSize = 176;
ySize = 165;
}
public static final ResourceLocation texture = new ResourceLocation(ElectroMagicTools.texturePath, "textures/guis/wandcharger.png");
public static final ResourceLocation texture = new ResourceLocation(ModInformation.texturePath, "textures/guis/wandcharger.png");
@Override
public void drawGuiContainerBackgroundLayer(float f, int j, int i) {
GL11.glColor4f(1F, 1F, 1F, 1F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
@Override
public void drawGuiContainerBackgroundLayer(float f, int j, int i) {
GL11.glColor4f(1F, 1F, 1F, 1F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
this.fontRendererObj.drawString("Industrial Wand Charging Station", 6, 6, 4210752);
this.fontRendererObj.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752);
}
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.wandRecharge.title"), 6, 6, 4210752);
this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
}
@@ -1,89 +1,32 @@
package tombenpotter.emt.client.gui.config;
import cpw.mods.fml.client.config.DummyConfigElement;
import cpw.mods.fml.client.config.GuiConfig;
import cpw.mods.fml.client.config.GuiConfigEntries;
import cpw.mods.fml.client.config.IConfigElement;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.common.config.Configuration;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.ModInformation;
import java.util.ArrayList;
import java.util.List;
import static tombenpotter.emt.common.util.ConfigHandler.*;
public class EMTGuiConfig extends GuiConfig {
public EMTGuiConfig(GuiScreen parentScreen) {
super(parentScreen, getConfigElements(), ElectroMagicTools.modid, false, false, GuiConfig.getAbridgedConfigPath(Config.config.toString()));
}
private static List<IConfigElement> getConfigElements() {
List<IConfigElement> list = new ArrayList<IConfigElement>();
list.add(new DummyConfigElement.DummyCategoryElement("General Config", "emt.config.general", GeneralEntry.class));
list.add(new DummyConfigElement.DummyCategoryElement("Values Config", "emt.config.valuezs", ValuesEntry.class));
list.add(new DummyConfigElement.DummyCategoryElement("Research Disabling Config", "emt.config.research.disable", ResearchEntry.class));
list.add(new DummyConfigElement.DummyCategoryElement("Essentia Generator Outputs", "emt.config.outputs", OutputsEntry.class));
return list;
}
public EMTGuiConfig(GuiScreen parentScreen) {
super(parentScreen, getConfigElements(parentScreen), ModInformation.modid, false, false, StatCollector.translateToLocal("gui." + ModInformation.modid + ".config.title"));
}
public static class GeneralEntry extends GuiConfigEntries.CategoryEntry {
public GeneralEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop) {
super(owningScreen, owningEntryList, prop);
}
@SuppressWarnings("rawtypes")
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
List<IConfigElement> list = new ArrayList<IConfigElement>();
@Override
protected GuiScreen buildChildScreen() {
return new GuiConfig(this.owningScreen,
(new ConfigElement(Config.config.getCategory(Configuration.CATEGORY_GENERAL))).getChildElements(),
this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
GuiConfig.getAbridgedConfigPath("emt/config/general"));
}
}
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_VALUES.toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_RESEARCH.toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory(CATEGORY_OUTPUTS.toLowerCase())));
public static class ValuesEntry extends GuiConfigEntries.CategoryEntry {
public ValuesEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop) {
super(owningScreen, owningEntryList, prop);
}
@Override
protected GuiScreen buildChildScreen() {
return new GuiConfig(this.owningScreen,
(new ConfigElement(Config.config.getCategory(Config.CATEGORY_VALUES))).getChildElements(),
this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
GuiConfig.getAbridgedConfigPath("emt/config/values"));
}
}
public static class ResearchEntry extends GuiConfigEntries.CategoryEntry {
public ResearchEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop) {
super(owningScreen, owningEntryList, prop);
}
@Override
protected GuiScreen buildChildScreen() {
return new GuiConfig(this.owningScreen,
(new ConfigElement(Config.config.getCategory(Config.CATEGORY_RESEARCH))).getChildElements(),
this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
GuiConfig.getAbridgedConfigPath("emt/config/research"));
}
}
public static class OutputsEntry extends GuiConfigEntries.CategoryEntry {
public OutputsEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop) {
super(owningScreen, owningEntryList, prop);
}
@Override
protected GuiScreen buildChildScreen() {
return new GuiConfig(this.owningScreen,
(new ConfigElement(Config.config.getCategory(Config.CATEGORY_OUTPUTS))).getChildElements(),
this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
GuiConfig.getAbridgedConfigPath("emt/config/outputs"));
}
}
return list;
}
}
@@ -6,24 +6,25 @@ import net.minecraft.client.gui.GuiScreen;
import java.util.Set;
public class EMTGuiFactory implements IModGuiFactory{
@Override
public void initialize(Minecraft minecraftInstance) {
public class EMTGuiFactory implements IModGuiFactory {
}
@Override
public void initialize(Minecraft minecraftInstance) {
@Override
public Class<? extends GuiScreen> mainConfigGuiClass() {
return EMTGuiConfig.class;
}
}
@Override
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
return null;
}
@Override
public Class<? extends GuiScreen> mainConfigGuiClass() {
return EMTGuiConfig.class;
}
@Override
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
return null;
}
@Override
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
return null;
}
@Override
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
return null;
}
}
@@ -9,9 +9,9 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.client.gui.container;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEtherealMacerator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@@ -20,75 +20,76 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.tileentity.TileEntity;
import thaumcraft.common.container.SlotOutput;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEtherealMacerator;
public class ContainerEtheralMacerator extends Container {
TileEntityEtherealMacerator te;
TileEntityEtherealMacerator te;
public ContainerEtheralMacerator(InventoryPlayer inventory, TileEntity te) {
this.te = ((TileEntityEtherealMacerator) te);
addSlotToContainer(new Slot(this.te, 0, 56, 26));
addSlotToContainer(new SlotOutput(this.te, 2, 116, 26));
addSlotToContainer(new SlotOutput(this.te, 1, 116, 53));
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 9; j++) {
addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}
for (int i = 0; i < 9; i++) {
addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142));
}
}
public ContainerEtheralMacerator(InventoryPlayer inventory, TileEntity te) {
this.te = ((TileEntityEtherealMacerator) te);
addSlotToContainer(new Slot(this.te, 0, 56, 26));
addSlotToContainer(new SlotOutput(this.te, 2, 116, 26));
addSlotToContainer(new SlotOutput(this.te, 1, 116, 53));
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 9; j++) {
addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}
for (int i = 0; i < 9; i++) {
addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142));
}
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return this.te.isUseableByPlayer(player);
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return this.te.isUseableByPlayer(player);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
ItemStack itemstack = null;
Slot slot = (Slot) this.inventorySlots.get(par2);
@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
ItemStack itemstack = null;
Slot slot = (Slot) this.inventorySlots.get(par2);
if (slot != null && slot.getHasStack()) {
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();
if (slot != null && slot.getHasStack()) {
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();
if (par2 == 1) {
if (!this.mergeItemStack(itemstack1, 2, 38, true)) {
return null;
}
if (par2 == 1) {
if (!this.mergeItemStack(itemstack1, 2, 38, true)) {
return null;
}
slot.onSlotChange(itemstack1, itemstack);
} else if (par2 != 0) {
if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) {
if (!this.mergeItemStack(itemstack1, 0, 1, false)) {
return null;
}
} else if (par2 >= 2 && par2 < 29) {
if (!this.mergeItemStack(itemstack1, 29, 38, false)) {
return null;
}
} else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) {
return null;
}
} else if (!this.mergeItemStack(itemstack1, 3, 38, false)) {
return null;
}
slot.onSlotChange(itemstack1, itemstack);
} else if (par2 != 0) {
if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) {
if (!this.mergeItemStack(itemstack1, 0, 1, false)) {
return null;
}
} else if (par2 >= 2 && par2 < 29) {
if (!this.mergeItemStack(itemstack1, 29, 38, false)) {
return null;
}
} else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) {
return null;
}
} else if (!this.mergeItemStack(itemstack1, 3, 38, false)) {
return null;
}
if (itemstack1.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
if (itemstack1.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
if (itemstack1.stackSize == itemstack.stackSize) {
return null;
}
if (itemstack1.stackSize == itemstack.stackSize) {
return null;
}
slot.onPickupFromSlot(par1EntityPlayer, itemstack1);
}
slot.onPickupFromSlot(par1EntityPlayer, itemstack1);
}
return itemstack;
}
return itemstack;
}
}
@@ -9,85 +9,86 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.client.gui.container;
import tombenpotter.emt.common.module.ic2.tile.TileEntityIndustrialWandRecharge;
import net.minecraft.entity.player.EntityPlayer;
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;
import tombenpotter.emt.common.module.ic2.tile.TileEntityIndustrialWandRecharge;
public class ContainerIndustrialWandRecharge extends Container {
TileEntityIndustrialWandRecharge charger;
TileEntityIndustrialWandRecharge charger;
public ContainerIndustrialWandRecharge(InventoryPlayer invPlayer, TileEntityIndustrialWandRecharge entity) {
this.charger = entity;
public ContainerIndustrialWandRecharge(InventoryPlayer invPlayer, TileEntityIndustrialWandRecharge entity) {
this.charger = entity;
for (int x = 0; x < 9; x++) {
this.addSlotToContainer(new Slot(invPlayer, x, 8 + x * 18, 142));
}
for (int x = 0; x < 9; x++) {
this.addSlotToContainer(new Slot(invPlayer, x, 8 + x * 18, 142));
}
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 9; x++) {
this.addSlotToContainer(new Slot(invPlayer, 9 + x + y * 9, 8 + x * 18, 84 + y * 18));
}
}
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 9; x++) {
this.addSlotToContainer(new Slot(invPlayer, 9 + x + y * 9, 8 + x * 18, 84 + y * 18));
}
}
this.addSlotToContainer(new Slot(charger, 0, 80, 35));
}
this.addSlotToContainer(new Slot(charger, 0, 80, 35));
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return charger.isUseableByPlayer(player);
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return charger.isUseableByPlayer(player);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
ItemStack itemstack = null;
Slot slot = (Slot) this.inventorySlots.get(par2);
@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
ItemStack itemstack = null;
Slot slot = (Slot) this.inventorySlots.get(par2);
if (slot != null && slot.getHasStack()) {
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();
if (slot != null && slot.getHasStack()) {
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();
if (par2 == 1) {
if (!this.mergeItemStack(itemstack1, 2, 38, true)) {
return null;
}
if (par2 == 1) {
if (!this.mergeItemStack(itemstack1, 2, 38, true)) {
return null;
}
slot.onSlotChange(itemstack1, itemstack);
} else if (par2 != 0) {
if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) {
if (!this.mergeItemStack(itemstack1, 0, 1, false)) {
return null;
}
} else if (par2 >= 2 && par2 < 29) {
if (!this.mergeItemStack(itemstack1, 29, 38, false)) {
return null;
}
} else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) {
return null;
}
} else if (!this.mergeItemStack(itemstack1, 2, 38, false)) {
return null;
}
slot.onSlotChange(itemstack1, itemstack);
} else if (par2 != 0) {
if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) {
if (!this.mergeItemStack(itemstack1, 0, 1, false)) {
return null;
}
} else if (par2 >= 2 && par2 < 29) {
if (!this.mergeItemStack(itemstack1, 29, 38, false)) {
return null;
}
} else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) {
return null;
}
} else if (!this.mergeItemStack(itemstack1, 2, 38, false)) {
return null;
}
if (itemstack1.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
if (itemstack1.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
if (itemstack1.stackSize == itemstack.stackSize) {
return null;
}
if (itemstack1.stackSize == itemstack.stackSize) {
return null;
}
slot.onPickupFromSlot(par1EntityPlayer, itemstack1);
}
slot.onPickupFromSlot(par1EntityPlayer, itemstack1);
}
return itemstack;
}
return itemstack;
}
}
@@ -5,45 +5,46 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelWings extends ModelBiped {
ModelRenderer rightWing;
ModelRenderer leftWing;
ModelRenderer center;
public ModelWings() {
textureWidth = 64;
textureHeight = 64;
rightWing = new ModelRenderer(this, 24, 0);
rightWing.addBox(-11F, 0F, 0F, 11, 13, 1);
rightWing.setRotationPoint(-2F, 0F, 3F);
rightWing.setTextureSize(64, 32);
rightWing.mirror = true;
setRotation(rightWing, 0F, 0.1570796F, 0F);
leftWing = new ModelRenderer(this, 0, 0);
leftWing.addBox(0F, 0F, 0F, 11, 13, 1);
leftWing.setRotationPoint(2F, 0F, 3F);
leftWing.setTextureSize(64, 32);
leftWing.mirror = true;
setRotation(leftWing, 0F, -0.1570796F, 0F);
center = new ModelRenderer(this, 0, 14);
center.addBox(0F, 0F, 0F, 8, 14, 1);
center.setRotationPoint(-4F, 0F, 3F);
center.setTextureSize(64, 32);
center.mirror = true;
setRotation(center, 0F, 0F, 0F);
}
ModelRenderer rightWing;
ModelRenderer leftWing;
ModelRenderer center;
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
rightWing.render(f5);
leftWing.render(f5);
center.render(f5);
}
public ModelWings() {
textureWidth = 64;
textureHeight = 64;
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
rightWing = new ModelRenderer(this, 24, 0);
rightWing.addBox(-11F, 0F, 0F, 11, 13, 1);
rightWing.setRotationPoint(-2F, 0F, 3F);
rightWing.setTextureSize(64, 32);
rightWing.mirror = true;
setRotation(rightWing, 0F, 0.1570796F, 0F);
leftWing = new ModelRenderer(this, 0, 0);
leftWing.addBox(0F, 0F, 0F, 11, 13, 1);
leftWing.setRotationPoint(2F, 0F, 3F);
leftWing.setTextureSize(64, 32);
leftWing.mirror = true;
setRotation(leftWing, 0F, -0.1570796F, 0F);
center = new ModelRenderer(this, 0, 14);
center.addBox(0F, 0F, 0F, 8, 14, 1);
center.setRotationPoint(-4F, 0F, 3F);
center.setTextureSize(64, 32);
center.mirror = true;
setRotation(center, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
rightWing.render(f5);
leftWing.render(f5);
center.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.client.renderer;
import cpw.mods.fml.relauncher.Side;
@@ -17,4 +18,5 @@ import net.minecraft.client.renderer.entity.RenderSnowMan;
@SideOnly(Side.CLIENT)
public class RenderArcher extends RenderSnowMan {
}
@@ -9,83 +9,84 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.client.renderer;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.module.base.entities.EntityLaser;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.base.entities.EntityLaser;
public class RenderLaser extends Render {
private static final ResourceLocation laserTexture = new ResourceLocation(ElectroMagicTools.texturePath, "textures/models/lasermodel.png");
private static final ResourceLocation laserTexture = new ResourceLocation(ModInformation.texturePath, "textures/models/lasermodel.png");
public void renderArrow(EntityLaser entityLaser, double par2, double par4, double par6, float par8, float par9) {
public void renderArrow(EntityLaser entityLaser, double par2, double par4, double par6, float par8, float par9) {
this.bindEntityTexture(entityLaser);
GL11.glPushMatrix();
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
GL11.glRotatef(entityLaser.prevRotationYaw + (entityLaser.rotationYaw - entityLaser.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entityLaser.prevRotationPitch + (entityLaser.rotationPitch - entityLaser.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F);
Tessellator tessellator = Tessellator.instance;
byte b0 = 0;
float f2 = 0.4F;
float f3 = 0.7F;
float f4 = (float) (0 + b0 * 10) / 32.0F;
float f5 = (float) (5 + b0 * 10) / 32.0F;
float f6 = 0.0F;
float f7 = 0.15625F;
float f8 = (float) (5 + b0 * 10) / 32.0F;
float f9 = (float) (10 + b0 * 10) / 32.0F;
float f10 = 0.05625F;
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
this.bindEntityTexture(entityLaser);
GL11.glPushMatrix();
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
GL11.glRotatef(entityLaser.prevRotationYaw + (entityLaser.rotationYaw - entityLaser.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entityLaser.prevRotationPitch + (entityLaser.rotationPitch - entityLaser.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F);
Tessellator tessellator = Tessellator.instance;
byte b0 = 0;
float f2 = 0.4F;
float f3 = 0.7F;
float f4 = (float) (0 + b0 * 10) / 32.0F;
float f5 = (float) (5 + b0 * 10) / 32.0F;
float f6 = 0.0F;
float f7 = 0.15625F;
float f8 = (float) (5 + b0 * 10) / 32.0F;
float f9 = (float) (10 + b0 * 10) / 32.0F;
float f10 = 0.05625F;
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
GL11.glScalef(f10, f10, f10);
GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
GL11.glNormal3f(f10, 0.0F, 0.0F);
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f8);
tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f8);
tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f9);
tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f9);
tessellator.draw();
GL11.glNormal3f(-f10, 0.0F, 0.0F);
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f8);
tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f8);
tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f9);
tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f9);
tessellator.draw();
GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
GL11.glScalef(f10, f10, f10);
GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
GL11.glNormal3f(f10, 0.0F, 0.0F);
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f8);
tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f8);
tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f9);
tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f9);
tessellator.draw();
GL11.glNormal3f(-f10, 0.0F, 0.0F);
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f8);
tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f8);
tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f9);
tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f9);
tessellator.draw();
for (int i = 0; i < 4; ++i) {
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
GL11.glNormal3f(0.0F, 0.0F, f10);
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) f2, (double) f4);
tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) f3, (double) f4);
tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) f3, (double) f5);
tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) f2, (double) f5);
tessellator.draw();
}
for (int i = 0; i < 4; ++i) {
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
GL11.glNormal3f(0.0F, 0.0F, f10);
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) f2, (double) f4);
tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) f3, (double) f4);
tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) f3, (double) f5);
tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) f2, (double) f5);
tessellator.draw();
}
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
protected ResourceLocation getArrowTextures(EntityLaser entityLaser) {
return laserTexture;
}
protected ResourceLocation getArrowTextures(EntityLaser entityLaser) {
return laserTexture;
}
protected ResourceLocation getEntityTexture(Entity par1Entity) {
return this.getArrowTextures((EntityLaser) par1Entity);
}
protected ResourceLocation getEntityTexture(Entity par1Entity) {
return this.getArrowTextures((EntityLaser) par1Entity);
}
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
this.renderArrow((EntityLaser) par1Entity, par2, par4, par6, par8, par9);
}
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
this.renderArrow((EntityLaser) par1Entity, par2, par4, par6, par8, par9);
}
}
@@ -16,71 +16,71 @@ import java.util.List;
public class CommandOutputs extends CommandBase {
public String text;
public String text;
@Override
public String getCommandName() {
return "emt_outputs";
}
@Override
public String getCommandName() {
return "emt_outputs";
}
@Override
public String getCommandUsage(ICommandSender p_71518_1_) {
return "/emt_outputs";
}
@Override
public String getCommandUsage(ICommandSender p_71518_1_) {
return "/emt_outputs";
}
@Override
public boolean canCommandSenderUseCommand(ICommandSender par1iCommandSender) {
return true;
}
@Override
public boolean canCommandSenderUseCommand(ICommandSender par1iCommandSender) {
return true;
}
@Override
public List addTabCompletionOptions(ICommandSender command, String[] stringArray) {
return null;
}
@Override
public List addTabCompletionOptions(ICommandSender command, String[] stringArray) {
return null;
}
@Override
public int compareTo(Object object) {
if (object instanceof ICommand) {
return this.compareTo((ICommand) object);
} else {
return 0;
}
}
@Override
public int compareTo(Object object) {
if (object instanceof ICommand) {
return this.compareTo((ICommand) object);
} else {
return 0;
}
}
@Override
public void processCommand(ICommandSender command, String[] astring) {
text = "EU Ouput per Essentia: ";
Collection<Aspect> aspectCollection = Aspect.aspects.values();
for (Aspect aspect : aspectCollection) {
String text2 = addStrings(text, (aspect.getTag() + ": " + String.valueOf(EssentiasOutputs.outputs.get(aspect.getTag())) + "\n"));
text = text2;
}
addOutputsBook("Essentia Outputs Book", text, command, astring);
}
@Override
public void processCommand(ICommandSender command, String[] astring) {
text = "EU Ouput per Essentia: ";
Collection<Aspect> aspectCollection = Aspect.aspects.values();
for (Aspect aspect : aspectCollection) {
String text2 = addStrings(text, (aspect.getTag() + ": " + String.valueOf(EssentiasOutputs.outputs.get(aspect.getTag())) + "\n"));
text = text2;
}
addOutputsBook("Essentia Outputs Book", text, command, astring);
}
public void addOutputsBook(String title, String text, ICommandSender command, String[] astring) {
ItemStack book = new ItemStack(Items.written_book);
book.setTagInfo("author", new NBTTagString("Tombenpotter"));
book.setTagInfo("title", new NBTTagString(title));
NBTTagCompound nbttagcompound = book.getTagCompound();
NBTTagList bookPages = new NBTTagList();
public void addOutputsBook(String title, String text, ICommandSender command, String[] astring) {
ItemStack book = new ItemStack(Items.written_book);
book.setTagInfo("author", new NBTTagString("Tombenpotter"));
book.setTagInfo("title", new NBTTagString(title));
NBTTagCompound nbttagcompound = book.getTagCompound();
NBTTagList bookPages = new NBTTagList();
bookPages.appendTag(new NBTTagString(text.substring(0, 237)));
bookPages.appendTag(new NBTTagString(text.substring(237, 476)));
bookPages.appendTag(new NBTTagString(text.substring(476, 709)));
bookPages.appendTag(new NBTTagString(text.substring(709)));
bookPages.appendTag(new NBTTagString(text.substring(0, 237)));
bookPages.appendTag(new NBTTagString(text.substring(237, 476)));
bookPages.appendTag(new NBTTagString(text.substring(476, 709)));
bookPages.appendTag(new NBTTagString(text.substring(709)));
nbttagcompound.setTag("pages", bookPages);
nbttagcompound.setTag("pages", bookPages);
System.out.println(text.length());
System.out.println(text.length());
if (!command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).inventory.addItemStackToInventory(book))
command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(book, 0);
}
if (!command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).inventory.addItemStackToInventory(book))
command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(book, 0);
}
public String addStrings(String string1, String string2) {
String result = string1 + string2;
return result;
}
public String addStrings(String string1, String string2) {
String result = string1 + string2;
return result;
}
}
@@ -9,43 +9,44 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base;
import cpw.mods.fml.common.registry.EntityRegistry;
import tombenpotter.emt.common.module.base.entities.EntityArcher;
import tombenpotter.emt.common.module.base.entities.EntityLaser;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityList.EntityEggInfo;
import net.minecraft.entity.EntityLiving;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.module.base.entities.EntityArcher;
import tombenpotter.emt.common.module.base.entities.EntityLaser;
public class EMTEntityRegistry {
private static int startEID = 300;
private static int entityIDs = 0;
private static final Class<? extends EntityLiving> ARCHER_CLASS = EntityArcher.class;
private static int startEID = 300;
private static int entityIDs = 0;
private static final Class<? extends EntityLiving> ARCHER_CLASS = EntityArcher.class;
private static int getUniqueEntityID() {
private static int getUniqueEntityID() {
do {
startEID++;
} while (EntityList.getStringFromID(startEID) != null);
return startEID;
}
do {
startEID++;
} while (EntityList.getStringFromID(startEID) != null);
return startEID;
}
@SuppressWarnings("unchecked")
public static void registerEntityEgg(Class<? extends Entity> entity, int colPrim, int colSec) {
int id = getUniqueEntityID();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, colPrim, colSec));
return;
}
@SuppressWarnings("unchecked")
public static void registerEntityEgg(Class<? extends Entity> entity, int colPrim, int colSec) {
int id = getUniqueEntityID();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, colPrim, colSec));
return;
}
public static void registerEMTEntities() {
public static void registerEMTEntities() {
EntityRegistry.registerModEntity(EntityLaser.class, "entityLaser", entityIDs++, ElectroMagicTools.instance, 80, 3, true);
EntityRegistry.registerModEntity(EntityArcher.class, "entityArcher", entityIDs++, ElectroMagicTools.instance, 80, 3, true);
registerEntityEgg(ARCHER_CLASS, 0x99111F, 0xE5685);
}
EntityRegistry.registerModEntity(EntityLaser.class, "entityLaser", entityIDs++, ElectroMagicTools.instance, 80, 3, true);
EntityRegistry.registerModEntity(EntityArcher.class, "entityArcher", entityIDs++, ElectroMagicTools.instance, 80, 3, true);
registerEntityEgg(ARCHER_CLASS, 0x99111F, 0xE5685);
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.entities;
import net.minecraft.enchantment.Enchantment;
@@ -36,94 +37,93 @@ import net.minecraftforge.common.IExtendedEntityProperties;
public class EntityArcher extends EntitySnowman implements IExtendedEntityProperties {
public EntityArcher(World par1World) {
super(par1World);
this.isImmuneToFire = true;
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, true, false, IMob.mobSelector));
this.tasks.addTask(4, new EntityAIWander(this, 0.30D));
}
public EntityArcher(World par1World) {
super(par1World);
this.isImmuneToFire = true;
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, true, false, IMob.mobSelector));
this.tasks.addTask(4, new EntityAIWander(this, 0.30D));
}
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30D);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D);
}
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30D);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D);
}
@Override
public void onDeath(DamageSource par1DamageSource) {
super.onDeath(par1DamageSource);
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1, true);
this.setDead();
}
@Override
public void onDeath(DamageSource par1DamageSource) {
super.onDeath(par1DamageSource);
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1, true);
this.setDead();
}
@Override
protected Item getDropItem() {
return Items.arrow;
}
@Override
protected Item getDropItem() {
return Items.arrow;
}
@Override
protected void dropFewItems(boolean par1, int par2) {
int j;
int k;
@Override
protected void dropFewItems(boolean par1, int par2) {
int j;
int k;
j = this.rand.nextInt(3 + par2);
j = this.rand.nextInt(3 + par2);
for (k = 0; k < j; ++k) {
this.dropItem(Items.arrow, 1);
}
j = this.rand.nextInt(3 + par2);
for (k = 0; k < j; ++k) {
this.dropItem(Items.arrow, 1);
}
j = this.rand.nextInt(3 + par2);
for (k = 0; k < j; ++k) {
this.dropItem(Items.bone, 1);
}
}
for (k = 0; k < j; ++k) {
this.dropItem(Items.bone, 1);
}
}
@Override
protected void dropRareDrop(int par1) {
this.entityDropItem(new ItemStack(Blocks.web, 1, 1), 0.0F);
}
@Override
protected void dropRareDrop(int par1) {
this.entityDropItem(new ItemStack(Blocks.web, 1, 1), 0.0F);
}
protected void addRandomArmor() {
super.addRandomArmor();
this.setCurrentItemOrArmor(0, new ItemStack(Items.bow));
}
protected void addRandomArmor() {
super.addRandomArmor();
this.setCurrentItemOrArmor(0, new ItemStack(Items.bow));
}
@Override
public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) {
EntityArrow entityarrow = new EntityArrow(this.worldObj, this, par1EntityLivingBase, 1.6F, (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4));
int i = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, this.getHeldItem());
int j = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, this.getHeldItem());
entityarrow.setDamage((double) (par2 * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F));
@Override
public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) {
EntityArrow entityarrow = new EntityArrow(this.worldObj, this, par1EntityLivingBase, 1.6F, (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4));
int i = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, this.getHeldItem());
int j = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, this.getHeldItem());
entityarrow.setDamage((double) (par2 * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F));
if (i > 0) {
entityarrow.setDamage(entityarrow.getDamage() + (double) i * 0.5D + 0.5D);
}
if (i > 0) {
entityarrow.setDamage(entityarrow.getDamage() + (double) i * 0.5D + 0.5D);
}
if (j > 0) {
entityarrow.setKnockbackStrength(j);
}
if (j > 0) {
entityarrow.setKnockbackStrength(j);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, this.getHeldItem()) > 0) {
entityarrow.setFire(100);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, this.getHeldItem()) > 0) {
entityarrow.setFire(100);
}
this.playSound("random.bow", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F));
this.worldObj.spawnEntityInWorld(entityarrow);
}
this.playSound("random.bow", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F));
this.worldObj.spawnEntityInWorld(entityarrow);
}
@Override
public void saveNBTData(NBTTagCompound compound) {
}
@Override
public void saveNBTData(NBTTagCompound compound) {
}
@Override
public void loadNBTData(NBTTagCompound compound) {
}
@Override
public void init(Entity entity, World world) {
}
@Override
public void loadNBTData(NBTTagCompound compound) {
}
@Override
public void init(Entity entity, World world) {
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.entities;
import cpw.mods.fml.relauncher.Side;
@@ -29,322 +30,321 @@ import net.minecraft.world.World;
import java.util.List;
public class EntityLaser extends Entity implements IProjectile {
private int xTile = -1;
private int yTile = -1;
private int zTile = -1;
private Block inTile;
private int inData;
private boolean inGround;
public Entity shootingEntity;
private int ticksInGround;
private int ticksInAir;
private int xTile = -1;
private int yTile = -1;
private int zTile = -1;
private Block inTile;
private int inData;
private boolean inGround;
public EntityLaser(World par1World) {
super(par1World);
this.renderDistanceWeight = 10.0D;
this.setSize(0.5F, 0.5F);
}
public Entity shootingEntity;
private int ticksInGround;
private int ticksInAir;
public EntityLaser(World par1World, double par2, double par4, double par6) {
super(par1World);
this.renderDistanceWeight = 10.0D;
this.setSize(0.5F, 0.5F);
this.setPosition(par2, par4, par6);
this.yOffset = 0.0F;
}
public EntityLaser(World par1World) {
super(par1World);
this.renderDistanceWeight = 10.0D;
this.setSize(0.5F, 0.5F);
}
public EntityLaser(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5) {
super(par1World);
this.renderDistanceWeight = 10.0D;
this.shootingEntity = par2EntityLivingBase;
public EntityLaser(World par1World, double par2, double par4, double par6) {
super(par1World);
this.renderDistanceWeight = 10.0D;
this.setSize(0.5F, 0.5F);
this.setPosition(par2, par4, par6);
this.yOffset = 0.0F;
}
this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D;
double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX;
double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 3.0F) - this.posY;
double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ;
double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2);
public EntityLaser(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5) {
super(par1World);
this.renderDistanceWeight = 10.0D;
this.shootingEntity = par2EntityLivingBase;
if (d3 >= 1.0E-7D) {
float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI));
double d4 = d0 / d3;
double d5 = d2 / d3;
this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3);
this.yOffset = 0.0F;
float f4 = (float) d3 * 0.2F;
this.setThrowableHeading(d0, d1 + (double) f4, d2, par4, par5);
}
}
this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D;
double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX;
double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 3.0F) - this.posY;
double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ;
double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2);
public EntityLaser(World par1World, EntityLivingBase par2EntityLivingBase, float par3) {
super(par1World);
this.renderDistanceWeight = 10.0D;
this.shootingEntity = par2EntityLivingBase;
if (d3 >= 1.0E-7D) {
float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI));
double d4 = d0 / d3;
double d5 = d2 / d3;
this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3);
this.yOffset = 0.0F;
float f4 = (float) d3 * 0.2F;
this.setThrowableHeading(d0, d1 + (double) f4, d2, par4, par5);
}
}
this.setSize(0.5F, 0.5F);
this.setLocationAndAngles(par2EntityLivingBase.posX, par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight(), par2EntityLivingBase.posZ, par2EntityLivingBase.rotationYaw, par2EntityLivingBase.rotationPitch);
this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
this.posY -= 0.10000000149011612D;
this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
this.setPosition(this.posX, this.posY, this.posZ);
this.yOffset = 0.0F;
this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F);
}
public EntityLaser(World par1World, EntityLivingBase par2EntityLivingBase, float par3) {
super(par1World);
this.renderDistanceWeight = 10.0D;
this.shootingEntity = par2EntityLivingBase;
protected void entityInit() {
this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
}
this.setSize(0.5F, 0.5F);
this.setLocationAndAngles(par2EntityLivingBase.posX, par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight(), par2EntityLivingBase.posZ, par2EntityLivingBase.rotationYaw, par2EntityLivingBase.rotationPitch);
this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
this.posY -= 0.10000000149011612D;
this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
this.setPosition(this.posX, this.posY, this.posZ);
this.yOffset = 0.0F;
this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F);
}
public void setThrowableHeading(double par1, double par3, double par5, float par7, float par8) {
float f2 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5);
par1 /= (double) f2;
par3 /= (double) f2;
par5 /= (double) f2;
par1 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8;
par3 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8;
par5 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8;
par1 *= (double) par7;
par3 *= (double) par7;
par5 *= (double) par7;
this.motionX = par1;
this.motionY = par3;
this.motionZ = par5;
float f3 = MathHelper.sqrt_double(par1 * par1 + par5 * par5);
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(par3, (double) f3) * 180.0D / Math.PI);
this.ticksInGround = 0;
}
protected void entityInit() {
this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
}
@SideOnly(Side.CLIENT)
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
this.setPosition(par1, par3, par5);
this.setRotation(par7, par8);
}
public void setThrowableHeading(double par1, double par3, double par5, float par7, float par8) {
float f2 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5);
par1 /= (double) f2;
par3 /= (double) f2;
par5 /= (double) f2;
par1 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8;
par3 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8;
par5 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8;
par1 *= (double) par7;
par3 *= (double) par7;
par5 *= (double) par7;
this.motionX = par1;
this.motionY = par3;
this.motionZ = par5;
float f3 = MathHelper.sqrt_double(par1 * par1 + par5 * par5);
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(par3, (double) f3) * 180.0D / Math.PI);
this.ticksInGround = 0;
}
@SideOnly(Side.CLIENT)
public void setVelocity(double par1, double par3, double par5) {
this.motionX = par1;
this.motionY = par3;
this.motionZ = par5;
@SideOnly(Side.CLIENT)
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
this.setPosition(par1, par3, par5);
this.setRotation(par7, par8);
}
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
float f = MathHelper.sqrt_double(par1 + par5);
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(par1, par5) / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(par3, (double) f) / Math.PI);
this.prevRotationPitch = this.rotationPitch;
this.prevRotationYaw = this.rotationYaw;
this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
this.ticksInGround = 0;
}
}
@SideOnly(Side.CLIENT)
public void setVelocity(double par1, double par3, double par5) {
this.motionX = par1;
this.motionY = par3;
this.motionZ = par5;
@SuppressWarnings("rawtypes")
public void onUpdate() {
super.onUpdate();
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
float f = MathHelper.sqrt_double(par1 + par5);
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(par1, par5) / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(par3, (double) f) / Math.PI);
this.prevRotationPitch = this.rotationPitch;
this.prevRotationYaw = this.rotationYaw;
this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
this.ticksInGround = 0;
}
}
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f) * 180.0D / Math.PI);
}
@SuppressWarnings("rawtypes")
public void onUpdate() {
super.onUpdate();
Block block = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile);
if (block.getMaterial() != Material.air) {
block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f) * 180.0D / Math.PI);
}
if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) {
this.inGround = true;
}
}
Block i = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile);
Block block = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile);
if (block.getMaterial() != Material.air) {
block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
i.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
AxisAlignedBB axisalignedbb = i.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) {
this.inGround = true;
}
}
Block i = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile);
if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) {
this.inGround = true;
}
i.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
AxisAlignedBB axisalignedbb = i.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
if (this.inGround) {
Block j = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile);
int k = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3, true);
this.setDead();
if (j == this.inTile && k == this.inData) {
++this.ticksInGround;
if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) {
this.inGround = true;
}
if (this.ticksInGround == 1200) {
this.setDead();
}
} else {
this.inGround = false;
this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
this.ticksInGround = 0;
this.ticksInAir = 0;
}
} else {
++this.ticksInAir;
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
if (this.inGround) {
Block j = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile);
int k = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3, true);
this.setDead();
if (j == this.inTile && k == this.inData) {
++this.ticksInGround;
if (movingobjectposition != null) {
vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
}
if (this.ticksInGround == 1200) {
this.setDead();
}
} else {
this.inGround = false;
this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
this.ticksInGround = 0;
this.ticksInAir = 0;
}
} else {
++this.ticksInAir;
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
Entity entity = null;
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
double d0 = 0.0D;
int l;
float f1;
if (movingobjectposition != null) {
vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
}
for (l = 0; l < list.size(); ++l) {
Entity entity1 = (Entity) list.get(l);
Entity entity = null;
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
double d0 = 0.0D;
int l;
float f1;
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double) f1, (double) f1, (double) f1);
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3, vec31);
for (l = 0; l < list.size(); ++l) {
Entity entity1 = (Entity) list.get(l);
if (movingobjectposition1 != null) {
double d1 = vec3.distanceTo(movingobjectposition1.hitVec);
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double) f1, (double) f1, (double) f1);
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3, vec31);
if (d1 < d0 || d0 == 0.0D) {
entity = entity1;
d0 = d1;
}
}
}
}
if (movingobjectposition1 != null) {
double d1 = vec3.distanceTo(movingobjectposition1.hitVec);
if (entity != null) {
movingobjectposition = new MovingObjectPosition(entity);
}
if (d1 < d0 || d0 == 0.0D) {
entity = entity1;
d0 = d1;
}
}
}
}
if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) {
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
if (entity != null) {
movingobjectposition = new MovingObjectPosition(entity);
}
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) {
movingobjectposition = null;
}
}
if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) {
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
float f2;
float f3;
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) {
movingobjectposition = null;
}
}
if (movingobjectposition != null) {
if (movingobjectposition.entityHit != null) {
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
float f2;
float f3;
{
this.motionX *= -0.10000000149011612D;
this.motionY *= -0.10000000149011612D;
this.motionZ *= -0.10000000149011612D;
this.rotationYaw += 180.0F;
this.prevRotationYaw += 180.0F;
this.ticksInAir = 0;
}
} else {
this.xTile = movingobjectposition.blockX;
this.yTile = movingobjectposition.blockY;
this.zTile = movingobjectposition.blockZ;
this.inTile = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile);
this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
this.motionX = (double) ((float) (movingobjectposition.hitVec.xCoord - this.posX));
this.motionY = (double) ((float) (movingobjectposition.hitVec.yCoord - this.posY));
this.motionZ = (double) ((float) (movingobjectposition.hitVec.zCoord - this.posZ));
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
this.posX -= this.motionX / (double) f2 * 0.05000000074505806D;
this.posY -= this.motionY / (double) f2 * 0.05000000074505806D;
this.posZ -= this.motionZ / (double) f2 * 0.05000000074505806D;
this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.inGround = true;
}
}
if (movingobjectposition != null) {
if (movingobjectposition.entityHit != null) {
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
{
this.motionX *= -0.10000000149011612D;
this.motionY *= -0.10000000149011612D;
this.motionZ *= -0.10000000149011612D;
this.rotationYaw += 180.0F;
this.prevRotationYaw += 180.0F;
this.ticksInAir = 0;
}
} else {
this.xTile = movingobjectposition.blockX;
this.yTile = movingobjectposition.blockY;
this.zTile = movingobjectposition.blockZ;
this.inTile = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile);
this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
this.motionX = (double) ((float) (movingobjectposition.hitVec.xCoord - this.posX));
this.motionY = (double) ((float) (movingobjectposition.hitVec.yCoord - this.posY));
this.motionZ = (double) ((float) (movingobjectposition.hitVec.zCoord - this.posZ));
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
this.posX -= this.motionX / (double) f2 * 0.05000000074505806D;
this.posY -= this.motionY / (double) f2 * 0.05000000074505806D;
this.posZ -= this.motionZ / (double) f2 * 0.05000000074505806D;
this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.inGround = true;
}
}
for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) {
;
}
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
while (this.rotationPitch - this.prevRotationPitch >= 180.0F) {
this.prevRotationPitch += 360.0F;
}
for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) {
;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F) {
this.prevRotationYaw -= 360.0F;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F) {
this.prevRotationPitch += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw >= 180.0F) {
this.prevRotationYaw += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F) {
this.prevRotationYaw -= 360.0F;
}
this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
float f4 = 0.99F;
f1 = 0.05F;
while (this.rotationYaw - this.prevRotationYaw >= 180.0F) {
this.prevRotationYaw += 360.0F;
}
if (this.isInWater()) {
for (int j1 = 0; j1 < 4; ++j1) {
f3 = 0.25F;
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) f3, this.posY - this.motionY * (double) f3, this.posZ - this.motionZ * (double) f3, this.motionX, this.motionY, this.motionZ);
}
this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
float f4 = 0.99F;
f1 = 0.05F;
f4 = 0.8F;
}
if (this.isInWater()) {
for (int j1 = 0; j1 < 4; ++j1) {
f3 = 0.25F;
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) f3, this.posY - this.motionY * (double) f3, this.posZ - this.motionZ * (double) f3, this.motionX, this.motionY, this.motionZ);
}
this.motionX *= (double) f4;
this.motionY *= (double) f4;
this.motionZ *= (double) f4;
this.motionY -= (double) f1;
this.setPosition(this.posX, this.posY, this.posZ);
}
}
f4 = 0.8F;
}
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
par1NBTTagCompound.setShort("xTile", (short) this.xTile);
par1NBTTagCompound.setShort("yTile", (short) this.yTile);
par1NBTTagCompound.setShort("zTile", (short) this.zTile);
par1NBTTagCompound.setByte("inTile", (byte) Block.getIdFromBlock(this.inTile));
par1NBTTagCompound.setByte("inData", (byte) this.inData);
par1NBTTagCompound.setByte("inGround", (byte) (this.inGround ? 1 : 0));
}
this.motionX *= (double) f4;
this.motionY *= (double) f4;
this.motionZ *= (double) f4;
this.motionY -= (double) f1;
this.setPosition(this.posX, this.posY, this.posZ);
}
}
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) {
this.xTile = par1NBTTagCompound.getShort("xTile");
this.yTile = par1NBTTagCompound.getShort("yTile");
this.zTile = par1NBTTagCompound.getShort("zTile");
this.inTile = Block.getBlockById(par1NBTTagCompound.getByte("inTile") & 255);
this.inData = par1NBTTagCompound.getByte("inData") & 255;
this.inGround = par1NBTTagCompound.getByte("inGround") == 1;
}
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
par1NBTTagCompound.setShort("xTile", (short) this.xTile);
par1NBTTagCompound.setShort("yTile", (short) this.yTile);
par1NBTTagCompound.setShort("zTile", (short) this.zTile);
par1NBTTagCompound.setByte("inTile", (byte) Block.getIdFromBlock(this.inTile));
par1NBTTagCompound.setByte("inData", (byte) this.inData);
par1NBTTagCompound.setByte("inGround", (byte) (this.inGround ? 1 : 0));
}
public void onCollide(Entity par1Entity) {
if (!this.worldObj.isRemote)
;
{
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3, true);
}
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) {
this.xTile = par1NBTTagCompound.getShort("xTile");
this.yTile = par1NBTTagCompound.getShort("yTile");
this.zTile = par1NBTTagCompound.getShort("zTile");
this.inTile = Block.getBlockById(par1NBTTagCompound.getByte("inTile") & 255);
this.inData = par1NBTTagCompound.getByte("inData") & 255;
this.inGround = par1NBTTagCompound.getByte("inGround") == 1;
}
}
@SideOnly(Side.CLIENT)
public float getShadowSize() {
return 0.0F;
}
public void onCollide(Entity par1Entity) {
if (!this.worldObj.isRemote)
;
{
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3, true);
}
}
@SideOnly(Side.CLIENT)
public float getShadowSize() {
return 0.0F;
}
}
@@ -4,10 +4,6 @@ import baubles.api.BaubleType;
import baubles.api.IBauble;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.TextHelper;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -22,190 +18,196 @@ import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.DamageSource;
import net.minecraft.util.IIcon;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.TextHelper;
import java.util.List;
import java.util.Random;
public class ItemEMTBaubles extends Item implements IBauble {
public IIcon[] icon = new IIcon[16];
public static int wornTick;
public Random random = new Random();
public ItemEMTBaubles() {
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxDamage(0);
this.setMaxStackSize(1);
setHasSubtypes(true);
public IIcon[] icon = new IIcon[16];
public static int wornTick;
public Random random = new Random();
wornTick = 0;
}
public ItemEMTBaubles() {
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxDamage(0);
this.setMaxStackSize(1);
this.setUnlocalizedName(ModInformation.modid);
setHasSubtypes(true);
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "euMaker.armor";
break;
}
case 1: {
name = "euMaker.inventory";
break;
}
case 2: {
name = "oneRing";
break;
}
default:
name = "nothing";
break;
}
return getUnlocalizedName() + "." + name;
}
wornTick = 0;
}
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ri) {
this.icon[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":armoreumaker");
this.icon[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":inventoryeumaker");
this.icon[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":onering");
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "euMaker.armor";
break;
}
case 1: {
name = "euMaker.inventory";
break;
}
case 2: {
name = "oneRing";
break;
}
default:
name = "nothing";
break;
}
return getUnlocalizedName() + "." + name;
}
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta) {
return this.icon[meta];
}
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ri) {
this.icon[0] = ri.registerIcon(ModInformation.texturePath + ":armoreumaker");
this.icon[1] = ri.registerIcon(ModInformation.texturePath + ":inventoryeumaker");
this.icon[2] = ri.registerIcon(ModInformation.texturePath + ":onering");
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) {
list.add(new ItemStack(this, 1, 0));
list.add(new ItemStack(this, 1, 1));
list.add(new ItemStack(this, 1, 2));
}
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta) {
return this.icon[meta];
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack stack) {
if (stack.getItemDamage() == 2) {
return true;
} else {
return false;
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) {
list.add(new ItemStack(this, 1, 0));
list.add(new ItemStack(this, 1, 1));
list.add(new ItemStack(this, 1, 2));
}
@Override
public BaubleType getBaubleType(ItemStack stack) {
if (stack.getItemDamage() <= 2) {
return BaubleType.RING;
} else {
return null;
}
}
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack stack) {
if (stack.getItemDamage() == 2) {
return true;
} else {
return false;
}
}
@Override
public void onWornTick(ItemStack stack, EntityLivingBase player) {
if (!player.worldObj.isRemote) {
if (stack != null) {
if (stack.getItemDamage() == 0) {
if (player instanceof EntityPlayer) {
int energyLeft = Config.armorBaubleProduction;
for (int i = 0; i < ((EntityPlayer) player).inventory.armorInventory.length; i++) {
if (energyLeft > 0) {
if ((((EntityPlayer) player).inventory.armorInventory[i] != null) && (((EntityPlayer) player).inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.armorInventory[i], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
}
}
}
}
}
if (stack != null) {
if (stack.getItemDamage() == 1) {
if (player instanceof EntityPlayer) {
int energyLeft = Config.inventoryBaubleProdution;
for (int i = 0; i < ((EntityPlayer) player).inventory.mainInventory.length; i++) {
if (energyLeft > 0) {
if ((((EntityPlayer) player).inventory.mainInventory[i] != null) && (((EntityPlayer) player).inventory.mainInventory[i].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.mainInventory[i], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
}
}
}
}
}
@Override
public BaubleType getBaubleType(ItemStack stack) {
if (stack.getItemDamage() <= 2) {
return BaubleType.RING;
} else {
return null;
}
}
if (stack != null && stack.getItemDamage() == 2) {
if (player instanceof EntityPlayer) {
((EntityPlayer) player).capabilities.disableDamage = true;
@Override
public void onWornTick(ItemStack stack, EntityLivingBase player) {
if (!player.worldObj.isRemote) {
if (stack != null) {
if (stack.getItemDamage() == 0) {
if (player instanceof EntityPlayer) {
int energyLeft = ConfigHandler.armorBaubleProduction;
for (int i = 0; i < ((EntityPlayer) player).inventory.armorInventory.length; i++) {
if (energyLeft > 0) {
if ((((EntityPlayer) player).inventory.armorInventory[i] != null) && (((EntityPlayer) player).inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.armorInventory[i], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
}
}
}
}
}
if (stack != null) {
if (stack.getItemDamage() == 1) {
if (player instanceof EntityPlayer) {
int energyLeft = ConfigHandler.inventoryBaubleProdution;
for (int i = 0; i < ((EntityPlayer) player).inventory.mainInventory.length; i++) {
if (energyLeft > 0) {
if ((((EntityPlayer) player).inventory.mainInventory[i] != null) && (((EntityPlayer) player).inventory.mainInventory[i].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.mainInventory[i], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
}
}
}
}
}
wornTick++;
if (stack != null && stack.getItemDamage() == 2) {
if (player instanceof EntityPlayer) {
((EntityPlayer) player).capabilities.disableDamage = true;
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("MindCorruption", wornTick);
((EntityPlayer) player).writeToNBT(tag);
int corruption = tag.getInteger("MindCorruption");
if (tag != null && corruption != wornTick) {
wornTick = corruption;
}
wornTick++;
if (corruption == 0)
((EntityPlayer) player).addChatMessage(new ChatComponentText(TextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever " + TextHelper.PURPLE + "tainted. " + TextHelper.RED + TextHelper.ITALIC + "Beware of wearing the ring. The tainting will only " + TextHelper.RED + TextHelper.ITALIC + "increase, and strange things will start happening."));
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("MindCorruption", wornTick);
((EntityPlayer) player).writeToNBT(tag);
int corruption = tag.getInteger("MindCorruption");
if (tag != null && corruption != wornTick) {
wornTick = corruption;
}
if (corruption > 6000 && corruption < 24000 && random.nextInt(2000) == 0)
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false));
if (corruption == 0)
((EntityPlayer) player).addChatMessage(new ChatComponentText(TextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever " + TextHelper.PURPLE + "tainted. " + TextHelper.RED + TextHelper.ITALIC + "Beware of wearing the ring. The tainting will only " + TextHelper.RED + TextHelper.ITALIC + "increase, and strange things will start happening."));
if (corruption >= 6000 && corruption < 24000 && random.nextInt(2000) == 0)
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
if (corruption > 6000 && corruption < 24000 && random.nextInt(2000) == 0)
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false));
if (corruption >= 24000 && corruption < 72000 && random.nextInt(2000) == 0) {
for (int i = 0; i <= 5; i++)
((EntityPlayer) player).capabilities.disableDamage = false;
if (corruption >= 6000 && corruption < 24000 && random.nextInt(2000) == 0)
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
player.attackEntityFrom(DamageSource.magic, 5);
}
if (corruption >= 24000 && corruption < 72000 && random.nextInt(2000) == 0) {
for (int i = 0; i <= 5; i++)
((EntityPlayer) player).capabilities.disableDamage = false;
if (corruption >= 72000 && corruption < 120000 && random.nextInt(4000) == 0) {
for (int i = 0; i <= 100; i++)
((EntityPlayer) player).capabilities.disableDamage = false;
player.attackEntityFrom(DamageSource.magic, 5);
}
player.motionY = 2;
}
if (corruption >= 72000 && corruption < 120000 && random.nextInt(4000) == 0) {
for (int i = 0; i <= 100; i++)
((EntityPlayer) player).capabilities.disableDamage = false;
if (corruption >= 120000 && random.nextInt(10000) == 0) {
for (int i = 0; i <= 510; i++)
((EntityPlayer) player).capabilities.disableDamage = false;
player.motionY = 2;
}
player.addPotionEffect(new PotionEffect(Potion.wither.id, 5000, 4, false));
}
}
}
}
}
if (corruption >= 120000 && random.nextInt(10000) == 0) {
for (int i = 0; i <= 510; i++)
((EntityPlayer) player).capabilities.disableDamage = false;
@Override
public void onEquipped(ItemStack stack, EntityLivingBase player) {
if (stack != null && stack.getItemDamage() == 2) {
player.setInvisible(true);
}
}
player.addPotionEffect(new PotionEffect(Potion.wither.id, 5000, 4, false));
}
}
}
}
}
@Override
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
if (stack != null && stack.getItemDamage() == 2) {
player.setInvisible(false);
if (player instanceof EntityPlayer && !((EntityPlayer) player).capabilities.isCreativeMode)
((EntityPlayer) player).capabilities.disableDamage = false;
}
}
@Override
public void onEquipped(ItemStack stack, EntityLivingBase player) {
if (stack != null && stack.getItemDamage() == 2) {
player.setInvisible(true);
}
}
@Override
public boolean canEquip(ItemStack stack, EntityLivingBase player) {
return true;
}
@Override
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
if (stack != null && stack.getItemDamage() == 2) {
player.setInvisible(false);
if (player instanceof EntityPlayer && !((EntityPlayer) player).capabilities.isCreativeMode)
((EntityPlayer) player).capabilities.disableDamage = false;
}
}
@Override
public boolean canUnequip(ItemStack stack, EntityLivingBase player) {
return true;
}
@Override
public boolean canEquip(ItemStack stack, EntityLivingBase player) {
return true;
}
@Override
public boolean canUnequip(ItemStack stack, EntityLivingBase player) {
return true;
}
}
@@ -9,12 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.items;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ElectroMagicTools;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
@@ -33,183 +32,185 @@ import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.common.config.Config;
import thaumcraft.common.lib.InventoryHelper;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import java.util.List;
public class ItemEMTItems extends Item {
public IIcon[] icon = new IIcon[500];
public IIcon[] icon = new IIcon[500];
public ItemEMTItems() {
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxDamage(0);
this.setMaxStackSize(64);
setHasSubtypes(true);
OreDictionary.registerOre("plateThaumium", new ItemStack(this, 1, 5));
OreDictionary.registerOre("slimeball", new ItemStack(this, 1, 8));
}
public ItemEMTItems() {
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxDamage(0);
this.setMaxStackSize(64);
setHasSubtypes(true);
OreDictionary.registerOre("plateThaumium", new ItemStack(this, 1, 5));
OreDictionary.registerOre("slimeball", new ItemStack(this, 1, 8));
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "oreClusterUranium";
break;
}
case 1: {
name = "crushedOreAmber";
break;
}
case 2: {
name = "purifiedOreAmber";
break;
}
case 3: {
name = "crushedOreCinnabar";
break;
}
case 4: {
name = "purifiedOreCinnabar";
break;
}
case 5: {
name = "thaumiumPlate";
break;
}
case 6: {
name = "lightningSummoner";
break;
}
case 7: {
name = "featherMesh";
break;
}
case 8: {
name = "glue";
break;
}
case 9: {
name = "ductTape";
break;
}
case 10: {
name = "rubberBall";
break;
}
case 11: {
name = "cardboard";
break;
}
case 12: {
name = "featherGluedCardboardWing";
break;
}
case 13: {
name = "denseIronSheet";
break;
}
case 14: {
name = "taintedFeather";
break;
}
case 15: {
name = "thaumiumWing";
break;
}
default:
name = "nothing";
break;
}
return getUnlocalizedName() + "." + name;
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "oreClusterUranium";
break;
}
case 1: {
name = "crushedOreAmber";
break;
}
case 2: {
name = "purifiedOreAmber";
break;
}
case 3: {
name = "crushedOreCinnabar";
break;
}
case 4: {
name = "purifiedOreCinnabar";
break;
}
case 5: {
name = "thaumiumPlate";
break;
}
case 6: {
name = "lightningSummoner";
break;
}
case 7: {
name = "featherMesh";
break;
}
case 8: {
name = "glue";
break;
}
case 9: {
name = "ductTape";
break;
}
case 10: {
name = "rubberBall";
break;
}
case 11: {
name = "cardboard";
break;
}
case 12: {
name = "featherGluedCardboardWing";
break;
}
case 13: {
name = "denseIronSheet";
break;
}
case 14: {
name = "taintedFeather";
break;
}
case 15: {
name = "thaumiumWing";
break;
}
default:
name = "nothing";
break;
}
return getUnlocalizedName() + "." + name;
}
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ri) {
this.icon[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":clusteruranium");
this.icon[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":crushedamber");
this.icon[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":purifiedamber");
this.icon[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":crushedcinnabar");
this.icon[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":purifiedcinnabar");
this.icon[5] = ri.registerIcon(ElectroMagicTools.texturePath + ":thaumiumplate");
this.icon[6] = ri.registerIcon(ElectroMagicTools.texturePath + ":lightningsummoner");
this.icon[7] = ri.registerIcon(ElectroMagicTools.texturePath + ":feathermesh");
this.icon[8] = ri.registerIcon(ElectroMagicTools.texturePath + ":glue");
this.icon[9] = ri.registerIcon(ElectroMagicTools.texturePath + ":ducttape");
this.icon[10] = ri.registerIcon(ElectroMagicTools.texturePath + ":rubberball");
this.icon[11] = ri.registerIcon(ElectroMagicTools.texturePath + ":cardboard");
this.icon[12] = ri.registerIcon(ElectroMagicTools.texturePath + ":feathercarboardwing");
this.icon[13] = ri.registerIcon(ElectroMagicTools.texturePath + ":denseironsheet");
this.icon[14] = ri.registerIcon(ElectroMagicTools.texturePath + ":taintedfeather");
this.icon[15] = ri.registerIcon(ElectroMagicTools.texturePath + ":thaumiumWing");
}
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ri) {
this.icon[0] = ri.registerIcon(ModInformation.texturePath + ":clusteruranium");
this.icon[1] = ri.registerIcon(ModInformation.texturePath + ":crushedamber");
this.icon[2] = ri.registerIcon(ModInformation.texturePath + ":purifiedamber");
this.icon[3] = ri.registerIcon(ModInformation.texturePath + ":crushedcinnabar");
this.icon[4] = ri.registerIcon(ModInformation.texturePath + ":purifiedcinnabar");
this.icon[5] = ri.registerIcon(ModInformation.texturePath + ":thaumiumplate");
this.icon[6] = ri.registerIcon(ModInformation.texturePath + ":lightningsummoner");
this.icon[7] = ri.registerIcon(ModInformation.texturePath + ":feathermesh");
this.icon[8] = ri.registerIcon(ModInformation.texturePath + ":glue");
this.icon[9] = ri.registerIcon(ModInformation.texturePath + ":ducttape");
this.icon[10] = ri.registerIcon(ModInformation.texturePath + ":rubberball");
this.icon[11] = ri.registerIcon(ModInformation.texturePath + ":cardboard");
this.icon[12] = ri.registerIcon(ModInformation.texturePath + ":feathercarboardwing");
this.icon[13] = ri.registerIcon(ModInformation.texturePath + ":denseironsheet");
this.icon[14] = ri.registerIcon(ModInformation.texturePath + ":taintedfeather");
this.icon[15] = ri.registerIcon(ModInformation.texturePath + ":thaumiumWing");
}
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta) {
return this.icon[meta];
}
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta) {
return this.icon[meta];
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) {
for (int i = 1; i <= 15; i++) {
list.add(new ItemStack(this, 1, i));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) {
for (int i = 1; i <= 15; i++) {
list.add(new ItemStack(this, 1, i));
}
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (stack != null && stack.getItemDamage() == 6) {
player.swingItem();
float f = 1.0F;
float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f);
float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f);
double d = player.prevPosX + ((player.posX - player.prevPosX) * f);
double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset;
double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f);
Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2);
float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F);
float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F);
float f5 = -MathHelper.cos(-f1 * 0.01745329F);
float f6 = MathHelper.sin(-f1 * 0.01745329F);
float f7 = f4 * f5;
float f8 = f6;
float f9 = f3 * f5;
double d3 = 5000D;
Vec3 vec3d1 = vec3d.addVector(f7 * d3, f8 * d3, f9 * d3);
MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(vec3d, vec3d1, true);
if (movingobjectposition == null) {
return stack;
}
if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) {
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
int k = movingobjectposition.blockZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k));
} else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) {
Entity entityhit = movingobjectposition.entityHit;
double x = entityhit.posX;
double y = entityhit.posY;
double z = entityhit.posZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z));
}
if (player.capabilities.isCreativeMode) {
return stack;
} else {
player.inventory.consumeInventoryItem(this);
return stack;
}
}
return stack;
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (stack != null && stack.getItemDamage() == 6) {
player.swingItem();
float f = 1.0F;
float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f);
float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f);
double d = player.prevPosX + ((player.posX - player.prevPosX) * f);
double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset;
double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f);
Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2);
float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F);
float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F);
float f5 = -MathHelper.cos(-f1 * 0.01745329F);
float f6 = MathHelper.sin(-f1 * 0.01745329F);
float f7 = f4 * f5;
float f8 = f6;
float f9 = f3 * f5;
double d3 = 5000D;
Vec3 vec3d1 = vec3d.addVector(f7 * d3, f8 * d3, f9 * d3);
MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(vec3d, vec3d1, true);
if (movingobjectposition == null) {
return stack;
}
if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) {
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
int k = movingobjectposition.blockZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k));
} else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) {
Entity entityhit = movingobjectposition.entityHit;
double x = entityhit.posX;
double y = entityhit.posY;
double z = entityhit.posZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z));
}
if (player.capabilities.isCreativeMode) {
return stack;
} else {
player.inventory.consumeInventoryItem(this);
return stack;
}
}
return stack;
}
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
super.onUpdate(stack, world, entity, par4, par5);
if ((!entity.worldObj.isRemote) && ((stack.getItemDamage() == 14)) && ((entity instanceof EntityLivingBase)) && (!((EntityLivingBase) entity).isEntityUndead()) && (!((EntityLivingBase) entity).isPotionActive(Config.potionTaintPoisonID)) && (world.rand.nextInt(4321) <= stack.stackSize)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Config.potionTaintPoisonID, 120, 0, false));
if ((entity instanceof EntityPlayer)) {
InventoryHelper.consumeInventoryItem((EntityPlayer) entity, stack.getItem(), stack.getItemDamage());
}
}
}
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
super.onUpdate(stack, world, entity, par4, par5);
if ((!entity.worldObj.isRemote) && ((stack.getItemDamage() == 14)) && ((entity instanceof EntityLivingBase)) && (!((EntityLivingBase) entity).isEntityUndead()) && (!((EntityLivingBase) entity).isPotionActive(Config.potionTaintPoisonID)) && (world.rand.nextInt(4321) <= stack.stackSize)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Config.potionTaintPoisonID, 120, 0, false));
if ((entity instanceof EntityPlayer)) {
InventoryHelper.consumeInventoryItem((EntityPlayer) entity, stack.getItem(), stack.getItemDamage());
}
}
}
}
@@ -2,7 +2,6 @@ package tombenpotter.emt.common.module.base.items;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.client.model.ModelWings;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -13,68 +12,69 @@ import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.client.model.ModelWings;
public class ItemFeatherWing extends ItemArmor {
public int visDiscount = 0;
public int visDiscount = 0;
public ItemFeatherWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxStackSize(1);
this.setMaxDamage(120);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.isDamageable();
}
public ItemFeatherWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxStackSize(1);
this.setMaxDamage(120);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.isDamageable();
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":featherwings");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":featherwings");
}
@Override
@SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/featherwing.png";
}
@Override
@SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/featherwing.png";
}
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
return new ModelWings();
}
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
return new ModelWings();
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
if (world.isRemote) {
boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed();
boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
if (world.isRemote) {
boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed();
boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
if (isJumping) {
player.motionY = 0.25;
player.fallDistance = 0;
}
if (isJumping) {
player.motionY = 0.25;
player.fallDistance = 0;
}
if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) {
player.motionY *= 0.9;
player.fallDistance = 0;
}
if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) {
player.motionY *= 0.9;
player.fallDistance = 0;
}
if (player.isInWater() && !player.capabilities.isCreativeMode)
player.motionY = -0.6;
if (player.isInWater() && !player.capabilities.isCreativeMode)
player.motionY = -0.6;
if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode)
player.motionY = -0.3;
if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode)
player.motionY = -0.3;
if (isSneaking && !player.onGround) {
player.motionY = -0.6;
player.fallDistance = 0F;
}
if (isSneaking && !player.onGround) {
player.motionY = -0.6;
player.fallDistance = 0F;
}
if (player.fallDistance > 0.0F)
player.fallDistance -= 0.25F;
}
}
if (player.fallDistance > 0.0F)
player.fallDistance -= 0.25F;
}
}
}
@@ -9,63 +9,70 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.items;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.ElectroMagicTools;
import net.minecraft.client.renderer.texture.IIconRegister;
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;
import org.lwjgl.input.Keyboard;
import thaumcraft.common.entities.projectile.EntityAlumentum;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.TextHelper;
import java.util.List;
public class ItemTaintedThorHammer extends ItemThorHammer {
public ItemTaintedThorHammer() {
this.setMaxDamage(1000);
}
public ItemTaintedThorHammer() {
this.setMaxDamage(1000);
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":hammer/taintedthorhammer");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":hammer/taintedthorhammer");
}
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
player.swingItem();
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 4, player.posZ));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 8, player.posZ));
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
player.swingItem();
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 4, player.posZ));
world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 8, player.posZ));
if (player.capabilities.isCreativeMode) {
return itemstack;
} else {
itemstack.damageItem(20, player);
return itemstack;
}
}
if (player.capabilities.isCreativeMode) {
return itemstack;
} else {
itemstack.damageItem(20, player);
return itemstack;
}
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 2F);
itemstack.damageItem(1, attacker);
return true;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 2F);
itemstack.damageItem(1, attacker);
return true;
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
list.add("It was, once the Hammer of Thor.");
list.add("It is now very dangerous.");
list.add("Do NOT right-click.");
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public void addInformation(ItemStack stack, EntityPlayer entityPlayer, List list, boolean par4) {
list.add(TextHelper.localize("tooltip.EMT.hammer.broken.thor"));
list.add(TextHelper.localize("tooltip.EMT.hammer.broken.danger"));
if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
list.add(TextHelper.localize("tooltip.EMT.hammer.broken.plsNoRightClick"));
} else {
list.add(TextHelper.localize("tooltip.EMT.hammer.broken.plsRightClick"));
}
}
}
@@ -12,75 +12,75 @@ import thaumcraft.api.IRepairable;
import thaumcraft.api.IVisDiscountGear;
import thaumcraft.api.aspects.Aspect;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.module.base.items.ItemFeatherWing;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.TextHelper;
import java.util.List;
public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisDiscountGear, IRepairable {
public ItemThaumiumReinforcedWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxStackSize(1);
this.setMaxDamage(250);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.isDamageable();
visDiscount = 4;
}
public ItemThaumiumReinforcedWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxStackSize(1);
this.setMaxDamage(250);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.isDamageable();
visDiscount = 4;
}
@Override
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
return visDiscount;
}
@Override
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
return visDiscount;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":thaumiumwings");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":thaumiumwings");
}
@Override
@SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/thaumiumwing.png";
}
@Override
@SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/thaumiumwing.png";
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
list.add("Vis discount: " + String.valueOf(visDiscount) + "%");
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
list.add(TextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%");
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
if (world.isRemote) {
boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed();
boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
if (world.isRemote) {
boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed();
boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
if (isJumping) {
player.motionY = 0.5;
player.fallDistance = 0;
}
if (isJumping) {
player.motionY = 0.5;
player.fallDistance = 0;
}
if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) {
player.motionY *= 0.5;
player.fallDistance = 0;
}
if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) {
player.motionY *= 0.5;
player.fallDistance = 0;
}
if (player.isInWater() && !player.capabilities.isCreativeMode)
player.motionY = -0.6;
if (player.isInWater() && !player.capabilities.isCreativeMode)
player.motionY = -0.6;
if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode)
player.motionY = -0.3;
if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode)
player.motionY = -0.3;
if (isSneaking && !player.onGround) {
player.motionY = -0.6;
player.fallDistance = 0;
}
if (isSneaking && !player.onGround) {
player.motionY = -0.6;
player.fallDistance = 0;
}
if (player.fallDistance > 0.0F)
player.fallDistance -= 0.5F;
}
}
if (player.fallDistance > 0.0F)
player.fallDistance -= 0.5F;
}
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.items;
import cpw.mods.fml.relauncher.Side;
@@ -28,77 +29,77 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import thaumcraft.api.IRepairable;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import java.util.List;
public class ItemThorHammer extends ItemSword implements IRepairable {
public ItemThorHammer() {
super(ToolMaterial.EMERALD);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxDamage(2000);
// OreDictionary.registerOre("craftingToolForgeHammer", this);
}
public ItemThorHammer() {
super(ToolMaterial.EMERALD);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxDamage(2000);
// OreDictionary.registerOre("craftingToolForgeHammer", this);
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":hammer/thorhammer");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":hammer/thorhammer");
}
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
player.swingItem();
float f = 1.0F;
float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f);
float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f);
double d = player.prevPosX + ((player.posX - player.prevPosX) * f);
double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset;
double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f);
Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2);
float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F);
float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F);
float f5 = -MathHelper.cos(-f1 * 0.01745329F);
float f6 = MathHelper.sin(-f1 * 0.01745329F);
float f7 = f4 * f5;
float f8 = f6;
float f9 = f3 * f5;
double d3 = 5000D;
Vec3 vec3d1 = vec3d.addVector(f7 * d3, f8 * d3, f9 * d3);
MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(vec3d, vec3d1, true);
if (movingobjectposition == null) {
return itemstack;
}
if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) {
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
int k = movingobjectposition.blockZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k));
} else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) {
Entity entityhit = movingobjectposition.entityHit;
double x = entityhit.posX;
double y = entityhit.posY;
double z = entityhit.posZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z));
}
if (player.capabilities.isCreativeMode) {
return itemstack;
} else {
itemstack.damageItem(20, player);
return itemstack;
}
}
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
player.swingItem();
float f = 1.0F;
float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f);
float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f);
double d = player.prevPosX + ((player.posX - player.prevPosX) * f);
double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset;
double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f);
Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2);
float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F);
float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F);
float f5 = -MathHelper.cos(-f1 * 0.01745329F);
float f6 = MathHelper.sin(-f1 * 0.01745329F);
float f7 = f4 * f5;
float f8 = f6;
float f9 = f3 * f5;
double d3 = 5000D;
Vec3 vec3d1 = vec3d.addVector(f7 * d3, f8 * d3, f9 * d3);
MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(vec3d, vec3d1, true);
if (movingobjectposition == null) {
return itemstack;
}
if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) {
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
int k = movingobjectposition.blockZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k));
} else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) {
Entity entityhit = movingobjectposition.entityHit;
double x = entityhit.posX;
double y = entityhit.posY;
double z = entityhit.posZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z));
}
if (player.capabilities.isCreativeMode) {
return itemstack;
} else {
itemstack.damageItem(20, player);
return itemstack;
}
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F);
itemstack.damageItem(1, attacker);
return true;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F);
itemstack.damageItem(1, attacker);
return true;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
list.add("The Hammer of Thor");
}
@Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
list.add("The Hammer of Thor");
}
}
@@ -9,9 +9,9 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.items.foci;
import tombenpotter.emt.common.util.CreativeTab;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@@ -23,119 +23,120 @@ import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.wands.IWandFocus;
import tombenpotter.emt.ElectroMagicTools;
import java.util.List;
public abstract class ItemBaseFocus extends Item implements IWandFocus {
private IIcon ornament, depth;
private IIcon ornament, depth;
public ItemBaseFocus() {
super();
this.setMaxDamage(1);
this.setNoRepair();
this.setMaxStackSize(1);
this.setCreativeTab(CreativeTab.tabTombenpotter);
}
public ItemBaseFocus() {
super();
this.setMaxDamage(1);
this.setNoRepair();
this.setMaxStackSize(1);
this.setCreativeTab(ElectroMagicTools.tabEMT);
}
boolean hasOrnament() {
return false;
}
boolean hasOrnament() {
return false;
}
boolean hasDepth() {
return false;
}
boolean hasDepth() {
return false;
}
@Override
public int getFocusColor() {
return 0;
}
@Override
public int getFocusColor() {
return 0;
}
@Override
public boolean isItemTool(ItemStack par1ItemStack) {
return true;
}
@Override
public boolean isItemTool(ItemStack par1ItemStack) {
return true;
}
@Override
public EnumRarity getRarity(ItemStack itemstack) {
return EnumRarity.rare;
}
@Override
public EnumRarity getRarity(ItemStack itemstack) {
return EnumRarity.rare;
}
@Override
public IIcon getFocusDepthLayerIcon() {
return depth;
}
@Override
public IIcon getFocusDepthLayerIcon() {
return depth;
}
@Override
public IIcon getOrnament() {
return ornament;
}
@Override
public IIcon getOrnament() {
return ornament;
}
@Override
public WandFocusAnimation getAnimation() {
return WandFocusAnimation.WAVE;
}
@Override
public WandFocusAnimation getAnimation() {
return WandFocusAnimation.WAVE;
}
@Override
public AspectList getVisCost() {
return null;
}
@Override
public AspectList getVisCost() {
return null;
}
public boolean isUseItem() {
return isVisCostPerTick();
}
public boolean isUseItem() {
return isVisCostPerTick();
}
@Override
public boolean isVisCostPerTick() {
return false;
}
@Override
public boolean isVisCostPerTick() {
return false;
}
@Override
public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, MovingObjectPosition paramMovingObjectPosition) {
if (isUseItem())
paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
return paramItemStack;
}
@Override
public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, MovingObjectPosition paramMovingObjectPosition) {
if (isUseItem())
paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
return paramItemStack;
}
@Override
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
@Override
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
}
}
@Override
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {
}
@Override
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "00";
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "00";
}
@Override
public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
return false;
}
@Override
public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
return false;
}
@Override
public boolean acceptsEnchant(int id) {
return false;
}
@Override
public boolean acceptsEnchant(int id) {
return false;
}
@Override
public int getItemEnchantability() {
return 5;
}
@Override
public int getItemEnchantability() {
return 5;
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
AspectList cost = getVisCost();
if (cost != null && cost.size() > 0) {
list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1"));
for (Aspect aspect : cost.getAspectsSorted()) {
float amount = cost.getAmount(aspect) / 100.0F;
list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount);
}
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
AspectList cost = getVisCost();
if (cost != null && cost.size() > 0) {
list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1"));
for (Aspect aspect : cost.getAspectsSorted()) {
float amount = cost.getAmount(aspect) / 100.0F;
list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount);
}
}
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.items.foci;
import cpw.mods.fml.relauncher.Side;
@@ -22,55 +23,54 @@ import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.items.wands.ItemWandCasting;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
public class ItemChristmasFocus extends ItemBaseFocus {
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 500).add(Aspect.AIR, 500);
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 500).add(Aspect.AIR, 500);
public ItemChristmasFocus() {
super();
}
public ItemChristmasFocus() {
super();
}
@Override
public int getFocusColor() {
return 99999999;
}
@Override
public int getFocusColor() {
return 99999999;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":christmasfocus");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":christmasfocus");
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "CHRISTMAS";
}
@Override
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition mop) {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if ((mop != null) && (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)) {
int x = mop.blockX;
int y = mop.blockY + 1;
int z = mop.blockZ;
if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) {
if (!world.isRemote) {
EntitySnowman snowman;
snowman = new EntitySnowman(world);
snowman.setPosition(x, y, z);
world.spawnEntityInWorld(snowman);
}
}
player.swingItem();
}
return itemstack;
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "CHRISTMAS";
}
@Override
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition mop) {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if ((mop != null) && (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)) {
int x = mop.blockX;
int y = mop.blockY + 1;
int z = mop.blockZ;
if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) {
if (!world.isRemote) {
EntitySnowman snowman;
snowman = new EntitySnowman(world);
snowman.setPosition(x, y, z);
world.spawnEntityInWorld(snowman);
}
}
player.swingItem();
}
return itemstack;
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.items.foci;
import cpw.mods.fml.relauncher.Side;
@@ -21,48 +22,48 @@ import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.items.wands.ItemWandCasting;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.base.entities.EntityLaser;
public class ItemExplosionFocus extends ItemBaseFocus {
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200);
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200);
public ItemExplosionFocus() {
super();
}
public ItemExplosionFocus() {
super();
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":explosionfocus");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":explosionfocus");
}
@Override
public int getFocusColor() {
return 9990;
}
@Override
public int getFocusColor() {
return 9990;
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "EXPLOSION";
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "EXPLOSION";
}
@Override
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) {
if (!world.isRemote) {
EntityLaser laser;
laser = new EntityLaser(world, player, 2);
world.spawnEntityInWorld(laser);
}
}
return itemstack;
}
@Override
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) {
if (!world.isRemote) {
EntityLaser laser;
laser = new EntityLaser(world, player, 2);
world.spawnEntityInWorld(laser);
}
}
return itemstack;
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.items.foci;
import cpw.mods.fml.relauncher.Side;
@@ -22,97 +23,96 @@ import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.items.wands.ItemWandCasting;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
public class ItemShieldFocus extends ItemBaseFocus {
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10);
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10);
public ItemShieldFocus() {
super();
}
public ItemShieldFocus() {
super();
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":shieldfocus");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":shieldfocus");
}
@Override
public int getFocusColor() {
return 555555555;
}
@Override
public int getFocusColor() {
return 555555555;
}
@Override
public boolean isUseItem() {
return true;
}
@Override
public boolean isUseItem() {
return true;
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "SHIELD";
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "SHIELD";
}
@Override
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int time) {
player.motionX = 0.0D;
player.motionY = 0.0D;
player.motionZ = 0.0D;
@Override
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int time) {
player.motionX = 0.0D;
player.motionY = 0.0D;
player.motionZ = 0.0D;
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) {
int x = MathHelper.floor_double(player.posX);
int y = MathHelper.floor_double(player.posY);
int z = MathHelper.floor_double(player.posZ);
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) {
int x = MathHelper.floor_double(player.posX);
int y = MathHelper.floor_double(player.posY);
int z = MathHelper.floor_double(player.posZ);
// Player Level
if (player.worldObj.isAirBlock(x + 1, y, z) && player.worldObj.isAirBlock(x - 1, y, z) && player.worldObj.isAirBlock(x, y, z + 1) && player.worldObj.isAirBlock(x, y, z - 1)) {
player.worldObj.setBlock(x + 1, y, z, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x - 1, y, z, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x, y, z + 1, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x, y, z - 1, IC2ModuleBlockRegistry.shield);
}
// Player Level
if (player.worldObj.isAirBlock(x + 1, y, z) && player.worldObj.isAirBlock(x - 1, y, z) && player.worldObj.isAirBlock(x, y, z + 1) && player.worldObj.isAirBlock(x, y, z - 1)) {
player.worldObj.setBlock(x + 1, y, z, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x - 1, y, z, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x, y, z + 1, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x, y, z - 1, IC2ModuleBlockRegistry.shield);
}
// Above the player
if (player.worldObj.isAirBlock(x + 1, y + 1, z) && player.worldObj.isAirBlock(x - 1, y + 1, z) && player.worldObj.isAirBlock(x, y + 1, z + 1) && player.worldObj.isAirBlock(x, y + 1, z - 1)) {
player.worldObj.setBlock(x + 1, y + 1, z, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x - 1, y + 1, z, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x, y + 1, z + 1, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x, y + 1, z - 1, IC2ModuleBlockRegistry.shield);
}
}
// Above the player
if (player.worldObj.isAirBlock(x + 1, y + 1, z) && player.worldObj.isAirBlock(x - 1, y + 1, z) && player.worldObj.isAirBlock(x, y + 1, z + 1) && player.worldObj.isAirBlock(x, y + 1, z - 1)) {
player.worldObj.setBlock(x + 1, y + 1, z, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x - 1, y + 1, z, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x, y + 1, z + 1, IC2ModuleBlockRegistry.shield);
player.worldObj.setBlock(x, y + 1, z - 1, IC2ModuleBlockRegistry.shield);
}
}
}
}
@Override
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {
int x = MathHelper.floor_double(player.posX);
int y = MathHelper.floor_double(player.posY);
int z = MathHelper.floor_double(player.posZ);
@Override
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {
int x = MathHelper.floor_double(player.posX);
int y = MathHelper.floor_double(player.posY);
int z = MathHelper.floor_double(player.posZ);
// Player Level
if ((player.worldObj.getBlock(x + 1, y, z) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x - 1, y, z) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x, y, z + 1) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x, y, z - 1) == IC2ModuleBlockRegistry.shield)) {
player.worldObj.setBlockToAir(x + 1, y, z);
player.worldObj.setBlockToAir(x - 1, y, z);
player.worldObj.setBlockToAir(x, y, z + 1);
player.worldObj.setBlockToAir(x, y, z - 1);
}
// Player Level
if ((player.worldObj.getBlock(x + 1, y, z) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x - 1, y, z) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x, y, z + 1) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x, y, z - 1) == IC2ModuleBlockRegistry.shield)) {
player.worldObj.setBlockToAir(x + 1, y, z);
player.worldObj.setBlockToAir(x - 1, y, z);
player.worldObj.setBlockToAir(x, y, z + 1);
player.worldObj.setBlockToAir(x, y, z - 1);
}
// Above the player
if ((player.worldObj.getBlock(x + 1, y + 1, z) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x - 1, y + 1, z) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x, y + 1, z + 1) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x, y + 1, z - 1) == IC2ModuleBlockRegistry.shield)) {
player.worldObj.setBlockToAir(x + 1, y + 1, z);
player.worldObj.setBlockToAir(x - 1, y + 1, z);
player.worldObj.setBlockToAir(x, y + 1, z + 1);
player.worldObj.setBlockToAir(x, y + 1, z - 1);
}
// Above the player
if ((player.worldObj.getBlock(x + 1, y + 1, z) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x - 1, y + 1, z) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x, y + 1, z + 1) == IC2ModuleBlockRegistry.shield) && (player.worldObj.getBlock(x, y + 1, z - 1) == IC2ModuleBlockRegistry.shield)) {
player.worldObj.setBlockToAir(x + 1, y + 1, z);
player.worldObj.setBlockToAir(x - 1, y + 1, z);
player.worldObj.setBlockToAir(x, y + 1, z + 1);
player.worldObj.setBlockToAir(x, y + 1, z - 1);
}
ItemStack milk = (new ItemStack(Items.milk_bucket));
player.curePotionEffects(milk);
}
ItemStack milk = (new ItemStack(Items.milk_bucket));
player.curePotionEffects(milk);
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.base.tile;
import thaumcraft.api.nodes.NodeModifier;
@@ -17,17 +18,17 @@ import thaumcraft.common.tiles.TileNode;
public class TileEntityPortableNode extends TileNode {
public TileEntityPortableNode() {
super();
}
public TileEntityPortableNode() {
super();
}
@Override
public NodeModifier getNodeModifier() {
return NodeModifier.FADING;
}
@Override
public NodeModifier getNodeModifier() {
return NodeModifier.FADING;
}
@Override
public NodeType getNodeType() {
return NodeType.UNSTABLE;
}
@Override
public NodeType getNodeType() {
return NodeType.UNSTABLE;
}
}
@@ -9,37 +9,40 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.ic2.blocks.*;
import tombenpotter.emt.common.module.ic2.items.blocks.*;
public class IC2ModuleBlockRegistry {
public static Block essentiaGens;
public static Block shield;
public static Block emtSolars;
public static Block emtMachines;
public static Block emtSolars2;
public static Block portableNode;
public static Block essentiaGenerator;
public static void registerBlocks() {
shield = new BlockShield().setBlockName("shield");
portableNode = new BlockPortableNode().setBlockName("portablenode");
emtSolars = new BlockEMTSolars().setBlockName("emtsolars");
essentiaGens = new BlockEssentiaGenerators().setBlockName("essentiaGens");
emtMachines = new BlockEMTMachines().setBlockName("emtmachines");
emtSolars2 = new BlockEMTSolars2().setBlockName("emtsolars2");
essentiaGenerator = new BlockEssentiaGenerator().setBlockName("essentiaGenerator");
public static Block essentiaGens;
public static Block shield;
public static Block emtSolars;
public static Block emtMachines;
public static Block emtSolars2;
public static Block portableNode;
public static Block essentiaGenerator;
GameRegistry.registerBlock(shield, "Shield Block");
GameRegistry.registerBlock(portableNode, "Portable Node");
GameRegistry.registerBlock(emtSolars, ItemBlockEMTSolars.class, "EMT Solar Panels");
GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "Essentia Generators");
GameRegistry.registerBlock(emtMachines, ItemBlockEMTMachines.class, "EMT Machines");
GameRegistry.registerBlock(emtSolars2, ItemBlockEMTSolars2.class, "EMT Solars 2");
GameRegistry.registerBlock(essentiaGenerator, ItemBlockEssentiaGenerator.class, "Essentia Generator");
}
public static void registerBlocks() {
shield = new BlockShield().setBlockName(ModInformation.modid + ".shield");
portableNode = new BlockPortableNode().setBlockName(ModInformation.modid + ".portablenode");
emtSolars = new BlockEMTSolars().setBlockName(ModInformation.modid + ".emtsolars");
emtSolars2 = new BlockEMTSolars2().setBlockName(ModInformation.modid + ".emtsolars2");
emtMachines = new BlockEMTMachines().setBlockName(ModInformation.modid + ".emtmachines");
essentiaGens = new BlockEssentiaGenerators().setBlockName(ModInformation.modid + ".essentiaGens");
essentiaGenerator = new BlockEssentiaGenerator().setBlockName(ModInformation.modid + ".essentiaGenerator");
GameRegistry.registerBlock(shield, "Shield Block");
GameRegistry.registerBlock(portableNode, "Portable Node");
GameRegistry.registerBlock(emtSolars, ItemBlockEMTSolars.class, "EMT Solar Panels");
GameRegistry.registerBlock(emtSolars2, ItemBlockEMTSolars2.class, "EMT Solars 2");
GameRegistry.registerBlock(emtMachines, ItemBlockEMTMachines.class, "EMT Machines");
GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "Essentia Generators");
GameRegistry.registerBlock(essentiaGenerator, ItemBlockEssentiaGenerator.class, "Essentia Generator");
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -17,8 +18,8 @@ import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.EnumHelper;
import thaumcraft.api.ThaumcraftApi;
import tombenpotter.emt.common.module.base.items.ItemEMTBaubles;
import tombenpotter.emt.common.module.base.items.ItemEMTItems;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.base.items.*;
import tombenpotter.emt.common.module.base.items.foci.ItemChristmasFocus;
import tombenpotter.emt.common.module.base.items.foci.ItemExplosionFocus;
import tombenpotter.emt.common.module.base.items.foci.ItemShieldFocus;
@@ -30,127 +31,124 @@ import tombenpotter.emt.common.module.ic2.items.armor.goggles.ItemElectricGoggle
import tombenpotter.emt.common.module.ic2.items.armor.goggles.ItemNanoGoggles;
import tombenpotter.emt.common.module.ic2.items.armor.goggles.ItemQuantumGoggles;
import tombenpotter.emt.common.module.ic2.items.armor.goggles.ItemSolarHelmetRevealing;
import tombenpotter.emt.common.module.base.items.ItemFeatherWing;
import tombenpotter.emt.common.module.ic2.items.armor.wings.ItemNanoWing;
import tombenpotter.emt.common.module.ic2.items.armor.wings.ItemQuantumWing;
import tombenpotter.emt.common.module.base.items.ItemThaumiumReinforcedWing;
import tombenpotter.emt.common.module.ic2.items.foci.*;
import tombenpotter.emt.common.module.ic2.items.foci.ItemChargeFocus;
import tombenpotter.emt.common.module.ic2.items.foci.ItemWandChargingFocus;
import tombenpotter.emt.common.module.ic2.items.tools.ItemElectricHoeGrowth;
import tombenpotter.emt.common.module.ic2.items.tools.ItemElectricThorHammer;
import tombenpotter.emt.common.module.ic2.items.tools.chainsaws.ItemDiamondChainsaw;
import tombenpotter.emt.common.module.ic2.items.tools.chainsaws.ItemStreamChainsaw;
import tombenpotter.emt.common.module.ic2.items.tools.chainsaws.ItemThaumiumChainsaw;
import tombenpotter.emt.common.module.ic2.items.tools.drills.ItemRockbreakerDrill;
import tombenpotter.emt.common.module.ic2.items.tools.drills.ItemThaumiumDrill;
import tombenpotter.emt.common.module.ic2.items.tools.ItemElectricThorHammer;
import tombenpotter.emt.common.module.base.items.ItemTaintedThorHammer;
import tombenpotter.emt.common.module.base.items.ItemThorHammer;
import tombenpotter.emt.common.module.ic2.items.tools.omnitools.ItemOmnitoolDiamond;
import tombenpotter.emt.common.module.ic2.items.tools.omnitools.ItemOmnitoolIron;
import tombenpotter.emt.common.module.ic2.items.tools.omnitools.ItemOmnitoolThaumium;
public class IC2ModuleItemRegistry {
public static Item thaumiumDrill;
public static Item thaumiumChainsaw;
public static Item quantumThaumicHelmet;
public static Item diamondChainsaw;
public static Item ironOmnitool;
public static Item diamondOmnitool;
public static Item thaumiumOmnitool;
public static Item nanoThaumicHelmet;
public static Item explosionFocus;
public static Item christmasFocus;
public static Item shieldFocus;
public static Item electricGoggles;
public static Item streamChainsaw;
public static Item rockbreakerDrill;
public static Item solarHelmetRevealing;
public static Item thorHammer;
public static Item taintedThorHammer;
public static Item electricThorHammer;
public static Item electricBootsTraveller;
public static Item quantumBootsTraveller;
public static Item nanoBootsTraveller;
public static Item electricScribingTools;
public static Item itemEMTItems;
public static Item electricHoeGrowth;
public static Item chargeFocus;
public static Item emtBauble;
public static Item wandChargeFocus;
public static Item featherWing;
public static Item thaumiumWing;
public static Item nanoWing;
public static Item quantumWing;
public static Item thaumiumDrill;
public static Item thaumiumChainsaw;
public static Item quantumThaumicHelmet;
public static Item diamondChainsaw;
public static Item ironOmnitool;
public static Item diamondOmnitool;
public static Item thaumiumOmnitool;
public static Item nanoThaumicHelmet;
public static Item explosionFocus;
public static Item christmasFocus;
public static Item shieldFocus;
public static Item electricGoggles;
public static Item streamChainsaw;
public static Item rockbreakerDrill;
public static Item solarHelmetRevealing;
public static Item thorHammer;
public static Item taintedThorHammer;
public static Item electricThorHammer;
public static Item electricBootsTraveller;
public static Item quantumBootsTraveller;
public static Item nanoBootsTraveller;
public static Item electricScribingTools;
public static Item itemEMTItems;
public static Item electricHoeGrowth;
public static Item chargeFocus;
public static Item emtBauble;
public static Item wandChargeFocus;
public static Item featherWing;
public static Item thaumiumWing;
public static Item nanoWing;
public static Item quantumWing;
public static ItemArmor.ArmorMaterial featherWingMaterial = EnumHelper.addArmorMaterial("FEATEHRWiNG", 1, new int[]{2, 2, 2, 2}, 6);
public static ItemArmor.ArmorMaterial featherWingMaterial = EnumHelper.addArmorMaterial("FEATEHRWiNG", 1, new int[]{2, 2, 2, 2}, 6);
public static void registerItems() {
thaumiumDrill = new ItemThaumiumDrill().setUnlocalizedName("thaumiumdrill");
thaumiumChainsaw = new ItemThaumiumChainsaw().setUnlocalizedName("thaumiumchainsaw");
quantumThaumicHelmet = new ItemQuantumGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName("quantumthaumichelmet");
diamondChainsaw = new ItemDiamondChainsaw().setUnlocalizedName("diamondchainsaw");
ironOmnitool = new ItemOmnitoolIron().setUnlocalizedName("ironomnitool");
diamondOmnitool = new ItemOmnitoolDiamond().setUnlocalizedName("diamondomnitool");
thaumiumOmnitool = new ItemOmnitoolThaumium().setUnlocalizedName("thaumiumomnitool");
nanoThaumicHelmet = new ItemNanoGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName("nanothaumichelmet");
explosionFocus = new ItemExplosionFocus().setUnlocalizedName("laserfocus");
christmasFocus = new ItemChristmasFocus().setUnlocalizedName("christmasfocus");
shieldFocus = new ItemShieldFocus().setUnlocalizedName("shieldfocus");
electricGoggles = new ItemElectricGoggles(ItemArmor.ArmorMaterial.IRON, 3, 0).setUnlocalizedName("electricgoggles");
streamChainsaw = new ItemStreamChainsaw().setUnlocalizedName("streamchainsaw");
rockbreakerDrill = new ItemRockbreakerDrill().setUnlocalizedName("rockbreakerdrill");
solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName("solarhelmetrevealing");
thorHammer = new ItemThorHammer().setUnlocalizedName("hammerthor");
taintedThorHammer = new ItemTaintedThorHammer().setUnlocalizedName("taintedthorhammer");
electricThorHammer = new ItemElectricThorHammer().setUnlocalizedName("electricthorhammer");
electricBootsTraveller = new ItemElectricBootsTraveller(3, 3).setUnlocalizedName("electricboots");
nanoBootsTraveller = new ItemNanoBootsTraveller(3, 3).setUnlocalizedName("nanobootstraveller");
quantumBootsTraveller = new ItemQuantumBootsTraveller(3, 3).setUnlocalizedName("quantumbootstraveller");
electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName("electricscribingtools");
itemEMTItems = new ItemEMTItems().setUnlocalizedName("itememtitems");
electricHoeGrowth = new ItemElectricHoeGrowth().setUnlocalizedName("electrichoeofgrowth");
chargeFocus = new ItemChargeFocus().setUnlocalizedName("chargefocus");
emtBauble = new ItemEMTBaubles().setUnlocalizedName("emtbauble");
wandChargeFocus = new ItemWandChargingFocus().setUnlocalizedName("wandchargefocus");
featherWing = new ItemFeatherWing(featherWingMaterial, 7, 1).setUnlocalizedName("featherwing");
thaumiumWing = new ItemThaumiumReinforcedWing(ThaumcraftApi.armorMatThaumium, 7, 1).setUnlocalizedName("thaumiumwing");
nanoWing = new ItemNanoWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName("nanowing");
quantumWing = new ItemQuantumWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName("quantumwing");
public static void registerItems() {
itemEMTItems = new ItemEMTItems().setUnlocalizedName(ModInformation.modid + ".emtitems");
emtBauble = new ItemEMTBaubles().setUnlocalizedName(ModInformation.modid + ".emtbauble");
electricGoggles = new ItemElectricGoggles(ItemArmor.ArmorMaterial.IRON, 3, 0).setUnlocalizedName(ModInformation.modid + ".electricgoggles");
nanoThaumicHelmet = new ItemNanoGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(ModInformation.modid + ".nanothaumichelmet");
quantumThaumicHelmet = new ItemQuantumGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(ModInformation.modid + ".quantumthaumichelmet");
solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(ModInformation.modid + ".solarhelmetrevealing");
electricBootsTraveller = new ItemElectricBootsTraveller(3, 3).setUnlocalizedName(ModInformation.modid + ".electricboots");
nanoBootsTraveller = new ItemNanoBootsTraveller(3, 3).setUnlocalizedName(ModInformation.modid + ".nanobootstraveller");
quantumBootsTraveller = new ItemQuantumBootsTraveller(3, 3).setUnlocalizedName(ModInformation.modid + ".quantumbootstraveller");
electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName(ModInformation.modid + ".electricscribingtools");
featherWing = new ItemFeatherWing(featherWingMaterial, 7, 1).setUnlocalizedName(ModInformation.modid + ".featherwing");
thaumiumWing = new ItemThaumiumReinforcedWing(ThaumcraftApi.armorMatThaumium, 7, 1).setUnlocalizedName(ModInformation.modid + ".thaumiumwing");
nanoWing = new ItemNanoWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(ModInformation.modid + ".nanowing");
quantumWing = new ItemQuantumWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(ModInformation.modid + ".quantumwing");
taintedThorHammer = new ItemTaintedThorHammer().setUnlocalizedName(ModInformation.modid + ".taintedthorhammer");
thorHammer = new ItemThorHammer().setUnlocalizedName(ModInformation.modid + ".hammerthor");
electricThorHammer = new ItemElectricThorHammer().setUnlocalizedName(ModInformation.modid + ".electricthorhammer");
thaumiumDrill = new ItemThaumiumDrill().setUnlocalizedName(ModInformation.modid + ".thaumiumdrill");
thaumiumChainsaw = new ItemThaumiumChainsaw().setUnlocalizedName(ModInformation.modid + ".thaumiumchainsaw");
diamondChainsaw = new ItemDiamondChainsaw().setUnlocalizedName(ModInformation.modid + ".diamondchainsaw");
ironOmnitool = new ItemOmnitoolIron().setUnlocalizedName(ModInformation.modid + ".ironomnitool");
thaumiumOmnitool = new ItemOmnitoolThaumium().setUnlocalizedName(ModInformation.modid + ".thaumiumomnitool");
diamondOmnitool = new ItemOmnitoolDiamond().setUnlocalizedName(ModInformation.modid + ".diamondomnitool");
streamChainsaw = new ItemStreamChainsaw().setUnlocalizedName(ModInformation.modid + ".streamchainsaw");
rockbreakerDrill = new ItemRockbreakerDrill().setUnlocalizedName(ModInformation.modid + ".rockbreakerdrill");
electricHoeGrowth = new ItemElectricHoeGrowth().setUnlocalizedName(ModInformation.modid + ".electrichoeofgrowth");
explosionFocus = new ItemExplosionFocus().setUnlocalizedName(ModInformation.modid + ".laserfocus");
christmasFocus = new ItemChristmasFocus().setUnlocalizedName(ModInformation.modid + ".christmasfocus");
shieldFocus = new ItemShieldFocus().setUnlocalizedName(ModInformation.modid + ".shieldfocus");
chargeFocus = new ItemChargeFocus().setUnlocalizedName(ModInformation.modid + ".chargefocus");
wandChargeFocus = new ItemWandChargingFocus().setUnlocalizedName(ModInformation.modid + ".wandchargefocus");
GameRegistry.registerItem(thaumiumDrill, "Thaumium Drill");
GameRegistry.registerItem(thaumiumChainsaw, "Thaumium Chainsaw");
GameRegistry.registerItem(quantumThaumicHelmet, "Quantum Goggles of Revealing");
GameRegistry.registerItem(diamondChainsaw, "Diamond Chainsaw");
GameRegistry.registerItem(ironOmnitool, "Omnitool");
GameRegistry.registerItem(diamondOmnitool, "Diamond Omnitool");
GameRegistry.registerItem(thaumiumOmnitool, "Thaumium Omnitool");
GameRegistry.registerItem(nanoThaumicHelmet, "Nanosuit Goggles of Revealing");
GameRegistry.registerItem(explosionFocus, "Wand Focus: Explosion");
GameRegistry.registerItem(christmasFocus, "Wand Focus : Kris-tmas");
GameRegistry.registerItem(shieldFocus, "Wand Focus : Shield");
GameRegistry.registerItem(electricGoggles, "Electric Goggles of Revealing");
GameRegistry.registerItem(streamChainsaw, "Chainsaw of the Stream");
GameRegistry.registerItem(rockbreakerDrill, "Drill of the Rockbreaker");
GameRegistry.registerItem(solarHelmetRevealing, "Quantum Solar Helmet of Revealing");
GameRegistry.registerItem(thorHammer, "Mjolnir");
GameRegistry.registerItem(taintedThorHammer, "Broken Relic of Mjolnir");
GameRegistry.registerItem(electricThorHammer, "Supercharged Mjolnir");
GameRegistry.registerItem(electricBootsTraveller, "Electric Boots of the Traveller");
GameRegistry.registerItem(nanoBootsTraveller, "Nano Boots of the Traveller");
GameRegistry.registerItem(quantumBootsTraveller, "Quantum Boots of the Traveller");
GameRegistry.registerItem(electricScribingTools, "Electric Scribing Tools");
GameRegistry.registerItem(electricHoeGrowth, "Electric Hoe of Growth");
GameRegistry.registerItem(chargeFocus, "Wand Focus: Charging");
GameRegistry.registerItem(itemEMTItems, "EMT Items");
GameRegistry.registerItem(emtBauble, "EMT Baubles");
GameRegistry.registerItem(wandChargeFocus, "Wand Focus: Wand Charging");
GameRegistry.registerItem(featherWing, "Feather Wing");
GameRegistry.registerItem(thaumiumWing, "Thaumium Reinforced Wing");
GameRegistry.registerItem(nanoWing, "Nanosuit Wing");
GameRegistry.registerItem(quantumWing, "Quantum Wing");
}
GameRegistry.registerItem(itemEMTItems, "EMT Items");
GameRegistry.registerItem(emtBauble, "EMT Baubles");
GameRegistry.registerItem(electricGoggles, "Electric Goggles of Revealing");
GameRegistry.registerItem(nanoThaumicHelmet, "Nanosuit Goggles of Revealing");
GameRegistry.registerItem(quantumThaumicHelmet, "Quantum Goggles of Revealing");
GameRegistry.registerItem(solarHelmetRevealing, "Quantum Solar Helmet of Revealing");
GameRegistry.registerItem(electricBootsTraveller, "Electric Boots of the Traveller");
GameRegistry.registerItem(nanoBootsTraveller, "Nano Boots of the Traveller");
GameRegistry.registerItem(quantumBootsTraveller, "Quantum Boots of the Traveller");
GameRegistry.registerItem(electricScribingTools, "Electric Scribing Tools");
GameRegistry.registerItem(featherWing, "Feather Wing");
GameRegistry.registerItem(thaumiumWing, "Thaumium Reinforced Wing");
GameRegistry.registerItem(nanoWing, "Nanosuit Wing");
GameRegistry.registerItem(quantumWing, "Quantum Wing");
GameRegistry.registerItem(taintedThorHammer, "Broken Relic of Mjolnir");
GameRegistry.registerItem(thorHammer, "Mjolnir");
GameRegistry.registerItem(electricThorHammer, "Supercharged Mjolnir");
GameRegistry.registerItem(thaumiumDrill, "Thaumium Drill");
GameRegistry.registerItem(thaumiumChainsaw, "Thaumium Chainsaw");
GameRegistry.registerItem(diamondChainsaw, "Diamond Chainsaw");
GameRegistry.registerItem(ironOmnitool, "Omnitool");
GameRegistry.registerItem(thaumiumOmnitool, "Thaumium Omnitool");
GameRegistry.registerItem(diamondOmnitool, "Diamond Omnitool");
GameRegistry.registerItem(streamChainsaw, "Chainsaw of the Stream");
GameRegistry.registerItem(rockbreakerDrill, "Drill of the Rockbreaker");
GameRegistry.registerItem(electricHoeGrowth, "Electric Hoe of Growth");
GameRegistry.registerItem(explosionFocus, "Wand Focus: Explosion");
GameRegistry.registerItem(christmasFocus, "Wand Focus: Kris-tmas");
GameRegistry.registerItem(shieldFocus, "Wand Focus: Shield");
GameRegistry.registerItem(chargeFocus, "Wand Focus: Charging");
GameRegistry.registerItem(wandChargeFocus, "Wand Focus: Wand Charging");
}
public static ItemStack armorEuMaker = new ItemStack(emtBauble, 1, 0);
public static ItemStack inventoryEuMaker = new ItemStack(emtBauble, 1, 1);
public static ItemStack oneRing = new ItemStack(emtBauble, 1, 2);
public static ItemStack armorEuMaker = new ItemStack(emtBauble, 1, 0);
public static ItemStack inventoryEuMaker = new ItemStack(emtBauble, 1, 1);
public static ItemStack oneRing = new ItemStack(emtBauble, 1, 2);
}
@@ -9,12 +9,9 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2;
import tombenpotter.emt.common.util.EMTResearchItem;
import tombenpotter.emt.common.module.ic2.recipes.EMTInitRecipes;
import tombenpotter.emt.common.module.ic2.recipes.EMTPostInitRecipes;
import tombenpotter.emt.common.module.ic2.recipes.UuMInfusionRecipes;
import ic2.api.item.IC2Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@@ -22,379 +19,381 @@ import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.research.ResearchCategories;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchPage;
import tombenpotter.emt.common.module.ic2.recipes.EMTInitRecipes;
import tombenpotter.emt.common.module.ic2.recipes.EMTPostInitRecipes;
import tombenpotter.emt.common.module.ic2.recipes.UuMInfusionRecipes;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.EMTResearchItem;
import tombenpotter.emt.common.util.ResearchAspects;
import tombenpotter.emt.common.util.Config;
public class IC2ModuleResearch {
public static void addResearchTab() {
ResourceLocation background = new ResourceLocation("thaumcraft", "textures/gui/gui_researchback.png");
ResearchCategories.registerCategory("EMT", new ResourceLocation("electromagictools:textures/misc/emt.png"), background);
}
public static void addResearchTab() {
ResourceLocation background = new ResourceLocation("thaumcraft", "textures/gui/gui_researchback.png");
ResearchCategories.registerCategory("EMT", new ResourceLocation("electromagictools:textures/misc/emt.png"), background);
}
public static void addResearch() {
ResearchItem research;
String text;
// String text2;
public static void addResearch() {
ResearchItem research;
String text;
// String text2;
/** Research that can't be disabled **/
text = "1";
research = new EMTResearchItem("Electric Magic Tools", "EMT", new AspectList(), 0, 0, 0, new ResourceLocation("electromagictools:textures/misc/emt.png")).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
/** Research that can't be disabled **/
text = "1";
research = new EMTResearchItem("Electric Magic Tools", "EMT", new AspectList(), 0, 0, 0, new ResourceLocation("electromagictools:textures/misc/emt.png")).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
text = "1";
research = new EMTResearchItem("Diamond Chainsaw", "EMT", new AspectList(), 5, -6, 0, new ItemStack(IC2ModuleItemRegistry.diamondChainsaw)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.diamondChainsaw));
text = "1";
research = new EMTResearchItem("Diamond Chainsaw", "EMT", new AspectList(), 5, -6, 0, new ItemStack(IC2ModuleItemRegistry.diamondChainsaw)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.diamondChainsaw));
text = "1";
research = new EMTResearchItem("Thaumium Plate", "EMT", new AspectList(), 6, -6, 0, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumPlate));
text = "1";
research = new EMTResearchItem("Thaumium Plate", "EMT", new AspectList(), 6, -6, 0, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumPlate));
text = "1";
research = new EMTResearchItem("Macerating Native Ore Clusters", "EMT", new AspectList(), 5, -7, 0, IC2Items.getItem("smallGoldDust")).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
text = "1";
research = new EMTResearchItem("Macerating Native Ore Clusters", "EMT", new AspectList(), 5, -7, 0, IC2Items.getItem("smallGoldDust")).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
text = "1";
research = new EMTResearchItem("The Legend", "EMT", new AspectList(), 5, -5, 0, new ItemStack(IC2ModuleItemRegistry.taintedThorHammer)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
text = "1";
research = new EMTResearchItem("The Legend", "EMT", new AspectList(), 5, -5, 0, new ItemStack(IC2ModuleItemRegistry.taintedThorHammer)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
text = "1";
research = new EMTResearchItem("Lightning Summoner", "EMT", new AspectList(), 6, -5, 0, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
text = "1";
research = new EMTResearchItem("Lightning Summoner", "EMT", new AspectList(), 6, -5, 0, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
text = "1";
research = new EMTResearchItem("The One Ring", "EMT", new AspectList(), 6, -7, 0, new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 2)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
text = "1";
research = new EMTResearchItem("The One Ring", "EMT", new AspectList(), 6, -7, 0, new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 2)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text));
text = "1";
research = new EMTResearchItem("Feather Wings", "EMT", new AspectList(), 0, 2, 0, new ItemStack(IC2ModuleItemRegistry.featherWing)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.rubberBall), new ResearchPage(EMTInitRecipes.ductTape), new ResearchPage(EMTInitRecipes.featherMesh), new ResearchPage(EMTInitRecipes.cardboard), new ResearchPage(EMTInitRecipes.featherWing), new ResearchPage(EMTInitRecipes.featherWings));
text = "1";
research = new EMTResearchItem("Feather Wings", "EMT", new AspectList(), 0, 2, 0, new ItemStack(IC2ModuleItemRegistry.featherWing)).setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.rubberBall), new ResearchPage(EMTInitRecipes.ductTape), new ResearchPage(EMTInitRecipes.featherMesh), new ResearchPage(EMTInitRecipes.cardboard), new ResearchPage(EMTInitRecipes.featherWing), new ResearchPage(EMTInitRecipes.featherWings));
/** Research that can be disabled **/
if (Config.thaumiumDrillResearch == false) {
text = "1";
research = new EMTResearchItem("Thaumium Drill", "EMT", ResearchAspects.thaumiumDrillResearch, -1, -2, 1, new ItemStack(IC2ModuleItemRegistry.thaumiumDrill)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumDrill));
}
/** Research that can be disabled **/
if (ConfigHandler.thaumiumDrillResearch == false) {
text = "1";
research = new EMTResearchItem("Thaumium Drill", "EMT", ResearchAspects.thaumiumDrillResearch, -1, -2, 1, new ItemStack(IC2ModuleItemRegistry.thaumiumDrill)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumDrill));
}
if (Config.thaumiumChainsawResearch == false) {
text = "1";
research = new EMTResearchItem("Thaumium Chainsaw", "EMT", ResearchAspects.thaumiumChainsawResearch, -2, -2, 1, new ItemStack(IC2ModuleItemRegistry.thaumiumChainsaw)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumChainsaw));
}
if (ConfigHandler.thaumiumChainsawResearch == false) {
text = "1";
research = new EMTResearchItem("Thaumium Chainsaw", "EMT", ResearchAspects.thaumiumChainsawResearch, -2, -2, 1, new ItemStack(IC2ModuleItemRegistry.thaumiumChainsaw)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumChainsaw));
}
if (Config.electricGooglesResearch == false) {
text = "1";
research = new EMTResearchItem("Electric Goggles", "EMT", ResearchAspects.electricGogglesResearch, 1, -2, 1, new ItemStack(IC2ModuleItemRegistry.electricGoggles)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricGoggles));
}
if (ConfigHandler.electricGooglesResearch == false) {
text = "1";
research = new EMTResearchItem("Electric Goggles", "EMT", ResearchAspects.electricGogglesResearch, 1, -2, 1, new ItemStack(IC2ModuleItemRegistry.electricGoggles)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricGoggles));
}
if (Config.electricGooglesResearch == false) {
if (Config.nanoGooglesResearch == false) {
text = "1";
research = new EMTResearchItem("Nanosuit Goggles of Revealing", "EMT", ResearchAspects.thaumicNanoHelmet, 2, -2, 2, new ItemStack(IC2ModuleItemRegistry.nanoThaumicHelmet)).setParents("Electric Goggles").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumicNanoHelmet));
}
}
if (ConfigHandler.electricGooglesResearch == false) {
if (ConfigHandler.nanoGooglesResearch == false) {
text = "1";
research = new EMTResearchItem("Nanosuit Goggles of Revealing", "EMT", ResearchAspects.thaumicNanoHelmet, 2, -2, 2, new ItemStack(IC2ModuleItemRegistry.nanoThaumicHelmet)).setParents("Electric Goggles").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumicNanoHelmet));
}
}
if (Config.electricGooglesResearch == false) {
if (Config.nanoGooglesResearch == false) {
if (Config.quantumGooglesResearch == false) {
text = "1";
research = new EMTResearchItem("Quantum Goggles of Revealing", "EMT", ResearchAspects.thaumicQuantumHelmet, 3, -2, 3, new ItemStack(IC2ModuleItemRegistry.quantumThaumicHelmet)).setParents("Nanosuit Goggles of Revealing").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumicQuantumHelmet));
}
}
}
if (ConfigHandler.electricGooglesResearch == false) {
if (ConfigHandler.nanoGooglesResearch == false) {
if (ConfigHandler.quantumGooglesResearch == false) {
text = "1";
research = new EMTResearchItem("Quantum Goggles of Revealing", "EMT", ResearchAspects.thaumicQuantumHelmet, 3, -2, 3, new ItemStack(IC2ModuleItemRegistry.quantumThaumicHelmet)).setParents("Nanosuit Goggles of Revealing").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumicQuantumHelmet));
}
}
}
if (Config.ironOmnitoolResearch == false) {
text = "1";
research = new EMTResearchItem("Iron Omnitool", "EMT", new AspectList(), -2, 0, 0, new ItemStack(IC2ModuleItemRegistry.ironOmnitool)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.ironOmnitool));
}
if (ConfigHandler.ironOmnitoolResearch == false) {
text = "1";
research = new EMTResearchItem("Iron Omnitool", "EMT", new AspectList(), -2, 0, 0, new ItemStack(IC2ModuleItemRegistry.ironOmnitool)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.ironOmnitool));
}
if (Config.ironOmnitoolResearch == false) {
if (Config.diamondOmnitoolResearch == false) {
text = "1";
research = new EMTResearchItem("Diamond Omnitool", "EMT", ResearchAspects.diamondOmnitoolResearch, -4, 0, 1, new ItemStack(IC2ModuleItemRegistry.diamondOmnitool)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.diamondOmnitool), new ResearchPage(EMTPostInitRecipes.ironOmnitoolToDiamond));
}
}
if (ConfigHandler.ironOmnitoolResearch == false) {
if (ConfigHandler.diamondOmnitoolResearch == false) {
text = "1";
research = new EMTResearchItem("Diamond Omnitool", "EMT", ResearchAspects.diamondOmnitoolResearch, -4, 0, 1, new ItemStack(IC2ModuleItemRegistry.diamondOmnitool)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.diamondOmnitool), new ResearchPage(EMTPostInitRecipes.ironOmnitoolToDiamond));
}
}
if (Config.thaumiumDrillResearch == false && Config.thaumiumChainsawResearch == false) {
if (Config.thaumiumOmnitoolResearch == false) {
text = "1";
research = new EMTResearchItem("Thaumium Omnitool", "EMT", ResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(IC2ModuleItemRegistry.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumOmnitool), new ResearchPage(EMTPostInitRecipes.diamondOmnitoolToThaumium));
}
}
if (ConfigHandler.thaumiumDrillResearch == false && ConfigHandler.thaumiumChainsawResearch == false) {
if (ConfigHandler.thaumiumOmnitoolResearch == false) {
text = "1";
research = new EMTResearchItem("Thaumium Omnitool", "EMT", ResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(IC2ModuleItemRegistry.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumOmnitool), new ResearchPage(EMTPostInitRecipes.diamondOmnitoolToThaumium));
}
}
if (Config.explosionFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Explosion Focus", "EMT", ResearchAspects.laserFocusResearch, 2, 3, 2, new ItemStack(IC2ModuleItemRegistry.explosionFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.explosionFocus));
}
if (ConfigHandler.explosionFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Explosion Focus", "EMT", ResearchAspects.laserFocusResearch, 2, 3, 2, new ItemStack(IC2ModuleItemRegistry.explosionFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.explosionFocus));
}
if (Config.christmasFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Kris-tmas Focus", "EMT", ResearchAspects.christmasFocusResearch, 3, 3, 1, new ItemStack(IC2ModuleItemRegistry.christmasFocus)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.christmasFocus));
}
if (ConfigHandler.christmasFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Kris-tmas Focus", "EMT", ResearchAspects.christmasFocusResearch, 3, 3, 1, new ItemStack(IC2ModuleItemRegistry.christmasFocus)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.christmasFocus));
}
if (Config.shieldFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Shield Focus", "EMT", ResearchAspects.shieldFocusResearch, 4, 3, 2, new ItemStack(IC2ModuleItemRegistry.shieldFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.shieldFocus));
}
if (ConfigHandler.shieldFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Shield Focus", "EMT", ResearchAspects.shieldFocusResearch, 4, 3, 2, new ItemStack(IC2ModuleItemRegistry.shieldFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.shieldFocus));
}
if (Config.shieldFocusResearch == false) {
if (Config.shieldBlockResearch == false) {
text = "1";
research = new EMTResearchItem("Shield Block", "EMT", ResearchAspects.shieldBlockResearch, 4, 5, 1, new ItemStack(IC2ModuleBlockRegistry.shield)).setSecondary().setParents("Shield Focus").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.shieldBlock));
}
}
if (ConfigHandler.shieldFocusResearch == false) {
if (ConfigHandler.shieldBlockResearch == false) {
text = "1";
research = new EMTResearchItem("Shield Block", "EMT", ResearchAspects.shieldBlockResearch, 4, 5, 1, new ItemStack(IC2ModuleBlockRegistry.shield)).setSecondary().setParents("Shield Focus").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.shieldBlock));
}
}
if (Config.potentiaGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Potentia Generator", "EMT", ResearchAspects.potentiaGeneratorResearch, -2, 3, 3, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.potentiaGenerator));
}
if (ConfigHandler.potentiaGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Potentia Generator", "EMT", ResearchAspects.potentiaGeneratorResearch, -2, 3, 3, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.potentiaGenerator));
}
if (Config.potentiaGeneratorResearch == false) {
if (Config.ignisGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Ignis Generator", "EMT", ResearchAspects.ignisGeneratorResearch, -3, 4, 1, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 1)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.ignisGenerator));
}
}
if (ConfigHandler.potentiaGeneratorResearch == false) {
if (ConfigHandler.ignisGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Ignis Generator", "EMT", ResearchAspects.ignisGeneratorResearch, -3, 4, 1, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 1)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.ignisGenerator));
}
}
if (Config.potentiaGeneratorResearch == false) {
if (Config.auramGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Auram Generator", "EMT", ResearchAspects.auramGeneratorResearch, -1, 4, 1, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 2)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.auramGenerator));
}
}
if (ConfigHandler.potentiaGeneratorResearch == false) {
if (ConfigHandler.auramGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Auram Generator", "EMT", ResearchAspects.auramGeneratorResearch, -1, 4, 1, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 2)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.auramGenerator));
}
}
if (Config.potentiaGeneratorResearch == false) {
if (Config.arborGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Arbor Generator", "EMT", ResearchAspects.arborGeneratorResearch, -2, 5, 1, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 3)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.arborGenerator));
}
}
if (ConfigHandler.potentiaGeneratorResearch == false) {
if (ConfigHandler.arborGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Arbor Generator", "EMT", ResearchAspects.arborGeneratorResearch, -2, 5, 1, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 3)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.arborGenerator));
}
}
if (Config.potentiaGeneratorResearch == false) {
if (Config.aerGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Aer Generator", "EMT", ResearchAspects.aerGenerator, -2, 6, 1, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.aerGenerator));
}
}
if (ConfigHandler.potentiaGeneratorResearch == false) {
if (ConfigHandler.aerGeneratorResearch == false) {
text = "1";
research = new EMTResearchItem("Aer Generator", "EMT", ResearchAspects.aerGenerator, -2, 6, 1, new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.aerGenerator));
}
}
if (Config.potentiaGeneratorResearch == false) {
if (Config.wandChargingSationResearch == false) {
text = "1";
research = new EMTResearchItem("Industrial Wand Charging Station", "EMT", ResearchAspects.wandCharger, -4, 2, 3, new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 0)).setParents("Potentia Generator").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.wandRecharger));
}
}
if (ConfigHandler.potentiaGeneratorResearch == false) {
if (ConfigHandler.wandChargingSationResearch == false) {
text = "1";
research = new EMTResearchItem("Industrial Wand Charging Station", "EMT", ResearchAspects.wandCharger, -4, 2, 3, new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 0)).setParents("Potentia Generator").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.wandRecharger));
}
}
if (Config.thaumiumChainsawResearch == false) {
if (Config.streamChainsawResearch == false) {
text = "1";
research = new EMTResearchItem("Chainsaw of the Stream", "EMT", ResearchAspects.streamChainsawResearch, -3, -4, 3, new ItemStack(IC2ModuleItemRegistry.streamChainsaw)).setParents("Thaumium Chainsaw").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.streamChainsaw));
}
}
if (ConfigHandler.thaumiumChainsawResearch == false) {
if (ConfigHandler.streamChainsawResearch == false) {
text = "1";
research = new EMTResearchItem("Chainsaw of the Stream", "EMT", ResearchAspects.streamChainsawResearch, -3, -4, 3, new ItemStack(IC2ModuleItemRegistry.streamChainsaw)).setParents("Thaumium Chainsaw").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.streamChainsaw));
}
}
if (Config.thaumiumDrillResearch == false) {
if (Config.rockbreakerDrillResearch == false) {
text = "1";
research = new EMTResearchItem("Drill of the Rockbreaker", "EMT", ResearchAspects.rockbreakerDrillResearch, 0, -4, 3, new ItemStack(IC2ModuleItemRegistry.rockbreakerDrill)).setParents("Thaumium Drill").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.rockbreakerDrill));
}
}
if (ConfigHandler.thaumiumDrillResearch == false) {
if (ConfigHandler.rockbreakerDrillResearch == false) {
text = "1";
research = new EMTResearchItem("Drill of the Rockbreaker", "EMT", ResearchAspects.rockbreakerDrillResearch, 0, -4, 3, new ItemStack(IC2ModuleItemRegistry.rockbreakerDrill)).setParents("Thaumium Drill").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.rockbreakerDrill));
}
}
if (Config.tinyUraniumResearch == false) {
text = "1";
research = new EMTResearchItem("Tiny Uranium", "EMT", ResearchAspects.tinyUraniumResearch, -5, -5, 1, IC2Items.getItem("Uran238")).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.tinyUranium));
}
if (ConfigHandler.tinyUraniumResearch == false) {
text = "1";
research = new EMTResearchItem("Tiny Uranium", "EMT", ResearchAspects.tinyUraniumResearch, -5, -5, 1, IC2Items.getItem("Uran238")).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.tinyUranium));
}
if (Config.thorHammerResearch == false) {
text = "1";
research = new EMTResearchItem("Mjolnir", "EMT", ResearchAspects.thorHammerResearch, -5, 5, 3, new ItemStack(IC2ModuleItemRegistry.thorHammer)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thorHammer));
}
if (ConfigHandler.thorHammerResearch == false) {
text = "1";
research = new EMTResearchItem("Mjolnir", "EMT", ResearchAspects.thorHammerResearch, -5, 5, 3, new ItemStack(IC2ModuleItemRegistry.thorHammer)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thorHammer));
}
if (Config.thorHammerResearch == false) {
if (Config.superchargedThorHammerResearch == false) {
text = "1";
research = new EMTResearchItem("Supercharged Mjolnir", "EMT", ResearchAspects.superchargedThorHammerResearch, -6, 6, 3, new ItemStack(IC2ModuleItemRegistry.electricThorHammer)).setParents("Mjolnir").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.superchargedThorHammer));
}
}
if (ConfigHandler.thorHammerResearch == false) {
if (ConfigHandler.superchargedThorHammerResearch == false) {
text = "1";
research = new EMTResearchItem("Supercharged Mjolnir", "EMT", ResearchAspects.superchargedThorHammerResearch, -6, 6, 3, new ItemStack(IC2ModuleItemRegistry.electricThorHammer)).setParents("Mjolnir").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.superchargedThorHammer));
}
}
if (Config.compressedSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Compressed Solars", "EMT", ResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(IC2ModuleBlockRegistry.emtSolars)).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.compressedSolar), new ResearchPage(EMTPostInitRecipes.doubleCompressedSolar), new ResearchPage(EMTPostInitRecipes.tripleCompressedSolar));
}
if (ConfigHandler.compressedSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Compressed Solars", "EMT", ResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(IC2ModuleBlockRegistry.emtSolars)).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.compressedSolar), new ResearchPage(EMTPostInitRecipes.doubleCompressedSolar), new ResearchPage(EMTPostInitRecipes.tripleCompressedSolar));
}
if (Config.compressedSolarsResearch == false) {
if (Config.solarHelmetResearch == false) {
text = "1";
research = new EMTResearchItem("Solar Helmet of Revealing", "EMT", ResearchAspects.solarHelmetRevealing, -2, -5, 1, new ItemStack(IC2ModuleItemRegistry.solarHelmetRevealing)).setSecondary().setParents("Compressed Solars").setParentsHidden("Quantum Goggles of Revealing").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.solarHelmetRevealing));
}
}
if (ConfigHandler.compressedSolarsResearch == false) {
if (ConfigHandler.solarHelmetResearch == false) {
text = "1";
research = new EMTResearchItem("Solar Helmet of Revealing", "EMT", ResearchAspects.solarHelmetRevealing, -2, -5, 1, new ItemStack(IC2ModuleItemRegistry.solarHelmetRevealing)).setSecondary().setParents("Compressed Solars").setParentsHidden("Quantum Goggles of Revealing").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.solarHelmetRevealing));
}
}
if (Config.electricBootsResearch == false) {
text = "1";
research = new EMTResearchItem("Electric Boots of the Traveller", "EMT", ResearchAspects.electricBootsTravel, 2, 0, 1, new ItemStack(IC2ModuleItemRegistry.electricBootsTraveller)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricBootsTravel));
}
if (ConfigHandler.electricBootsResearch == false) {
text = "1";
research = new EMTResearchItem("Electric Boots of the Traveller", "EMT", ResearchAspects.electricBootsTravel, 2, 0, 1, new ItemStack(IC2ModuleItemRegistry.electricBootsTraveller)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricBootsTravel));
}
if (Config.electricBootsResearch == false) {
if (Config.nanoBootsResearch == false) {
text = "1";
research = new EMTResearchItem("Nano Boots of the Traveller", "EMT", ResearchAspects.nanoBootsTravel, 4, 0, 2, new ItemStack(IC2ModuleItemRegistry.nanoBootsTraveller)).setParents("Electric Boots of the Traveller").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.nanoBootsTravel));
}
}
if (ConfigHandler.electricBootsResearch == false) {
if (ConfigHandler.nanoBootsResearch == false) {
text = "1";
research = new EMTResearchItem("Nano Boots of the Traveller", "EMT", ResearchAspects.nanoBootsTravel, 4, 0, 2, new ItemStack(IC2ModuleItemRegistry.nanoBootsTraveller)).setParents("Electric Boots of the Traveller").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.nanoBootsTravel));
}
}
if (Config.electricBootsResearch == false) {
if (Config.nanoBootsResearch == false) {
if (Config.quantumBootsResearch == false) {
text = "1";
research = new EMTResearchItem("Quantum Boots of the Traveller", "EMT", ResearchAspects.quantumBootsTravel, 6, 0, 3, new ItemStack(IC2ModuleItemRegistry.quantumBootsTraveller)).setParents("Nano Boots of the Traveller").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.quantumBootsTravel));
}
}
}
if (ConfigHandler.electricBootsResearch == false) {
if (ConfigHandler.nanoBootsResearch == false) {
if (ConfigHandler.quantumBootsResearch == false) {
text = "1";
research = new EMTResearchItem("Quantum Boots of the Traveller", "EMT", ResearchAspects.quantumBootsTravel, 6, 0, 3, new ItemStack(IC2ModuleItemRegistry.quantumBootsTraveller)).setParents("Nano Boots of the Traveller").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.quantumBootsTravel));
}
}
}
if (Config.electricScribingToolsResearch == false) {
text = "1";
research = new EMTResearchItem("Electric Scribing Tools", "EMT", ResearchAspects.electricScribingTools, -6, -5, 1, new ItemStack(IC2ModuleItemRegistry.electricScribingTools)).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricScribingTools));
}
if (ConfigHandler.electricScribingToolsResearch == false) {
text = "1";
research = new EMTResearchItem("Electric Scribing Tools", "EMT", ResearchAspects.electricScribingTools, -6, -5, 1, new ItemStack(IC2ModuleItemRegistry.electricScribingTools)).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricScribingTools));
}
if (Config.etherealProcessorResearch == false) {
text = "1";
research = new EMTResearchItem("Etheral Processor", "EMT", ResearchAspects.etherealProcessor, -1, 2, 2, new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 1)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.etheralProcessor));
}
if (ConfigHandler.etherealProcessorResearch == false) {
text = "1";
research = new EMTResearchItem("Etheral Processor", "EMT", ResearchAspects.etherealProcessor, -1, 2, 2, new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 1)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.etheralProcessor));
}
if (Config.compressedSolarsResearch == false) {
if (Config.waterSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Water Infused Solar Panels", "EMT", ResearchAspects.waterSolars, -7, -7, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.waterSolar), new ResearchPage(EMTPostInitRecipes.doubleWaterSolar), new ResearchPage(EMTPostInitRecipes.tripleWaterSolar));
if (ConfigHandler.compressedSolarsResearch == false) {
if (ConfigHandler.waterSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Water Infused Solar Panels", "EMT", ResearchAspects.waterSolars, -7, -7, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.waterSolar), new ResearchPage(EMTPostInitRecipes.doubleWaterSolar), new ResearchPage(EMTPostInitRecipes.tripleWaterSolar));
}
}
}
}
if (ConfigHandler.compressedSolarsResearch == false) {
if (ConfigHandler.darkSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Entropy Infused Solar Panels", "EMT", ResearchAspects.darkSolars, -8, -6, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.darkSolar), new ResearchPage(EMTPostInitRecipes.doubleDarkSolar), new ResearchPage(EMTPostInitRecipes.tripleDarkSolar));
}
}
if (Config.compressedSolarsResearch == false) {
if (Config.darkSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Entropy Infused Solar Panels", "EMT", ResearchAspects.darkSolars, -8, -6, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.darkSolar), new ResearchPage(EMTPostInitRecipes.doubleDarkSolar), new ResearchPage(EMTPostInitRecipes.tripleDarkSolar));
}
}
if (ConfigHandler.compressedSolarsResearch == false) {
if (ConfigHandler.orderSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Order Infused Solar Panels", "EMT", ResearchAspects.orderSolars, -6, -8, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.orderSolar), new ResearchPage(EMTPostInitRecipes.doubleOrderSolar), new ResearchPage(EMTPostInitRecipes.tripleOrderSolar));
}
}
if (Config.compressedSolarsResearch == false) {
if (Config.orderSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Order Infused Solar Panels", "EMT", ResearchAspects.orderSolars, -6, -8, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.orderSolar), new ResearchPage(EMTPostInitRecipes.doubleOrderSolar), new ResearchPage(EMTPostInitRecipes.tripleOrderSolar));
}
}
if (ConfigHandler.compressedSolarsResearch == false) {
if (ConfigHandler.fireSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Fire Infused Solar Panels", "EMT", ResearchAspects.fireSolars, -5, -7, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.fireSolar), new ResearchPage(EMTPostInitRecipes.doubleFireSolar), new ResearchPage(EMTPostInitRecipes.tripleFireSolar));
}
}
if (Config.compressedSolarsResearch == false) {
if (Config.fireSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Fire Infused Solar Panels", "EMT", ResearchAspects.fireSolars, -5, -7, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.fireSolar), new ResearchPage(EMTPostInitRecipes.doubleFireSolar), new ResearchPage(EMTPostInitRecipes.tripleFireSolar));
}
}
if (ConfigHandler.compressedSolarsResearch == false) {
if (ConfigHandler.airSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Air Infused Solar Panels", "EMT", ResearchAspects.airSolars, -4, -6, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 15)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.airSolar), new ResearchPage(EMTPostInitRecipes.doubleAirSolar), new ResearchPage(EMTPostInitRecipes.tripleAirSolar));
}
}
if (Config.compressedSolarsResearch == false) {
if (Config.airSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Air Infused Solar Panels", "EMT", ResearchAspects.airSolars, -4, -6, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 15)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.airSolar), new ResearchPage(EMTPostInitRecipes.doubleAirSolar), new ResearchPage(EMTPostInitRecipes.tripleAirSolar));
}
}
if (ConfigHandler.compressedSolarsResearch == false) {
if (ConfigHandler.earthSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Earth Infused Solar Panels", "EMT", ResearchAspects.earthSolars, -6, -7, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.earthSolar), new ResearchPage(EMTPostInitRecipes.doubleEarthSolar), new ResearchPage(EMTPostInitRecipes.tripleEarthSolar));
}
}
if (Config.compressedSolarsResearch == false) {
if (Config.earthSolarsResearch == false) {
text = "1";
research = new EMTResearchItem("Earth Infused Solar Panels", "EMT", ResearchAspects.earthSolars, -6, -7, 1, new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.earthSolar), new ResearchPage(EMTPostInitRecipes.doubleEarthSolar), new ResearchPage(EMTPostInitRecipes.tripleEarthSolar));
}
}
if (ConfigHandler.uuMInfusionResearch == false) {
text = "1";
research = new EMTResearchItem("UU-Matter Infusion", "EMT", ResearchAspects.uuMInfusion, 5, 5, 3, IC2Items.getItem("UuMatterCell")).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(UuMInfusionRecipes.charcoalToCoal), new ResearchPage(UuMInfusionRecipes.glowstoneDustToBlock), new ResearchPage(UuMInfusionRecipes.stoneBricksToIronOre), new ResearchPage(UuMInfusionRecipes.arcaneStoneToCopperOre), new ResearchPage(UuMInfusionRecipes.arcaneStoneBricksToTinOre), new ResearchPage(UuMInfusionRecipes.amberBlockToLeadOre), new ResearchPage(UuMInfusionRecipes.amberBricksToUraniumOre), new ResearchPage(UuMInfusionRecipes.shardToResin), new ResearchPage(UuMInfusionRecipes.shardToRedstone), new ResearchPage(UuMInfusionRecipes.shardToLapis), new ResearchPage(UuMInfusionRecipes.ironToGold), new ResearchPage(UuMInfusionRecipes.goldToDiamond), new ResearchPage(UuMInfusionRecipes.diamondToUranium), new ResearchPage(UuMInfusionRecipes.uraniumToIridium));
}
if (Config.uuMInfusionResearch == false) {
text = "1";
research = new EMTResearchItem("UU-Matter Infusion", "EMT", ResearchAspects.uuMInfusion, 5, 5, 3, IC2Items.getItem("UuMatterCell")).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(UuMInfusionRecipes.charcoalToCoal), new ResearchPage(UuMInfusionRecipes.glowstoneDustToBlock), new ResearchPage(UuMInfusionRecipes.stoneBricksToIronOre), new ResearchPage(UuMInfusionRecipes.arcaneStoneToCopperOre), new ResearchPage(UuMInfusionRecipes.arcaneStoneBricksToTinOre), new ResearchPage(UuMInfusionRecipes.amberBlockToLeadOre), new ResearchPage(UuMInfusionRecipes.amberBricksToUraniumOre), new ResearchPage(UuMInfusionRecipes.shardToResin), new ResearchPage(UuMInfusionRecipes.shardToRedstone), new ResearchPage(UuMInfusionRecipes.shardToLapis), new ResearchPage(UuMInfusionRecipes.ironToGold), new ResearchPage(UuMInfusionRecipes.goldToDiamond), new ResearchPage(UuMInfusionRecipes.diamondToUranium), new ResearchPage(
UuMInfusionRecipes.uraniumToIridium));
}
if (ConfigHandler.portableNodeResarch == false) {
text = "1";
research = new EMTResearchItem("Portable Node", "EMT", ResearchAspects.portableNode, 2, 5, 3, new ItemStack(IC2ModuleBlockRegistry.portableNode)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.portableNode));
}
if (Config.portableNodeResarch == false) {
text = "1";
research = new EMTResearchItem("Portable Node", "EMT", ResearchAspects.portableNode, 2, 5, 3, new ItemStack(IC2ModuleBlockRegistry.portableNode)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.portableNode));
}
if (ConfigHandler.electricHoeGrowthResearch == false) {
text = "1";
research = new EMTResearchItem("Electric Hoe of Growth", "EMT", ResearchAspects.electricHoeGrowth, -1, -4, 2, new ItemStack(IC2ModuleItemRegistry.electricHoeGrowth)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricHoeGrowth));
}
if (Config.electricHoeGrowthResearch == false) {
text = "1";
research = new EMTResearchItem("Electric Hoe of Growth", "EMT", ResearchAspects.electricHoeGrowth, -1, -4, 2, new ItemStack(IC2ModuleItemRegistry.electricHoeGrowth)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricHoeGrowth));
}
if (ConfigHandler.chargeFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Wand Focus: Charging", "EMT", ResearchAspects.chargeFocus, 5, 3, 2, new ItemStack(IC2ModuleItemRegistry.chargeFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.chargeFocus));
}
if (Config.chargeFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Wand Focus: Charging", "EMT", ResearchAspects.chargeFocus, 5, 3, 2, new ItemStack(IC2ModuleItemRegistry.chargeFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.chargeFocus));
}
if (ConfigHandler.wandChargeFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Wand Focus: Wand Charging", "EMT", ResearchAspects.wandChargeFocus, 7, 3, 3, new ItemStack(IC2ModuleItemRegistry.wandChargeFocus)).setParents("Wand Focus: Charging").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.wandChargeFocus));
}
if (Config.wandChargeFocusResearch == false) {
text = "1";
research = new EMTResearchItem("Wand Focus: Wand Charging", "EMT", ResearchAspects.wandChargeFocus, 7, 3, 3, new ItemStack(IC2ModuleItemRegistry.wandChargeFocus)).setParents("Wand Focus: Charging").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.wandChargeFocus));
}
if (ConfigHandler.inventoryChargingRing == false) {
text = "1";
research = new EMTResearchItem("Inventory Charging Ring", "EMT", ResearchAspects.inventoryChargingRing, 0, -5, 3, new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 1)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.inventoryChargingRing));
}
if (Config.inventoryChargingRing == false) {
text = "1";
research = new EMTResearchItem("Inventory Charging Ring", "EMT", ResearchAspects.inventoryChargingRing, 0, -5, 3, new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 1)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.inventoryChargingRing));
}
if (ConfigHandler.armorChargingRing == false) {
text = "1";
research = new EMTResearchItem("Armor Charging Ring", "EMT", ResearchAspects.armorChargingRing, 0, -7, 3, new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 0)).setSecondary().setParents("Inventory Charging Ring").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.armorChargingRing));
}
if (Config.armorChargingRing == false) {
text = "1";
research = new EMTResearchItem("Armor Charging Ring", "EMT", ResearchAspects.armorChargingRing, 0, -7, 3, new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 0)).setSecondary().setParents("Inventory Charging Ring").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.armorChargingRing));
}
if (ConfigHandler.thaumiumWingResearch == false) {
text = "1";
research = new EMTResearchItem("Thaumium Reinforced Wings", "EMT", ResearchAspects.thaumiumWing, 0, 4, 0, new ItemStack(IC2ModuleItemRegistry.thaumiumWing)).setSecondary().setParents("Feather Wings").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumWing), new ResearchPage(EMTPostInitRecipes.thaumiumWings));
}
if (Config.thaumiumWingResearch == false) {
text = "1";
research = new EMTResearchItem("Thaumium Reinforced Wings", "EMT", ResearchAspects.thaumiumWing, 0, 4, 0, new ItemStack(IC2ModuleItemRegistry.thaumiumWing)).setSecondary().setParents("Feather Wings").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumWing), new ResearchPage(EMTPostInitRecipes.thaumiumWings));
}
if (ConfigHandler.nanoWingResearch == false) {
text = "1";
research = new EMTResearchItem("Nanosuit Wings", "EMT", ResearchAspects.nanoWing, 0, 6, 2, new ItemStack(IC2ModuleItemRegistry.nanoWing)).setParents("Thaumium Reinforced Wings").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.nanoWings));
}
if (Config.nanoWingResearch == false) {
text = "1";
research = new EMTResearchItem("Nanosuit Wings", "EMT", ResearchAspects.nanoWing, 0, 6, 2, new ItemStack(IC2ModuleItemRegistry.nanoWing)).setParents("Thaumium Reinforced Wings").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.nanoWings));
}
if (Config.quantumWingsResearch == false) {
text = "1";
research = new EMTResearchItem("Quantum Wings", "EMT", ResearchAspects.quantumWing, 0, 8, 3, new ItemStack(IC2ModuleItemRegistry.quantumWing)).setParents("Nanosuit Wings").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.quantumWings));
}
}
if (ConfigHandler.quantumWingsResearch == false) {
text = "1";
research = new EMTResearchItem("Quantum Wings", "EMT", ResearchAspects.quantumWing, 0, 8, 3, new ItemStack(IC2ModuleItemRegistry.quantumWing)).setParents("Nanosuit Wings").setConcealed().registerResearchItem();
research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.quantumWings));
}
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -40,37 +41,37 @@ import tombenpotter.emt.common.module.ic2.tile.solars.water.TileEntityWaterSolar
public class IC2ModuleTERegistry {
public static void registerTEs() {
public static void registerTEs() {
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(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge");
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");
GameRegistry.registerTileEntity(TileEntityDarkSolar.class, "tileentitydarksolar");
GameRegistry.registerTileEntity(TileEntityDoubleDarkSolar.class, "tileentitydoubledarksolar");
GameRegistry.registerTileEntity(TileEntityTripleDarkSolar.class, "tileentitytripledarksolar");
GameRegistry.registerTileEntity(TileEntityOrderSolar.class, "tileentityordersolar");
GameRegistry.registerTileEntity(TileEntityDoubleOrderSolar.class, "tileentitydoubleordersolar");
GameRegistry.registerTileEntity(TileEntityTripleOrderSolar.class, "tileentitytripleordersolar");
GameRegistry.registerTileEntity(TileEntityFireSolar.class, "tileentityfiresolar");
GameRegistry.registerTileEntity(TileEntityDoubleFireSolar.class, "tileentitydoublefiresolar");
GameRegistry.registerTileEntity(TileEntityTripleFireSolar.class, "tileentitytriplefiresolar");
GameRegistry.registerTileEntity(TileEntityAirSolar.class, "tileentityairsolar");
GameRegistry.registerTileEntity(TileEntityDoubleAirSolar.class, "tileentitydoubleairsolar");
GameRegistry.registerTileEntity(TileEntityTripleAirSolar.class, "tileentitytripleairsolar");
GameRegistry.registerTileEntity(TileEntityEarthSolar.class, "tileentityearthsolar");
GameRegistry.registerTileEntity(TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar");
GameRegistry.registerTileEntity(TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar");
GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode");
GameRegistry.registerTileEntity(TileEntityEssentiaGenerator.class, "tileentityessentiagenerator");
}
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(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge");
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");
GameRegistry.registerTileEntity(TileEntityDarkSolar.class, "tileentitydarksolar");
GameRegistry.registerTileEntity(TileEntityDoubleDarkSolar.class, "tileentitydoubledarksolar");
GameRegistry.registerTileEntity(TileEntityTripleDarkSolar.class, "tileentitytripledarksolar");
GameRegistry.registerTileEntity(TileEntityOrderSolar.class, "tileentityordersolar");
GameRegistry.registerTileEntity(TileEntityDoubleOrderSolar.class, "tileentitydoubleordersolar");
GameRegistry.registerTileEntity(TileEntityTripleOrderSolar.class, "tileentitytripleordersolar");
GameRegistry.registerTileEntity(TileEntityFireSolar.class, "tileentityfiresolar");
GameRegistry.registerTileEntity(TileEntityDoubleFireSolar.class, "tileentitydoublefiresolar");
GameRegistry.registerTileEntity(TileEntityTripleFireSolar.class, "tileentitytriplefiresolar");
GameRegistry.registerTileEntity(TileEntityAirSolar.class, "tileentityairsolar");
GameRegistry.registerTileEntity(TileEntityDoubleAirSolar.class, "tileentitydoubleairsolar");
GameRegistry.registerTileEntity(TileEntityTripleAirSolar.class, "tileentitytripleairsolar");
GameRegistry.registerTileEntity(TileEntityEarthSolar.class, "tileentityearthsolar");
GameRegistry.registerTileEntity(TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar");
GameRegistry.registerTileEntity(TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar");
GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode");
GameRegistry.registerTileEntity(TileEntityEssentiaGenerator.class, "tileentityessentiagenerator");
}
}
@@ -2,7 +2,6 @@ package tombenpotter.emt.common.module.ic2.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEMT;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
@@ -12,70 +11,75 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEMT;
public abstract class BlockEMT extends BlockContainer {
public IIcon[] top = new IIcon[16];
public IIcon[] bottom = new IIcon[16];
public IIcon[] side = new IIcon[16];
public IIcon[] frontOff = new IIcon[16];
public IIcon[] frontOn = new IIcon[16];
public IIcon[] top = new IIcon[16];
public IIcon[] bottom = new IIcon[16];
public IIcon[] side = new IIcon[16];
public IIcon[] frontOff = new IIcon[16];
public IIcon[] frontOn = new IIcon[16];
protected BlockEMT(Material material) {
super(material);
}
protected BlockEMT(Material material) {
super(material);
}
@Override
public TileEntity createNewTileEntity(World var1, int var2) {
return null;
}
@Override
public TileEntity createNewTileEntity(World var1, int var2) {
return null;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) {
TileEntityEMT tile = (TileEntityEMT) access.getTileEntity(x, y, z);
int i = access.getBlockMetadata(x, y, z);
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) {
TileEntityEMT tile = (TileEntityEMT) access.getTileEntity(x, y, z);
int i = access.getBlockMetadata(x, y, z);
if (side == 0) {
return this.bottom[i];
} else if (side == 1) {
return this.top[i];
} else if (side != tile.facing) {
return this.side[i];
} else if (tile.isOn) {
return this.frontOn[i];
} else {
return this.frontOff[i];
}
}
if (side == 0) {
return this.bottom[i];
} else if (side == 1) {
return this.top[i];
} else if (side != tile.facing) {
return this.side[i];
} else if (tile.isOn) {
return this.frontOn[i];
} else {
return this.frontOff[i];
}
}
@Override
public IIcon getIcon(int side, int meta) {
if (side < 1) {
return this.bottom[meta];
}
if (side == 1) {
return this.top[meta];
}
if (side == 3) {
return this.frontOff[meta];
}
return this.side[meta];
}
@Override
public IIcon getIcon(int side, int meta) {
if (side < 1) {
return this.bottom[meta];
}
if (side == 1) {
return this.top[meta];
}
if (side == 3) {
return this.frontOff[meta];
}
return this.side[meta];
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) {
int facing = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
TileEntityEMT tile = (TileEntityEMT) world.getTileEntity(x, y, z);
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) {
int facing = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
TileEntityEMT tile = (TileEntityEMT) world.getTileEntity(x, y, z);
if (facing == 0) tile.facing = 2;
else if (facing == 1) tile.facing = 5;
else if (facing == 2) tile.facing = 3;
else if (facing == 3) tile.facing = 4;
}
if (facing == 0)
tile.facing = 2;
else if (facing == 1)
tile.facing = 5;
else if (facing == 2)
tile.facing = 3;
else if (facing == 3)
tile.facing = 4;
}
@Override
public int damageDropped(int meta) {
return meta;
}
@Override
public int damageDropped(int meta) {
return meta;
}
}
@@ -9,14 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEtherealMacerator;
import tombenpotter.emt.common.module.ic2.tile.TileEntityIndustrialWandRecharge;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -29,104 +26,109 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEtherealMacerator;
import tombenpotter.emt.common.module.ic2.tile.TileEntityIndustrialWandRecharge;
import tombenpotter.emt.common.util.CreativeTabEMT;
import java.util.List;
import java.util.Random;
public class BlockEMTMachines extends BlockEMT {
public BlockEMTMachines() {
super(Material.iron);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setHardness(4.0F);
}
public BlockEMTMachines() {
super(Material.iron);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setHardness(4.0F);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ir) {
this.blockIcon = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/top");
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ir) {
this.blockIcon = ir.registerIcon(ModInformation.texturePath + ":machines/top");
this.top[0] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/top");
this.top[1] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/etherealmaceratortop");
this.top[0] = ir.registerIcon(ModInformation.texturePath + ":machines/top");
this.top[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmaceratortop");
this.bottom[0] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/side");
this.bottom[1] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/etherealmacerator");
this.bottom[0] = ir.registerIcon(ModInformation.texturePath + ":machines/side");
this.bottom[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmacerator");
this.side[0] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/side");
this.side[1] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/etherealmacerator");
this.side[0] = ir.registerIcon(ModInformation.texturePath + ":machines/side");
this.side[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmacerator");
this.frontOff[0] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/wandcharger");
this.frontOff[1] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/etherealmaceratorfront");
this.frontOff[0] = ir.registerIcon(ModInformation.texturePath + ":machines/wandcharger");
this.frontOff[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmaceratorfront");
this.frontOn[0] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/wandcharger");
this.frontOn[1] = ir.registerIcon(ElectroMagicTools.texturePath + ":machines/etherealmaceratorfrontactive");
}
this.frontOn[0] = ir.registerIcon(ModInformation.texturePath + ":machines/wandcharger");
this.frontOn[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmaceratorfrontactive");
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
list.add(new ItemStack(id, 1, 0));
list.add(new ItemStack(id, 1, 1));
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
list.add(new ItemStack(id, 1, 0));
list.add(new ItemStack(id, 1, 1));
}
@Override
public TileEntity createTileEntity(World world, int meta) {
if (meta == 0) {
return new TileEntityIndustrialWandRecharge();
}
if (meta == 1) {
return new TileEntityEtherealMacerator();
}
return super.createTileEntity(world, meta);
}
@Override
public TileEntity createTileEntity(World world, int meta) {
if (meta == 0) {
return new TileEntityIndustrialWandRecharge();
}
if (meta == 1) {
return new TileEntityEtherealMacerator();
}
return super.createTileEntity(world, meta);
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityIndustrialWandRecharge) {
player.openGui(ElectroMagicTools.instance, 0, world, x, y, z);
} else if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityEtherealMacerator) {
player.openGui(ElectroMagicTools.instance, 1, world, x, y, z);
}
return true;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityIndustrialWandRecharge) {
player.openGui(ElectroMagicTools.instance, 0, world, x, y, z);
} else if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityEtherealMacerator) {
player.openGui(ElectroMagicTools.instance, 1, world, x, y, z);
}
return true;
}
@Override
public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
dropItems(world, x, y, z);
world.removeTileEntity(x, y, z);
super.breakBlock(world, x, y, z, par5, par6);
}
@Override
public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
dropItems(world, x, y, z);
world.removeTileEntity(x, y, z);
super.breakBlock(world, x, y, z, par5, par6);
}
private void dropItems(World world, int x, int y, int z) {
Random rand = new Random();
private void dropItems(World world, int x, int y, int z) {
Random rand = new Random();
TileEntity tileEntity = world.getTileEntity(x, y, z);
if (!(tileEntity instanceof IInventory)) {
return;
}
IInventory inventory = (IInventory) tileEntity;
TileEntity tileEntity = world.getTileEntity(x, y, z);
if (!(tileEntity instanceof IInventory)) {
return;
}
IInventory inventory = (IInventory) tileEntity;
for (int i = 0; i < inventory.getSizeInventory(); i++) {
ItemStack item = inventory.getStackInSlot(i);
for (int i = 0; i < inventory.getSizeInventory(); i++) {
ItemStack item = inventory.getStackInSlot(i);
if (item != null && item.stackSize > 0) {
float rx = rand.nextFloat() * 0.8F + 0.1F;
float ry = rand.nextFloat() * 0.8F + 0.1F;
float rz = rand.nextFloat() * 0.8F + 0.1F;
if (item != null && item.stackSize > 0) {
float rx = rand.nextFloat() * 0.8F + 0.1F;
float ry = rand.nextFloat() * 0.8F + 0.1F;
float rz = rand.nextFloat() * 0.8F + 0.1F;
EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
if (item.hasTagCompound()) {
entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy());
}
if (item.hasTagCompound()) {
entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy());
}
float factor = 0.05F;
entityItem.motionX = rand.nextGaussian() * factor;
entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
entityItem.motionZ = rand.nextGaussian() * factor;
world.spawnEntityInWorld(entityItem);
item.stackSize = 0;
}
}
}
float factor = 0.05F;
entityItem.motionX = rand.nextGaussian() * factor;
entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
entityItem.motionZ = rand.nextGaussian() * factor;
world.spawnEntityInWorld(entityItem);
item.stackSize = 0;
}
}
}
}
@@ -9,10 +9,21 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.ic2.tile.solars.air.TileEntityAirSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.compressed.TileEntityCompressedSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.compressed.TileEntityDoubleCompressedSolar;
@@ -29,163 +40,153 @@ import tombenpotter.emt.common.module.ic2.tile.solars.order.TileEntityTripleOrde
import tombenpotter.emt.common.module.ic2.tile.solars.water.TileEntityDoubleWaterSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.water.TileEntityTripleWaterSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.water.TileEntityWaterSolar;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ElectroMagicTools;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import java.util.List;
public class BlockEMTSolars extends BlockEMT {
public BlockEMTSolars() {
super(Material.iron);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setHardness(4.0F);
}
public BlockEMTSolars() {
super(Material.iron);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setHardness(4.0F);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ri) {
this.top[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/solartop");
this.top[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/doublesolartop");
this.top[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/triplesolartop");
this.top[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/solartop");
this.top[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/doublesolartop");
this.top[5] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/triplesolartop");
this.top[6] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/solartop");
this.top[7] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/doublesolartop");
this.top[8] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/triplesolartop");
this.top[9] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/solartop");
this.top[10] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/doublesolartop");
this.top[11] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/triplesolartop");
this.top[12] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/solartop");
this.top[13] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/doublesolartop");
this.top[14] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/triplesolartop");
this.top[15] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/solartop");
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ri) {
this.top[0] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop");
this.top[1] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop");
this.top[2] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop");
this.top[3] = ri.registerIcon(ModInformation.texturePath + ":solars/water/solartop");
this.top[4] = ri.registerIcon(ModInformation.texturePath + ":solars/water/doublesolartop");
this.top[5] = ri.registerIcon(ModInformation.texturePath + ":solars/water/triplesolartop");
this.top[6] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/solartop");
this.top[7] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/doublesolartop");
this.top[8] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/triplesolartop");
this.top[9] = ri.registerIcon(ModInformation.texturePath + ":solars/order/solartop");
this.top[10] = ri.registerIcon(ModInformation.texturePath + ":solars/order/doublesolartop");
this.top[11] = ri.registerIcon(ModInformation.texturePath + ":solars/order/triplesolartop");
this.top[12] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/solartop");
this.top[13] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/doublesolartop");
this.top[14] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/triplesolartop");
this.top[15] = ri.registerIcon(ModInformation.texturePath + ":solars/air/solartop");
this.bottom[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/bottom");
this.bottom[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/bottom");
this.bottom[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/bottom");
this.bottom[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/waterbottom");
this.bottom[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/waterbottom");
this.bottom[5] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/waterbottom");
this.bottom[6] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/darkbottom");
this.bottom[7] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/darkbottom");
this.bottom[8] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/darkbottom");
this.bottom[9] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/orderbottom");
this.bottom[10] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/orderbottom");
this.bottom[11] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/orderbottom");
this.bottom[12] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/firebottom");
this.bottom[13] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/firebottom");
this.bottom[14] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/firebottom");
this.bottom[15] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/airbottom");
this.bottom[0] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom");
this.bottom[1] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom");
this.bottom[2] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom");
this.bottom[3] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterbottom");
this.bottom[4] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterbottom");
this.bottom[5] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterbottom");
this.bottom[6] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkbottom");
this.bottom[7] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkbottom");
this.bottom[8] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkbottom");
this.bottom[9] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderbottom");
this.bottom[10] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderbottom");
this.bottom[11] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderbottom");
this.bottom[12] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/firebottom");
this.bottom[13] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/firebottom");
this.bottom[14] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/firebottom");
this.bottom[15] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airbottom");
this.frontOff[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/side");
this.frontOff[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/side");
this.frontOff[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/side");
this.frontOff[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/waterside");
this.frontOff[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/waterside");
this.frontOff[5] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/waterside");
this.frontOff[6] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/darkside");
this.frontOff[7] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/darkside");
this.frontOff[8] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/darkside");
this.frontOff[9] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/orderside");
this.frontOff[10] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/orderside");
this.frontOff[11] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/orderside");
this.frontOff[12] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/fireside");
this.frontOff[13] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/fireside");
this.frontOff[14] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/fireside");
this.frontOff[15] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/airside");
this.frontOff[0] = ri.registerIcon(ModInformation.texturePath + ":solars/side");
this.frontOff[1] = ri.registerIcon(ModInformation.texturePath + ":solars/side");
this.frontOff[2] = ri.registerIcon(ModInformation.texturePath + ":solars/side");
this.frontOff[3] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside");
this.frontOff[4] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside");
this.frontOff[5] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside");
this.frontOff[6] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside");
this.frontOff[7] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside");
this.frontOff[8] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside");
this.frontOff[9] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside");
this.frontOff[10] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside");
this.frontOff[11] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside");
this.frontOff[12] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside");
this.frontOff[13] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside");
this.frontOff[14] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside");
this.frontOff[15] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside");
this.side[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/side");
this.side[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/side");
this.side[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/side");
this.side[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/waterside");
this.side[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/waterside");
this.side[5] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/water/waterside");
this.side[6] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/darkside");
this.side[7] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/darkside");
this.side[8] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/dark/darkside");
this.side[9] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/orderside");
this.side[10] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/orderside");
this.side[11] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/order/orderside");
this.side[12] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/fireside");
this.side[13] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/fireside");
this.side[14] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/fire/fireside");
this.side[15] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/airside");
}
this.side[0] = ri.registerIcon(ModInformation.texturePath + ":solars/side");
this.side[1] = ri.registerIcon(ModInformation.texturePath + ":solars/side");
this.side[2] = ri.registerIcon(ModInformation.texturePath + ":solars/side");
this.side[3] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside");
this.side[4] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside");
this.side[5] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside");
this.side[6] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside");
this.side[7] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside");
this.side[8] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside");
this.side[9] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside");
this.side[10] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside");
this.side[11] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside");
this.side[12] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside");
this.side[13] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside");
this.side[14] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside");
this.side[15] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside");
}
@SideOnly(Side.CLIENT)
@SuppressWarnings({"unchecked", "rawtypes"})
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
for (int i = 0; i <= 15; i++) {
list.add(new ItemStack(id, 1, i));
}
}
@SideOnly(Side.CLIENT)
@SuppressWarnings({"unchecked", "rawtypes"})
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
for (int i = 0; i <= 15; i++) {
list.add(new ItemStack(id, 1, i));
}
}
@Override
public TileEntity createTileEntity(World world, int meta) {
if (meta == 0) {
return new TileEntityCompressedSolar();
}
if (meta == 1) {
return new TileEntityDoubleCompressedSolar();
}
if (meta == 2) {
return new TileEntityTripleCompressedSolar();
}
if (meta == 3) {
return new TileEntityWaterSolar();
}
if (meta == 4) {
return new TileEntityDoubleWaterSolar();
}
if (meta == 5) {
return new TileEntityTripleWaterSolar();
}
if (meta == 6) {
return new TileEntityDarkSolar();
}
if (meta == 7) {
return new TileEntityDoubleDarkSolar();
}
if (meta == 8) {
return new TileEntityTripleDarkSolar();
}
if (meta == 9) {
return new TileEntityOrderSolar();
}
if (meta == 10) {
return new TileEntityDoubleOrderSolar();
}
if (meta == 11) {
return new TileEntityTripleOrderSolar();
}
if (meta == 12) {
return new TileEntityFireSolar();
}
if (meta == 13) {
return new TileEntityDoubleFireSolar();
}
if (meta == 14) {
return new TileEntityTripleFireSolar();
}
if (meta == 15) {
return new TileEntityAirSolar();
}
return super.createTileEntity(world, meta);
}
@Override
public TileEntity createTileEntity(World world, int meta) {
if (meta == 0) {
return new TileEntityCompressedSolar();
}
if (meta == 1) {
return new TileEntityDoubleCompressedSolar();
}
if (meta == 2) {
return new TileEntityTripleCompressedSolar();
}
if (meta == 3) {
return new TileEntityWaterSolar();
}
if (meta == 4) {
return new TileEntityDoubleWaterSolar();
}
if (meta == 5) {
return new TileEntityTripleWaterSolar();
}
if (meta == 6) {
return new TileEntityDarkSolar();
}
if (meta == 7) {
return new TileEntityDoubleDarkSolar();
}
if (meta == 8) {
return new TileEntityTripleDarkSolar();
}
if (meta == 9) {
return new TileEntityOrderSolar();
}
if (meta == 10) {
return new TileEntityDoubleOrderSolar();
}
if (meta == 11) {
return new TileEntityTripleOrderSolar();
}
if (meta == 12) {
return new TileEntityFireSolar();
}
if (meta == 13) {
return new TileEntityDoubleFireSolar();
}
if (meta == 14) {
return new TileEntityTripleFireSolar();
}
if (meta == 15) {
return new TileEntityAirSolar();
}
return super.createTileEntity(world, meta);
}
@Override
public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
world.removeTileEntity(x, y, z);
super.breakBlock(world, x, y, z, par5, par6);
}
@Override
public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
world.removeTileEntity(x, y, z);
super.breakBlock(world, x, y, z, par5, par6);
}
}
@@ -9,17 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.module.ic2.tile.solars.air.TileEntityDoubleAirSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.air.TileEntityTripleAirSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.earth.TileEntityDoubleEarthSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.earth.TileEntityEarthSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.earth.TileEntityTripleEarthSolar;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ElectroMagicTools;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -28,76 +22,83 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.ic2.tile.solars.air.TileEntityDoubleAirSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.air.TileEntityTripleAirSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.earth.TileEntityDoubleEarthSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.earth.TileEntityEarthSolar;
import tombenpotter.emt.common.module.ic2.tile.solars.earth.TileEntityTripleEarthSolar;
import java.util.List;
public class BlockEMTSolars2 extends BlockEMT {
public BlockEMTSolars2() {
super(Material.iron);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setHardness(4.0F);
}
public BlockEMTSolars2() {
super(Material.iron);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setHardness(4.0F);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ri) {
this.top[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/doublesolartop");
this.top[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/triplesolartop");
this.top[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/solartop");
this.top[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/doublesolartop");
this.top[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/triplesolartop");
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ri) {
this.top[0] = ri.registerIcon(ModInformation.texturePath + ":solars/air/doublesolartop");
this.top[1] = ri.registerIcon(ModInformation.texturePath + ":solars/air/triplesolartop");
this.top[2] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/solartop");
this.top[3] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/doublesolartop");
this.top[4] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/triplesolartop");
this.bottom[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/airbottom");
this.bottom[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/airbottom");
this.bottom[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/earthbottom");
this.bottom[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/earthbottom");
this.bottom[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/earthbottom");
this.bottom[0] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airbottom");
this.bottom[1] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airbottom");
this.bottom[2] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthbottom");
this.bottom[3] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthbottom");
this.bottom[4] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthbottom");
this.frontOff[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/airside");
this.frontOff[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/airside");
this.frontOff[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/earthside");
this.frontOff[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/earthside");
this.frontOff[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/earthside");
this.frontOff[0] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside");
this.frontOff[1] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside");
this.frontOff[2] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside");
this.frontOff[3] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside");
this.frontOff[4] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside");
this.side[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/airside");
this.side[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/air/airside");
this.side[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/earthside");
this.side[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/earthside");
this.side[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":solars/earth/earthside");
}
this.side[0] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside");
this.side[1] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside");
this.side[2] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside");
this.side[3] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside");
this.side[4] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside");
}
@SideOnly(Side.CLIENT)
@SuppressWarnings({"unchecked", "rawtypes"})
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
for (int i = 0; i <= 4; i++) {
list.add(new ItemStack(id, 1, i));
}
}
@SideOnly(Side.CLIENT)
@SuppressWarnings({"unchecked", "rawtypes"})
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
for (int i = 0; i <= 4; i++) {
list.add(new ItemStack(id, 1, i));
}
}
@Override
public TileEntity createTileEntity(World world, int meta) {
if (meta == 0) {
return new TileEntityDoubleAirSolar();
}
if (meta == 1) {
return new TileEntityTripleAirSolar();
}
if (meta == 2) {
return new TileEntityEarthSolar();
}
if (meta == 3) {
return new TileEntityDoubleEarthSolar();
}
if (meta == 4) {
return new TileEntityTripleEarthSolar();
}
return super.createTileEntity(world, meta);
}
@Override
public TileEntity createTileEntity(World world, int meta) {
if (meta == 0) {
return new TileEntityDoubleAirSolar();
}
if (meta == 1) {
return new TileEntityTripleAirSolar();
}
if (meta == 2) {
return new TileEntityEarthSolar();
}
if (meta == 3) {
return new TileEntityDoubleEarthSolar();
}
if (meta == 4) {
return new TileEntityTripleEarthSolar();
}
return super.createTileEntity(world, meta);
}
@Override
public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
world.removeTileEntity(x, y, z);
super.breakBlock(world, x, y, z, par5, par6);
}
@Override
public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
world.removeTileEntity(x, y, z);
super.breakBlock(world, x, y, z, par5, par6);
}
}
@@ -10,59 +10,59 @@ import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.IEssentiaContainerItem;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.ic2.tile.generators.TileEntityEssentiaGenerator;
import tombenpotter.emt.common.util.CreativeTab;
public class BlockEssentiaGenerator extends BlockEMT {
public BlockEssentiaGenerator() {
super(Material.iron);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setHardness(4.0F);
}
public BlockEssentiaGenerator() {
super(Material.iron);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setHardness(4.0F);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ri) {
this.blockIcon = ri.registerIcon(ElectroMagicTools.texturePath + ":machines/top");
this.top[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/top");
this.bottom[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/top");
this.side[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/side");
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ri) {
this.blockIcon = ri.registerIcon(ModInformation.texturePath + ":machines/top");
this.top[0] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top");
this.bottom[0] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top");
this.side[0] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/side");
}
@Override
public TileEntity createNewTileEntity(World var1, int var2) {
return new TileEntityEssentiaGenerator();
}
@Override
public TileEntity createNewTileEntity(World var1, int var2) {
return new TileEntityEssentiaGenerator();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
TileEntityEssentiaGenerator tile = (TileEntityEssentiaGenerator) world.getTileEntity(x, y, z);
if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IEssentiaContainerItem) {
IEssentiaContainerItem item = (IEssentiaContainerItem) player.getHeldItem().getItem();
Aspect aspect = item.getAspects(player.getHeldItem()).getAspects()[0];
if (tile.isFree[0]) {
tile.aspects[0] = aspect.getTag();
tile.isFree[0] = false;
} else if (tile.isFree[1]) {
tile.aspects[1] = aspect.getTag();
tile.isFree[1] = false;
} else if (tile.isFree[2]) {
tile.aspects[2] = aspect.getTag();
tile.isFree[2] = false;
} else if (tile.isFree[3]) {
tile.aspects[3] = aspect.getTag();
tile.isFree[3] = false;
}
return true;
} else if (player.getHeldItem() == null && player.isSneaking()) {
for (int i = 0; i < tile.aspects.length; i++) {
if (!tile.isFree[i]) {
tile.isFree[i] = true;
}
}
return true;
}
return false;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
TileEntityEssentiaGenerator tile = (TileEntityEssentiaGenerator) world.getTileEntity(x, y, z);
if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IEssentiaContainerItem) {
IEssentiaContainerItem item = (IEssentiaContainerItem) player.getHeldItem().getItem();
Aspect aspect = item.getAspects(player.getHeldItem()).getAspects()[0];
if (tile.isFree[0]) {
tile.aspects[0] = aspect.getTag();
tile.isFree[0] = false;
} else if (tile.isFree[1]) {
tile.aspects[1] = aspect.getTag();
tile.isFree[1] = false;
} else if (tile.isFree[2]) {
tile.aspects[2] = aspect.getTag();
tile.isFree[2] = false;
} else if (tile.isFree[3]) {
tile.aspects[3] = aspect.getTag();
tile.isFree[3] = false;
}
return true;
} else if (player.getHeldItem() == null && player.isSneaking()) {
for (int i = 0; i < tile.aspects.length; i++) {
if (!tile.isFree[i]) {
tile.isFree[i] = true;
}
}
return true;
}
return false;
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.blocks;
import cpw.mods.fml.relauncher.Side;
@@ -21,79 +22,79 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.ic2.tile.generators.*;
import tombenpotter.emt.common.util.CreativeTab;
import java.util.List;
import java.util.Random;
public class BlockEssentiaGenerators extends BlockEMT {
public BlockEssentiaGenerators() {
super(Material.iron);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setHardness(4.0F);
}
public BlockEssentiaGenerators() {
super(Material.iron);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setHardness(4.0F);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ri) {
this.blockIcon = ri.registerIcon(ElectroMagicTools.texturePath + ":machines/top");
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ri) {
this.blockIcon = ri.registerIcon(ModInformation.texturePath + ":machines/top");
for (int i = 0; i <= 5; i++) {
this.top[i] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/top");
}
for (int i = 0; i <= 5; i++) {
this.top[i] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top");
}
for (int i = 0; i <= 5; i++) {
this.bottom[i] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/top");
}
for (int i = 0; i <= 5; i++) {
this.bottom[i] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top");
}
for (int i = 0; i <= 5; i++) {
this.side[i] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/side");
}
for (int i = 0; i <= 5; i++) {
this.side[i] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/side");
}
this.frontOff[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/potentiafront");
this.frontOff[1] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/ignisfront");
this.frontOff[2] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/auramfront");
this.frontOff[3] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/arborfront");
this.frontOff[4] = ri.registerIcon(ElectroMagicTools.texturePath + ":essentiagenerator/aerfront");
}
this.frontOff[0] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/potentiafront");
this.frontOff[1] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/ignisfront");
this.frontOff[2] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/auramfront");
this.frontOff[3] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/arborfront");
this.frontOff[4] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/aerfront");
}
@SuppressWarnings({"unchecked", "rawtypes"})
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
list.add(new ItemStack(id, 1, 0));
list.add(new ItemStack(id, 1, 1));
list.add(new ItemStack(id, 1, 2));
list.add(new ItemStack(id, 1, 3));
list.add(new ItemStack(id, 1, 4));
}
@SuppressWarnings({"unchecked", "rawtypes"})
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
list.add(new ItemStack(id, 1, 0));
list.add(new ItemStack(id, 1, 1));
list.add(new ItemStack(id, 1, 2));
list.add(new ItemStack(id, 1, 3));
list.add(new ItemStack(id, 1, 4));
}
@Override
public TileEntity createTileEntity(World world, int meta) {
if (meta == 0) {
return new TileEntityPotentiaGenerator();
}
if (meta == 1) {
return new TileEntityIgnisGenerator();
}
if (meta == 2) {
return new TileEntityAuramGenerator();
}
if (meta == 3) {
return new TileEntityArborGenerator();
}
if (meta == 4) {
return new TileEntityAerGenerator();
}
return super.createTileEntity(world, meta);
}
@Override
public TileEntity createTileEntity(World world, int meta) {
if (meta == 0) {
return new TileEntityPotentiaGenerator();
}
if (meta == 1) {
return new TileEntityIgnisGenerator();
}
if (meta == 2) {
return new TileEntityAuramGenerator();
}
if (meta == 3) {
return new TileEntityArborGenerator();
}
if (meta == 4) {
return new TileEntityAerGenerator();
}
return super.createTileEntity(world, meta);
}
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
float f = (float) par2 + 0.5F;
float f1 = (float) par3 + 1.0F;
float f2 = (float) par4 + 0.5F;
par1World.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D);
}
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
float f = (float) par2 + 0.5F;
float f1 = (float) par3 + 1.0F;
float f2 = (float) par4 + 0.5F;
par1World.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D);
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.module.base.tile.TileEntityPortableNode;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
@@ -26,75 +26,81 @@ import net.minecraft.world.Explosion;
import net.minecraft.world.World;
import thaumcraft.common.blocks.BlockAiry;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.base.tile.TileEntityPortableNode;
import java.util.List;
import java.util.Random;
public class BlockPortableNode extends BlockAiry {
public IIcon[] texture = new IIcon[1];
public IIcon[] texture = new IIcon[1];
public BlockPortableNode() {
this.setCreativeTab(CreativeTab.tabTombenpotter);
setBlockUnbreakable();
}
public BlockPortableNode() {
this.setCreativeTab(ElectroMagicTools.tabEMT);
setBlockUnbreakable();
}
@Override
public TileEntity createTileEntity(World world, int meta) {
return new TileEntityPortableNode();
}
@Override
public TileEntity createTileEntity(World world, int meta) {
return new TileEntityPortableNode();
}
@Override
public int quantityDropped(Random par1Random) {
return 0;
}
@Override
public int quantityDropped(Random par1Random) {
return 0;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
protected boolean canSilkHarvest() {
return false;
}
@Override
protected boolean canSilkHarvest() {
return false;
}
public boolean canEntityDestroy(World world, int x, int y, int z, Entity entity) {
return false;
}
public boolean canEntityDestroy(World world, int x, int y, int z, Entity entity) {
return false;
}
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {
}
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister ri) {
this.texture[0] = ri.registerIcon(ElectroMagicTools.texturePath + ":portablenode");
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister ri) {
this.texture[0] = ri.registerIcon(ModInformation.texturePath + ":portablenode");
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
return this.texture[0];
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
return this.texture[0];
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
list.add(new ItemStack(id, 1, 0));
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
list.add(new ItemStack(id, 1, 0));
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
if (!world.isRemote && player.isSneaking() && player.getHeldItem() == null) {
world.setBlockToAir(x, y, z);
world.removeTileEntity(x, y, z);
}
return true;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
if (!world.isRemote && player.isSneaking() && player.getHeldItem() == null) {
world.setBlockToAir(x, y, z);
world.removeTileEntity(x, y, z);
}
return true;
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return null;
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.blocks;
import cpw.mods.fml.relauncher.Side;
@@ -22,67 +23,67 @@ import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import java.util.Random;
public class BlockShield extends Block {
public BlockShield() {
super(Material.rock);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setHardness(1F);
this.setResistance(10000000000000000000000000000000000000F);
}
public BlockShield() {
super(Material.rock);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setHardness(1F);
this.setResistance(10000000000000000000000000000000000000F);
}
@Override
public int quantityDropped(Random par1Random) {
return 0;
}
@Override
public int quantityDropped(Random par1Random) {
return 0;
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderBlockPass() {
return 0;
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderBlockPass() {
return 0;
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":shield");
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon(ModInformation.texturePath + ":shield");
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
protected boolean canSilkHarvest() {
return false;
}
@Override
protected boolean canSilkHarvest() {
return false;
}
@Override
public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
return false;
}
@Override
public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
return false;
}
@Override
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
return false;
}
@Override
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
return false;
}
@Override
public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
return false;
}
@Override
public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
return false;
}
@Override
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {
}
@Override
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.CreativeTab;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.creativetab.CreativeTabs;
@@ -21,60 +21,61 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import thaumcraft.api.IScribeTools;
import thaumcraft.common.items.ItemInkwell;
import tombenpotter.emt.ElectroMagicTools;
import java.util.List;
public class ItemElectricScribingTools extends ItemInkwell implements IElectricItem, IScribeTools {
public static int maxCharge = 400;
public static int maxCharge = 400;
public ItemElectricScribingTools() {
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxDamage(400);
this.setMaxStackSize(1);
}
public ItemElectricScribingTools() {
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxDamage(400);
this.setMaxStackSize(1);
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return 1;
}
@Override
public int getTier(ItemStack itemStack) {
return 1;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 5;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 5;
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
}
@@ -18,12 +18,12 @@
*
* http://www.minecraftforum.net/topic/1813058-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.armor.boots;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import ic2.api.item.IMetalArmor;
@@ -44,193 +44,195 @@ import thaumcraft.api.IVisDiscountGear;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.common.Thaumcraft;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.TextHelper;
import java.util.List;
public class ItemElectricBootsTraveller extends ItemArmor implements IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
public int maxCharge = 10000;
public int energyPerDamage = 100;
public int visDiscount = 2;
public float speedBonus = 0.055F;
public float jumpBonus = 0.3F;
public float fallDistance = 0.5F;
public double transferLimit = 100;
public int maxCharge = 10000;
public int energyPerDamage = 100;
public int visDiscount = 2;
public float speedBonus = 0.055F;
public float jumpBonus = 0.3F;
public float fallDistance = 0.5F;
public double transferLimit = 100;
public ItemElectricBootsTraveller(int par3, int par4) {
super(ArmorMaterial.DIAMOND, par3, par4);
this.setMaxDamage(27);
this.setMaxStackSize(1);
this.setCreativeTab(CreativeTab.tabTombenpotter);
MinecraftForge.EVENT_BUS.register(this);
}
public ItemElectricBootsTraveller(int par3, int par4) {
super(ArmorMaterial.DIAMOND, par3, par4);
this.setMaxDamage(27);
this.setMaxStackSize(1);
this.setCreativeTab(ElectroMagicTools.tabEMT);
MinecraftForge.EVENT_BUS.register(this);
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":electricboots");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":electricboots");
}
@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);
}
}
@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);
}
}
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
} else {
return 0;
}
}
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
} else {
return 0;
}
}
@Override
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
}
@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 double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
}
public double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
list.add("Vis discount: " + String.valueOf(visDiscount) + "%");
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
list.add(TextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%");
}
@Override
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
return visDiscount;
}
@Override
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
return visDiscount;
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
if ((player.worldObj.isRemote) && (!player.isSneaking())) {
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) {
Thaumcraft.instance.entityEventHandler.prevStep.put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
}
player.stepHeight = 1.0F;
}
if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) {
player.moveFlying(0F, 1F, speedBonus);
player.jumpMovementFactor = jumpBonus;
}
}
reduceFallDistance(player);
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
if ((player.worldObj.isRemote) && (!player.isSneaking())) {
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) {
Thaumcraft.instance.entityEventHandler.prevStep.put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
}
player.stepHeight = 1.0F;
}
if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) {
player.moveFlying(0F, 1F, speedBonus);
player.jumpMovementFactor = jumpBonus;
}
}
reduceFallDistance(player);
}
@SubscribeEvent
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
if (event.entityLiving instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entityLiving;
boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this;
@SubscribeEvent
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
if (event.entityLiving instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entityLiving;
boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this;
if (hasArmor)
player.motionY += jumpBonus;
}
}
if (hasArmor)
player.motionY += jumpBonus;
}
}
public void reduceFallDistance(EntityPlayer player) {
if (player.fallDistance > 0.0F) {
player.fallDistance -= fallDistance;
}
}
public void reduceFallDistance(EntityPlayer player) {
if (player.fallDistance > 0.0F) {
player.fallDistance -= fallDistance;
}
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/electricboots.png";
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/electricboots.png";
}
@Override
public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) {
return true;
}
@Override
public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) {
return true;
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public int getItemEnchantability() {
if (Config.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public int getItemEnchantability() {
if (ConfigHandler.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
if (Config.enchanting == false) {
return false;
} else {
return true;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
if (ConfigHandler.enchanting == false) {
return false;
} else {
return true;
}
}
public int getEnergyPerDamage() {
return energyPerDamage;
}
public int getEnergyPerDamage() {
return energyPerDamage;
}
/* IC2 API METHODS */
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return transferLimit;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return transferLimit;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
}
@@ -18,36 +18,38 @@
*
* http://www.minecraftforum.net/topic/1813058-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.armor.boots;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
public ItemNanoBootsTraveller(int par3, int par4) {
super(par3, par4);
maxCharge = 500000;
speedBonus = (float) Config.nanoBootsSpeed;
jumpBonus = (float) Config.nanoBootsJump;
fallDistance = 0.75F;
visDiscount = 4;
transferLimit = 1000;
energyPerDamage = 500;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":nanobootstravel");
}
public ItemNanoBootsTraveller(int par3, int par4) {
super(par3, par4);
maxCharge = 500000;
speedBonus = (float) ConfigHandler.nanoBootsSpeed;
jumpBonus = (float) ConfigHandler.nanoBootsJump;
fallDistance = 0.75F;
visDiscount = 4;
transferLimit = 1000;
energyPerDamage = 500;
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/nanobootstravel.png";
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":nanobootstravel");
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/nanobootstravel.png";
}
}
@@ -18,44 +18,46 @@
*
* http://www.minecraftforum.net/topic/1813058-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.armor.boots;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
public ItemQuantumBootsTraveller(int par3, int par4) {
super(par3, par4);
maxCharge = 1000000;
speedBonus = (float) Config.quantumBootsSpeed;
jumpBonus = (float) Config.quantumBootsJump;
fallDistance = 0.0F;
visDiscount = 5;
transferLimit = 10000;
energyPerDamage = 1000;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":quantumbootstravel");
}
public ItemQuantumBootsTraveller(int par3, int par4) {
super(par3, par4);
maxCharge = 1000000;
speedBonus = (float) ConfigHandler.quantumBootsSpeed;
jumpBonus = (float) ConfigHandler.quantumBootsJump;
fallDistance = 0.0F;
visDiscount = 5;
transferLimit = 10000;
energyPerDamage = 1000;
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/quantumbootstravel.png";
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":quantumbootstravel");
}
@Override
public void reduceFallDistance(EntityPlayer player) {
if (player.fallDistance > 0.0F) {
player.fallDistance = fallDistance;
}
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/quantumbootstravel.png";
}
@Override
public void reduceFallDistance(EntityPlayer player) {
if (player.fallDistance > 0.0F) {
player.fallDistance = fallDistance;
}
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.armor.goggles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import ic2.api.item.IMetalArmor;
@@ -33,166 +33,170 @@ import thaumcraft.api.IVisDiscountGear;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.nodes.IRevealer;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.TextHelper;
import java.util.List;
public class ItemElectricGoggles extends ItemArmor implements IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor {
public double maxCharge = 10000;
public double transferLimit = 10;
public int tier = 2;
public int energyPerDamage = 100;
public int visDiscount = 5;
public double maxCharge = 10000;
public double transferLimit = 10;
public int tier = 2;
public int energyPerDamage = 100;
public int visDiscount = 5;
public ItemElectricGoggles(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
}
public ItemElectricGoggles(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setCreativeTab(ElectroMagicTools.tabEMT);
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":electricgoggles");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":electricgoggles");
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/electricgoggles.png";
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/electricgoggles.png";
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public int getItemEnchantability() {
if (Config.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public int getItemEnchantability() {
if (ConfigHandler.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
if (Config.enchanting == false) {
return false;
} else {
return true;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
if (ConfigHandler.enchanting == false) {
return false;
} else {
return true;
}
}
@Override
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
return visDiscount;
}
@Override
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
return visDiscount;
}
@Override
public boolean showNodes(ItemStack itemstack, EntityLivingBase player) {
return true;
}
@Override
public boolean showNodes(ItemStack itemstack, EntityLivingBase player) {
return true;
}
@Override
public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) {
return true;
}
@Override
public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) {
return true;
}
@Override
public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) {
return true;
}
@Override
public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) {
return true;
}
@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, 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(0, absorptionRatio, (int) damageLimit);
}
}
@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, 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(0, absorptionRatio, (int) damageLimit);
}
}
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
} else {
return 0;
}
}
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
} else {
return 0;
}
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
list.add("Vis discount: " + String.valueOf(visDiscount) + "%");
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
list.add(TextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%");
}
@Override
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
}
@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 double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
}
public double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
}
public int getEnergyPerDamage() {
return energyPerDamage;
}
public int getEnergyPerDamage() {
return energyPerDamage;
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
}
/* IC2 API METHODS */
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return transferLimit;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return transferLimit;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.armor.goggles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
@@ -24,49 +24,50 @@ import net.minecraft.potion.PotionEffect;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
public class ItemNanoGoggles extends ItemElectricGoggles {
public ItemNanoGoggles(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxDamage(27);
this.setMaxStackSize(1);
visDiscount = 6;
tier = 3;
maxCharge = 100000;
energyPerDamage = 1000;
transferLimit = 100;
}
public ItemNanoGoggles(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxDamage(27);
this.setMaxStackSize(1);
visDiscount = 6;
tier = 3;
maxCharge = 100000;
energyPerDamage = 1000;
transferLimit = 100;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":nanothaumichelmet");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":nanothaumichelmet");
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/thaumicnanohelmet.png";
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/thaumicnanohelmet.png";
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if (Config.nightVisionOff == false) {
if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) {
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if (ConfigHandler.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 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 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));
}
}
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.armor.goggles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
@@ -25,81 +25,86 @@ import net.minecraft.potion.PotionEffect;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
import java.util.*;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
public class ItemQuantumGoggles extends ItemNanoGoggles {
private static final Map<Integer, Integer> potionCost = new HashMap();
public ItemQuantumGoggles(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxDamage(27);
this.setMaxStackSize(1);
maxCharge = 10000000;
tier = 3;
visDiscount = 8;
transferLimit = 10000;
energyPerDamage = 1000;
private static final Map<Integer, Integer> potionCost = new HashMap();
potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000));
potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000));
potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000));
}
public ItemQuantumGoggles(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxDamage(27);
this.setMaxStackSize(1);
maxCharge = 10000000;
tier = 3;
visDiscount = 8;
transferLimit = 10000;
energyPerDamage = 1000;
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":quantumthaumichelmet");
}
potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000));
potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000));
potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000));
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/thaumicquantumhelmet.png";
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":quantumthaumichelmet");
}
@SuppressWarnings({"rawtypes", "unchecked"})
@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);
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/thaumicquantumhelmet.png";
}
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);
@SuppressWarnings({"rawtypes", "unchecked"})
@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);
}
if (Config.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));
}
}
}
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);
if (ConfigHandler.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));
}
}
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.armor.goggles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -26,7 +26,8 @@ import net.minecraft.potion.PotionEffect;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
import java.util.HashMap;
import java.util.Iterator;
@@ -34,157 +35,157 @@ import java.util.LinkedList;
import java.util.Map;
public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
private int ticker;
private int generating;
private int genDay;
private int genNight;
private boolean sunIsUp;
private boolean skyIsVisible;
private boolean noSunWorld;
private boolean dampPlace;
@SuppressWarnings("rawtypes")
private static final Map potionCost = new HashMap();
private int ticker;
private int generating;
private int genDay;
private int genNight;
private boolean sunIsUp;
private boolean skyIsVisible;
private boolean noSunWorld;
private boolean dampPlace;
@SuppressWarnings("unchecked")
public ItemSolarHelmetRevealing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxDamage(27);
this.setMaxStackSize(1);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.maxCharge = 1000000;
this.genDay = 256;
this.genNight = 128;
maxCharge = 10000000;
visDiscount = 7;
tier = 3;
transferLimit = 10000;
energyPerDamage = 10000;
@SuppressWarnings("rawtypes")
private static final Map potionCost = new HashMap();
potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000));
potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000));
potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000));
}
@SuppressWarnings("unchecked")
public ItemSolarHelmetRevealing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxDamage(27);
this.setMaxStackSize(1);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.maxCharge = 1000000;
this.genDay = 256;
this.genNight = 128;
maxCharge = 10000000;
visDiscount = 7;
tier = 3;
transferLimit = 10000;
energyPerDamage = 10000;
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) {
return ElectroMagicTools.texturePath + ":textures/models/solarrevealinghelmet.png";
}
potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000));
potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000));
potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000));
}
@SuppressWarnings("unchecked")
@Override
public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) {
if (Config.nightVisionOff == false) {
if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) {
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) {
return ModInformation.texturePath + ":textures/models/solarrevealinghelmet.png";
}
int x = MathHelper.floor_double(player.posX);
int z = MathHelper.floor_double(player.posZ);
int y = MathHelper.floor_double(player.posY);
@SuppressWarnings("unchecked")
@Override
public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) {
if (ConfigHandler.nightVisionOff == false) {
if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) {
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 x = MathHelper.floor_double(player.posX);
int z = MathHelper.floor_double(player.posZ);
int y = MathHelper.floor_double(player.posY);
int refill = player.getAir();
if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) {
player.setAir(refill + 200);
ElectricItem.manager.use(itemStack, 1000, null);
}
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));
}
}
@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);
int refill = player.getAir();
if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) {
player.setAir(refill + 200);
ElectricItem.manager.use(itemStack, 1000, null);
}
if (worldObj.isRemote) {
return;
}
checkForSun(player);
if (this.generating > 0) {
int energyLeft = this.generating;
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
if (energyLeft > 0) {
if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
} else {
return;
}
}
for (int j = 0; j < player.inventory.mainInventory.length; j++) {
if (energyLeft > 0) {
if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
} else {
return;
}
}
}
}
@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);
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;
}
if (worldObj.isRemote) {
return;
}
checkForSun(player);
if (this.generating > 0) {
int energyLeft = this.generating;
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
if (energyLeft > 0) {
if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
} else {
return;
}
}
for (int j = 0; j < player.inventory.mainInventory.length; j++) {
if (energyLeft > 0) {
if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
} else {
return;
}
}
}
}
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 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 static int tickRate() {
return 128;
}
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;
}
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":solarrevealinghelmet");
}
public static int tickRate() {
return 128;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":solarrevealinghelmet");
}
}
@@ -2,8 +2,6 @@ package tombenpotter.emt.common.module.ic2.items.armor.wings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.module.base.items.ItemThaumiumReinforcedWing;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import ic2.api.item.IMetalArmor;
@@ -19,178 +17,180 @@ import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import net.minecraftforge.common.ISpecialArmor;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.base.items.ItemThaumiumReinforcedWing;
import tombenpotter.emt.common.util.ConfigHandler;
import java.util.List;
public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectricItem, ISpecialArmor, IMetalArmor {
public int maxCharge = 100000;
public int tier = 3;
public double transferLimit = 1000;
public int energyPerDamage = 100;
public int maxCharge = 100000;
public int tier = 3;
public double transferLimit = 1000;
public int energyPerDamage = 100;
public ItemNanoWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxStackSize(1);
this.setMaxDamage(27);
this.setCreativeTab(CreativeTab.tabTombenpotter);
visDiscount = 5;
}
public ItemNanoWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxStackSize(1);
this.setMaxDamage(27);
this.setCreativeTab(ElectroMagicTools.tabEMT);
visDiscount = 5;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":nanowings");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":nanowings");
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@Override
@SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/nanowing.png";
}
@Override
@SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/nanowing.png";
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
if (world.isRemote) {
boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed();
boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
if (world.isRemote) {
boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed();
boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
if (isJumping) {
player.motionY = 0.7;
player.fallDistance = 0;
}
if (isJumping) {
player.motionY = 0.7;
player.fallDistance = 0;
}
if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) {
player.motionY *= 0.3;
player.fallDistance = 0;
}
if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) {
player.motionY *= 0.3;
player.fallDistance = 0;
}
if (player.isInWater() && !player.capabilities.isCreativeMode)
player.motionY = -0.4;
if (player.isInWater() && !player.capabilities.isCreativeMode)
player.motionY = -0.4;
if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode)
player.motionY = -0.2;
if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode)
player.motionY = -0.2;
if (isSneaking && !player.onGround) {
player.motionY = -0.6;
player.fallDistance = 0;
}
}
if (player.fallDistance > 0.0F)
player.fallDistance -= 0.75F;
}
if (isSneaking && !player.onGround) {
player.motionY = -0.6;
player.fallDistance = 0;
}
}
if (player.fallDistance > 0.0F)
player.fallDistance -= 0.75F;
}
@Override
public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) {
return true;
}
@Override
public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) {
return true;
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public int getItemEnchantability() {
if (Config.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public int getItemEnchantability() {
if (ConfigHandler.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
if (Config.enchanting == false) {
return false;
} else {
return true;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
if (ConfigHandler.enchanting == false) {
return false;
} else {
return true;
}
}
public int getEnergyPerDamage() {
return energyPerDamage;
}
public int getEnergyPerDamage() {
return energyPerDamage;
}
@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);
}
}
@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);
}
}
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
} else {
return 0;
}
}
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) {
return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio());
} else {
return 0;
}
}
@Override
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
}
@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 double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
}
public double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
}
/* IC2 API METHODS */
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return transferLimit;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return transferLimit;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
}
@@ -9,61 +9,61 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
public class ItemQuantumWing extends ItemNanoWing {
public ItemQuantumWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxStackSize(1);
this.setMaxDamage(27);
this.setCreativeTab(CreativeTab.tabTombenpotter);
maxCharge = 1000000;
visDiscount = 6;
transferLimit = 10000;
energyPerDamage = 1000;
}
public ItemQuantumWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxStackSize(1);
this.setMaxDamage(27);
this.setCreativeTab(ElectroMagicTools.tabEMT);
maxCharge = 1000000;
visDiscount = 6;
transferLimit = 10000;
energyPerDamage = 1000;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":quantumwings");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":quantumwings");
}
@Override
@SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ElectroMagicTools.texturePath + ":textures/models/quantumwing.png";
}
@Override
@SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return ModInformation.texturePath + ":textures/models/quantumwing.png";
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
if (world.isRemote) {
boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed();
boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
if (world.isRemote) {
boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed();
boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
if (isJumping)
player.motionY = 0.85;
if (isJumping)
player.motionY = 0.85;
if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode)
player.motionY *= 0.3;
if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode)
player.motionY *= 0.3;
if (player.isInWater() && !player.capabilities.isCreativeMode)
player.motionY = -0.1;
if (player.isInWater() && !player.capabilities.isCreativeMode)
player.motionY = -0.1;
if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode)
player.motionY = -0.05;
if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode)
player.motionY = -0.05;
if (isSneaking && isHoldingJump)
player.motionY = 0;
if (isSneaking && isHoldingJump)
player.motionY = 0;
if (isSneaking && !player.onGround && !isHoldingJump)
player.motionY = -0.6;
if (isSneaking && !player.onGround && !isHoldingJump)
player.motionY = -0.6;
if (player.fallDistance > 0.0F)
player.fallDistance = 0F;
}
}
if (player.fallDistance > 0.0F)
player.fallDistance = 0F;
}
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.blocks;
import net.minecraft.block.Block;
@@ -17,35 +18,35 @@ import net.minecraft.item.ItemStack;
public class ItemBlockEMTMachines extends ItemBlock {
public ItemBlockEMTMachines(Block id) {
super(id);
setHasSubtypes(true);
}
public ItemBlockEMTMachines(Block id) {
super(id);
setHasSubtypes(true);
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "wandrecharge";
break;
}
case 1: {
name = "etheralprocessor";
break;
}
case 2: {
name = "raindispeller";
break;
}
default:
name = "nothing";
}
return getUnlocalizedName() + "." + name;
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "wandrecharge";
break;
}
case 1: {
name = "etheralprocessor";
break;
}
case 2: {
name = "raindispeller";
break;
}
default:
name = "nothing";
}
return getUnlocalizedName() + "." + name;
}
@Override
public int getMetadata(int par1) {
return par1;
}
@Override
public int getMetadata(int par1) {
return par1;
}
}
@@ -9,185 +9,188 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.blocks;
import tombenpotter.emt.common.util.Config;
import net.minecraft.block.Block;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.TextHelper;
import java.util.List;
import static tombenpotter.emt.common.util.TextHelper.localize;
public class ItemBlockEMTSolars extends ItemBlock {
public ItemBlockEMTSolars(Block id) {
super(id);
setHasSubtypes(true);
}
public ItemBlockEMTSolars(Block id) {
super(id);
setHasSubtypes(true);
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "compressed";
break;
}
case 1: {
name = "doublecompressed";
break;
}
case 2: {
name = "triplecompressed";
break;
}
case 3: {
name = "water";
break;
}
case 4: {
name = "doublewater";
break;
}
case 5: {
name = "triplewater";
break;
}
case 6: {
name = "dark";
break;
}
case 7: {
name = "doubledark";
break;
}
case 8: {
name = "tripledark";
break;
}
case 9: {
name = "order";
break;
}
case 10: {
name = "doubleorder";
break;
}
case 11: {
name = "tripleorder";
break;
}
case 12: {
name = "fire";
break;
}
case 13: {
name = "doublefire";
break;
}
case 14: {
name = "triplefire";
break;
}
case 15: {
name = "air";
break;
}
default:
name = "nothing";
break;
}
return getUnlocalizedName() + "." + name;
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "compressed";
break;
}
case 1: {
name = "doublecompressed";
break;
}
case 2: {
name = "triplecompressed";
break;
}
case 3: {
name = "water";
break;
}
case 4: {
name = "doublewater";
break;
}
case 5: {
name = "triplewater";
break;
}
case 6: {
name = "dark";
break;
}
case 7: {
name = "doubledark";
break;
}
case 8: {
name = "tripledark";
break;
}
case 9: {
name = "order";
break;
}
case 10: {
name = "doubleorder";
break;
}
case 11: {
name = "tripleorder";
break;
}
case 12: {
name = "fire";
break;
}
case 13: {
name = "doublefire";
break;
}
case 14: {
name = "triplefire";
break;
}
case 15: {
name = "air";
break;
}
default:
name = "nothing";
break;
}
return getUnlocalizedName() + "." + name;
}
@Override
public int getMetadata(int par1) {
return par1;
}
@Override
public int getMetadata(int par1) {
return par1;
}
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) {
if (GuiScreen.isShiftKeyDown()) {
switch (itemstack.getItemDamage()) {
case 0: {
list.add(Config.compressedSolarOutput + " EU/T");
break;
}
case 1: {
list.add(Config.doubleCompressedSolarOutput + " EU/T");
break;
}
case 2: {
list.add(Config.tripleCompressedSolarOutput + " EU/T");
break;
}
case 3: {
list.add("Special Effect: " + Config.compressedSolarOutput + " EU/T when raining");
break;
}
case 4: {
list.add("Special Effect: " + Config.doubleCompressedSolarOutput + " EU/T when raining");
break;
}
case 5: {
list.add("Special Effect: " + Config.tripleCompressedSolarOutput + " EU/T when raining");
break;
}
case 6: {
list.add("Special Effect: " + Config.compressedSolarOutput + " EU/T at night");
break;
}
case 7: {
list.add("Special Effect: " + Config.doubleCompressedSolarOutput + " EU/T at night");
break;
}
case 8: {
list.add("Special Effect: " + Config.tripleCompressedSolarOutput + " EU/T at night");
break;
}
case 9: {
list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 3");
break;
}
case 10: {
list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 3");
break;
}
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) {
switch (itemstack.getItemDamage()) {
case 0: {
list.add(ConfigHandler.compressedSolarOutput + localize("tooltip.EMT.euPerTick"));
break;
}
case 1: {
list.add(ConfigHandler.doubleCompressedSolarOutput + localize("tooltip.EMT.euPerTick"));
break;
}
case 2: {
list.add(ConfigHandler.tripleCompressedSolarOutput + localize("tooltip.EMT.euPerTick"));
break;
}
case 3: {
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
break;
}
case 4: {
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
break;
}
case 5: {
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
break;
}
case 6: {
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
break;
}
case 7: {
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
break;
}
case 8: {
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
break;
}
case 9: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple"));
break;
}
case 10: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple"));
break;
}
case 11: {
list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 3");
break;
}
case 12: {
list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 2 when located in the nether");
break;
}
case 13: {
list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 2 when located in the nether");
break;
}
case 14: {
list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 2 when lava is on top");
list.add("Special Effect: Output multiplied by 2 when located in the nether");
}
case 15: {
list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 2.5 when the block is over Y = 160");
break;
}
default:
list.add("Didn't I forget a tooltip?");
break;
}
}
}
case 11: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple"));
break;
}
case 12: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether"));
break;
}
case 13: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether"));
break;
}
case 14: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.lava"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " +localize("tooltip.EMT.output.double.nether"));
break;
}
case 15: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.height"));
break;
}
default: {
list.add(localize("tooltip.EMT.forget"));
break;
}
}
}
}
@@ -9,94 +9,96 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.blocks;
import tombenpotter.emt.common.util.Config;
import net.minecraft.block.Block;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.TextHelper;
import java.util.List;
import static tombenpotter.emt.common.util.TextHelper.localize;
public class ItemBlockEMTSolars2 extends ItemBlock {
public ItemBlockEMTSolars2(Block id) {
super(id);
setHasSubtypes(true);
}
public ItemBlockEMTSolars2(Block id) {
super(id);
setHasSubtypes(true);
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "doubleair";
break;
}
case 1: {
name = "tripleair";
break;
}
case 2: {
name = "earth";
break;
}
case 3: {
name = "doubleearth";
break;
}
case 4: {
name = "tripleearth";
break;
}
default:
name = "nothing";
break;
}
return getUnlocalizedName() + "." + name;
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "doubleair";
break;
}
case 1: {
name = "tripleair";
break;
}
case 2: {
name = "earth";
break;
}
case 3: {
name = "doubleearth";
break;
}
case 4: {
name = "tripleearth";
break;
}
default:
name = "nothing";
break;
}
return getUnlocalizedName() + "." + name;
}
@Override
public int getMetadata(int par1) {
return par1;
}
@Override
public int getMetadata(int par1) {
return par1;
}
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) {
if (GuiScreen.isShiftKeyDown()) {
switch (itemstack.getItemDamage()) {
case 0: {
list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 2.5 when the block is over Y = 160");
break;
}
case 1: {
list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 2.5 when the block is over Y = 160");
break;
}
case 2: {
list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 2.5 when the block is under Y = 10");
break;
}
case 3: {
list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 2.5 when the block is under Y = 10");
break;
}
case 4: {
list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T");
list.add("Special Effect: Output multiplied by 2.5 when the block is under Y = 10");
break;
}
default:
list.add("Didn't I forget a tooltip?");
break;
}
}
}
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) {
switch (itemstack.getItemDamage()) {
case 0: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.height"));
break;
}
case 1: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.height"));
break;
}
case 2: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.low"));
break;
}
case 3: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.low"));
break;
}
case 4: {
list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick"));
list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.low"));
break;
}
default: {
list.add(localize("tooltip.EMT.forget"));
break;
}
}
}
}
@@ -9,12 +9,12 @@ import java.util.List;
public class ItemBlockEssentiaGenerator extends ItemBlock {
public ItemBlockEssentiaGenerator(Block id) {
super(id);
}
public ItemBlockEssentiaGenerator(Block id) {
super(id);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
// list.add("");
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
// list.add("");
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.blocks;
import net.minecraft.block.Block;
@@ -20,48 +21,48 @@ import java.util.List;
public class ItemBlockEssentiaGenerators extends ItemBlock {
public ItemBlockEssentiaGenerators(Block id) {
super(id);
setHasSubtypes(true);
}
public ItemBlockEssentiaGenerators(Block id) {
super(id);
setHasSubtypes(true);
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "potentia";
break;
}
case 1: {
name = "ignis";
break;
}
case 2: {
name = "auram";
break;
}
case 3: {
name = "arbor";
break;
}
case 4: {
name = "aer";
break;
}
default:
name = "nothing";
}
return getUnlocalizedName() + "." + name;
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
String name = "";
switch (itemstack.getItemDamage()) {
case 0: {
name = "potentia";
break;
}
case 1: {
name = "ignis";
break;
}
case 2: {
name = "auram";
break;
}
case 3: {
name = "arbor";
break;
}
case 4: {
name = "aer";
break;
}
default:
name = "nothing";
}
return getUnlocalizedName() + "." + name;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
list.add("Going away next version.");
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
list.add("Going away next version.");
}
@Override
public int getMetadata(int meta) {
return meta;
}
@Override
public int getMetadata(int meta) {
return meta;
}
}
@@ -9,13 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.foci;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.module.base.items.foci.ItemBaseFocus;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.ElectroMagicTools;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -26,65 +24,68 @@ import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.items.wands.ItemWandCasting;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.base.items.foci.ItemBaseFocus;
import tombenpotter.emt.common.util.ConfigHandler;
public class ItemChargeFocus extends ItemBaseFocus {
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10);
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10);
public ItemChargeFocus() {
super();
}
public ItemChargeFocus() {
super();
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":chargefocus");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":chargefocus");
}
@Override
public int getFocusColor() {
return 0xFFFF00;
}
@Override
public int getFocusColor() {
return 0xFFFF00;
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "WANDCHARGING";
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "WANDCHARGING";
}
@Override
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) {
if (!world.isRemote) {
@Override
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) {
if (!world.isRemote) {
int energyLeft = Config.chargeFocusProduction;
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
if (energyLeft > 0) {
if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
} else {
return itemstack;
}
}
for (int j = 0; j < player.inventory.mainInventory.length; j++) {
if (energyLeft > 0) {
if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
} else {
return itemstack;
}
}
}
}
return itemstack;
}
int energyLeft = ConfigHandler.chargeFocusProduction;
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
if (energyLeft > 0) {
if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
} else {
return itemstack;
}
}
for (int j = 0; j < player.inventory.mainInventory.length; j++) {
if (energyLeft > 0) {
if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false);
energyLeft -= sentPacket;
}
} else {
return itemstack;
}
}
}
}
return itemstack;
}
}
@@ -2,9 +2,6 @@ package tombenpotter.emt.common.module.ic2.items.foci;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.module.base.items.foci.ItemBaseFocus;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.ElectroMagicTools;
import ic2.api.item.ElectricItem;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
@@ -12,58 +9,61 @@ import net.minecraft.item.ItemStack;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.items.wands.ItemWandCasting;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.base.items.foci.ItemBaseFocus;
import tombenpotter.emt.common.util.ConfigHandler;
public class ItemWandChargingFocus extends ItemBaseFocus {
AspectList visCost = new AspectList();
AspectList visCost = new AspectList();
public ItemWandChargingFocus() {
super();
}
public ItemWandChargingFocus() {
super();
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":wandchargefocus");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":wandchargefocus");
}
@Override
public int getFocusColor() {
return 0xFFFF450;
}
@Override
public int getFocusColor() {
return 0xFFFF450;
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "ELECTRICCHARGING";
}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "ELECTRICCHARGING";
}
@Override
public boolean isVisCostPerTick() {
return true;
}
@Override
public boolean isVisCostPerTick() {
return true;
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public AspectList getVisCost() {
return visCost;
}
@Override
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) {
@Override
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) {
if (!player.worldObj.isRemote) {
ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem();
if (!player.worldObj.isRemote) {
ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem();
ItemStack armor = player.inventory.armorInventory[1];
if (armor != null) {
if ((ElectricItem.manager.use(armor, Config.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, Config.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, Config.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, Config.wandChargeFocusCost / 4, player)))) {
wandItem.addVis(itemstack, Aspect.ORDER, 1, true);
wandItem.addVis(itemstack, Aspect.FIRE, 1, true);
wandItem.addVis(itemstack, Aspect.ENTROPY, 1, true);
wandItem.addVis(itemstack, Aspect.WATER, 1, true);
wandItem.addVis(itemstack, Aspect.EARTH, 1, true);
wandItem.addVis(itemstack, Aspect.AIR, 1, true);
}
}
}
}
ItemStack armor = player.inventory.armorInventory[1];
if (armor != null) {
if ((ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)))) {
wandItem.addVis(itemstack, Aspect.ORDER, 1, true);
wandItem.addVis(itemstack, Aspect.FIRE, 1, true);
wandItem.addVis(itemstack, Aspect.ENTROPY, 1, true);
wandItem.addVis(itemstack, Aspect.WATER, 1, true);
wandItem.addVis(itemstack, Aspect.EARTH, 1, true);
wandItem.addVis(itemstack, Aspect.AIR, 1, true);
}
}
}
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools;
import cpw.mods.fml.relauncher.Side;
@@ -20,78 +21,78 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import thaumcraft.common.items.equipment.ItemElementalHoe;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ElectroMagicTools;
import java.util.List;
public class ItemElectricHoeGrowth extends ItemElementalHoe implements IElectricItem {
public IIcon icon;
public int maxCharge = 1000000;
public int growthCost = 1000;
public int tillCost = 100;
public IIcon icon;
public int maxCharge = 1000000;
public int growthCost = 1000;
public int tillCost = 100;
public ItemElectricHoeGrowth() {
super(ToolMaterial.EMERALD);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxStackSize(1);
}
public ItemElectricHoeGrowth() {
super(ToolMaterial.EMERALD);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxStackSize(1);
}
/**
* @SideOnly(Side.CLIENT)
* @Override public void registerIcons(IIconRegister iconRegister) {
* this.icon = iconRegister.registerIcon("electromagictools:electrichoegrowth");
* }
*/
/**
* @SideOnly(Side.CLIENT)
* @Override public void registerIcons(IIconRegister iconRegister) {
* this.icon = iconRegister.registerIcon("electromagictools:electrichoegrowth");
* }
*/
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public boolean isRepairable() {
return false;
}
/* IC2 API METHODS */
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return 3;
}
@Override
public int getTier(ItemStack itemStack) {
return 3;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 1000;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 1000;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
}
@@ -9,12 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.module.base.entities.EntityArcher;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -30,173 +29,176 @@ import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.module.base.entities.EntityArcher;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.TextHelper;
import java.util.List;
public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
public int maxCharge = 1000000;
private final int hitCost = 5000;
private final int lightningCost = 75000;
public int maxCharge = 1000000;
private final int hitCost = 5000;
private final int lightningCost = 75000;
public ItemElectricThorHammer() {
super(ToolMaterial.EMERALD);
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxDamage(27);
this.setMaxStackSize(1);
// OreDictionary.registerOre("craftingToolForgeHammer", this);
}
public ItemElectricThorHammer() {
super(ToolMaterial.EMERALD);
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxDamage(27);
this.setMaxStackSize(1);
// OreDictionary.registerOre("craftingToolForgeHammer", this);
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":hammer/electricthorhammer");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":hammer/electricthorhammer");
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 19F);
}
return false;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 19F);
}
return false;
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
list.add(player.getCommandSenderName() + "'s Hammer");
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
list.add(player.getCommandSenderName() + TextHelper.localize("tooltip.EMT.hammer.electric"));
}
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
if (player.capabilities.isCreativeMode) {
return itemstack;
} else if (ElectricItem.manager.canUse(itemstack, lightningCost)) {
player.swingItem();
// Corners
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 8));
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
if (player.capabilities.isCreativeMode) {
return itemstack;
} else if (ElectricItem.manager.canUse(itemstack, lightningCost)) {
player.swingItem();
// Corners
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 8));
// Fronts
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ + 8));
// Fronts
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ + 8));
// Others
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 1));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 2));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 3));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 4));
// Others
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 1));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 2));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 3));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 4));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 1));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 2));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 3));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 4));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 1));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 2));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 3));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 4));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 1, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 2, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 3, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 4, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 1, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 2, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 3, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 4, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 1, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 2, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 3, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 4, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 1, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 2, player.posY, player.posZ - 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 3, player.posY, player.posZ + 8));
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 4, player.posY, player.posZ - 8));
EntityArcher archer;
archer = new EntityArcher(world);
archer.setPosition(player.posX + 8, player.posY + 2, player.posZ - 8);
world.spawnEntityInWorld(archer);
EntityArcher archer;
archer = new EntityArcher(world);
archer.setPosition(player.posX + 8, player.posY + 2, player.posZ - 8);
world.spawnEntityInWorld(archer);
EntityArcher archer1;
archer1 = new EntityArcher(world);
archer1.setPosition(player.posX - 8, player.posY + 2, player.posZ + 8);
world.spawnEntityInWorld(archer1);
EntityArcher archer1;
archer1 = new EntityArcher(world);
archer1.setPosition(player.posX - 8, player.posY + 2, player.posZ + 8);
world.spawnEntityInWorld(archer1);
EntityArcher archer2;
archer2 = new EntityArcher(world);
archer2.setPosition(player.posX - 8, player.posY + 2, player.posZ - 8);
world.spawnEntityInWorld(archer2);
EntityArcher archer2;
archer2 = new EntityArcher(world);
archer2.setPosition(player.posX - 8, player.posY + 2, player.posZ - 8);
world.spawnEntityInWorld(archer2);
EntityArcher archer3;
archer3 = new EntityArcher(world);
archer3.setPosition(player.posX + 8, player.posY + 2, player.posZ + 8);
world.spawnEntityInWorld(archer3);
ElectricItem.manager.use(itemstack, lightningCost, player);
return itemstack;
} else {
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ));
player.addPotionEffect(new PotionEffect(Potion.harm.getId(), 1, 1));
return itemstack;
}
}
EntityArcher archer3;
archer3 = new EntityArcher(world);
archer3.setPosition(player.posX + 8, player.posY + 2, player.posZ + 8);
world.spawnEntityInWorld(archer3);
ElectricItem.manager.use(itemstack, lightningCost, player);
return itemstack;
} else {
world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ));
player.addPotionEffect(new PotionEffect(Potion.harm.getId(), 1, 1));
return itemstack;
}
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public int getItemEnchantability() {
if (Config.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public int getItemEnchantability() {
if (ConfigHandler.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
return Config.enchanting;
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
return ConfigHandler.enchanting;
}
/* IC2 API METHODS */
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 100;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 100;
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools.chainsaws;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.block.Block;
@@ -30,154 +30,155 @@ import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import net.minecraftforge.event.ForgeEventFactory;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
import java.util.List;
public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
public int maxCharge = 40000;
public int cost = 200;
public int hitCost = 300;
public int tier = 2;
public int maxCharge = 40000;
public int cost = 200;
public int hitCost = 300;
public int tier = 2;
public ItemDiamondChainsaw() {
super(ToolMaterial.EMERALD);
this.efficiencyOnProperMaterial = 16F;
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxDamage(27);
this.setMaxStackSize(1);
}
public ItemDiamondChainsaw() {
super(ToolMaterial.EMERALD);
this.efficiencyOnProperMaterial = 16F;
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxDamage(27);
this.setMaxStackSize(1);
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":diamondchainsaw");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":diamondchainsaw");
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack) {
return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack);
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack) {
return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack);
}
@Override
public float getDigSpeed(ItemStack stack, Block block, int meta) {
if (!ElectricItem.manager.canUse(stack, cost)) {
return 1.0F;
}
@Override
public float getDigSpeed(ItemStack stack, Block block, int meta) {
if (!ElectricItem.manager.canUse(stack, cost)) {
return 1.0F;
}
if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F) {
return efficiencyOnProperMaterial;
} else {
return super.getDigSpeed(stack, block, meta);
}
}
if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F) {
return efficiencyOnProperMaterial;
} else {
return super.getDigSpeed(stack, block, meta);
}
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F);
}
return false;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F);
}
return false;
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
ItemStack torchStack = player.inventory.mainInventory[i];
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
continue;
}
Item item = torchStack.getItem();
if (!(item instanceof ItemBlock)) {
continue;
}
int oldMeta = torchStack.getItemDamage();
int oldSize = torchStack.stackSize;
boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
if (player.capabilities.isCreativeMode) {
torchStack.setItemDamage(oldMeta);
torchStack.stackSize = oldSize;
} else if (torchStack.stackSize <= 0) {
ForgeEventFactory.onPlayerDestroyItem(player, torchStack);
player.inventory.mainInventory[i] = null;
}
if (result) {
return true;
}
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
ItemStack torchStack = player.inventory.mainInventory[i];
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
continue;
}
Item item = torchStack.getItem();
if (!(item instanceof ItemBlock)) {
continue;
}
int oldMeta = torchStack.getItemDamage();
int oldSize = torchStack.stackSize;
boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
if (player.capabilities.isCreativeMode) {
torchStack.setItemDamage(oldMeta);
torchStack.stackSize = oldSize;
} else if (torchStack.stackSize <= 0) {
ForgeEventFactory.onPlayerDestroyItem(player, torchStack);
player.inventory.mainInventory[i] = null;
}
if (result) {
return true;
}
}
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public int getItemEnchantability() {
if (Config.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public int getItemEnchantability() {
if (ConfigHandler.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
return Config.enchanting;
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
return ConfigHandler.enchanting;
}
/* IC2 API METHODS */
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return tier;
}
@Override
public int getTier(ItemStack itemStack) {
return tier;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 300;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 300;
}
}
@@ -11,6 +11,7 @@
*
* This class originally belongs to Azanor, but with his permission I took it, and modified it to make it work as I wanted to.
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools.chainsaws;
import cpw.mods.fml.common.network.NetworkRegistry;
@@ -27,81 +28,81 @@ import thaumcraft.common.lib.Utils;
import thaumcraft.common.lib.network.PacketHandler;
import thaumcraft.common.lib.network.fx.PacketFXBlockBubble;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import java.awt.*;
import java.util.ArrayList;
public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
boolean alternateServer;
boolean alternateClient;
@SuppressWarnings("rawtypes")
public static ArrayList oreDictLogs = new ArrayList();
boolean alternateServer;
boolean alternateClient;
@SuppressWarnings("rawtypes")
public static ArrayList oreDictLogs = new ArrayList();
public ItemStreamChainsaw() {
this.efficiencyOnProperMaterial = 25F;
alternateServer = false;
alternateClient = false;
setCreativeTab(CreativeTab.tabTombenpotter);
this.maxStackSize = 1;
this.setMaxDamage(27);
maxCharge = 900000;
cost = 400;
hitCost = 500;
tier = 3;
}
public ItemStreamChainsaw() {
this.efficiencyOnProperMaterial = 25F;
alternateServer = false;
alternateClient = false;
setCreativeTab(ElectroMagicTools.tabEMT);
this.maxStackSize = 1;
this.setMaxDamage(27);
maxCharge = 900000;
cost = 400;
hitCost = 500;
tier = 3;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":streamchainsaw");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":streamchainsaw");
}
@Override
public EnumAction getItemUseAction(ItemStack itemstack) {
return EnumAction.bow;
}
@Override
public EnumAction getItemUseAction(ItemStack itemstack) {
return EnumAction.bow;
}
@Override
public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) {
Block bi = world.getBlock(x, y, z);
if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z))) {
if (!world.isRemote) {
if (Utils.breakFurthestBlock(world, x, y, z, bi, player)) {
world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F);
ElectricItem.manager.use(itemstack, cost, player);
this.alternateServer = (!this.alternateServer);
}
} else {
player.swingItem();
ElectricItem.manager.use(itemstack, cost, player);
this.alternateClient = (!this.alternateClient);
}
}
return super.onItemUse(itemstack, player, world, x, y, z, par7, par8, par9, par10);
}
@Override
public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) {
Block bi = world.getBlock(x, y, z);
if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z))) {
if (!world.isRemote) {
if (Utils.breakFurthestBlock(world, x, y, z, bi, player)) {
world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F);
ElectricItem.manager.use(itemstack, cost, player);
this.alternateServer = (!this.alternateServer);
}
} else {
player.swingItem();
ElectricItem.manager.use(itemstack, cost, player);
this.alternateClient = (!this.alternateClient);
}
}
return super.onItemUse(itemstack, player, world, x, y, z, par7, par8, par9, par10);
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
World world = player.worldObj;
Block bi = world.getBlock(x, y, z);
if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z))) {
if (!world.isRemote) {
Utils.breakFurthestBlock(world, x, y, z, bi, player);
PacketHandler.INSTANCE.sendToAllAround(new PacketFXBlockBubble(x, y, z, new Color(0.33F, 0.33F, 1.0F).getRGB()), new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32.0D));
@Override
public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
World world = player.worldObj;
Block bi = world.getBlock(x, y, z);
if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z))) {
if (!world.isRemote) {
Utils.breakFurthestBlock(world, x, y, z, bi, player);
PacketHandler.INSTANCE.sendToAllAround(new PacketFXBlockBubble(x, y, z, new Color(0.33F, 0.33F, 1.0F).getRGB()), new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32.0D));
world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F);
}
ElectricItem.manager.use(itemstack, cost, player);
return true;
}
return super.onBlockStartBreak(itemstack, x, y, z, player);
}
world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F);
}
ElectricItem.manager.use(itemstack, cost, player);
return true;
}
return super.onBlockStartBreak(itemstack, x, y, z, player);
}
/* IC2 API METHODS */
@Override
public double getTransferLimit(ItemStack itemStack) {
return 900;
}
/* IC2 API METHODS */
@Override
public double getTransferLimit(ItemStack itemStack) {
return 900;
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools.chainsaws;
import cpw.mods.fml.relauncher.Side;
@@ -22,43 +23,43 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
public class ItemThaumiumChainsaw extends ItemDiamondChainsaw {
public ItemThaumiumChainsaw() {
this.efficiencyOnProperMaterial = 21F;
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxDamage(27);
this.setMaxStackSize(1);
maxCharge = 60000;
cost = 250;
hitCost = 350;
}
public ItemThaumiumChainsaw() {
this.efficiencyOnProperMaterial = 21F;
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxDamage(27);
this.setMaxStackSize(1);
maxCharge = 60000;
cost = 250;
hitCost = 350;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":thaumiumchainsaw");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":thaumiumchainsaw");
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F);
}
return false;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F);
}
return false;
}
/* IC2 API METHODS */
@Override
public double getTransferLimit(ItemStack itemStack) {
return 600;
}
/* IC2 API METHODS */
@Override
public double getTransferLimit(ItemStack itemStack) {
return 600;
}
}
@@ -11,11 +11,11 @@
*
* This class originally belongs to Azanor, but with his permission I took it, and modified it to make it work as I wanted to.
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools.drills;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
@@ -39,171 +39,173 @@ import thaumcraft.common.Thaumcraft;
import thaumcraft.common.entities.EntityFollowingItem;
import thaumcraft.common.lib.Utils;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
import javax.swing.*;
import java.util.ArrayList;
import java.util.Iterator;
public class ItemRockbreakerDrill extends ItemThaumiumDrill {
private static final Block[] isEffective = {Blocks.nether_brick, Blocks.netherrack, Blocks.glowstone, Blocks.iron_block, Blocks.gold_block, Blocks.diamond_block, Blocks.lapis_block, Blocks.redstone_block, Blocks.redstone_ore, Blocks.emerald_ore, Blocks.emerald_block, Blocks.stonebrick, Blocks.glass, Blocks.stone, Blocks.gold_ore, Blocks.iron_ore, Blocks.coal_ore, Blocks.cobblestone, Blocks.diamond_ore, Blocks.lapis_ore, Blocks.dirt, Blocks.gravel, Blocks.sand, Blocks.sandstone, Blocks.soul_sand, Blocks.clay, Blocks.grass, Blocks.snow_layer, Blocks.snow, Blocks.farmland, Blocks.hardened_clay, Blocks.stained_hardened_clay, Blocks.mossy_cobblestone};
public Icon icon;
int side;
public int searchCost = 1000;
public int hitCost = 400;
public ItemRockbreakerDrill() {
side = 0;
setCreativeTab(CreativeTab.tabTombenpotter);
this.efficiencyOnProperMaterial = 25F;
this.setMaxStackSize(1);
if (Config.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(2571);
}
maxCharge = 900000;
transferLimit = 900;
tier = 3;
}
private static final Block[] isEffective = {Blocks.nether_brick, Blocks.netherrack, Blocks.glowstone, Blocks.iron_block, Blocks.gold_block, Blocks.diamond_block, Blocks.lapis_block, Blocks.redstone_block, Blocks.redstone_ore, Blocks.emerald_ore, Blocks.emerald_block, Blocks.stonebrick, Blocks.glass, Blocks.stone, Blocks.gold_ore, Blocks.iron_ore, Blocks.coal_ore, Blocks.cobblestone, Blocks.diamond_ore, Blocks.lapis_ore, Blocks.dirt, Blocks.gravel, Blocks.sand, Blocks.sandstone, Blocks.soul_sand, Blocks.clay, Blocks.grass, Blocks.snow_layer, Blocks.snow, Blocks.farmland, Blocks.hardened_clay, Blocks.stained_hardened_clay, Blocks.mossy_cobblestone};
public Icon icon;
int side;
public int searchCost = 1000;
public int hitCost = 400;
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":rockbreakerdrill");
}
public ItemRockbreakerDrill() {
side = 0;
setCreativeTab(ElectroMagicTools.tabEMT);
this.efficiencyOnProperMaterial = 25F;
this.setMaxStackSize(1);
if (ConfigHandler.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(2571);
}
maxCharge = 900000;
transferLimit = 900;
tier = 3;
}
private boolean isEffectiveAgainst(Block block) {
for (int var3 = 0; var3 < isEffective.length; var3++) {
if (isEffective[var3] == block) {
return true;
}
}
return false;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":rockbreakerdrill");
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player) {
MovingObjectPosition movingobjectposition = Utils.getTargetBlock(((Entity) (player)).worldObj, player, true);
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectType.BLOCK) {
side = movingobjectposition.sideHit;
}
return super.onBlockStartBreak(itemstack, X, Y, Z, player);
}
private boolean isEffectiveAgainst(Block block) {
for (int var3 = 0; var3 < isEffective.length; var3++) {
if (isEffective[var3] == block) {
return true;
}
}
return false;
}
@SuppressWarnings("rawtypes")
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) {
if (Config.toolsInBore == false) {
cost = 350;
} else {
cost = 1;
}
if (entityLiving.isSneaking()) {
if (ElectricItem.manager.canUse(stack, cost)) {
ElectricItem.manager.use(stack, cost, entityLiving);
}
return true;
}
int md = world.getBlockMetadata(x, y, z);
if (ForgeHooks.isToolEffective(stack, block, md) || isEffectiveAgainst(block)) {
for (int aa = -1; aa <= 1; aa++) {
for (int bb = -1; bb <= 1; bb++) {
int xx = 0;
int yy = 0;
int zz = 0;
if (side <= 1) {
xx = aa;
zz = bb;
} else if (side <= 3) {
xx = aa;
yy = bb;
} else {
zz = aa;
yy = bb;
}
Block bl = world.getBlock(x + xx, y + yy, z + zz);
md = world.getBlockMetadata(x + xx, y + yy, z + zz);
if (!ForgeHooks.isToolEffective(stack, bl, md) && !isEffectiveAgainst(bl)) {
continue;
}
if (ElectricItem.manager.canUse(stack, cost)) {
ElectricItem.manager.use(stack, cost, entityLiving);
}
int fortune = EnchantmentHelper.getFortuneModifier(entityLiving);
world.setBlockToAir(x + xx, y + yy, z + zz);
ArrayList ret = bl.getDrops(world, x + xx, y + yy, z + zz, md, fortune);
boolean creative = false;
if ((entityLiving instanceof EntityPlayer) && ((EntityPlayer) entityLiving).capabilities.isCreativeMode) {
creative = true;
}
if (ret.size() <= 0 || creative || ((Entity) (entityLiving)).worldObj.isRemote) {
continue;
}
ItemStack is;
for (Iterator i$ = ret.iterator(); i$.hasNext(); world.spawnEntityInWorld(new EntityFollowingItem(world, (double) x + (double) xx + 0.5D, (double) y + (double) yy + 0.5D, (double) z + (double) zz + 0.5D, is, entityLiving, 3))) {
is = (ItemStack) i$.next();
}
}
}
}
return true;
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player) {
MovingObjectPosition movingobjectposition = Utils.getTargetBlock(((Entity) (player)).worldObj, player, true);
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectType.BLOCK) {
side = movingobjectposition.sideHit;
}
return super.onBlockStartBreak(itemstack, X, Y, Z, player);
}
@SuppressWarnings("unused")
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
if (!player.isSneaking()) {
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
ItemStack torchStack = player.inventory.mainInventory[i];
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
continue;
}
Item item = torchStack.getItem();
if (!(item instanceof ItemBlock)) {
continue;
}
int oldMeta = torchStack.getItemDamage();
int oldSize = torchStack.stackSize;
boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
if (player.capabilities.isCreativeMode) {
torchStack.setItemDamage(oldMeta);
torchStack.stackSize = oldSize;
} else if (torchStack.stackSize <= 0) {
ForgeEventFactory.onPlayerDestroyItem(player, torchStack);
player.inventory.mainInventory[i] = null;
}
if (result) {
return true;
}
}
} else {
ElectricItem.manager.use(stack, searchCost, player);
if (!world.isRemote) {
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F);
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, xOffset, zOffset);
}
Minecraft mc = Minecraft.getMinecraft();
Thaumcraft.instance.renderEventHandler.startScan(player, x, y, z, System.currentTimeMillis() + 5000L);
player.swingItem();
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
@SuppressWarnings("rawtypes")
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) {
if (ConfigHandler.toolsInBore == false) {
cost = 350;
} else {
cost = 1;
}
if (entityLiving.isSneaking()) {
if (ElectricItem.manager.canUse(stack, cost)) {
ElectricItem.manager.use(stack, cost, entityLiving);
}
return true;
}
int md = world.getBlockMetadata(x, y, z);
if (ForgeHooks.isToolEffective(stack, block, md) || isEffectiveAgainst(block)) {
for (int aa = -1; aa <= 1; aa++) {
for (int bb = -1; bb <= 1; bb++) {
int xx = 0;
int yy = 0;
int zz = 0;
if (side <= 1) {
xx = aa;
zz = bb;
} else if (side <= 3) {
xx = aa;
yy = bb;
} else {
zz = aa;
yy = bb;
}
Block bl = world.getBlock(x + xx, y + yy, z + zz);
md = world.getBlockMetadata(x + xx, y + yy, z + zz);
if (!ForgeHooks.isToolEffective(stack, bl, md) && !isEffectiveAgainst(bl)) {
continue;
}
if (ElectricItem.manager.canUse(stack, cost)) {
ElectricItem.manager.use(stack, cost, entityLiving);
}
int fortune = EnchantmentHelper.getFortuneModifier(entityLiving);
world.setBlockToAir(x + xx, y + yy, z + zz);
ArrayList ret = bl.getDrops(world, x + xx, y + yy, z + zz, md, fortune);
boolean creative = false;
if ((entityLiving instanceof EntityPlayer) && ((EntityPlayer) entityLiving).capabilities.isCreativeMode) {
creative = true;
}
if (ret.size() <= 0 || creative || ((Entity) (entityLiving)).worldObj.isRemote) {
continue;
}
ItemStack is;
for (Iterator i$ = ret.iterator(); i$.hasNext(); world.spawnEntityInWorld(new EntityFollowingItem(world, (double) x + (double) xx + 0.5D, (double) y + (double) yy + 0.5D, (double) z + (double) zz + 0.5D, is, entityLiving, 3))) {
is = (ItemStack) i$.next();
}
}
}
}
return true;
}
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
@SuppressWarnings("unused")
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
if (!player.isSneaking()) {
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
ItemStack torchStack = player.inventory.mainInventory[i];
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
continue;
}
Item item = torchStack.getItem();
if (!(item instanceof ItemBlock)) {
continue;
}
int oldMeta = torchStack.getItemDamage();
int oldSize = torchStack.stackSize;
boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
if (player.capabilities.isCreativeMode) {
torchStack.setItemDamage(oldMeta);
torchStack.stackSize = oldSize;
} else if (torchStack.stackSize <= 0) {
ForgeEventFactory.onPlayerDestroyItem(player, torchStack);
player.inventory.mainInventory[i] = null;
}
if (result) {
return true;
}
}
} else {
ElectricItem.manager.use(stack, searchCost, player);
if (!world.isRemote) {
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F);
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, xOffset, zOffset);
}
Minecraft mc = Minecraft.getMinecraft();
Thaumcraft.instance.renderEventHandler.startScan(player, x, y, z, System.currentTimeMillis() + 5000L);
player.swingItem();
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
if (!((Entity) (player)).worldObj.isRemote && (!(entity instanceof EntityPlayer) || MinecraftServer.getServer().isPVPEnabled())) {
entity.setFire(2);
}
return super.onLeftClickEntity(stack, player, entity);
}
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F);
}
return false;
}
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
if (!((Entity) (player)).worldObj.isRemote && (!(entity instanceof EntityPlayer) || MinecraftServer.getServer().isPVPEnabled())) {
entity.setFire(2);
}
return super.onLeftClickEntity(stack, player, entity);
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F);
}
return false;
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools.drills;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.block.Block;
@@ -29,160 +29,161 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.ForgeEventFactory;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
import java.util.List;
public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
public int maxCharge = 60000;
public int cost;
public int tier = 2;
public double transferLimit = 100;
public int maxCharge = 60000;
public int cost;
public int tier = 2;
public double transferLimit = 100;
public ItemThaumiumDrill() {
super(ToolMaterial.EMERALD);
this.efficiencyOnProperMaterial = 20F;
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxStackSize(1);
if (Config.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(240);
}
}
public ItemThaumiumDrill() {
super(ToolMaterial.EMERALD);
this.efficiencyOnProperMaterial = 20F;
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxStackSize(1);
if (ConfigHandler.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(240);
}
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":thaumiumdrill");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":thaumiumdrill");
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
if (Config.toolsInBore == false) {
cost = 250;
} else {
cost = 1;
}
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
if (ConfigHandler.toolsInBore == false) {
cost = 250;
} else {
cost = 1;
}
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack) {
return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.canHarvestBlock(block, stack);
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack) {
return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.canHarvestBlock(block, stack);
}
@Override
public float getDigSpeed(ItemStack stack, Block block, int meta) {
if (!ElectricItem.manager.canUse(stack, cost)) {
return 1.0F;
}
@Override
public float getDigSpeed(ItemStack stack, Block block, int meta) {
if (!ElectricItem.manager.canUse(stack, cost)) {
return 1.0F;
}
if (Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) {
return efficiencyOnProperMaterial;
} else {
return super.getDigSpeed(stack, block, meta);
}
}
if (Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) {
return efficiencyOnProperMaterial;
} else {
return super.getDigSpeed(stack, block, meta);
}
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase entityliving1) {
return true;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase entityliving1) {
return true;
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
ItemStack torchStack = player.inventory.mainInventory[i];
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
continue;
}
Item item = torchStack.getItem();
if (!(item instanceof ItemBlock)) {
continue;
}
int oldMeta = torchStack.getItemDamage();
int oldSize = torchStack.stackSize;
boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
if (player.capabilities.isCreativeMode) {
torchStack.setItemDamage(oldMeta);
torchStack.stackSize = oldSize;
} else if (torchStack.stackSize <= 0) {
ForgeEventFactory.onPlayerDestroyItem(player, torchStack);
player.inventory.mainInventory[i] = null;
}
if (result) {
return true;
}
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
ItemStack torchStack = player.inventory.mainInventory[i];
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
continue;
}
Item item = torchStack.getItem();
if (!(item instanceof ItemBlock)) {
continue;
}
int oldMeta = torchStack.getItemDamage();
int oldSize = torchStack.stackSize;
boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
if (player.capabilities.isCreativeMode) {
torchStack.setItemDamage(oldMeta);
torchStack.stackSize = oldSize;
} else if (torchStack.stackSize <= 0) {
ForgeEventFactory.onPlayerDestroyItem(player, torchStack);
player.inventory.mainInventory[i] = null;
}
if (result) {
return true;
}
}
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public int getItemEnchantability() {
if (Config.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public int getItemEnchantability() {
if (ConfigHandler.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
return Config.enchanting;
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
return ConfigHandler.enchanting;
}
/* IC2 API METHODS */
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return tier;
}
@Override
public int getTier(ItemStack itemStack) {
return tier;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return transferLimit;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return transferLimit;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools.omnitools;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -23,51 +23,53 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
public class ItemOmnitoolDiamond extends ItemOmnitoolIron {
public ItemOmnitoolDiamond() {
super();
this.efficiencyOnProperMaterial = 16F;
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxStackSize(1);
if (Config.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(350);
}
maxCharge = 70000;
hitCost = 250;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":diamondomnitool");
}
public ItemOmnitoolDiamond() {
super();
this.efficiencyOnProperMaterial = 16F;
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxStackSize(1);
if (ConfigHandler.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(350);
}
maxCharge = 70000;
hitCost = 250;
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
if (Config.toolsInBore == false) {
cost = 200;
} else {
cost = 1;
}
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":diamondomnitool");
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F);
}
return false;
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
if (ConfigHandler.toolsInBore == false) {
cost = 200;
} else {
cost = 1;
}
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
/* IC2 API METHODS */
@Override
public double getTransferLimit(ItemStack itemStack) {
return 400;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F);
}
return false;
}
/* IC2 API METHODS */
@Override
public double getTransferLimit(ItemStack itemStack) {
return 400;
}
}
@@ -9,13 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools.omnitools;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ElectroMagicTools;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.block.Block;
@@ -31,163 +29,166 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import net.minecraftforge.event.ForgeEventFactory;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
import java.util.List;
public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
public int maxCharge = 20000;
public int cost;
public int hitCost = 125;
public int maxCharge = 20000;
public int cost;
public int hitCost = 125;
public ItemOmnitoolIron() {
super(ToolMaterial.EMERALD);
this.efficiencyOnProperMaterial = 13F;
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxStackSize(1);
if (Config.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(200);
}
}
public ItemOmnitoolIron() {
super(ToolMaterial.EMERALD);
this.efficiencyOnProperMaterial = 13F;
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxStackSize(1);
if (ConfigHandler.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(200);
}
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":ironomnitool");
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":ironomnitool");
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1);
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
itemList.add(charged);
}
if (getEmptyItem(itemStack) == this) {
itemList.add(new ItemStack(this, 1, getMaxDamage()));
}
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving)
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving)
{
if (Config.toolsInBore == false) {
cost = 100;
} else {
cost = 1;
}
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
{
if (ConfigHandler.toolsInBore == false) {
cost = 100;
} else {
cost = 1;
}
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack) {
return Items.iron_axe.canHarvestBlock(block, stack) || Items.iron_sword.canHarvestBlock(block, stack) || Items.iron_pickaxe.canHarvestBlock(block, stack) || Items.iron_shovel.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack);
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack) {
return Items.iron_axe.canHarvestBlock(block, stack) || Items.iron_sword.canHarvestBlock(block, stack) || Items.iron_pickaxe.canHarvestBlock(block, stack) || Items.iron_shovel.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack);
}
@Override
public float getDigSpeed(ItemStack stack, Block block, int meta) {
if (!ElectricItem.manager.canUse(stack, cost)) {
return 1.0F;
}
@Override
public float getDigSpeed(ItemStack stack, Block block, int meta) {
if (!ElectricItem.manager.canUse(stack, cost)) {
return 1.0F;
}
if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F || Items.shears.getDigSpeed(stack, block, meta) > 1.0F) {
return efficiencyOnProperMaterial;
} else {
return super.getDigSpeed(stack, block, meta);
}
}
if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F || Items.shears.getDigSpeed(stack, block, meta) > 1.0F) {
return efficiencyOnProperMaterial;
} else {
return super.getDigSpeed(stack, block, meta);
}
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 8F);
}
return false;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 8F);
}
return false;
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
ItemStack torchStack = player.inventory.mainInventory[i];
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
continue;
}
Item item = torchStack.getItem();
if (!(item instanceof ItemBlock)) {
continue;
}
int oldMeta = torchStack.getItemDamage();
int oldSize = torchStack.stackSize;
boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
if (player.capabilities.isCreativeMode) {
torchStack.setItemDamage(oldMeta);
torchStack.stackSize = oldSize;
} else if (torchStack.stackSize <= 0) {
ForgeEventFactory.onPlayerDestroyItem(player, torchStack);
player.inventory.mainInventory[i] = null;
}
if (result) {
return true;
}
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
ItemStack torchStack = player.inventory.mainInventory[i];
if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase().contains("torch")) {
continue;
}
Item item = torchStack.getItem();
if (!(item instanceof ItemBlock)) {
continue;
}
int oldMeta = torchStack.getItemDamage();
int oldSize = torchStack.stackSize;
boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset);
if (player.capabilities.isCreativeMode) {
torchStack.setItemDamage(oldMeta);
torchStack.stackSize = oldSize;
} else if (torchStack.stackSize <= 0) {
ForgeEventFactory.onPlayerDestroyItem(player, torchStack);
player.inventory.mainInventory[i] = null;
}
if (result) {
return true;
}
}
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public boolean isRepairable() {
return false;
}
@Override
public int getItemEnchantability() {
if (Config.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public int getItemEnchantability() {
if (ConfigHandler.enchanting == false) {
return 0;
} else {
return 4;
}
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
return Config.enchanting;
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
return ConfigHandler.enchanting;
}
/* IC2 API METHODS */
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getChargedItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack) {
return this;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public boolean canProvideEnergy(ItemStack itemStack) {
return false;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public int getTier(ItemStack itemStack) {
return 2;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 200;
}
@Override
public double getTransferLimit(ItemStack itemStack) {
return 200;
}
}
@@ -9,11 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.items.tools.omnitools;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.ElectricItem;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -23,52 +23,53 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.util.CreativeTab;
import tombenpotter.emt.ModInformation;
import tombenpotter.emt.common.util.ConfigHandler;
public class ItemOmnitoolThaumium extends ItemOmnitoolDiamond {
public ItemOmnitoolThaumium() {
super();
this.efficiencyOnProperMaterial = 21F;
this.setCreativeTab(CreativeTab.tabTombenpotter);
this.setMaxStackSize(1);
if (Config.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(467);
}
maxCharge = 140000;
hitCost = 650;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ElectroMagicTools.texturePath + ":thaumiumomnitool");
}
public ItemOmnitoolThaumium() {
super();
this.efficiencyOnProperMaterial = 21F;
this.setCreativeTab(ElectroMagicTools.tabEMT);
this.setMaxStackSize(1);
if (ConfigHandler.toolsInBore == false) {
this.setMaxDamage(27);
} else {
this.setMaxDamage(467);
}
maxCharge = 140000;
hitCost = 650;
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
if (Config.toolsInBore == false) {
cost = 300;
} else {
cost = 1;
}
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":thaumiumomnitool");
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F);
}
return false;
}
@Override
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
if (ConfigHandler.toolsInBore == false) {
cost = 300;
} else {
cost = 1;
}
ElectricItem.manager.use(stack, cost, entityLiving);
return true;
}
/* IC2 API METHODS */
@Override
public double getTransferLimit(ItemStack itemStack) {
return 800;
}
@Override
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F);
}
return false;
}
/* IC2 API METHODS */
@Override
public double getTransferLimit(ItemStack itemStack) {
return 800;
}
}
@@ -9,12 +9,11 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.recipes;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import tombenpotter.emt.common.module.ic2.IC2ModuleItemRegistry;
import ic2.api.item.IC2Items;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@@ -22,54 +21,56 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.common.config.ConfigItems;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.module.ic2.IC2ModuleItemRegistry;
import tombenpotter.emt.common.util.TextHelper;
public class EMTInitRecipes {
public static void add() {
public static void add() {
/** Crafting Recipes **/
ironOmnitool = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.ironOmnitool), "X", "Z", "Y", 'X', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', IC2Items.getItem("plateiron"));
diamondChainsaw = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.diamondChainsaw), " X ", "XYX", 'X', new ItemStack(Items.diamond), 'Y', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE));
ductTape = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 9), "XXX", "YYY", "XXX", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 8), 'Y', new ItemStack(Items.paper));
featherMesh = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 7), "XYX", "YXY", "XYX", 'X', new ItemStack(Items.feather), 'Y', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 9));
featherWing = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 12), "XYZ", "XYZ", "XYZ", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 7), 'Y', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 8), 'Z', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 11));
featherWings = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.featherWing), "XX", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 12));
taintedFeathers = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 14), " X ", "XYX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 12), 'Y', new ItemStack(Items.feather));
/** Crafting Recipes **/
ironOmnitool = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.ironOmnitool), "X", "Z", "Y", 'X', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', IC2Items.getItem("plateiron"));
diamondChainsaw = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.diamondChainsaw), " X ", "XYX", 'X', new ItemStack(Items.diamond), 'Y', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE));
ductTape = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 9), "XXX", "YYY", "XXX", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 8), 'Y', new ItemStack(Items.paper));
featherMesh = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 7), "XYX", "YXY", "XYX", 'X', new ItemStack(Items.feather), 'Y', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 9));
featherWing = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 12), "XYZ", "XYZ", "XYZ", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 7), 'Y', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 8), 'Z', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 11));
featherWings = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.featherWing), "XX", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 12));
taintedFeathers = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 14), " X ", "XYX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 12), 'Y', new ItemStack(Items.feather));
if (Loader.isModLoaded("gregtech_addon") == false) {
GameRegistry.addShapedRecipe(IC2Items.getItem("diamondDrill"), " Y ", "YXY", 'Y', new ItemStack(Items.diamond), 'X', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE));
} else {
FMLLog.info("[EMT] Gregtech Addon detected. Disabling the fix for the Diamond Drill recipe.");
}
if (!Loader.isModLoaded("gregtech_addon")) {
GameRegistry.addShapedRecipe(IC2Items.getItem("diamondDrill"), " Y ", "YXY", 'Y', new ItemStack(Items.diamond), 'X', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE));
} else {
ElectroMagicTools.logger.info(TextHelper.localize("console.EMT.modLoaded.GT"));
}
GameRegistry.addRecipe(IC2Items.getItem("nanoHelmet"), "XYX", "XZX", 'X', IC2Items.getItem("carbonPlate"), 'Y', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(IC2Items.getItem("nightvisionGoggles").getItem(), 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace));
GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', IC2Items.getItem("reBattery"), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace));
GameRegistry.addRecipe(IC2Items.getItem("nanoHelmet"), "XYX", "XZX", 'X', IC2Items.getItem("carbonPlate"), 'Y', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(IC2Items.getItem("nightvisionGoggles").getItem(), 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace));
GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', IC2Items.getItem("reBattery"), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace));
/** OreDict Crafting Recipes **/
for (int i = 0; i < OreDictionary.getOres("logWood").size(); i++) {
cardboard = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 11), "XXX", "YYY", "XXX", 'X', new ItemStack(Items.paper), 'Y', OreDictionary.getOres("logWood").get(i));
}
for (int i = 0; i < OreDictionary.getOres("itemRubber").size(); i++) {
rubberBall = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 10), "XXX", "XXX", "XXX", 'X', OreDictionary.getOres("itemRubber").get(i));
}
/** OreDict Crafting Recipes **/
for (int i = 0; i < OreDictionary.getOres("logWood").size(); i++) {
cardboard = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 11), "XXX", "YYY", "XXX", 'X', new ItemStack(Items.paper), 'Y', OreDictionary.getOres("logWood").get(i));
}
for (int i = 0; i < OreDictionary.getOres("itemRubber").size(); i++) {
rubberBall = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 10), "XXX", "XXX", "XXX", 'X', OreDictionary.getOres("itemRubber").get(i));
}
/** Smelting Recipes **/
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 1), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F);
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 2), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F);
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 3), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F);
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 4), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F);
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 10), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 2, 8), 0.0F);
/** Smelting Recipes **/
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 1), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F);
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 2), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F);
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 3), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F);
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 4), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F);
GameRegistry.addSmelting(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 10), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 2, 8), 0.0F);
}
}
public static IRecipe ironOmnitool;
public static IRecipe diamondChainsaw;
public static IRecipe ductTape;
public static IRecipe rubberBall;
public static IRecipe featherMesh;
public static IRecipe cardboard;
public static IRecipe featherWing;
public static IRecipe featherWings;
public static IRecipe taintedFeathers;
public static IRecipe ironOmnitool;
public static IRecipe diamondChainsaw;
public static IRecipe ductTape;
public static IRecipe rubberBall;
public static IRecipe featherMesh;
public static IRecipe cardboard;
public static IRecipe featherWing;
public static IRecipe featherWings;
public static IRecipe taintedFeathers;
}
@@ -9,9 +9,9 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.recipes;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.registry.GameRegistry;
import ic2.api.item.IC2Items;
import ic2.api.recipe.IRecipeInput;
@@ -30,286 +30,288 @@ import thaumcraft.api.crafting.ShapedArcaneRecipe;
import thaumcraft.api.crafting.ShapelessArcaneRecipe;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
import tombenpotter.emt.common.util.CraftingAspects;
import tombenpotter.emt.ElectroMagicTools;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.IC2ModuleItemRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.CraftingAspects;
import tombenpotter.emt.common.util.TextHelper;
import java.util.Iterator;
public class EMTPostInitRecipes {
public static void add() {
public static void add() {
/** Infusion Recipes **/
/** Infusion Recipes **/
thaumiumDrill = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Drill", new ItemStack(IC2ModuleItemRegistry.thaumiumDrill), 5, CraftingAspects.thaumiumDrillCrafting, new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron")});
thaumiumDrill = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Drill", new ItemStack(IC2ModuleItemRegistry.thaumiumDrill), 5, CraftingAspects.thaumiumDrillCrafting, new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron")});
thaumiumChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Chainsaw", new ItemStack(IC2ModuleItemRegistry.thaumiumChainsaw), 5, CraftingAspects.thaumiumChainsawCrafting, new ItemStack(IC2ModuleItemRegistry.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron")});
thaumiumChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Chainsaw", new ItemStack(IC2ModuleItemRegistry.thaumiumChainsaw), 5, CraftingAspects.thaumiumChainsawCrafting, new ItemStack(IC2ModuleItemRegistry.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron")});
thaumicQuantumHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Goggles of Revealing", new ItemStack(IC2ModuleItemRegistry.quantumThaumicHelmet), 6, CraftingAspects.thaumicQuantumHelmetCrafting, new ItemStack(IC2ModuleItemRegistry.nanoThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.milk_bucket), new ItemStack(IC2Items.getItem("quantumHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("advancedCircuit")});
thaumicQuantumHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Goggles of Revealing", new ItemStack(IC2ModuleItemRegistry.quantumThaumicHelmet), 6, CraftingAspects.thaumicQuantumHelmetCrafting, new ItemStack(IC2ModuleItemRegistry.nanoThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.milk_bucket), new ItemStack(IC2Items.getItem("quantumHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("advancedCircuit")});
thaumicNanoHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Goggles of Revealing", new ItemStack(IC2ModuleItemRegistry.nanoThaumicHelmet), 5, CraftingAspects.thaumicNanoHelmetCrafting, new ItemStack(IC2ModuleItemRegistry.electricGoggles, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.gold_ingot), new ItemStack(IC2Items.getItem("nanoHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("electronicCircuit")});
thaumicNanoHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Goggles of Revealing", new ItemStack(IC2ModuleItemRegistry.nanoThaumicHelmet), 5, CraftingAspects.thaumicNanoHelmetCrafting, new ItemStack(IC2ModuleItemRegistry.electricGoggles, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.gold_ingot), new ItemStack(IC2Items.getItem("nanoHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("electronicCircuit")});
thaumiumOmnitool = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Omnitool", new ItemStack(IC2ModuleItemRegistry.thaumiumOmnitool), 6, CraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(IC2ModuleItemRegistry.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("plateobsidian")});
thaumiumOmnitool = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Omnitool", new ItemStack(IC2ModuleItemRegistry.thaumiumOmnitool), 6, CraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(IC2ModuleItemRegistry.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("plateobsidian")});
diamondOmnitoolToThaumium = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Omnitool", new ItemStack(IC2ModuleItemRegistry.thaumiumOmnitool), 6, CraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(IC2ModuleItemRegistry.diamondOmnitool, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Blocks.diamond_block), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("carbonPlate"), IC2Items.getItem("advancedCircuit")});
diamondOmnitoolToThaumium = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Omnitool", new ItemStack(IC2ModuleItemRegistry.thaumiumOmnitool), 6, CraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(IC2ModuleItemRegistry.diamondOmnitool, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Blocks.diamond_block), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("carbonPlate"), IC2Items.getItem("advancedCircuit")});
explosionFocus = ThaumcraftApi.addInfusionCraftingRecipe("Explosion Focus", new ItemStack(IC2ModuleItemRegistry.explosionFocus), 6, CraftingAspects.laserFocusCrafting, new ItemStack(ConfigItems.itemFocusHellbat, 1), new ItemStack[]{new ItemStack(IC2Items.getItem("miningLaser").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.arrow), new ItemStack(Items.gunpowder), new ItemStack(Items.firework_charge), new ItemStack(ConfigItems.itemResource, 1, 1)});
explosionFocus = ThaumcraftApi.addInfusionCraftingRecipe("Explosion Focus", new ItemStack(IC2ModuleItemRegistry.explosionFocus), 6, CraftingAspects.laserFocusCrafting, new ItemStack(ConfigItems.itemFocusHellbat, 1), new ItemStack[]{new ItemStack(IC2Items.getItem("miningLaser").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.arrow), new ItemStack(Items.gunpowder), new ItemStack(Items.firework_charge), new ItemStack(ConfigItems.itemResource, 1, 1)});
shieldFocus = ThaumcraftApi.addInfusionCraftingRecipe("Shield Focus", new ItemStack(IC2ModuleItemRegistry.shieldFocus), 4, CraftingAspects.shieldFocusCrafting, new ItemStack(ConfigItems.itemFocusPortableHole, 1), new ItemStack[]{IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian), new ItemStack(Blocks.obsidian)});
shieldFocus = ThaumcraftApi.addInfusionCraftingRecipe("Shield Focus", new ItemStack(IC2ModuleItemRegistry.shieldFocus), 4, CraftingAspects.shieldFocusCrafting, new ItemStack(ConfigItems.itemFocusPortableHole, 1), new ItemStack[]{IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian), new ItemStack(Blocks.obsidian)});
potentiaGenerator = ThaumcraftApi.addInfusionCraftingRecipe("Potentia Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), 6, CraftingAspects.potentiaGeneratorCrafting, IC2Items.getItem("semifluidGenerator"), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(ConfigItems.itemFocusTrade), new ItemStack(Blocks.hopper), new ItemStack(ConfigBlocks.blockJar), IC2Items.getItem("mvTransformer"), IC2Items.getItem("advancedMachine"), IC2Items.getItem("orewashingplant"), IC2Items.getItem("scrap")});
potentiaGenerator = ThaumcraftApi.addInfusionCraftingRecipe("Potentia Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), 6, CraftingAspects.potentiaGeneratorCrafting, IC2Items.getItem("semifluidGenerator"), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(ConfigItems.itemFocusTrade), new ItemStack(Blocks.hopper), new ItemStack(ConfigBlocks.blockJar), IC2Items.getItem("mvTransformer"), IC2Items.getItem("advancedMachine"), IC2Items.getItem("orewashingplant"), IC2Items.getItem("scrap")});
streamChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Chainsaw of the Stream", new ItemStack(IC2ModuleItemRegistry.streamChainsaw), 6, CraftingAspects.streamChaisnawCrafting, new ItemStack(IC2ModuleItemRegistry.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.water_bucket), new ItemStack(ConfigItems.itemAxeElemental), new ItemStack(ConfigBlocks.blockMagicalLog), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("compressedPlantBall"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade")});
streamChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Chainsaw of the Stream", new ItemStack(IC2ModuleItemRegistry.streamChainsaw), 6, CraftingAspects.streamChaisnawCrafting, new ItemStack(IC2ModuleItemRegistry.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.water_bucket), new ItemStack(ConfigItems.itemAxeElemental), new ItemStack(ConfigBlocks.blockMagicalLog), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("compressedPlantBall"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade")});
rockbreakerDrill = ThaumcraftApi.addInfusionCraftingRecipe("Drill of the Rockbreaker", new ItemStack(IC2ModuleItemRegistry.rockbreakerDrill), 6, CraftingAspects.rockbreakerDrillCrafting, new ItemStack(IC2ModuleItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.flint_and_steel), new ItemStack(Items.fire_charge), new ItemStack(ConfigItems.itemPickElemental), new ItemStack(ConfigItems.itemShovelElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade")});
rockbreakerDrill = ThaumcraftApi.addInfusionCraftingRecipe("Drill of the Rockbreaker", new ItemStack(IC2ModuleItemRegistry.rockbreakerDrill), 6, CraftingAspects.rockbreakerDrillCrafting, new ItemStack(IC2ModuleItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.flint_and_steel), new ItemStack(Items.fire_charge), new ItemStack(ConfigItems.itemPickElemental), new ItemStack(ConfigItems.itemShovelElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade")});
thorHammer = ThaumcraftApi.addInfusionCraftingRecipe("Mjolnir", new ItemStack(IC2ModuleItemRegistry.thorHammer), 7, CraftingAspects.thorHammerCrafting, new ItemStack(IC2ModuleItemRegistry.taintedThorHammer, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(ConfigItems.itemResource, 1, 1), new ItemStack(ConfigItems.itemFocusShock), IC2Items.getItem("rubber")});
thorHammer = ThaumcraftApi.addInfusionCraftingRecipe("Mjolnir", new ItemStack(IC2ModuleItemRegistry.thorHammer), 7, CraftingAspects.thorHammerCrafting, new ItemStack(IC2ModuleItemRegistry.taintedThorHammer, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(ConfigItems.itemResource, 1, 1), new ItemStack(ConfigItems.itemFocusShock), IC2Items.getItem("rubber")});
superchargedThorHammer = ThaumcraftApi.addInfusionCraftingRecipe("Supercharged Mjolnir", new ItemStack(IC2ModuleItemRegistry.electricThorHammer), 10, CraftingAspects.superchargedThorHammerCrafting, new ItemStack(IC2ModuleItemRegistry.thorHammer, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6), new ItemStack(Blocks.web), new ItemStack(ConfigItems.itemFocusHellbat), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("nanoSaber").getItem(), 1, OreDictionary.WILDCARD_VALUE)});
superchargedThorHammer = ThaumcraftApi.addInfusionCraftingRecipe("Supercharged Mjolnir", new ItemStack(IC2ModuleItemRegistry.electricThorHammer), 10, CraftingAspects.superchargedThorHammerCrafting, new ItemStack(IC2ModuleItemRegistry.thorHammer, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 6), new ItemStack(Blocks.web), new ItemStack(ConfigItems.itemFocusHellbat), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("nanoSaber").getItem(), 1, OreDictionary.WILDCARD_VALUE)});
wandRecharger = ThaumcraftApi.addInfusionCraftingRecipe("Industrial Wand Charging Station", new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 0), 6, CraftingAspects.wandCharger, new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5), new ItemStack[]{IC2Items.getItem("replicator"), IC2Items.getItem("iridiumPlate"), new ItemStack(Blocks.diamond_block), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(ConfigBlocks.blockJar)});
wandRecharger = ThaumcraftApi.addInfusionCraftingRecipe("Industrial Wand Charging Station", new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 0), 6, CraftingAspects.wandCharger, new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5), new ItemStack[]{IC2Items.getItem("replicator"), IC2Items.getItem("iridiumPlate"), new ItemStack(Blocks.diamond_block), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(ConfigBlocks.blockJar)});
solarHelmetRevealing = ThaumcraftApi.addInfusionCraftingRecipe("Solar Helmet of Revealing", new ItemStack(IC2ModuleItemRegistry.solarHelmetRevealing), 5, CraftingAspects.solarHelmetRevealing, new ItemStack(IC2ModuleItemRegistry.quantumThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), IC2Items.getItem("glassFiberCableItem"), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, 4)});
solarHelmetRevealing = ThaumcraftApi.addInfusionCraftingRecipe("Solar Helmet of Revealing", new ItemStack(IC2ModuleItemRegistry.solarHelmetRevealing), 5, CraftingAspects.solarHelmetRevealing, new ItemStack(IC2ModuleItemRegistry.quantumThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), IC2Items.getItem("glassFiberCableItem"), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, 4)});
electricBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Electric Boots of the Traveller", new ItemStack(IC2ModuleItemRegistry.electricBootsTraveller), 2, CraftingAspects.electricBootsTravel, new ItemStack(ConfigItems.itemBootsTraveller), new ItemStack[]{new ItemStack(Items.diamond), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), IC2Items.getItem("hazmatBoots"), new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE)});
electricBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Electric Boots of the Traveller", new ItemStack(IC2ModuleItemRegistry.electricBootsTraveller), 2, CraftingAspects.electricBootsTravel, new ItemStack(ConfigItems.itemBootsTraveller), new ItemStack[]{new ItemStack(Items.diamond), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), IC2Items.getItem("hazmatBoots"), new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE)});
nanoBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Nano Boots of the Traveller", new ItemStack(IC2ModuleItemRegistry.nanoBootsTraveller), 2, CraftingAspects.nanoBootsTravel, new ItemStack(IC2ModuleItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(IC2Items.getItem("nanoBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE)});
nanoBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Nano Boots of the Traveller", new ItemStack(IC2ModuleItemRegistry.nanoBootsTraveller), 2, CraftingAspects.nanoBootsTravel, new ItemStack(IC2ModuleItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(IC2Items.getItem("nanoBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE)});
quantumBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Boots of the Traveller", new ItemStack(IC2ModuleItemRegistry.quantumBootsTraveller), 2, CraftingAspects.quantumBootsTravel, new ItemStack(IC2ModuleItemRegistry.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Blocks.diamond_block), new ItemStack(IC2Items.getItem("quantumBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate")});
quantumBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Boots of the Traveller", new ItemStack(IC2ModuleItemRegistry.quantumBootsTraveller), 2, CraftingAspects.quantumBootsTravel, new ItemStack(IC2ModuleItemRegistry.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Blocks.diamond_block), new ItemStack(IC2Items.getItem("quantumBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate")});
etheralProcessor = ThaumcraftApi.addInfusionCraftingRecipe("Etheral Processor", new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 1), 3, CraftingAspects.etherealProcessor, IC2Items.getItem("macerator"), new ItemStack[]{IC2Items.getItem("electroFurnace"), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.iron_block), new ItemStack(Blocks.iron_block), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5)});
etheralProcessor = ThaumcraftApi.addInfusionCraftingRecipe("Etheral Processor", new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 1), 3, CraftingAspects.etherealProcessor, IC2Items.getItem("macerator"), new ItemStack[]{IC2Items.getItem("electroFurnace"), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.iron_block), new ItemStack(Blocks.iron_block), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5)});
tripleCompressedSolar = ThaumcraftApi.addInfusionCraftingRecipe("Compressed Solars", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), 2, CraftingAspects.compressedSolars, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack[]{new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1)});
tripleCompressedSolar = ThaumcraftApi.addInfusionCraftingRecipe("Compressed Solars", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), 2, CraftingAspects.compressedSolars, new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack[]{new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1)});
electricHoeGrowth = ThaumcraftApi.addInfusionCraftingRecipe("Electric Hoe of Growth", new ItemStack(IC2ModuleItemRegistry.electricHoeGrowth), 4, CraftingAspects.electricHoeGrowth, new ItemStack(ConfigItems.itemHoeElemental), new ItemStack[]{new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("electricHoe").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.dye, 1, 15), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), new ItemStack(Blocks.sapling, 1, OreDictionary.WILDCARD_VALUE)});
electricHoeGrowth = ThaumcraftApi.addInfusionCraftingRecipe("Electric Hoe of Growth", new ItemStack(IC2ModuleItemRegistry.electricHoeGrowth), 4, CraftingAspects.electricHoeGrowth, new ItemStack(ConfigItems.itemHoeElemental), new ItemStack[]{new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("electricHoe").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.dye, 1, 15), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), new ItemStack(Blocks.sapling, 1, OreDictionary.WILDCARD_VALUE)});
chargeFocus = ThaumcraftApi.addInfusionCraftingRecipe("Wand Focus: Charging", new ItemStack(IC2ModuleItemRegistry.chargeFocus), 4, CraftingAspects.chargeFocus, new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{IC2Items.getItem("generator"), IC2Items.getItem("batBox"), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE)});
chargeFocus = ThaumcraftApi.addInfusionCraftingRecipe("Wand Focus: Charging", new ItemStack(IC2ModuleItemRegistry.chargeFocus), 4, CraftingAspects.chargeFocus, new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{IC2Items.getItem("generator"), IC2Items.getItem("batBox"), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE)});
wandChargeFocus = ThaumcraftApi.addInfusionCraftingRecipe("Wand Focus: Wand Charging", new ItemStack(IC2ModuleItemRegistry.wandChargeFocus), 5, CraftingAspects.wandChargeFocus, new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 0), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.chargeFocus), new ItemStack(IC2Items.getItem("energyPack").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate")});
wandChargeFocus = ThaumcraftApi.addInfusionCraftingRecipe("Wand Focus: Wand Charging", new ItemStack(IC2ModuleItemRegistry.wandChargeFocus), 5, CraftingAspects.wandChargeFocus, new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 0), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.chargeFocus), new ItemStack(IC2Items.getItem("energyPack").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate")});
inventoryChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Inventory Charging Ring", new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 1), 6, CraftingAspects.inventoryChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("waterMill"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor")});
inventoryChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Inventory Charging Ring", new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 1), 6, CraftingAspects.inventoryChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("waterMill"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor")});
armorChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Armor Charging Ring", new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 0), 6, CraftingAspects.armorChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("waterMill"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor")});
armorChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Armor Charging Ring", new ItemStack(IC2ModuleItemRegistry.emtBauble, 1, 0), 6, CraftingAspects.armorChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("waterMill"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor")});
nanoWings = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Wings", new ItemStack(IC2ModuleItemRegistry.nanoWing), 4, CraftingAspects.nanoWing, new ItemStack(IC2ModuleItemRegistry.thaumiumWing), new ItemStack[]{IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), new ItemStack(IC2Items.getItem("nanoBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1)});
nanoWings = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Wings", new ItemStack(IC2ModuleItemRegistry.nanoWing), 4, CraftingAspects.nanoWing, new ItemStack(IC2ModuleItemRegistry.thaumiumWing), new ItemStack[]{IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), new ItemStack(IC2Items.getItem("nanoBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1)});
quantumWings = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Wings", new ItemStack(IC2ModuleItemRegistry.quantumWing), 6, CraftingAspects.quantumWing, new ItemStack(IC2ModuleItemRegistry.nanoWing, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1)});
quantumWings = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Wings", new ItemStack(IC2ModuleItemRegistry.quantumWing), 6, CraftingAspects.quantumWing, new ItemStack(IC2ModuleItemRegistry.nanoWing, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1)});
/** Arcane Worktable Recipes **/
/** Arcane Worktable Recipes **/
diamondOmnitool = ThaumcraftApi.addShapelessArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(IC2ModuleItemRegistry.diamondOmnitool), CraftingAspects.diamondOmnitoolCrafting, new ItemStack(IC2ModuleItemRegistry.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE));
diamondOmnitool = ThaumcraftApi.addShapelessArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(IC2ModuleItemRegistry.diamondOmnitool), CraftingAspects.diamondOmnitoolCrafting, new ItemStack(IC2ModuleItemRegistry.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE));
ironOmnitoolToDiamond = ThaumcraftApi.addArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(IC2ModuleItemRegistry.diamondOmnitool), CraftingAspects.diamondOmnitoolCrafting, "XAX", "XBX", "XAX", 'X', new ItemStack(Items.diamond), 'A', IC2Items.getItem("advancedCircuit"), 'B', new ItemStack(IC2ModuleItemRegistry.ironOmnitool, 1, OreDictionary.WILDCARD_VALUE));
ironOmnitoolToDiamond = ThaumcraftApi.addArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(IC2ModuleItemRegistry.diamondOmnitool), CraftingAspects.diamondOmnitoolCrafting, "XAX", "XBX", "XAX", 'X', new ItemStack(Items.diamond), 'A', IC2Items.getItem("advancedCircuit"), 'B', new ItemStack(IC2ModuleItemRegistry.ironOmnitool, 1, OreDictionary.WILDCARD_VALUE));
christmasFocus = ThaumcraftApi.addArcaneCraftingRecipe("Kris-tmas Focus", new ItemStack(IC2ModuleItemRegistry.christmasFocus), CraftingAspects.christmasFocusCrafting, "XYX", "YZY", "XYX", 'X', new ItemStack(Blocks.snow), 'Y', new ItemStack(Blocks.pumpkin), 'Z', new ItemStack(ConfigItems.itemFocusFrost));
christmasFocus = ThaumcraftApi.addArcaneCraftingRecipe("Kris-tmas Focus", new ItemStack(IC2ModuleItemRegistry.christmasFocus), CraftingAspects.christmasFocusCrafting, "XYX", "YZY", "XYX", 'X', new ItemStack(Blocks.snow), 'Y', new ItemStack(Blocks.pumpkin), 'Z', new ItemStack(ConfigItems.itemFocusFrost));
electricGoggles = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", new ItemStack(IC2ModuleItemRegistry.electricGoggles), CraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater);
electricGoggles = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", new ItemStack(IC2ModuleItemRegistry.electricGoggles), CraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater);
shieldBlock = ThaumcraftApi.addArcaneCraftingRecipe("Shield Blocks", new ItemStack(IC2ModuleBlockRegistry.shield, 8), CraftingAspects.shieldBlockCrafting, "XYX", "X X", "XYX", 'X', new ItemStack(Blocks.glass), 'Y', new ItemStack(Blocks.obsidian));
shieldBlock = ThaumcraftApi.addArcaneCraftingRecipe("Shield Blocks", new ItemStack(IC2ModuleBlockRegistry.shield, 8), CraftingAspects.shieldBlockCrafting, "XYX", "X X", "XYX", 'X', new ItemStack(Blocks.glass), 'Y', new ItemStack(Blocks.obsidian));
tinyUranium = ThaumcraftApi.addShapelessArcaneCraftingRecipe("Tiny Uranium", new ItemStack(IC2Items.getItem("smallUran235").getItem(), 7), CraftingAspects.tinyUraniumCrafting, IC2Items.getItem("Uran238"));
tinyUranium = ThaumcraftApi.addShapelessArcaneCraftingRecipe("Tiny Uranium", new ItemStack(IC2Items.getItem("smallUran235").getItem(), 7), CraftingAspects.tinyUraniumCrafting, IC2Items.getItem("Uran238"));
compressedSolar = ThaumcraftApi.addArcaneCraftingRecipe("Compressed Solars", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', IC2Items.getItem("solarPanel"));
compressedSolar = ThaumcraftApi.addArcaneCraftingRecipe("Compressed Solars", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', IC2Items.getItem("solarPanel"));
doubleCompressedSolar = ThaumcraftApi.addArcaneCraftingRecipe("Compressed Solars", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0));
doubleCompressedSolar = ThaumcraftApi.addArcaneCraftingRecipe("Compressed Solars", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0));
electricScribingTools = ThaumcraftApi.addArcaneCraftingRecipe("Electric Scribing Tools", new ItemStack(IC2ModuleItemRegistry.electricScribingTools), CraftingAspects.electricScribingTools, "YXY", "XZX", "YXY", 'Y', IC2Items.getItem("electronicCircuit"), 'X', new ItemStack(ConfigItems.itemInkwell), 'Z', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE));
electricScribingTools = ThaumcraftApi.addArcaneCraftingRecipe("Electric Scribing Tools", new ItemStack(IC2ModuleItemRegistry.electricScribingTools), CraftingAspects.electricScribingTools, "YXY", "XZX", "YXY", 'Y', IC2Items.getItem("electronicCircuit"), 'X', new ItemStack(ConfigItems.itemInkwell), 'Z', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE));
thaumiumWing = ThaumcraftApi.addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 15), CraftingAspects.thaumiumWing, "XYZ", "XYZ", "XYZ", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 14), 'Y', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), 'Z', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 13));
thaumiumWing = ThaumcraftApi.addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 15), CraftingAspects.thaumiumWing, "XYZ", "XYZ", "XYZ", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 14), 'Y', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), 'Z', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 13));
thaumiumWings = ThaumcraftApi.addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(IC2ModuleItemRegistry.thaumiumWing), CraftingAspects.thaumiumWing, "XX", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 15));
thaumiumWings = ThaumcraftApi.addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(IC2ModuleItemRegistry.thaumiumWing), CraftingAspects.thaumiumWing, "XX", 'X', new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 15));
/** Crucible Recipes **/
/** Crucible Recipes **/
ignisGenerator = ThaumcraftApi.addCrucibleRecipe("Ignis Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 1), new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), CraftingAspects.ignisGeneratorCrafting);
ignisGenerator = ThaumcraftApi.addCrucibleRecipe("Ignis Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 1), new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), CraftingAspects.ignisGeneratorCrafting);
auramGenerator = ThaumcraftApi.addCrucibleRecipe("Auram Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 2), new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), CraftingAspects.auramGeneratorCrafting);
auramGenerator = ThaumcraftApi.addCrucibleRecipe("Auram Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 2), new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), CraftingAspects.auramGeneratorCrafting);
arborGenerator = ThaumcraftApi.addCrucibleRecipe("Arbor Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 3), new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), CraftingAspects.arborGeneratorCrafting);
arborGenerator = ThaumcraftApi.addCrucibleRecipe("Arbor Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 3), new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), CraftingAspects.arborGeneratorCrafting);
aerGenerator = ThaumcraftApi.addCrucibleRecipe("Aer Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 4), new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), CraftingAspects.aerGenerator);
aerGenerator = ThaumcraftApi.addCrucibleRecipe("Aer Generator", new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 4), new ItemStack(IC2ModuleBlockRegistry.essentiaGens, 1, 0), CraftingAspects.aerGenerator);
waterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 3), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.waterSolars);
waterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 3), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.waterSolars);
doubleWaterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 4), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.waterSolars);
doubleWaterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 4), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.waterSolars);
tripleWaterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 5), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.waterSolars);
tripleWaterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 5), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.waterSolars);
darkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 6), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.darkSolars);
darkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 6), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.darkSolars);
doubleDarkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 7), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.darkSolars);
doubleDarkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 7), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.darkSolars);
tripleDarkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 8), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.darkSolars);
tripleDarkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 8), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.darkSolars);
orderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 9), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.orderSolars);
orderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 9), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.orderSolars);
doubleOrderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 10), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.orderSolars);
doubleOrderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 10), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.orderSolars);
tripleOrderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 11), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.orderSolars);
tripleOrderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 11), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.orderSolars);
fireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 12), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.fireSolars);
fireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 12), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.fireSolars);
doubleFireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 13), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.fireSolars);
doubleFireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 13), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.fireSolars);
tripleFireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 14), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.fireSolars);
tripleFireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 14), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.fireSolars);
airSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 15), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.airSolars);
airSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 15), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.airSolars);
doubleAirSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 0), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.airSolars);
doubleAirSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 0), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.airSolars);
tripleAirSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.airSolars);
tripleAirSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 1), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.airSolars);
earthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 2), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.earthSolars);
earthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 2), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0), CraftingAspects.earthSolars);
doubleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 3), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.earthSolars);
doubleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 3), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1), CraftingAspects.earthSolars);
tripleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 4), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.earthSolars);
tripleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 4), new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2), CraftingAspects.earthSolars);
portableNode = ThaumcraftApi.addCrucibleRecipe("Portable Node", new ItemStack(IC2ModuleBlockRegistry.portableNode), new ItemStack(ConfigItems.itemJarFilled), CraftingAspects.portableNode);
portableNode = ThaumcraftApi.addCrucibleRecipe("Portable Node", new ItemStack(IC2ModuleBlockRegistry.portableNode), new ItemStack(ConfigItems.itemJarFilled), CraftingAspects.portableNode);
/** IC2 Stuff related recipes **/
/** IC2 Stuff related recipes **/
/* Ore Clusters Macerator Recipes */
ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy();
ironClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)), null, ironClusterRecipe);
ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy();
ironClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)), null, ironClusterRecipe);
ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy();
goldClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)), null, goldClusterRecipe);
ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy();
goldClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)), null, goldClusterRecipe);
ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy();
copperClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)), null, copperClusterRecipe);
ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy();
copperClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)), null, copperClusterRecipe);
ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy();
tinClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)), null, tinClusterRecipe);
ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy();
tinClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)), null, tinClusterRecipe);
ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy();
silverClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)), null, silverClusterRecipe);
ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy();
silverClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)), null, silverClusterRecipe);
ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy();
leadClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)), null, leadClusterRecipe);
ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy();
leadClusterRecipe.stackSize = 22;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)), null, leadClusterRecipe);
/* Thaumium Plates Recipes */
thaumiumPlate = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), "X", "Y", "Z", 'Y', new ItemStack(ConfigItems.itemResource, 1, 2), 'X', new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(Blocks.obsidian));
Recipes.metalformerRolling.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)), null, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5));
thaumiumPlate = GameRegistry.addShapedRecipe(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5), "X", "Y", "Z", 'Y', new ItemStack(ConfigItems.itemResource, 1, 2), 'X', new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(Blocks.obsidian));
Recipes.metalformerRolling.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)), null, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 5));
/* Iron Sheet Recipe */
Recipes.metalformerRolling.addRecipe(new RecipeInputItemStack(IC2Items.getItem("denseplateiron")), null, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 13));
Recipes.metalformerRolling.addRecipe(new RecipeInputItemStack(IC2Items.getItem("denseplateiron")), null, new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 13));
/* Ore Processing for Amber and Cinnabar */
if (Config.removeAmberAndCinnabarMacerating == true) {
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext(); ) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) {
it.remove();
FMLLog.info("[EMT] Electro-Magic Tools : Removing conflicting amber macerating recipe(s)");
}
}
if (ConfigHandler.removeAmberAndCinnabarMacerating == true) {
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext(); ) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) {
it.remove();
ElectroMagicTools.logger.info(TextHelper.localize("console.EMT.recipes.amberConflict"));
}
}
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext(); ) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) {
it.remove();
FMLLog.info("[EMT] Electro-Magic Tools : Removing Conflicting cinnabar macerating recipe(s)");
}
}
}
ItemStack crushedAmberRecipe = new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 1);
crushedAmberRecipe.stackSize = 2;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)), null, crushedAmberRecipe);
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext(); ) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) {
it.remove();
ElectroMagicTools.logger.info(TextHelper.localize("console.EMT.recipes.cinnabarConflict"));
}
}
}
ItemStack crushedAmberRecipe = new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 1);
crushedAmberRecipe.stackSize = 2;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)), null, crushedAmberRecipe);
ItemStack crushedCinnabarRecipe = new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 3);
crushedCinnabarRecipe.stackSize = 2;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)), null, crushedCinnabarRecipe);
ItemStack crushedCinnabarRecipe = new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 3);
crushedCinnabarRecipe.stackSize = 2;
Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)), null, crushedCinnabarRecipe);
NBTTagCompound waterAmount = new NBTTagCompound();
waterAmount.setInteger("amount", 1000);
NBTTagCompound waterAmount = new NBTTagCompound();
waterAmount.setInteger("amount", 1000);
ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust");
smallCopperDust.stackSize = 2;
ItemStack smallTinDust = IC2Items.getItem("smallTinDust");
smallCopperDust.stackSize = 2;
ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust");
smallCopperDust.stackSize = 2;
ItemStack smallTinDust = IC2Items.getItem("smallTinDust");
smallCopperDust.stackSize = 2;
Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 1)), waterAmount, new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 2), smallCopperDust, IC2Items.getItem("stoneDust")});
Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 3)), waterAmount, new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 4), smallTinDust, IC2Items.getItem("stoneDust")});
Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 1)), waterAmount, new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 2), smallCopperDust, IC2Items.getItem("stoneDust")});
Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 3)), waterAmount, new ItemStack[]{new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 4), smallTinDust, IC2Items.getItem("stoneDust")});
NBTTagCompound heatAmount = new NBTTagCompound();
heatAmount.setInteger("minHeat", 1000);
NBTTagCompound heatAmount = new NBTTagCompound();
heatAmount.setInteger("minHeat", 1000);
Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 2)), heatAmount, new ItemStack[]{IC2Items.getItem("smallCopperDust"), new ItemStack(ConfigItems.itemResource, 1, 6)});
Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 4)), heatAmount, new ItemStack[]{IC2Items.getItem("smallTinDust"), new ItemStack(ConfigItems.itemResource, 1, 3)});
}
Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 2)), heatAmount, new ItemStack[]{IC2Items.getItem("smallCopperDust"), new ItemStack(ConfigItems.itemResource, 1, 6)});
Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(IC2ModuleItemRegistry.itemEMTItems, 1, 4)), heatAmount, new ItemStack[]{IC2Items.getItem("smallTinDust"), new ItemStack(ConfigItems.itemResource, 1, 3)});
}
public static InfusionRecipe thaumiumDrill;
public static InfusionRecipe thaumiumChainsaw;
public static InfusionRecipe thaumicQuantumHelmet;
public static InfusionRecipe thaumiumOmnitool;
public static InfusionRecipe thaumicNanoHelmet;
public static InfusionRecipe explosionFocus;
public static InfusionRecipe shieldFocus;
public static InfusionRecipe potentiaGenerator;
public static InfusionRecipe streamChainsaw;
public static InfusionRecipe rockbreakerDrill;
public static InfusionRecipe thorHammer;
public static InfusionRecipe superchargedThorHammer;
public static InfusionRecipe wandRecharger;
public static InfusionRecipe solarHelmetRevealing;
public static InfusionRecipe electricBootsTravel;
public static InfusionRecipe nanoBootsTravel;
public static InfusionRecipe quantumBootsTravel;
public static InfusionRecipe diamondOmnitoolToThaumium;
public static InfusionRecipe etheralProcessor;
public static InfusionRecipe tripleCompressedSolar;
public static InfusionRecipe electricHoeGrowth;
public static InfusionRecipe chargeFocus;
public static InfusionRecipe wandChargeFocus;
public static InfusionRecipe inventoryChargingRing;
public static InfusionRecipe armorChargingRing;
public static InfusionRecipe nanoWings;
public static InfusionRecipe quantumWings;
public static InfusionRecipe thaumiumDrill;
public static InfusionRecipe thaumiumChainsaw;
public static InfusionRecipe thaumicQuantumHelmet;
public static InfusionRecipe thaumiumOmnitool;
public static InfusionRecipe thaumicNanoHelmet;
public static InfusionRecipe explosionFocus;
public static InfusionRecipe shieldFocus;
public static InfusionRecipe potentiaGenerator;
public static InfusionRecipe streamChainsaw;
public static InfusionRecipe rockbreakerDrill;
public static InfusionRecipe thorHammer;
public static InfusionRecipe superchargedThorHammer;
public static InfusionRecipe wandRecharger;
public static InfusionRecipe solarHelmetRevealing;
public static InfusionRecipe electricBootsTravel;
public static InfusionRecipe nanoBootsTravel;
public static InfusionRecipe quantumBootsTravel;
public static InfusionRecipe diamondOmnitoolToThaumium;
public static InfusionRecipe etheralProcessor;
public static InfusionRecipe tripleCompressedSolar;
public static InfusionRecipe electricHoeGrowth;
public static InfusionRecipe chargeFocus;
public static InfusionRecipe wandChargeFocus;
public static InfusionRecipe inventoryChargingRing;
public static InfusionRecipe armorChargingRing;
public static InfusionRecipe nanoWings;
public static InfusionRecipe quantumWings;
public static ShapelessArcaneRecipe diamondOmnitool;
public static ShapelessArcaneRecipe tinyUranium;
public static ShapedArcaneRecipe christmasFocus;
public static ShapedArcaneRecipe electricGoggles;
public static ShapedArcaneRecipe shieldBlock;
public static ShapedArcaneRecipe compressedSolar;
public static ShapedArcaneRecipe doubleCompressedSolar;
public static ShapedArcaneRecipe ironOmnitoolToDiamond;
public static ShapedArcaneRecipe electricScribingTools;
public static ShapedArcaneRecipe thaumiumWing;
public static ShapedArcaneRecipe thaumiumWings;
public static ShapelessArcaneRecipe diamondOmnitool;
public static ShapelessArcaneRecipe tinyUranium;
public static ShapedArcaneRecipe christmasFocus;
public static ShapedArcaneRecipe electricGoggles;
public static ShapedArcaneRecipe shieldBlock;
public static ShapedArcaneRecipe compressedSolar;
public static ShapedArcaneRecipe doubleCompressedSolar;
public static ShapedArcaneRecipe ironOmnitoolToDiamond;
public static ShapedArcaneRecipe electricScribingTools;
public static ShapedArcaneRecipe thaumiumWing;
public static ShapedArcaneRecipe thaumiumWings;
public static CrucibleRecipe ignisGenerator;
public static CrucibleRecipe auramGenerator;
public static CrucibleRecipe arborGenerator;
public static CrucibleRecipe aerGenerator;
public static CrucibleRecipe waterSolar;
public static CrucibleRecipe doubleWaterSolar;
public static CrucibleRecipe tripleWaterSolar;
public static CrucibleRecipe darkSolar;
public static CrucibleRecipe doubleDarkSolar;
public static CrucibleRecipe tripleDarkSolar;
public static CrucibleRecipe orderSolar;
public static CrucibleRecipe doubleOrderSolar;
public static CrucibleRecipe tripleOrderSolar;
public static CrucibleRecipe fireSolar;
public static CrucibleRecipe doubleFireSolar;
public static CrucibleRecipe tripleFireSolar;
public static CrucibleRecipe airSolar;
public static CrucibleRecipe doubleAirSolar;
public static CrucibleRecipe tripleAirSolar;
public static CrucibleRecipe earthSolar;
public static CrucibleRecipe doubleEarthSolar;
public static CrucibleRecipe tripleEarthSolar;
public static CrucibleRecipe portableNode;
public static CrucibleRecipe ignisGenerator;
public static CrucibleRecipe auramGenerator;
public static CrucibleRecipe arborGenerator;
public static CrucibleRecipe aerGenerator;
public static CrucibleRecipe waterSolar;
public static CrucibleRecipe doubleWaterSolar;
public static CrucibleRecipe tripleWaterSolar;
public static CrucibleRecipe darkSolar;
public static CrucibleRecipe doubleDarkSolar;
public static CrucibleRecipe tripleDarkSolar;
public static CrucibleRecipe orderSolar;
public static CrucibleRecipe doubleOrderSolar;
public static CrucibleRecipe tripleOrderSolar;
public static CrucibleRecipe fireSolar;
public static CrucibleRecipe doubleFireSolar;
public static CrucibleRecipe tripleFireSolar;
public static CrucibleRecipe airSolar;
public static CrucibleRecipe doubleAirSolar;
public static CrucibleRecipe tripleAirSolar;
public static CrucibleRecipe earthSolar;
public static CrucibleRecipe doubleEarthSolar;
public static CrucibleRecipe tripleEarthSolar;
public static CrucibleRecipe portableNode;
public static IRecipe thaumiumPlate;
public static IRecipe thaumiumPlate;
}
@@ -9,9 +9,9 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.recipes;
import tombenpotter.emt.common.util.CraftingAspects;
import ic2.api.item.IC2Items;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@@ -21,91 +21,92 @@ import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.crafting.InfusionRecipe;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
import tombenpotter.emt.common.util.CraftingAspects;
public class UuMInfusionRecipes {
public static ItemStack uuMCell = IC2Items.getItem("UuMatterCell");
public static void add() {
public static ItemStack uuMCell = IC2Items.getItem("UuMatterCell");
ItemStack iridium = IC2Items.getItem("iridiumOre").copy();
iridium.stackSize = 2;
uraniumToIridium = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", iridium, 4, CraftingAspects.uuMatterInfusions, IC2Items.getItem("Uran238"), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell});
public static void add() {
ItemStack uranium = IC2Items.getItem("Uran238").copy();
uranium.stackSize = 2;
diamondToUranium = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", uranium, 4, CraftingAspects.lesserUUMInfusions, new ItemStack(Items.diamond), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell});
ItemStack iridium = IC2Items.getItem("iridiumOre").copy();
iridium.stackSize = 2;
uraniumToIridium = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", iridium, 4, CraftingAspects.uuMatterInfusions, IC2Items.getItem("Uran238"), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell});
ItemStack diamond = new ItemStack(Items.diamond).copy();
diamond.stackSize = 1;
goldToDiamond = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", diamond, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Items.gold_ingot), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell});
ItemStack uranium = IC2Items.getItem("Uran238").copy();
uranium.stackSize = 2;
diamondToUranium = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", uranium, 4, CraftingAspects.lesserUUMInfusions, new ItemStack(Items.diamond), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell});
ItemStack gold = new ItemStack(Items.gold_ingot).copy();
gold.stackSize = 2;
ironToGold = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", gold, 4, CraftingAspects.cheapestUUMInfusions, new ItemStack(Items.iron_ingot), new ItemStack[]{uuMCell, uuMCell, uuMCell});
ItemStack diamond = new ItemStack(Items.diamond).copy();
diamond.stackSize = 1;
goldToDiamond = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", diamond, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Items.gold_ingot), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell});
ItemStack ironOre = new ItemStack(Blocks.iron_ore).copy();
ironOre.stackSize = 16;
stoneBricksToIronOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", ironOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Blocks.stonebrick), new ItemStack[]{uuMCell, uuMCell});
ItemStack gold = new ItemStack(Items.gold_ingot).copy();
gold.stackSize = 2;
ironToGold = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", gold, 4, CraftingAspects.cheapestUUMInfusions, new ItemStack(Items.iron_ingot), new ItemStack[]{uuMCell, uuMCell, uuMCell});
/**
* ItemStack copperOre = Items.getItem("copperOre").copy(); BUGGED IN 1.6 IF IC2 OREGEN IS DISABLED
**/
ItemStack copperOre = IC2Items.getItem("crushedCopperOre").copy();
copperOre.stackSize = 32;
arcaneStoneToCopperOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", copperOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), new ItemStack[]{uuMCell, uuMCell});
ItemStack ironOre = new ItemStack(Blocks.iron_ore).copy();
ironOre.stackSize = 16;
stoneBricksToIronOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", ironOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Blocks.stonebrick), new ItemStack[]{uuMCell, uuMCell});
/**
* ItemStack tinOre = Items.getItem("tinOre").copy(); BUGGED IN 1.6 IF IC2 OREGEN IS DISABLED
**/
ItemStack tinOre = IC2Items.getItem("crushedTinOre").copy();
tinOre.stackSize = 32;
arcaneStoneBricksToTinOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", tinOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 7), new ItemStack[]{uuMCell, uuMCell});
/**
* ItemStack copperOre = Items.getItem("copperOre").copy(); BUGGED IN 1.6 IF IC2 OREGEN IS DISABLED
**/
ItemStack copperOre = IC2Items.getItem("crushedCopperOre").copy();
copperOre.stackSize = 32;
arcaneStoneToCopperOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", copperOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), new ItemStack[]{uuMCell, uuMCell});
/**
* ItemStack leadOre = Items.getItem("leadOre").copy(); BUGGED IN 1.6 IF IC2 OREGEN IS DISABLED
**/
ItemStack leadOre = IC2Items.getItem("crushedLeadOre").copy();
leadOre.stackSize = 32;
amberBlockToLeadOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", leadOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 0), new ItemStack[]{uuMCell, uuMCell});
/**
* ItemStack tinOre = Items.getItem("tinOre").copy(); BUGGED IN 1.6 IF IC2 OREGEN IS DISABLED
**/
ItemStack tinOre = IC2Items.getItem("crushedTinOre").copy();
tinOre.stackSize = 32;
arcaneStoneBricksToTinOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", tinOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 7), new ItemStack[]{uuMCell, uuMCell});
ItemStack uraniumOre = IC2Items.getItem("uraniumOre").copy();
uraniumOre.stackSize = 8;
amberBricksToUraniumOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", uraniumOre, 4, CraftingAspects.lesserUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 1), new ItemStack[]{uuMCell, uuMCell, uuMCell});
/**
* ItemStack leadOre = Items.getItem("leadOre").copy(); BUGGED IN 1.6 IF IC2 OREGEN IS DISABLED
**/
ItemStack leadOre = IC2Items.getItem("crushedLeadOre").copy();
leadOre.stackSize = 32;
amberBlockToLeadOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", leadOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 0), new ItemStack[]{uuMCell, uuMCell});
ItemStack coal = new ItemStack(Items.coal, 1, 0).copy();
coal.stackSize = 16;
charcoalToCoal = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", coal, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Items.coal, 1, 1), new ItemStack[]{uuMCell, uuMCell});
ItemStack uraniumOre = IC2Items.getItem("uraniumOre").copy();
uraniumOre.stackSize = 8;
amberBricksToUraniumOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", uraniumOre, 4, CraftingAspects.lesserUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 1), new ItemStack[]{uuMCell, uuMCell, uuMCell});
ItemStack stickyResin = IC2Items.getItem("resin").copy();
stickyResin.stackSize = 21;
shardToResin = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", stickyResin, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell});
ItemStack coal = new ItemStack(Items.coal, 1, 0).copy();
coal.stackSize = 16;
charcoalToCoal = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", coal, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Items.coal, 1, 1), new ItemStack[]{uuMCell, uuMCell});
ItemStack redstone = new ItemStack(Items.redstone).copy();
redstone.stackSize = 24;
shardToRedstone = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", redstone, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell});
ItemStack stickyResin = IC2Items.getItem("resin").copy();
stickyResin.stackSize = 21;
shardToResin = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", stickyResin, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell});
ItemStack lapisLazuli = new ItemStack(Items.dye, 1, 4).copy();
lapisLazuli.stackSize = 8;
shardToLapis = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", lapisLazuli, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell});
ItemStack redstone = new ItemStack(Items.redstone).copy();
redstone.stackSize = 24;
shardToRedstone = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", redstone, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell});
ItemStack glowstone = new ItemStack(Blocks.glowstone).copy();
glowstone.stackSize = 1;
glowstoneDustToBlock = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", glowstone, 4, CraftingAspects.cheapestUUMInfusions, new ItemStack(Items.glowstone_dust), new ItemStack[]{uuMCell});
ItemStack lapisLazuli = new ItemStack(Items.dye, 1, 4).copy();
lapisLazuli.stackSize = 8;
shardToLapis = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", lapisLazuli, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell});
}
ItemStack glowstone = new ItemStack(Blocks.glowstone).copy();
glowstone.stackSize = 1;
glowstoneDustToBlock = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", glowstone, 4, CraftingAspects.cheapestUUMInfusions, new ItemStack(Items.glowstone_dust), new ItemStack[]{uuMCell});
}
public static InfusionRecipe uraniumToIridium;
public static InfusionRecipe diamondToUranium;
public static InfusionRecipe goldToDiamond;
public static InfusionRecipe ironToGold;
public static InfusionRecipe stoneBricksToIronOre;
public static InfusionRecipe arcaneStoneToCopperOre;
public static InfusionRecipe arcaneStoneBricksToTinOre;
public static InfusionRecipe amberBlockToLeadOre;
public static InfusionRecipe amberBricksToUraniumOre;
public static InfusionRecipe charcoalToCoal;
public static InfusionRecipe shardToResin;
public static InfusionRecipe shardToRedstone;
public static InfusionRecipe shardToLapis;
public static InfusionRecipe glowstoneDustToBlock;
public static InfusionRecipe uraniumToIridium;
public static InfusionRecipe diamondToUranium;
public static InfusionRecipe goldToDiamond;
public static InfusionRecipe ironToGold;
public static InfusionRecipe stoneBricksToIronOre;
public static InfusionRecipe arcaneStoneToCopperOre;
public static InfusionRecipe arcaneStoneBricksToTinOre;
public static InfusionRecipe amberBlockToLeadOre;
public static InfusionRecipe amberBricksToUraniumOre;
public static InfusionRecipe charcoalToCoal;
public static InfusionRecipe shardToResin;
public static InfusionRecipe shardToRedstone;
public static InfusionRecipe shardToLapis;
public static InfusionRecipe glowstoneDustToBlock;
}
@@ -8,45 +8,45 @@ import net.minecraft.tileentity.TileEntity;
public abstract class TileEntityEMT extends TileEntity {
public int facing;
public boolean isOn;
public int facing;
public boolean isOn;
@Override
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
@Override
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
facing = tagCompound.getInteger("facing");
isOn = tagCompound.getBoolean("isOn");
}
facing = tagCompound.getInteger("facing");
isOn = tagCompound.getBoolean("isOn");
}
@Override
public void writeToNBT(NBTTagCompound tagCompound) {
super.writeToNBT(tagCompound);
@Override
public void writeToNBT(NBTTagCompound tagCompound) {
super.writeToNBT(tagCompound);
tagCompound.setInteger("facing", facing);
tagCompound.setBoolean("isOn", isOn);
}
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 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 onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
NBTTagCompound nbt = pkt.func_148857_g();
readFromNBT(nbt);
}
@Override
public void markDirty() {
super.markDirty(); // Mark dirty for gamesave
if (worldObj.isRemote) {
return;
}
this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); // Update block + TE via Network
}
@Override
public void markDirty() {
super.markDirty(); // Mark dirty for gamesave
if (worldObj.isRemote) {
return;
}
this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); // Update block + TE via Network
}
}
@@ -9,11 +9,9 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEMT;
import tombenpotter.emt.common.util.Config;
import ic2.api.item.IC2Items;
import ic2.api.tile.IWrenchable;
import net.minecraft.entity.player.EntityPlayer;
@@ -27,281 +25,277 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.common.config.ConfigItems;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityEtherealMacerator extends TileEntityEMT implements ISidedInventory, IWrenchable {
private static final int[] slots_top = new int[]{0};
private static final int[] slots_bottom = new int[]{2, 1};
private static final int[] slots_sides = new int[]{1};
private ItemStack[] slots = new ItemStack[3];
public int maceratingSpeed = Config.etherealProcessorBaseSpeed;
public int cookTime;
private static final int[] slots_top = new int[]{0};
private static final int[] slots_bottom = new int[]{2, 1};
private static final int[] slots_sides = new int[]{1};
public int getSizeInventory() {
return this.slots.length;
}
private ItemStack[] slots = new ItemStack[3];
public int maceratingSpeed = ConfigHandler.etherealProcessorBaseSpeed;
public int cookTime;
public ItemStack getStackInSlot(int par1) {
return this.slots[par1];
}
public int getSizeInventory() {
return this.slots.length;
}
public ItemStack decrStackSize(int par1, int par2) {
if (this.slots[par1] != null) {
ItemStack itemstack;
public ItemStack getStackInSlot(int par1) {
return this.slots[par1];
}
if (this.slots[par1].stackSize <= par2) {
itemstack = this.slots[par1];
this.slots[par1] = null;
return itemstack;
} else {
itemstack = this.slots[par1].splitStack(par2);
public ItemStack decrStackSize(int par1, int par2) {
if (this.slots[par1] != null) {
ItemStack itemstack;
if (this.slots[par1].stackSize == 0) {
this.slots[par1] = null;
}
if (this.slots[par1].stackSize <= par2) {
itemstack = this.slots[par1];
this.slots[par1] = null;
return itemstack;
} else {
itemstack = this.slots[par1].splitStack(par2);
return itemstack;
}
} else {
return null;
}
}
if (this.slots[par1].stackSize == 0) {
this.slots[par1] = null;
}
public ItemStack getStackInSlotOnClosing(int par1) {
if (this.slots[par1] != null) {
ItemStack itemstack = this.slots[par1];
this.slots[par1] = null;
return itemstack;
} else {
return null;
}
}
return itemstack;
}
} else {
return null;
}
}
public void setInventorySlotContents(int par1, ItemStack par2ItemStack) {
this.slots[par1] = par2ItemStack;
public ItemStack getStackInSlotOnClosing(int par1) {
if (this.slots[par1] != null) {
ItemStack itemstack = this.slots[par1];
this.slots[par1] = null;
return itemstack;
} else {
return null;
}
}
if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) {
par2ItemStack.stackSize = this.getInventoryStackLimit();
}
}
public void setInventorySlotContents(int par1, ItemStack par2ItemStack) {
this.slots[par1] = par2ItemStack;
public String getInvName() {
return "Ethereal Processor";
}
if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) {
par2ItemStack.stackSize = this.getInventoryStackLimit();
}
}
public boolean isInvNameLocalized() {
return false;
}
public String getInvName() {
return "Ethereal Processor";
}
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
NBTTagList nbttaglist = tagCompound.getTagList("Items", 10);
this.slots = new ItemStack[this.getSizeInventory()];
public boolean isInvNameLocalized() {
return false;
}
for (int i = 0; i < nbttaglist.tagCount(); ++i) {
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
byte b0 = nbttagcompound1.getByte("Slot");
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
NBTTagList nbttaglist = tagCompound.getTagList("Items", 10);
this.slots = new ItemStack[this.getSizeInventory()];
if (b0 >= 0 && b0 < this.slots.length) {
this.slots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
}
}
this.cookTime = tagCompound.getShort("CookTime");
}
for (int i = 0; i < nbttaglist.tagCount(); ++i) {
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
byte b0 = nbttagcompound1.getByte("Slot");
public void writeToNBT(NBTTagCompound tagCompound) {
super.writeToNBT(tagCompound);
tagCompound.setShort("CookTime", (short) this.cookTime);
NBTTagList nbttaglist = new NBTTagList();
if (b0 >= 0 && b0 < this.slots.length) {
this.slots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
}
}
this.cookTime = tagCompound.getShort("CookTime");
}
for (int i = 0; i < this.slots.length; ++i) {
if (this.slots[i] != null) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setByte("Slot", (byte) i);
this.slots[i].writeToNBT(nbttagcompound1);
nbttaglist.appendTag(nbttagcompound1);
}
}
tagCompound.setTag("Items", nbttaglist);
}
public void writeToNBT(NBTTagCompound tagCompound) {
super.writeToNBT(tagCompound);
tagCompound.setShort("CookTime", (short) this.cookTime);
NBTTagList nbttaglist = new NBTTagList();
public int getInventoryStackLimit() {
return 64;
}
for (int i = 0; i < this.slots.length; ++i) {
if (this.slots[i] != null) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setByte("Slot", (byte) i);
this.slots[i].writeToNBT(nbttagcompound1);
nbttaglist.appendTag(nbttagcompound1);
}
}
tagCompound.setTag("Items", nbttaglist);
}
public void updateEntity() {
if (this.canSmelt() && isOverLimit(1) == false && isOverLimit(2) == false && isOP() == false) {
++this.cookTime;
this.isOn = true;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
public int getInventoryStackLimit() {
return 64;
}
if (this.cookTime == this.maceratingSpeed) {
this.cookTime = 0;
this.smeltItem();
}
} else {
this.cookTime = 0;
this.isOn = false;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
public void updateEntity() {
if (this.canSmelt() && isOverLimit(1) == false && isOverLimit(2) == false && isOP() == false) {
++this.cookTime;
this.isOn = true;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
private boolean canSmelt() {
if (this.slots[0] == null) {
return false;
} else {
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]);
if (itemstack == null)
return false;
if (this.slots[2] == null)
return true;
if (!this.slots[2].isItemEqual(itemstack))
return false;
int result = slots[2].stackSize + (itemstack.stackSize * 2);
return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize());
}
}
if (this.cookTime == this.maceratingSpeed) {
this.cookTime = 0;
this.smeltItem();
}
} else {
this.cookTime = 0;
this.isOn = false;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
public void smeltItem() {
if (this.canSmelt()) {
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]);
private boolean canSmelt() {
if (this.slots[0] == null) {
return false;
} else {
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]);
if (itemstack == null)
return false;
if (this.slots[2] == null)
return true;
if (!this.slots[2].isItemEqual(itemstack))
return false;
int result = slots[2].stackSize + (itemstack.stackSize * 2);
return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize());
}
}
if (this.slots[2] == null) {
this.slots[2] = itemstack.copy();
this.slots[2].stackSize *= 2;
} else if (this.slots[2].isItemEqual(itemstack)) {
slots[2].stackSize += (itemstack.stackSize * 2);
}
public void smeltItem() {
if (this.canSmelt()) {
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]);
--this.slots[0].stackSize;
if (this.slots[2] == null) {
this.slots[2] = itemstack.copy();
this.slots[2].stackSize *= 2;
} else if (this.slots[2].isItemEqual(itemstack)) {
slots[2].stackSize += (itemstack.stackSize * 2);
}
if (this.slots[0].stackSize <= 0) {
this.slots[0] = null;
}
this.addBonus();
}
}
--this.slots[0].stackSize;
public void addBonus() {
if (this.canSmelt()) {
if (this.worldObj.rand.nextInt(Config.etherealProcessorBonus) == 0) {
if (this.slots[1] == null) {
this.setInventorySlotContents(1, new ItemStack(ConfigItems.itemNugget, 1, 6));
} else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6)) && this.isOverLimit(1) == false && this.isOverLimit(2) == false) {
slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2);
}
}
}
}
if (this.slots[0].stackSize <= 0) {
this.slots[0] = null;
}
this.addBonus();
}
}
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) {
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
}
public void addBonus() {
if (this.canSmelt()) {
if (this.worldObj.rand.nextInt(ConfigHandler.etherealProcessorBonus) == 0) {
if (this.slots[1] == null) {
this.setInventorySlotContents(1, new ItemStack(ConfigItems.itemNugget, 1, 6));
} else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6)) && this.isOverLimit(1) == false && this.isOverLimit(2) == false) {
slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2);
}
}
}
}
public void openChest() {
}
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) {
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
}
public void closeChest() {
}
public void openChest() {
}
@Override
public boolean isItemValidForSlot(int slot, ItemStack stack) {
if (slot != 0) return false;
if (FurnaceRecipes.smelting().getSmeltingResult(stack) != null) return true;
return false;
}
public void closeChest() {
}
public int[] getAccessibleSlotsFromSide(int par1) {
return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides);
}
@Override
public boolean isItemValidForSlot(int slot, ItemStack stack) {
if (slot != 0)
return false;
if (FurnaceRecipes.smelting().getSmeltingResult(stack) != null)
return true;
return false;
}
public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3) {
return this.isItemValidForSlot(par1, par2ItemStack);
}
public int[] getAccessibleSlotsFromSide(int par1) {
return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides);
}
public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3) {
return true;
}
public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3) {
return this.isItemValidForSlot(par1, par2ItemStack);
}
public boolean isOverLimit(int i) {
if (slots[i] != null) {
if (slots[i].stackSize >= 63)
return true;
else if (slots[i].stackSize < 63)
return false;
else
return false;
} else {
return false;
}
}
public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3) {
return true;
}
public boolean isOP() {
final int cobblestoneId = OreDictionary.getOreID("blockCobble");
public boolean isOverLimit(int i) {
if (slots[i] != null) {
if (slots[i].stackSize >= 63)
return true;
else if (slots[i].stackSize < 63)
return false;
else
return false;
} else {
return false;
}
}
if (OreDictionary.getOreID(this.slots[0]) == cobblestoneId
|| this.slots[0].getItem() == Item.getItemFromBlock(Blocks.sand)
|| this.slots[0].getItem() == Items.potato
|| this.slots[0].getItem() == Items.porkchop
|| this.slots[0].getItem() == Items.beef
|| this.slots[0].getItem() == Items.chicken
|| this.slots[0].getItem() == Items.fish
|| this.slots[0].getItem() == IC2Items.getItem("coalDust").getItem()
|| (OreDictionary.getOreName(OreDictionary.getOreID(this.slots[0])).toLowerCase().contains("dust") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armour") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armor") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("helm") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("legging") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("boot") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("chestp") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick")
|| this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("shovel") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("axe") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick"))) {
return true;
} else {
return false;
}
}
public boolean isOP() {
final int cobblestoneId = OreDictionary.getOreID("blockCobble");
@Override
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) {
return false;
}
if (OreDictionary.getOreID(this.slots[0]) == cobblestoneId || this.slots[0].getItem() == Item.getItemFromBlock(Blocks.sand) || this.slots[0].getItem() == Items.potato || this.slots[0].getItem() == Items.porkchop || this.slots[0].getItem() == Items.beef || this.slots[0].getItem() == Items.chicken || this.slots[0].getItem() == Items.fish || this.slots[0].getItem() == IC2Items.getItem("coalDust").getItem() || (OreDictionary.getOreName(OreDictionary.getOreID(this.slots[0])).toLowerCase().contains("dust") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armour") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armor") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("helm") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("legging") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("boot") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("chestp") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("shovel") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("axe") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick"))) {
return true;
} else {
return false;
}
}
@Override
public short getFacing() {
return 0;
}
@Override
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) {
return false;
}
@Override
public void setFacing(short facing) {
@Override
public short getFacing() {
return 0;
}
}
@Override
public void setFacing(short facing) {
@Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
return true;
}
}
@Override
public float getWrenchDropRate() {
return 1;
}
@Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
return true;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 1);
}
@Override
public float getWrenchDropRate() {
return 1;
}
@Override
public String getInventoryName() {
return "Ethereal Macerator";
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtMachines, 1, 1);
}
@Override
public boolean hasCustomInventoryName() {
return false;
}
@Override
public String getInventoryName() {
return "Ethereal Macerator";
}
@Override
public void openInventory() {
@Override
public boolean hasCustomInventoryName() {
return false;
}
}
@Override
public void openInventory() {
@Override
public void closeInventory() {
}
}
@Override
public void closeInventory() {
}
}
@@ -9,6 +9,7 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile;
import ic2.api.energy.prefab.BasicSink;
@@ -19,168 +20,169 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.common.items.wands.ItemWandCasting;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements IInventory {
private BasicSink ic2EnergySink = new BasicSink(this, 100000, 4);
ItemStack ItemStacks[];
private BasicSink ic2EnergySink = new BasicSink(this, 100000, 4);
public TileEntityIndustrialWandRecharge() {
ItemStacks = new ItemStack[1];
}
ItemStack ItemStacks[];
@Override
public int getSizeInventory() {
return 1;
}
public TileEntityIndustrialWandRecharge() {
ItemStacks = new ItemStack[1];
}
@Override
public ItemStack getStackInSlot(int i) {
return ItemStacks[i];
}
@Override
public int getSizeInventory() {
return 1;
}
@Override
public ItemStack decrStackSize(int i, int j) {
if (ItemStacks[i] != null) {
@Override
public ItemStack getStackInSlot(int i) {
return ItemStacks[i];
}
if (ItemStacks[i].stackSize <= j) {
ItemStack itemstack = ItemStacks[i];
ItemStacks[i] = null;
return itemstack;
} else {
ItemStack itemstack1 = ItemStacks[i].splitStack(j);
@Override
public ItemStack decrStackSize(int i, int j) {
if (ItemStacks[i] != null) {
if (ItemStacks[i].stackSize == 0) {
ItemStacks[i] = null;
}
if (ItemStacks[i].stackSize <= j) {
ItemStack itemstack = ItemStacks[i];
ItemStacks[i] = null;
return itemstack;
} else {
ItemStack itemstack1 = ItemStacks[i].splitStack(j);
return itemstack1;
}
} else {
return null;
}
}
if (ItemStacks[i].stackSize == 0) {
ItemStacks[i] = null;
}
@Override
public ItemStack getStackInSlotOnClosing(int i) {
if (ItemStacks[i] != null) {
ItemStack itemstack = ItemStacks[i];
ItemStacks[i] = null;
return itemstack;
} else {
return null;
}
}
return itemstack1;
}
} else {
return null;
}
}
@Override
public void updateEntity() {
ic2EnergySink.updateEntity();
if (!this.worldObj.isRemote) {
if (getStackInSlot(0) != null) {
@Override
public ItemStack getStackInSlotOnClosing(int i) {
if (ItemStacks[i] != null) {
ItemStack itemstack = ItemStacks[i];
ItemStacks[i] = null;
return itemstack;
} else {
return null;
}
}
ItemStack wand = getStackInSlot(0);
if (wand != null && wand.getItem() instanceof ItemWandCasting) {
ItemWandCasting wandItem = (ItemWandCasting) wand.getItem();
if (ic2EnergySink.useEnergy(Config.wandChargerConsumption) && wandItem.getAspectsWithRoom(wand) != null) {
wandItem.addVis(wand, Aspect.ORDER, 1, true);
wandItem.addVis(wand, Aspect.FIRE, 1, true);
wandItem.addVis(wand, Aspect.ENTROPY, 1, true);
wandItem.addVis(wand, Aspect.WATER, 1, true);
wandItem.addVis(wand, Aspect.EARTH, 1, true);
wandItem.addVis(wand, Aspect.AIR, 1, true);
}
}
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
}
@Override
public void updateEntity() {
ic2EnergySink.updateEntity();
if (!this.worldObj.isRemote) {
if (getStackInSlot(0) != null) {
@Override
public void setInventorySlotContents(int i, ItemStack itemstack) {
ItemStacks[i] = itemstack;
ItemStack wand = getStackInSlot(0);
if (wand != null && wand.getItem() instanceof ItemWandCasting) {
ItemWandCasting wandItem = (ItemWandCasting) wand.getItem();
if (ic2EnergySink.useEnergy(ConfigHandler.wandChargerConsumption) && wandItem.getAspectsWithRoom(wand) != null) {
wandItem.addVis(wand, Aspect.ORDER, 1, true);
wandItem.addVis(wand, Aspect.FIRE, 1, true);
wandItem.addVis(wand, Aspect.ENTROPY, 1, true);
wandItem.addVis(wand, Aspect.WATER, 1, true);
wandItem.addVis(wand, Aspect.EARTH, 1, true);
wandItem.addVis(wand, Aspect.AIR, 1, true);
}
}
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
}
if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) {
itemstack.stackSize = getInventoryStackLimit();
}
}
@Override
public void setInventorySlotContents(int i, ItemStack itemstack) {
ItemStacks[i] = itemstack;
public void readFromNBT(NBTTagCompound p_145839_1_) {
super.readFromNBT(p_145839_1_);
NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10);
this.ItemStacks = new ItemStack[this.getSizeInventory()];
if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) {
itemstack.stackSize = getInventoryStackLimit();
}
}
for (int i = 0; i < nbttaglist.tagCount(); ++i) {
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
byte b0 = nbttagcompound1.getByte("Slot");
public void readFromNBT(NBTTagCompound p_145839_1_) {
super.readFromNBT(p_145839_1_);
NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10);
this.ItemStacks = new ItemStack[this.getSizeInventory()];
if (b0 >= 0 && b0 < this.ItemStacks.length) {
this.ItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
}
}
}
for (int i = 0; i < nbttaglist.tagCount(); ++i) {
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
byte b0 = nbttagcompound1.getByte("Slot");
public void writeToNBT(NBTTagCompound p_145841_1_) {
super.writeToNBT(p_145841_1_);
NBTTagList nbttaglist = new NBTTagList();
if (b0 >= 0 && b0 < this.ItemStacks.length) {
this.ItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
}
}
}
for (int i = 0; i < this.ItemStacks.length; ++i) {
if (this.ItemStacks[i] != null) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setByte("Slot", (byte) i);
this.ItemStacks[i].writeToNBT(nbttagcompound1);
nbttaglist.appendTag(nbttagcompound1);
}
}
public void writeToNBT(NBTTagCompound p_145841_1_) {
super.writeToNBT(p_145841_1_);
NBTTagList nbttaglist = new NBTTagList();
p_145841_1_.setTag("Items", nbttaglist);
}
for (int i = 0; i < this.ItemStacks.length; ++i) {
if (this.ItemStacks[i] != null) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setByte("Slot", (byte) i);
this.ItemStacks[i].writeToNBT(nbttagcompound1);
nbttaglist.appendTag(nbttagcompound1);
}
}
@Override
public int getInventoryStackLimit() {
return 64;
}
p_145841_1_.setTag("Items", nbttaglist);
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) {
return false;
}
@Override
public int getInventoryStackLimit() {
return 64;
}
return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) {
return false;
}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
return true;
}
return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
}
@Override
public void invalidate() {
ic2EnergySink.invalidate();
super.invalidate();
}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
return true;
}
@Override
public void onChunkUnload() {
ic2EnergySink.onChunkUnload();
}
@Override
public void invalidate() {
ic2EnergySink.invalidate();
super.invalidate();
}
@Override
public String getInventoryName() {
return "Industrial Wand Charging Station";
}
@Override
public void onChunkUnload() {
ic2EnergySink.onChunkUnload();
}
@Override
public boolean hasCustomInventoryName() {
return false;
}
@Override
public String getInventoryName() {
return "Industrial Wand Charging Station";
}
@Override
public void openInventory() {
}
@Override
public boolean hasCustomInventoryName() {
return false;
}
@Override
public void closeInventory() {
}
@Override
public void openInventory() {
}
@Override
public void closeInventory() {
}
}
@@ -4,7 +4,7 @@ import thaumcraft.api.aspects.Aspect;
public class TileEntityAerGenerator extends TileEntityBaseGenerator {
public TileEntityAerGenerator() {
aspect = Aspect.AIR;
}
public TileEntityAerGenerator() {
aspect = Aspect.AIR;
}
}
@@ -9,13 +9,14 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.generators;
import thaumcraft.api.aspects.Aspect;
public class TileEntityArborGenerator extends TileEntityBaseGenerator {
public TileEntityArborGenerator() {
aspect = Aspect.TREE;
}
public TileEntityArborGenerator() {
aspect = Aspect.TREE;
}
}
@@ -9,12 +9,14 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.generators;
import thaumcraft.api.aspects.Aspect;
public class TileEntityAuramGenerator extends TileEntityBaseGenerator {
public TileEntityAuramGenerator() {
aspect = Aspect.AURA;
}
public TileEntityAuramGenerator() {
aspect = Aspect.AURA;
}
}
@@ -6,60 +6,61 @@ import net.minecraftforge.common.util.ForgeDirection;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.common.lib.events.EssentiaHandler;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEMT;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.EssentiasOutputs;
public abstract class TileEntityBaseGenerator extends TileEntityEMT {
public static int waitTime;
public BasicSource energySource = new BasicSource(this, 1000000000, 3);
public Aspect aspect;
public double output;
public TileEntityBaseGenerator() {
waitTime = 30;
output = EssentiasOutputs.outputs.get(aspect.getTag());
}
public static int waitTime;
public BasicSource energySource = new BasicSource(this, 1000000000, 3);
public Aspect aspect;
public double output;
@Override
public void updateEntity() {
energySource.updateEntity();
public TileEntityBaseGenerator() {
waitTime = 30;
output = EssentiasOutputs.outputs.get(aspect.getTag());
}
if (waitTime > 0) {
waitTime--;
}
@Override
public void updateEntity() {
energySource.updateEntity();
if (waitTime <= 0) {
createEnergy();
waitTime = Config.essentiaGeneratorsDelay;
}
}
if (waitTime > 0) {
waitTime--;
}
public void createEnergy() {
if (!this.worldObj.isRemote && EssentiaHandler.drainEssentia(this, aspect, ForgeDirection.UNKNOWN, 8)) {
energySource.addEnergy(output);
}
}
if (waitTime <= 0) {
createEnergy();
waitTime = ConfigHandler.essentiaGeneratorsDelay;
}
}
@Override
public void onChunkUnload() {
energySource.onChunkUnload();
}
public void createEnergy() {
if (!this.worldObj.isRemote && EssentiaHandler.drainEssentia(this, aspect, ForgeDirection.UNKNOWN, 8)) {
energySource.addEnergy(output);
}
}
@Override
public void invalidate() {
energySource.invalidate();
super.invalidate();
}
@Override
public void onChunkUnload() {
energySource.onChunkUnload();
}
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
energySource.readFromNBT(tag);
}
@Override
public void invalidate() {
energySource.invalidate();
super.invalidate();
}
@Override
public void writeToNBT(NBTTagCompound tag) {
super.writeToNBT(tag);
energySource.writeToNBT(tag);
}
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
energySource.readFromNBT(tag);
}
@Override
public void writeToNBT(NBTTagCompound tag) {
super.writeToNBT(tag);
energySource.writeToNBT(tag);
}
}
@@ -6,68 +6,68 @@ import net.minecraftforge.common.util.ForgeDirection;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.common.lib.events.EssentiaHandler;
import tombenpotter.emt.common.module.ic2.tile.TileEntityEMT;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
import tombenpotter.emt.common.util.EssentiasOutputs;
public class TileEntityEssentiaGenerator extends TileEntityEMT {
public String[] aspects = new String[4];
public boolean[] isFree = new boolean[4];
public static int waitTime;
public BasicSource energySource = new BasicSource(this, 1000000000, 3);
public String[] aspects = new String[4];
public boolean[] isFree = new boolean[4];
public static int waitTime;
public BasicSource energySource = new BasicSource(this, 1000000000, 3);
public TileEntityEssentiaGenerator() {
waitTime = 30;
for (int i = 0; i < aspects.length; i++) {
aspects[i] = String.valueOf(i);
isFree[i] = true;
}
}
public TileEntityEssentiaGenerator() {
waitTime = 30;
for (int i = 0; i < aspects.length; i++) {
aspects[i] = String.valueOf(i);
isFree[i] = true;
}
}
public void updateEntity() {
energySource.updateEntity();
if (waitTime > 0) {
waitTime--;
}
public void updateEntity() {
energySource.updateEntity();
if (waitTime > 0) {
waitTime--;
}
if (waitTime <= 0 && !worldObj.isRemote) {
for (int i = 0; i < aspects.length; i++) {
if (EssentiaHandler.drainEssentia(this, Aspect.getAspect(aspects[i]), ForgeDirection.UNKNOWN, 8)) {
energySource.addEnergy(EssentiasOutputs.outputs.get(aspects[i]));
}
}
waitTime = Config.essentiaGeneratorsDelay;
}
}
if (waitTime <= 0 && !worldObj.isRemote) {
for (int i = 0; i < aspects.length; i++) {
if (EssentiaHandler.drainEssentia(this, Aspect.getAspect(aspects[i]), ForgeDirection.UNKNOWN, 8)) {
energySource.addEnergy(EssentiasOutputs.outputs.get(aspects[i]));
}
}
waitTime = ConfigHandler.essentiaGeneratorsDelay;
}
}
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
energySource.readFromNBT(tag);
for (int i = 0; i < aspects.length; i++) {
this.aspects[i] = tag.getString("aspect" + String.valueOf(i));
this.isFree[i] = tag.getBoolean("isFree" + String.valueOf(i));
}
}
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
energySource.readFromNBT(tag);
for (int i = 0; i < aspects.length; i++) {
this.aspects[i] = tag.getString("aspect" + String.valueOf(i));
this.isFree[i] = tag.getBoolean("isFree" + String.valueOf(i));
}
}
@Override
public void writeToNBT(NBTTagCompound tag) {
super.writeToNBT(tag);
energySource.writeToNBT(tag);
for (int i = 0; i < aspects.length; i++) {
tag.setString("aspect" + String.valueOf(i), this.aspects[i]);
tag.setBoolean("isFree" + String.valueOf(i), this.isFree[i]);
}
}
@Override
public void writeToNBT(NBTTagCompound tag) {
super.writeToNBT(tag);
energySource.writeToNBT(tag);
for (int i = 0; i < aspects.length; i++) {
tag.setString("aspect" + String.valueOf(i), this.aspects[i]);
tag.setBoolean("isFree" + String.valueOf(i), this.isFree[i]);
}
}
@Override
public void onChunkUnload() {
energySource.onChunkUnload();
}
@Override
public void onChunkUnload() {
energySource.onChunkUnload();
}
@Override
public void invalidate() {
energySource.invalidate();
super.invalidate();
}
@Override
public void invalidate() {
energySource.invalidate();
super.invalidate();
}
}
@@ -9,13 +9,14 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.generators;
import thaumcraft.api.aspects.Aspect;
public class TileEntityIgnisGenerator extends TileEntityBaseGenerator {
public TileEntityIgnisGenerator() {
aspect = Aspect.FIRE;
}
public TileEntityIgnisGenerator() {
aspect = Aspect.FIRE;
}
}
@@ -9,13 +9,14 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.generators;
import thaumcraft.api.aspects.Aspect;
public class TileEntityPotentiaGenerator extends TileEntityBaseGenerator {
public TileEntityPotentiaGenerator() {
aspect = Aspect.ENERGY;
}
public TileEntityPotentiaGenerator() {
aspect = Aspect.ENERGY;
}
}
@@ -10,96 +10,96 @@ import java.util.Random;
public abstract class TileEntitySolarBase extends TileEntityEMT implements IWrenchable {
public BasicSource energySource = new BasicSource(this, 10000, 1);
public static Random random = new Random();
public boolean initialized;
public boolean theSunIsVisible;
public boolean canRain;
public boolean noSunlight;
public int tick;
public double output = 0;
public BasicSource energySource = new BasicSource(this, 10000, 1);
public static Random random = new Random();
public boolean initialized;
public boolean theSunIsVisible;
public boolean canRain;
public boolean noSunlight;
public int tick;
public double output = 0;
public TileEntitySolarBase() {
this.tick = random.nextInt(64);
}
public TileEntitySolarBase() {
this.tick = random.nextInt(64);
}
@Override
public void updateEntity() {
energySource.updateEntity();
checkConditions();
}
@Override
public void updateEntity() {
energySource.updateEntity();
checkConditions();
}
public void checkConditions() {
if (!initialized && worldObj != null) {
canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0;
noSunlight = worldObj.provider.hasNoSky;
initialized = true;
}
if (noSunlight) {
return;
}
if (tick-- == 0) {
updateSunState();
tick = 64;
}
createEnergy();
}
public void checkConditions() {
if (!initialized && worldObj != null) {
canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0;
noSunlight = worldObj.provider.hasNoSky;
initialized = true;
}
if (noSunlight) {
return;
}
if (tick-- == 0) {
updateSunState();
tick = 64;
}
createEnergy();
}
public void createEnergy() {
if (theSunIsVisible) {
energySource.addEnergy(output);
}
}
public void createEnergy() {
if (theSunIsVisible) {
energySource.addEnergy(output);
}
}
public void updateSunState() {
boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering());
theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord);
}
public void updateSunState() {
boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering());
theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord);
}
@Override
public void onChunkUnload() {
energySource.onChunkUnload();
}
@Override
public void onChunkUnload() {
energySource.onChunkUnload();
}
@Override
public void invalidate() {
energySource.invalidate();
super.invalidate();
}
@Override
public void invalidate() {
energySource.invalidate();
super.invalidate();
}
@Override
public void writeToNBT(NBTTagCompound nbttagcompound) {
super.writeToNBT(nbttagcompound);
energySource.writeToNBT(nbttagcompound);
}
@Override
public void writeToNBT(NBTTagCompound nbttagcompound) {
super.writeToNBT(nbttagcompound);
energySource.writeToNBT(nbttagcompound);
}
@Override
public void readFromNBT(NBTTagCompound nbttagcompound) {
super.readFromNBT(nbttagcompound);
energySource.readFromNBT(nbttagcompound);
}
@Override
public void readFromNBT(NBTTagCompound nbttagcompound) {
super.readFromNBT(nbttagcompound);
energySource.readFromNBT(nbttagcompound);
}
@Override
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) {
return false;
}
@Override
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) {
return false;
}
@Override
public short getFacing() {
return 0;
}
@Override
public short getFacing() {
return 0;
}
@Override
public void setFacing(short facing) {
}
@Override
public void setFacing(short facing) {
}
@Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
return true;
}
@Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
return true;
}
@Override
public float getWrenchDropRate() {
return 1;
}
@Override
public float getWrenchDropRate() {
return 1;
}
}
@@ -9,31 +9,32 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.air;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.solars.TileEntitySolarBase;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityAirSolar extends TileEntitySolarBase {
public TileEntityAirSolar() {
output = Config.compressedSolarOutput;
}
public TileEntityAirSolar() {
output = ConfigHandler.compressedSolarOutput;
}
@Override
public void createEnergy() {
if (theSunIsVisible && this.yCoord >= 160) {
energySource.addEnergy(output * 2.5);
} else if (theSunIsVisible) {
energySource.addEnergy(output);
}
}
@Override
public void createEnergy() {
if (theSunIsVisible && this.yCoord >= 160) {
energySource.addEnergy(output * 2.5);
} else if (theSunIsVisible) {
energySource.addEnergy(output);
}
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 15);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 15);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.air;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityDoubleAirSolar extends TileEntityAirSolar {
public TileEntityDoubleAirSolar() {
output = Config.doubleCompressedSolarOutput;
}
public TileEntityDoubleAirSolar() {
output = ConfigHandler.doubleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 0);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 0);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.air;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityTripleAirSolar extends TileEntityAirSolar {
public TileEntityTripleAirSolar() {
output = Config.tripleCompressedSolarOutput;
}
public TileEntityTripleAirSolar() {
output = ConfigHandler.tripleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 1);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 1);
}
}
@@ -9,22 +9,23 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.compressed;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.solars.TileEntitySolarBase;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityCompressedSolar extends TileEntitySolarBase {
public TileEntityCompressedSolar() {
output = Config.compressedSolarOutput;
}
public TileEntityCompressedSolar() {
output = ConfigHandler.compressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 0);
}
}
@@ -9,22 +9,23 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.compressed;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.solars.TileEntitySolarBase;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityDoubleCompressedSolar extends TileEntitySolarBase {
public TileEntityDoubleCompressedSolar() {
output = Config.doubleCompressedSolarOutput;
}
public TileEntityDoubleCompressedSolar() {
output = ConfigHandler.doubleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 1);
}
}
@@ -9,22 +9,23 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.compressed;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.solars.TileEntitySolarBase;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityTripleCompressedSolar extends TileEntitySolarBase {
public TileEntityTripleCompressedSolar() {
output = Config.tripleCompressedSolarOutput;
}
public TileEntityTripleCompressedSolar() {
output = ConfigHandler.tripleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 2);
}
}
@@ -9,29 +9,30 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.dark;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.solars.TileEntitySolarBase;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityDarkSolar extends TileEntitySolarBase {
public TileEntityDarkSolar() {
output = Config.compressedSolarOutput;
}
public TileEntityDarkSolar() {
output = ConfigHandler.compressedSolarOutput;
}
@Override
public void createEnergy() {
if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && !worldObj.isDaytime() && !worldObj.isRaining() && !worldObj.isThundering()) {
energySource.addEnergy(output);
}
}
@Override
public void createEnergy() {
if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && !worldObj.isDaytime() && !worldObj.isRaining() && !worldObj.isThundering()) {
energySource.addEnergy(output);
}
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 6);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 6);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.dark;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityDoubleDarkSolar extends TileEntityDarkSolar {
public TileEntityDoubleDarkSolar() {
output = Config.doubleCompressedSolarOutput;
}
public TileEntityDoubleDarkSolar() {
output = ConfigHandler.doubleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 7);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 7);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.dark;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityTripleDarkSolar extends TileEntityDarkSolar {
public TileEntityTripleDarkSolar() {
output = Config.tripleCompressedSolarOutput;
}
public TileEntityTripleDarkSolar() {
output = ConfigHandler.tripleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 8);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 8);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityDoubleEarthSolar extends TileEntityEarthSolar {
public TileEntityDoubleEarthSolar() {
output = Config.doubleCompressedSolarOutput;
}
public TileEntityDoubleEarthSolar() {
output = ConfigHandler.doubleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 3);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 3);
}
}
@@ -9,31 +9,32 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.solars.TileEntitySolarBase;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityEarthSolar extends TileEntitySolarBase {
public TileEntityEarthSolar() {
output = Config.compressedSolarOutput;
}
public TileEntityEarthSolar() {
output = ConfigHandler.compressedSolarOutput;
}
@Override
public void createEnergy() {
if (theSunIsVisible && this.yCoord <= 10) {
energySource.addEnergy(output * 2.5);
} else if (theSunIsVisible) {
energySource.addEnergy(output);
}
}
@Override
public void createEnergy() {
if (theSunIsVisible && this.yCoord <= 10) {
energySource.addEnergy(output * 2.5);
} else if (theSunIsVisible) {
energySource.addEnergy(output);
}
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 2);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 2);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityTripleEarthSolar extends TileEntityEarthSolar {
public TileEntityTripleEarthSolar() {
output = Config.tripleCompressedSolarOutput;
}
public TileEntityTripleEarthSolar() {
output = ConfigHandler.tripleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 4);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars2, 1, 4);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.fire;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityDoubleFireSolar extends TileEntityFireSolar {
public TileEntityDoubleFireSolar() {
output = Config.doubleCompressedSolarOutput;
}
public TileEntityDoubleFireSolar() {
output = ConfigHandler.doubleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 13);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 13);
}
}
@@ -9,39 +9,40 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.fire;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.solars.TileEntitySolarBase;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityFireSolar extends TileEntitySolarBase {
public TileEntityFireSolar() {
output = Config.compressedSolarOutput;
}
public TileEntityFireSolar() {
output = ConfigHandler.compressedSolarOutput;
}
@Override
public void checkConditions() {
if (!initialized && worldObj != null) {
canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0;
initialized = true;
}
@Override
public void checkConditions() {
if (!initialized && worldObj != null) {
canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0;
initialized = true;
}
if (worldObj.provider.dimensionId == -1) {
energySource.addEnergy(output * 2);
} else {
if (tick-- == 0) {
updateSunState();
tick = 64;
}
}
}
if (worldObj.provider.dimensionId == -1) {
energySource.addEnergy(output * 2);
} else {
if (tick-- == 0) {
updateSunState();
tick = 64;
}
}
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 12);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 12);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.fire;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityTripleFireSolar extends TileEntityFireSolar {
public TileEntityTripleFireSolar() {
output = Config.tripleCompressedSolarOutput;
}
public TileEntityTripleFireSolar() {
output = ConfigHandler.tripleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 14);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 14);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.order;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityDoubleOrderSolar extends TileEntityOrderSolar {
public TileEntityDoubleOrderSolar() {
output = Config.doubleCompressedSolarOutput;
}
public TileEntityDoubleOrderSolar() {
output = ConfigHandler.doubleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 10);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 10);
}
}
@@ -9,29 +9,30 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.order;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.solars.TileEntitySolarBase;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityOrderSolar extends TileEntitySolarBase {
public TileEntityOrderSolar() {
output = Config.compressedSolarOutput;
}
public TileEntityOrderSolar() {
output = ConfigHandler.compressedSolarOutput;
}
@Override
public void createEnergy() {
if (theSunIsVisible) {
energySource.addEnergy(output * 3);
}
}
@Override
public void createEnergy() {
if (theSunIsVisible) {
energySource.addEnergy(output * 3);
}
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 9);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 9);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.order;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityTripleOrderSolar extends TileEntityOrderSolar {
public TileEntityTripleOrderSolar() {
output = Config.tripleCompressedSolarOutput;
}
public TileEntityTripleOrderSolar() {
output = ConfigHandler.tripleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 11);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 11);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.water;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityDoubleWaterSolar extends TileEntityWaterSolar {
public TileEntityDoubleWaterSolar() {
output = Config.doubleCompressedSolarOutput;
}
public TileEntityDoubleWaterSolar() {
output = ConfigHandler.doubleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 4);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 4);
}
}
@@ -9,21 +9,22 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.water;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityTripleWaterSolar extends TileEntityWaterSolar {
public TileEntityTripleWaterSolar() {
output = Config.tripleCompressedSolarOutput;
}
public TileEntityTripleWaterSolar() {
output = ConfigHandler.tripleCompressedSolarOutput;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 5);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 5);
}
}
@@ -9,29 +9,30 @@
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
* http://www.minecraftforum.net/topic/1585216-
******************************************************************************/
package tombenpotter.emt.common.module.ic2.tile.solars.water;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tombenpotter.emt.common.module.ic2.IC2ModuleBlockRegistry;
import tombenpotter.emt.common.module.ic2.tile.solars.TileEntitySolarBase;
import tombenpotter.emt.common.util.Config;
import tombenpotter.emt.common.util.ConfigHandler;
public class TileEntityWaterSolar extends TileEntitySolarBase {
public TileEntityWaterSolar() {
output = Config.compressedSolarOutput;
}
public TileEntityWaterSolar() {
output = ConfigHandler.compressedSolarOutput;
}
@Override
public void createEnergy() {
if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) {
energySource.addEnergy(output);
}
}
@Override
public void createEnergy() {
if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) {
energySource.addEnergy(output);
}
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 3);
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(IC2ModuleBlockRegistry.emtSolars, 1, 3);
}
}
Loaded 100 of 121 files, more files were not shown because too many files have changed in this diff. Show more