From 2b5bb53bc6b27afb5f33fbfddfa9e9559e87e96e Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Wed, 23 Jul 2014 13:43:12 -0400 Subject: [PATCH 1/2] Fixed a few recipe issues --- src/main/java/mekanism/common/Mekanism.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index b563c3014..dce79ef61 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -662,10 +662,10 @@ public class Mekanism "TTT", "TET", "TTT", Character.valueOf('E'), "alloyAdvanced", Character.valueOf('T'), new ItemStack(PartTransmitter, 1, 4) })); CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(PartTransmitter, 8, 6), new Object[] { - "TTT", "TRT", "TTT", Character.valueOf('R'), "alloyElite", Character.valueOf('T'), new ItemStack(PartTransmitter, 1, 9) + "TTT", "TRT", "TTT", Character.valueOf('R'), "alloyElite", Character.valueOf('T'), new ItemStack(PartTransmitter, 1, 5) })); CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(PartTransmitter, 8, 7), new Object[] { - "TTT", "TAT", "TTT", Character.valueOf('A'), "alloyUltimate", Character.valueOf('T'), new ItemStack(PartTransmitter, 1, 10) + "TTT", "TAT", "TTT", Character.valueOf('A'), "alloyUltimate", Character.valueOf('T'), new ItemStack(PartTransmitter, 1, 6) })); CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(PartTransmitter, 8, 8), new Object[] { "SGS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), "blockGlass" @@ -775,7 +775,6 @@ public class Mekanism RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.stonebrick, 1, 2), new ItemStack(Blocks.stonebrick, 1, 0)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stonebrick, 1, 3)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.stonebrick, 1, 1), new ItemStack(Blocks.stonebrick, 1, 0)); - RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.quartz_ore), new ItemStack(Items.quartz, 2)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.glowstone), new ItemStack(Items.glowstone_dust, 4)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.clay), new ItemStack(Items.clay_ball, 4)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(SaltBlock), new ItemStack(Salt, 4)); From bb8985b6f8c0765ad3ec406f04a0db978257c4ff Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Wed, 23 Jul 2014 13:49:42 -0400 Subject: [PATCH 2/2] Fixed a few energy transfer issues --- .../common/tile/TileEntityEnergyCube.java | 32 ++++++++++--------- .../common/tile/TileEntityBioGenerator.java | 4 +-- .../common/tile/TileEntitySolarGenerator.java | 5 ++- .../common/tile/TileEntityWindTurbine.java | 5 ++- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/main/java/mekanism/common/tile/TileEntityEnergyCube.java b/src/main/java/mekanism/common/tile/TileEntityEnergyCube.java index 86e921166..c57ac3b97 100644 --- a/src/main/java/mekanism/common/tile/TileEntityEnergyCube.java +++ b/src/main/java/mekanism/common/tile/TileEntityEnergyCube.java @@ -20,7 +20,6 @@ import net.minecraft.util.MathHelper; import net.minecraftforge.common.util.ForgeDirection; import cpw.mods.fml.common.Optional.Interface; import cpw.mods.fml.common.Optional.Method; - import dan200.computercraft.api.lua.ILuaContext; import dan200.computercraft.api.peripheral.IComputerAccess; import dan200.computercraft.api.peripheral.IPeripheral; @@ -55,22 +54,25 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IPe { super.onUpdate(); - ChargeUtils.charge(0, this); - ChargeUtils.discharge(1, this); - - if(MekanismUtils.canFunction(this)) + if(!worldObj.isRemote) { - CableUtils.emit(this); + ChargeUtils.charge(0, this); + ChargeUtils.discharge(1, this); + + if(MekanismUtils.canFunction(this)) + { + CableUtils.emit(this); + } + + int newScale = getScaledEnergyLevel(20); + + if(newScale != prevScale) + { + Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this).getTargetPoint(50D)); + } + + prevScale = newScale; } - - int newScale = getScaledEnergyLevel(20); - - if(newScale != prevScale) - { - Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this).getTargetPoint(50D)); - } - - prevScale = newScale; } @Override diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java index 1ea82fa74..916fab482 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java @@ -46,10 +46,10 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IFlui { super.onUpdate(); - ChargeUtils.charge(1, this); - if(inventory[0] != null) { + ChargeUtils.charge(1, this); + FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(inventory[0]); if(fluid != null && FluidRegistry.isFluidRegistered("bioethanol")) diff --git a/src/main/java/mekanism/generators/common/tile/TileEntitySolarGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntitySolarGenerator.java index df3a3a12a..45a642c26 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntitySolarGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntitySolarGenerator.java @@ -15,7 +15,6 @@ import net.minecraft.world.biome.BiomeGenDesert; import net.minecraftforge.common.util.ForgeDirection; import cpw.mods.fml.common.ModAPIManager; import cpw.mods.fml.common.Optional.Method; - import dan200.computercraft.api.lua.ILuaContext; import dan200.computercraft.api.peripheral.IComputerAccess; @@ -63,10 +62,10 @@ public class TileEntitySolarGenerator extends TileEntityGenerator { super.onUpdate(); - ChargeUtils.charge(0, this); - if(!worldObj.isRemote) { + ChargeUtils.charge(0, this); + if(worldObj.isDaytime() && ((!worldObj.isRaining() && !worldObj.isThundering()) || isDesert()) && !worldObj.provider.hasNoSky && worldObj.canBlockSeeTheSky(xCoord, yCoord+1, zCoord)) { seesSun = true; diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityWindTurbine.java b/src/main/java/mekanism/generators/common/tile/TileEntityWindTurbine.java index 82cd4b4f3..f423f951b 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityWindTurbine.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityWindTurbine.java @@ -8,7 +8,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.generators.common.MekanismGenerators; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.Optional.Method; - import dan200.computercraft.api.lua.ILuaContext; import dan200.computercraft.api.peripheral.IComputerAccess; @@ -28,10 +27,10 @@ public class TileEntityWindTurbine extends TileEntityGenerator implements IBound { super.onUpdate(); - ChargeUtils.charge(0, this); - if(!worldObj.isRemote) { + ChargeUtils.charge(0, this); + if(canOperate()) { setActive(true);