mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-18 19:29:29 +00:00
Essentia gen rework (#6)
+Added GUI for Essentia Gens +Added Essentia Pipe Support for Essentia Gens +Added Tooltip for Essentia Gens +Added CFG for Essentia Gen EU Storage +Added Lucrum Gen with Infusion Recipe, Thaumonomicon Entry etc. +Updated ru_RU.lang (ty Cinobi) +Added WiP de_DE.lang +Removed unused .java +Added Essentia Storage for Essentia Gens +Rescaled Ticktime for Essentia Gens to 20Ticks(was 30Tick before) +Version number increase
This commit is contained in:
1 parent
a97a032210
commit
9a1a1bbf3f
27 files changed
+1071
-55
No files matched your search
@@ -9,6 +9,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -19,8 +20,10 @@ import java.util.Random;
|
||||
|
||||
public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
|
||||
private static int subtypes=6;
|
||||
|
||||
public BlockEssentiaGenerators(String name) {
|
||||
super(name, Material.iron, soundTypeMetal, 5, 4.0F);
|
||||
super(name, Material.iron, soundTypeMetal, subtypes, 4.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,7 +32,7 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
super.registerBlockIcons(ir);
|
||||
this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top");
|
||||
|
||||
for (int meta = 0; meta < 5; meta++) {
|
||||
for (int meta = 0; meta < subtypes; meta++) {
|
||||
iconSets[meta].top = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
|
||||
iconSets[meta].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
|
||||
iconSets[meta].side = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/side");
|
||||
@@ -40,6 +43,7 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/auramfront");
|
||||
iconSets[3].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/arborfront");
|
||||
iconSets[4].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
|
||||
iconSets[5].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -49,6 +53,7 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
list.add(new ItemStack(id, 1, 2));
|
||||
list.add(new ItemStack(id, 1, 3));
|
||||
list.add(new ItemStack(id, 1, 4));
|
||||
list.add(new ItemStack(id, 1, 5));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,6 +69,8 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
return new TileEntityArborGenerator();
|
||||
case 4:
|
||||
return new TileEntityAerGenerator();
|
||||
case 5:
|
||||
return new TileEntityLucrumGenerator();
|
||||
}
|
||||
return super.createTileEntity(world, meta);
|
||||
}
|
||||
@@ -82,4 +89,19 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3)
|
||||
{
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
if (world.isRemote) {
|
||||
return true;
|
||||
}
|
||||
TileEntity tileentity = world.getTileEntity(i, j, k);
|
||||
if (tileentity != null) {
|
||||
player.openGui(emt.EMT.instance, 1, world, i, j, k);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package emt.client.gui;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.client.gui.container.ConainerGenerator;
|
||||
import emt.tile.generator.TileEntityBaseGenerator;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GuiGenerator extends GuiContainer {
|
||||
|
||||
private static ResourceLocation tex = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/generator.png");
|
||||
|
||||
TileEntityBaseGenerator tileentity;
|
||||
private boolean allowUserInput;
|
||||
private int xSize;
|
||||
private int ySize;
|
||||
|
||||
public GuiGenerator(InventoryPlayer invPlayer, TileEntityBaseGenerator entity) {
|
||||
super(new ConainerGenerator(invPlayer, entity));
|
||||
this.tileentity = entity;
|
||||
this.allowUserInput = false;
|
||||
this.xSize = 194;
|
||||
this.ySize = 168;
|
||||
}
|
||||
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
String formatPanelName = I18n.format(this.tileentity.getInventoryName(), new Object[0]);
|
||||
int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2;
|
||||
this.fontRendererObj.drawStringWithShadow(formatPanelName, nmPos, 7, 6618118);
|
||||
|
||||
String storageString = I18n.format("emt.Storage", new Object[0]);
|
||||
String fuel=I18n.format("emt.Fuel", new Object[0]);
|
||||
if (this.tileentity.maxstorage<1000)
|
||||
this.fontRendererObj.drawString(storageString + this.tileentity.storage + "/" + this.tileentity.maxstorage +"EU", 36, 22, 0);
|
||||
else if (10000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 10000000)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.storage/1000) + "/" + (this.tileentity.maxstorage/1000) +"kEU", 36, 22, 0);
|
||||
else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.storage/1000000) + "/" + (this.tileentity.maxstorage/1000000) +"MEU", 36, 22, 0);
|
||||
else if (1000000000 <= this.tileentity.maxstorage)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.storage/1000000000) + "/" + (this.tileentity.maxstorage/1000000000) +"GEU", 36, 22, 0);
|
||||
if(this.tileentity.isActive)
|
||||
this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating/20/20)+" EU/t", 36, 35, 0);
|
||||
else
|
||||
this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+"0 EU/t",36, 35, 0);
|
||||
this.fontRendererObj.drawString(fuel+": "+Integer.toString(this.tileentity.fuel),36,48,0);
|
||||
this.fontRendererObj.drawString(fuel+"/t: "+Integer.toString((this.tileentity.fuel*20*20)-this.tileentity.tick),36,63,0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
|
||||
{
|
||||
// GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.renderEngine.bindTexture(tex);
|
||||
|
||||
int h = (this.width - this.xSize) / 2;
|
||||
int k = (this.height - this.ySize) / 2;
|
||||
drawTexturedModalRect(h, k, 0, 0, this.xSize, this.ySize);
|
||||
if (this.tileentity.storage > 0)
|
||||
{
|
||||
int l = this.tileentity.gaugeEnergyScaled(33);
|
||||
drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14);
|
||||
}
|
||||
|
||||
if (this.tileentity.fuel > 0)
|
||||
{
|
||||
int l = this.tileentity.gaugeFuelScaled(33);
|
||||
drawTexturedModalRect(h + 18, k + 42, 195, 0, l, 14);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package emt.client.gui.container;
|
||||
|
||||
import emt.tile.generator.TileEntityBaseGenerator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ConainerGenerator
|
||||
extends Container
|
||||
{
|
||||
private TileEntityBaseGenerator tileentity;
|
||||
public int storage;
|
||||
public int fuel;
|
||||
public int generating;
|
||||
|
||||
public ConainerGenerator(InventoryPlayer inventoryplayer, TileEntityBaseGenerator tileentity)
|
||||
{
|
||||
this.storage = 0;
|
||||
this.fuel = 0;
|
||||
this.tileentity = tileentity;
|
||||
/* for (int j = 0; j < 4; j++) {
|
||||
addSlotToContainer(new Slot(this.tileentity, j, 17 + j * 18, 59));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int k = 0; k < 9; k++) {
|
||||
addSlotToContainer(new Slot(inventoryplayer, k + i * 9 + 9, 17 + k * 18, 86 + i * 18));
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < 9; j++) {
|
||||
addSlotToContainer(new Slot(inventoryplayer, j, 17 + j * 18, 144));
|
||||
}
|
||||
|
||||
addSlotToContainer(new Slot(this.tileentity, 5, 17 + 7 * 18, 59));*/
|
||||
}
|
||||
|
||||
public void addCraftingToCrafters(ICrafting icrafting)
|
||||
{
|
||||
super.addCraftingToCrafters(icrafting);
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) this.tileentity.generating);
|
||||
icrafting.sendProgressBarUpdate(this, 1, this.tileentity.storage);
|
||||
icrafting.sendProgressBarUpdate(this, 2, this.tileentity.fuel);
|
||||
}
|
||||
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++)
|
||||
{
|
||||
ICrafting icrafting = (ICrafting)this.crafters.get(i);
|
||||
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) this.tileentity.generating);
|
||||
icrafting.sendProgressBarUpdate(this, 1, this.tileentity.storage);
|
||||
icrafting.sendProgressBarUpdate(this, 2, this.tileentity.fuel);
|
||||
}
|
||||
|
||||
this.generating = (int) this.tileentity.generating;
|
||||
this.tileentity.storage = ((int)this.tileentity.energySource.getEnergyStored());
|
||||
}
|
||||
|
||||
public void updateProgressBar(int i, int j)
|
||||
{
|
||||
if (i == 0) {
|
||||
this.tileentity.generating = j;
|
||||
}
|
||||
if (i == 1) {
|
||||
if (j<this.tileentity.maxstorage)
|
||||
this.tileentity.storage = j;
|
||||
else
|
||||
this.tileentity.storage=this.tileentity.maxstorage;
|
||||
}
|
||||
if (i == 2) {
|
||||
this.tileentity.fuel=j;
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
|
||||
{
|
||||
int slot = par2;
|
||||
ItemStack stack = null;
|
||||
|
||||
Slot slotObject = (Slot)this.inventorySlots.get(par2);
|
||||
if ((slotObject != null) && (slotObject.getHasStack()))
|
||||
{
|
||||
ItemStack stackInSlot = slotObject.getStack();
|
||||
stack = stackInSlot.copy();
|
||||
if ((slot >= 0) && (slot <= 3))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 4, 40, true)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if ((slot >= 4) && (slot < 31))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 0, 4, false)) {
|
||||
if (!mergeItemStack(stackInSlot, 31, 40, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((slot >= 31) && (slot < 39))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 0, 30, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!mergeItemStack(stackInSlot, 0, 30, false)) {
|
||||
return null;
|
||||
}
|
||||
if (stackInSlot.stackSize == 0) {
|
||||
slotObject.putStack(null);
|
||||
} else {
|
||||
slotObject.onSlotChanged();
|
||||
}
|
||||
if (stack.stackSize != stackInSlot.stackSize) {
|
||||
slotObject.onPickupFromSlot(par1EntityPlayer, stackInSlot);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
public boolean canInteractWith(EntityPlayer entityplayer)
|
||||
{
|
||||
return this.tileentity.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import static thaumcraft.api.ThaumcraftApi.*;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.crafting.CrucibleRecipe;
|
||||
import thaumcraft.api.crafting.InfusionRecipe;
|
||||
@@ -154,6 +155,9 @@ public class EMTRecipes {
|
||||
|
||||
public static void registerLateRecipes() {
|
||||
/** Infusion Recipes **/
|
||||
lucrumGenerator = addInfusionCraftingRecipe("Lucrum Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 5), 10, new AspectList().add(Aspect.GREED, 64).add(Aspect.EXCHANGE, 128), new ItemStack(EMTBlocks.essentiaGens, 1, 0),
|
||||
new ItemStack[] {new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block),new ItemStack(Blocks.gold_block)});
|
||||
|
||||
thaumiumDrill = addInfusionCraftingRecipe("Thaumium Drill", getChargedItem(EMTItems.thaumiumDrill, 10), 5, EMTCraftingAspects.thaumiumDrillCrafting, new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE),
|
||||
new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(EMTItems.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron") });
|
||||
|
||||
@@ -452,6 +456,7 @@ public class EMTRecipes {
|
||||
public static InfusionRecipe armorChargingRing;
|
||||
public static InfusionRecipe nanoWings;
|
||||
public static InfusionRecipe quantumWings;
|
||||
public static InfusionRecipe lucrumGenerator;
|
||||
|
||||
public static ShapelessArcaneRecipe diamondOmnitool;
|
||||
public static ShapelessArcaneRecipe tinyUranium;
|
||||
|
||||
@@ -122,6 +122,12 @@ public class EMTResearches {
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.potentiaGeneratorResearch) {
|
||||
if (!EMTConfigHandler.lucrumGeneratorResearch) {
|
||||
new EMTResearchItem("Lucrum Generator", EMTResearchAspects.lucrumGeneratorResearch, -2, 2, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 5)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.lucrumGenerator));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.potentiaGeneratorResearch) {
|
||||
if (!EMTConfigHandler.aerGeneratorResearch) {
|
||||
new EMTResearchItem("Aer Generator", EMTResearchAspects.aerGenerator, -2, 6, 1, new ItemStack(EMTBlocks.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.aerGenerator));
|
||||
|
||||
@@ -9,6 +9,7 @@ import emt.tile.generator.TileEntityAerGenerator;
|
||||
import emt.tile.generator.TileEntityArborGenerator;
|
||||
import emt.tile.generator.TileEntityAuramGenerator;
|
||||
import emt.tile.generator.TileEntityIgnisGenerator;
|
||||
import emt.tile.generator.TileEntityLucrumGenerator;
|
||||
import emt.tile.generator.TileEntityPotentiaGenerator;
|
||||
import emt.tile.solar.air.TileEntityAirSolar;
|
||||
import emt.tile.solar.air.TileEntityDoubleAirSolar;
|
||||
@@ -34,18 +35,24 @@ import emt.tile.solar.water.TileEntityWaterSolar;
|
||||
|
||||
public class EMTTiles {
|
||||
|
||||
public static void registerTiles() {
|
||||
GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode");
|
||||
public static void registerTileEntities() {
|
||||
|
||||
//Essentia Gens
|
||||
GameRegistry.registerTileEntity(TileEntityPotentiaGenerator.class, "tileentitypotentiagenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityIgnisGenerator.class, "tileentityignisgenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityAuramGenerator.class, "tileentityauramgenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityArborGenerator.class, "tileentityarborgenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityAerGenerator.class, "tileentityaergenerator");
|
||||
GameRegistry.registerTileEntity(TileEntityLucrumGenerator.class, "tileentityperditiogenerator");
|
||||
|
||||
//Machinery
|
||||
GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge");
|
||||
GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator");
|
||||
|
||||
//Solars
|
||||
GameRegistry.registerTileEntity(TileEntityCompressedSolar.class, "tileentitycompressedsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityDoubleCompressedSolar.class, "tileentitydoublecompressedsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityTripleCompressedSolar.class, "tileentitytriplecompressedsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator");
|
||||
GameRegistry.registerTileEntity(TileEntityWaterSolar.class, "tileentitywatersolar");
|
||||
GameRegistry.registerTileEntity(TileEntityDoubleWaterSolar.class, "tileentitydoublewatersolar");
|
||||
GameRegistry.registerTileEntity(TileEntityTripleWaterSolar.class, "tileentitytriplewatersolar");
|
||||
@@ -64,6 +71,9 @@ public class EMTTiles {
|
||||
GameRegistry.registerTileEntity(TileEntityEarthSolar.class, "tileentityearthsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar");
|
||||
GameRegistry.registerTileEntity(TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar");
|
||||
|
||||
//Random Stuff
|
||||
GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode");
|
||||
GameRegistry.registerTileEntity(TileElectricCloud.class, "tileEntityElectricCloud");
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ public class Registry {
|
||||
public static void register() {
|
||||
EMTBlocks.registerBlocks();
|
||||
EMTItems.registerItems();
|
||||
EMTTiles.registerTiles();
|
||||
EMTTiles.registerTileEntities();
|
||||
EMTRecipes.registerEarlyRecipes();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package emt.item.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
||||
public class ItemBlockEssentiaGenerator extends ItemBlock {
|
||||
|
||||
public ItemBlockEssentiaGenerator(Block id) {
|
||||
super(id);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,22 @@
|
||||
package emt.item.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
|
||||
public ItemBlockEssentiaGenerators(Block id) {
|
||||
super(id);
|
||||
public ItemBlockEssentiaGenerators(Block block) {
|
||||
super(block);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -30,6 +39,9 @@ public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
case 4:
|
||||
name = "aer";
|
||||
break;
|
||||
case 5:
|
||||
name = "lucrum";
|
||||
break;
|
||||
default:
|
||||
name = "nothing";
|
||||
}
|
||||
@@ -40,4 +52,45 @@ public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
public int getMetadata(int meta) {
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack is, EntityPlayer player, List list, boolean flag) {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
|
||||
switch (is.getItemDamage()) {
|
||||
case 0:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.ENERGY.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
case 1:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) +" EU");
|
||||
break;
|
||||
case 2:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AURA.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
case 3:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.TREE.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.FIRE.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
case 4:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.AIR.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
case 5:
|
||||
list.add(StatCollector.translateToLocal("emt.Output")+Integer.toString((int)(EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag())/20/20)) +" EU/t");
|
||||
list.add(StatCollector.translateToLocal("gui.EMT.book.aspect.output.essentia.eu")+": "+Double.toString((EMTEssentiasOutputs.outputs.get(Aspect.GREED.getTag()))) +" EU");
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
list.add(StatCollector.translateToLocal("emt.Storage")+Double.toString(EMTConfigHandler.EssentiaGeneratorStorage)+" EU");
|
||||
} else
|
||||
list.add(StatCollector.translateToLocal("emt.PressShift"));
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,5 @@
|
||||
package emt.item.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import static emt.util.EMTTextHelper.localize;
|
||||
|
||||
import java.util.List;
|
||||
@@ -12,6 +7,10 @@ import java.util.List;
|
||||
import emt.block.BlockBaseContainer;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBlockSolars extends ItemBlock {
|
||||
|
||||
|
||||
@@ -2,11 +2,14 @@ package emt.proxy;
|
||||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import emt.client.gui.GuiEtherealMacerator;
|
||||
import emt.client.gui.GuiGenerator;
|
||||
import emt.client.gui.GuiIndustrialWandRecharger;
|
||||
import emt.client.gui.container.ConainerGenerator;
|
||||
import emt.client.gui.container.ContainerEtheralMacerator;
|
||||
import emt.client.gui.container.ContainerIndustrialWandRecharge;
|
||||
import emt.tile.TileEntityEtherealMacerator;
|
||||
import emt.tile.TileEntityIndustrialWandRecharge;
|
||||
import emt.tile.generator.TileEntityBaseGenerator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
@@ -34,6 +37,9 @@ public class CommonProxy implements IGuiHandler {
|
||||
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
|
||||
return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
|
||||
}
|
||||
else if (entity != null && entity instanceof TileEntityBaseGenerator) {
|
||||
return new ConainerGenerator(player.inventory, (TileEntityBaseGenerator) entity);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -52,6 +58,9 @@ public class CommonProxy implements IGuiHandler {
|
||||
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
|
||||
return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
|
||||
}
|
||||
else if (entity != null && entity instanceof TileEntityBaseGenerator) {
|
||||
return new GuiGenerator(player.inventory, (TileEntityBaseGenerator) entity);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,9 @@ public abstract class TileEntityEMT extends TileEntity {
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeToNBT(tagCompound);
|
||||
|
||||
tagCompound.setInteger("facing", facing);
|
||||
tagCompound.setBoolean("isOn", isOn);
|
||||
super.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityAerGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityAerGenerator() {
|
||||
aspect = Aspect.AIR;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.aer.name");
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,18 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityArborGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityArborGenerator() {
|
||||
aspect = Aspect.TREE;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.arbor.name");
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,18 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityAuramGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityAuramGenerator() {
|
||||
aspect = Aspect.AURA;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.auram.name");
|
||||
}
|
||||
}
|
||||
@@ -1,55 +1,67 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import emt.tile.TileEntityEMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.aspects.IAspectContainer;
|
||||
import thaumcraft.api.aspects.IAspectSource;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource;
|
||||
|
||||
public abstract class TileEntityBaseGenerator extends TileEntityEMT {
|
||||
public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory, IAspectContainer, IEssentiaTransport {
|
||||
|
||||
public BasicSource energySource = new BasicSource(this, 1000000000, 3);
|
||||
public BasicSource energySource = new BasicSource(this, 100000, 2);
|
||||
public Aspect aspect;
|
||||
public double output;
|
||||
public double generating;
|
||||
public int tick = 0;
|
||||
public boolean isActive = false;
|
||||
Random rnd = new Random();
|
||||
public int tier;
|
||||
public int storage;
|
||||
public int maxstorage;
|
||||
public int maxfuel;
|
||||
public int fuel;
|
||||
public int refuel;
|
||||
|
||||
public TileEntityBaseGenerator() {
|
||||
output = 2000;
|
||||
energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage);
|
||||
maxstorage = (int) energySource.getCapacity();
|
||||
maxfuel = 64;
|
||||
fuel = 0;
|
||||
storage = 0;
|
||||
refuel = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (tick > 0)
|
||||
tick--;
|
||||
|
||||
if (tick == 0) {
|
||||
energySource.updateEntity();
|
||||
isActive = false;
|
||||
storeFuel();
|
||||
fillfrompipe();
|
||||
createEnergy();
|
||||
tick = 20;
|
||||
}
|
||||
energySource.updateEntity();
|
||||
}
|
||||
|
||||
public void createEnergy() {
|
||||
int count = 0;
|
||||
|
||||
public void storeFuel() {
|
||||
if (fuel<maxfuel) {
|
||||
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
|
||||
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
|
||||
for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) {
|
||||
TileEntity tile = this.worldObj.getTileEntity(x, y, z);
|
||||
if (tile != null && tile instanceof IAspectSource) {
|
||||
IAspectSource as = (IAspectSource) tile;
|
||||
if (as.doesContainerContainAmount(aspect, 1)) {
|
||||
if (as.takeFromContainer(aspect, 1)) {
|
||||
isActive = true;
|
||||
if (as.doesContainerContainAmount(aspect, refuel)) {
|
||||
if (as.takeFromContainer(aspect, refuel)) {
|
||||
PacketHandler.INSTANCE.sendToAllAround(new PacketFXEssentiaSource(xCoord, yCoord, zCoord, (byte) (xCoord - x), (byte) (yCoord - y), (byte) (zCoord - z), aspect.getColor()), new cpw.mods.fml.common.network.NetworkRegistry.TargetPoint(this.getWorldObj().provider.dimensionId, xCoord, yCoord, zCoord, 32.0D));
|
||||
energySource.addEnergy(output / 30D);
|
||||
this.addToContainer(aspect, refuel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,6 +69,63 @@ public abstract class TileEntityBaseGenerator extends TileEntityEMT {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void fillfrompipe() {
|
||||
|
||||
TileEntity[] te = new TileEntity[ForgeDirection.VALID_DIRECTIONS.length];
|
||||
for (int i =0;i<ForgeDirection.VALID_DIRECTIONS.length;i++) {
|
||||
te[i]=ThaumcraftApiHelper.getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, ForgeDirection.VALID_DIRECTIONS[i]);
|
||||
if (te[i] != null)
|
||||
{
|
||||
IEssentiaTransport pipe = (IEssentiaTransport)te[i];
|
||||
if (!pipe.canOutputTo(ForgeDirection.VALID_DIRECTIONS[i])) {
|
||||
return;
|
||||
}
|
||||
else
|
||||
if (pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i])!=null && pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]).equals(aspect) && (pipe.getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]) < getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]))) {
|
||||
addToContainer(aspect, pipe.takeEssentia(aspect, 1, ForgeDirection.VALID_DIRECTIONS[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void createEnergy() {
|
||||
if (fuel>0) {
|
||||
if (storage+(generating/20/20) < maxstorage) {
|
||||
isActive = true;
|
||||
if (FMLCommonHandler.instance().getEffectiveSide().isServer()) {
|
||||
energySource.addEnergy(generating/20/20);
|
||||
storage = (int) energySource.getEnergyStored();
|
||||
}
|
||||
tick = tick+1;
|
||||
if (tick == 20*20) {
|
||||
fuel=fuel-1;
|
||||
tick = 0;
|
||||
}
|
||||
}
|
||||
else if (storage == maxstorage)
|
||||
isActive = false;
|
||||
else if ((storage+(generating/20/20) > maxstorage) && storage != maxstorage) {
|
||||
isActive = true;
|
||||
if (FMLCommonHandler.instance().getEffectiveSide().isServer()) {
|
||||
energySource.setEnergyStored((double)maxstorage);
|
||||
storage = maxstorage;
|
||||
}
|
||||
tick = tick+1;
|
||||
if (tick == 20*20) {
|
||||
fuel=fuel-1;
|
||||
tick = 0;
|
||||
}
|
||||
isActive = false;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
isActive = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
@@ -73,11 +142,213 @@ public abstract class TileEntityBaseGenerator extends TileEntityEMT {
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
super.readFromNBT(tag);
|
||||
energySource.readFromNBT(tag);
|
||||
if (tag.getInteger("storage")>storage)
|
||||
storage = tag.getInteger("storage");
|
||||
if (tag.getInteger("fuel")>fuel)
|
||||
fuel = tag.getInteger("fuel");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
tag.setInteger("storage", this.storage);
|
||||
tag.setInteger("fuel", this.fuel);
|
||||
super.writeToNBT(tag);
|
||||
energySource.writeToNBT(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int p_70304_1_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "EMT";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer p_70300_1_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
}
|
||||
|
||||
public int gaugeEnergyScaled(int i)
|
||||
{
|
||||
return this.storage * i / this.maxstorage;
|
||||
}
|
||||
|
||||
public int gaugeFuelScaled(int i)
|
||||
{
|
||||
return fuel*i/maxfuel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack Stack) {
|
||||
/*boolean ret= false;
|
||||
if (i<=4)
|
||||
ret = true;
|
||||
else if(IEssentiaContainerItem.class.isInstance(Stack))
|
||||
ret = true;
|
||||
return ret;*/
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AspectList getAspects() {
|
||||
return new AspectList().add(aspect, fuel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAspects(AspectList aspects) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerAccept(Aspect tag) {
|
||||
if(!tag.equals(aspect))
|
||||
return false;
|
||||
else return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addToContainer(Aspect tag, int amount) {
|
||||
if(!tag.equals(aspect)||amount<0)
|
||||
return amount;
|
||||
else if (amount+this.fuel<this.maxfuel) {
|
||||
this.fuel=this.fuel+amount;
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
this.fuel=this.fuel+(amount-(amount-(this.maxfuel-this.fuel)));
|
||||
return amount-(this.maxfuel-this.fuel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean takeFromContainer(Aspect tag, int amount) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean takeFromContainer(AspectList ot) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerContainAmount(Aspect tag, int amount) {
|
||||
return (tag.equals(aspect)&&amount <= fuel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerContain(AspectList ot) {
|
||||
return ot.aspects.containsKey(aspect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int containerContains(Aspect tag) {
|
||||
return tag == aspect ? fuel : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConnectable(ForgeDirection face) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInputFrom(ForgeDirection face) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canOutputTo(ForgeDirection face) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSuction(Aspect aspect, int amount) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Aspect getSuctionType(ForgeDirection face) {
|
||||
return aspect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSuctionAmount(ForgeDirection face) {
|
||||
return 128;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int takeEssentia(Aspect aspect, int amount, ForgeDirection face) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addEssentia(Aspect aspect, int amount, ForgeDirection face) {
|
||||
if(amount<(maxfuel-fuel))
|
||||
return amount;
|
||||
else
|
||||
return maxfuel - addToContainer(aspect,amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Aspect getEssentiaType(ForgeDirection face) {
|
||||
return aspect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEssentiaAmount(ForgeDirection face) {
|
||||
return fuel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinimumSuction() {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderExtendedTube() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +1,18 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityIgnisGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityIgnisGenerator() {
|
||||
aspect = Aspect.FIRE;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.ignis.name");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityLucrumGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityLucrumGenerator() {
|
||||
aspect = Aspect.GREED;
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.lucrum.name");
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,18 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityPotentiaGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityPotentiaGenerator() {
|
||||
aspect = Aspect.ENERGY;
|
||||
output = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.potentia.name");
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,8 @@ public class EMTConfigHandler {
|
||||
public static double quantumBootsMinDrop;
|
||||
public static double quantumBootsMaxDrop;
|
||||
|
||||
public static double EssentiaGeneratorStorage;
|
||||
|
||||
/** Essentias **/
|
||||
public static double fireOutput;
|
||||
public static double waterOutput;
|
||||
@@ -79,6 +81,7 @@ public class EMTConfigHandler {
|
||||
public static boolean ignisGeneratorResearch;
|
||||
public static boolean auramGeneratorResearch;
|
||||
public static boolean arborGeneratorResearch;
|
||||
public static boolean lucrumGeneratorResearch;
|
||||
public static boolean wandChargingSationResearch;
|
||||
public static boolean tinyUraniumResearch;
|
||||
public static boolean thorHammerResearch;
|
||||
@@ -143,6 +146,9 @@ public class EMTConfigHandler {
|
||||
entropyOutput = config.get(OUTPUTS, "Perditio Output", 10000).getDouble(entropyOutput);
|
||||
earthOutput = config.get(OUTPUTS, "Terra Output", 2000).getDouble(earthOutput);
|
||||
outputCap = config.get(OUTPUTS, "Output Cap", -1).getDouble(outputCap);
|
||||
|
||||
EssentiaGeneratorStorage=config.get(VALUES,"Essentia Generator Storage",1000000,"This is the number you have to modify if you want to change the size of the "+"internal buffer of the Essentia Generator").getDouble(EssentiaGeneratorStorage);
|
||||
|
||||
|
||||
wandChargerConsumption = config.get(VALUES, "Wand Charging Station Consumption", 50000, "This is the number you have to modify if you want to make the Industrial Wand Charging " + "Station use more or less EU to charge 1 unit of Vis on your wand.").getDouble(wandChargerConsumption);
|
||||
compressedSolarOutput = config.get(VALUES, "Compressed Solar Panel Output", 10, "This is the number you have to modify if you want to make the Compressed Solar Panel yield " + "more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(compressedSolarOutput);
|
||||
@@ -163,7 +169,7 @@ public class EMTConfigHandler {
|
||||
nanoBootsMinDrop = config.get(VALUES, "Nano Boots of the Traveller minimum drop", 6.0, "The distance allowed to fall without any damage").getDouble(nanoBootsMinDrop);
|
||||
nanoBootsMaxDrop = config.get(VALUES, "Nano Boots of the Traveller maximum healthy drop", 35.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(nanoBootsMaxDrop);
|
||||
quantumBootsMinDrop = config.get(VALUES, "Quantum Boots of the Traveller minimum drop", 10.0, "The distance allowed to fall without any damage").getDouble(quantumBootsMinDrop);
|
||||
quantumBootsMaxDrop = config.get(VALUES, "Quantum Boots of the Traveller maximum healthy drop", 100.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(quantumBootsMaxDrop);
|
||||
quantumBootsMaxDrop = config.get(VALUES, "Quantum Boots of the Traveller maximum healthy drop", 100.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(quantumBootsMaxDrop);
|
||||
|
||||
thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Drill", false).getBoolean(thaumiumDrillResearch);
|
||||
thaumiumChainsawResearch = config.get(RESEARCH, "Thaumium Chainsaw", false).getBoolean(thaumiumChainsawResearch);
|
||||
@@ -184,6 +190,7 @@ public class EMTConfigHandler {
|
||||
ignisGeneratorResearch = config.get(RESEARCH, "Ignis Generator", false).getBoolean(ignisGeneratorResearch);
|
||||
auramGeneratorResearch = config.get(RESEARCH, "Auram Generator", false).getBoolean(auramGeneratorResearch);
|
||||
arborGeneratorResearch = config.get(RESEARCH, "Arbor Generator", false).getBoolean(arborGeneratorResearch);
|
||||
lucrumGeneratorResearch = config.get(RESEARCH, "Lucrum Generator", false).getBoolean(lucrumGeneratorResearch);
|
||||
wandChargingSationResearch = config.get(RESEARCH, "Industrial Wand Charging Station", false).getBoolean(wandChargingSationResearch);
|
||||
tinyUraniumResearch = config.get(RESEARCH, "Tiny Piles of Uranium", false).getBoolean(tinyUraniumResearch);
|
||||
thorHammerResearch = config.get(RESEARCH, "Mjolnir", false).getBoolean(thorHammerResearch);
|
||||
|
||||
@@ -20,6 +20,7 @@ public class EMTResearchAspects {
|
||||
public static AspectList ignisGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.FIRE, 3);
|
||||
public static AspectList auramGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AURA, 3);
|
||||
public static AspectList arborGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.TREE, 3);
|
||||
public static AspectList lucrumGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.GREED, 3);
|
||||
public static AspectList streamChainsawResearch = new AspectList().add(Aspect.TOOL, 3).add(Aspect.TREE, 3).add(Aspect.WATER, 6).add(Aspect.ENERGY, 4);
|
||||
public static AspectList rockbreakerDrillResearch = new AspectList().add(Aspect.ENERGY, 3).add(Aspect.FIRE, 2).add(Aspect.MINE, 3);
|
||||
public static AspectList shieldBlockResearch = new AspectList().add(Aspect.ARMOR, 3).add(Aspect.TRAP, 2);
|
||||
|
||||
Reference in new issue
Block a user