From fc0a611f9389c90e5514a1058180b88f59c42b57 Mon Sep 17 00:00:00 2001 From: Vexatos Date: Fri, 13 Dec 2013 19:50:48 +0100 Subject: [PATCH 1/4] Update de_DE.lang --- resources/assets/mekanism/lang/de_DE.lang | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/resources/assets/mekanism/lang/de_DE.lang b/resources/assets/mekanism/lang/de_DE.lang index 784de0bfd..882ec3b36 100644 --- a/resources/assets/mekanism/lang/de_DE.lang +++ b/resources/assets/mekanism/lang/de_DE.lang @@ -25,6 +25,7 @@ item.WalkieTalkie.name=Walkie-Talkie item.Jetpack.name=Jetpack item.ScubaTank.name=Taucherflasche item.GasMask.name=Gasmaske +item.Dictionary.name=Lexikon //Gas Tank tile.GasTank.GasTank.name=Gastank @@ -65,6 +66,8 @@ tile.MachineBlock.DigitalMiner.name=Digitalbergbaugerät //Machine Block 2 (second ID iteration) tile.MachineBlock2.RotaryCondensentrator.name=Rotationskondensentrator +tile.MachineBlock2.ChemicalFormulator.name=Chemischer Formulator +tile.MachineBlock2.ChemicalInfuser.name=Chemischer Infundierer //Ore Block tile.OreBlock.OsmiumOre.name=Osmiumerz @@ -95,6 +98,7 @@ item.steelDust.name=Stahlstaub item.copperDust.name=Kupferstaub item.tinDust.name=Zinnstaub item.silverDust.name=Silberstaub +item.leadDust.name=Bleistaub //Clumps item.ironClump.name=Eisenklumpen @@ -104,6 +108,7 @@ item.copperClump.name=Kupferklumpen item.tinClump.name=Zinnklumpen item.silverClump.name=Silberklumpen item.obsidianClump.name=Obsidianklumpen +item.leadClump.name=Bleiklumpen //Dirty Dust item.dirtyIronDust.name=Dreckiger Eisenstaub @@ -113,6 +118,7 @@ item.dirtyCopperDust.name=Dreckiger Kupferstaub item.dirtyTinDust.name=Dreckiger Zinnstaub item.dirtySilverDust.name=Dreckiger Silberstaub item.dirtyObsidianDust.name=Dreckiger Obsidianstaub +item.dirtyLeadDust.name=Dreckiger Bleistaub //Ingots item.obsidianIngot.name=Obsidianbarren @@ -126,10 +132,14 @@ item.tinIngot.name=Zinnbarren //Gasses gas.hydrogen=Wasserstoff gas.oxygen=Sauerstoff +gas.sulfuricGas=Schwefelgas +gas.sulfuricAcid=Schwefelsäure //Fluids fluid.hydrogen=Flüssiger Wasserstoff fluid.oxygen=Flüssiger Sauerstoff +fluid.sulfuricGas=Schwefelgas +fluid.sulfuricAcid=Schwefelsäure //Gui text gui.removeSpeedUpgrade=Entferne Geschwindigkeitsupgrade @@ -163,6 +173,9 @@ gui.input=Input gui.slots=Slots gui.state=Status +gui.dictionary.noKey=Kein Key. +gui.dictionary.key=Key + gui.configuration=Konfiguration gui.configuration.strictInput=Strikter Input From 7555fbee7c974b08f344ec8bdedfbd54fbe96638 Mon Sep 17 00:00:00 2001 From: Aidan Brady Date: Fri, 13 Dec 2013 17:15:53 -0500 Subject: [PATCH 2/4] Update UE --- .../prefab/ConductorChunkInitiate.java | 64 ---------- .../prefab/block/BlockRotatable.java | 119 ++++++++++-------- 2 files changed, 65 insertions(+), 118 deletions(-) delete mode 100644 common/universalelectricity/prefab/ConductorChunkInitiate.java diff --git a/common/universalelectricity/prefab/ConductorChunkInitiate.java b/common/universalelectricity/prefab/ConductorChunkInitiate.java deleted file mode 100644 index 05bfdb333..000000000 --- a/common/universalelectricity/prefab/ConductorChunkInitiate.java +++ /dev/null @@ -1,64 +0,0 @@ -package universalelectricity.prefab; - -import java.util.ArrayList; -import java.util.Collection; - -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.ForgeSubscribe; -import net.minecraftforge.event.world.ChunkEvent; -import universalelectricity.core.block.INetworkConnection; - -/** - * A helper class to register chunk loading for your wires if you need them to be refreshed upon - * chunk load. This prevents the need for your wire to be refreshed. - * - * @author Calclavia, Aidancbrady - * - */ -public class ConductorChunkInitiate -{ - private static boolean onChunkLoadRegistered = false; - - /** - * Registers and initiates Universal Electricity's network loader. - */ - public static void register() - { - if (!onChunkLoadRegistered) - { - try - { - MinecraftForge.EVENT_BUS.register(new ConductorChunkInitiate()); - onChunkLoadRegistered = true; - } - catch (Exception e) - { - e.printStackTrace(); - } - } - } - - @ForgeSubscribe - public void onChunkLoad(ChunkEvent.Load event) - { - if (event.getChunk() != null) - { - Collection collection = new ArrayList(); - collection.addAll(event.getChunk().chunkTileEntityMap.values()); - - for (Object obj : collection) - { - if (obj instanceof TileEntity) - { - TileEntity tileEntity = (TileEntity) obj; - - if (tileEntity instanceof INetworkConnection) - { - ((INetworkConnection) tileEntity).refresh(); - } - } - } - } - } -} diff --git a/common/universalelectricity/prefab/block/BlockRotatable.java b/common/universalelectricity/prefab/block/BlockRotatable.java index a7358ca92..2856926a1 100644 --- a/common/universalelectricity/prefab/block/BlockRotatable.java +++ b/common/universalelectricity/prefab/block/BlockRotatable.java @@ -8,70 +8,81 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; -/** A block that can rotate based on placed position and wrenching. - * - * @author Calclavia */ +/** + * A block that can rotate based on placed position and wrenching. + * + * @author Calclavia + */ public abstract class BlockRotatable extends BlockTile implements IRotatableBlock { - public BlockRotatable(int id, Material material) - { - super(id, material); - } + protected byte rotationMask = 60; - @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack itemStack) - { - int angle = MathHelper.floor_double((entityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; - int change = 3; + public BlockRotatable(int id, Material material) + { + super(id, material); + } - switch (angle) - { - case 0: - change = 2; - break; + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack itemStack) + { + int angle = MathHelper.floor_double((entityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int change = 3; - case 1: - change = 5; - break; + switch (angle) + { + case 0: + change = 2; + break; - case 2: - change = 3; - break; + case 1: + change = 5; + break; - case 3: - change = 4; - break; - } + case 2: + change = 3; + break; - world.setBlockMetadataWithNotify(x, y, z, change, 3); - } + case 3: + change = 4; + break; + } - @Override - public boolean onUseWrench(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int side, float hitX, float hitY, float hitZ) - { - this.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side)); - return true; - } + world.setBlockMetadataWithNotify(x, y, z, change, 3); + } - public static boolean rotateBlock(World worldObj, int x, int y, int z, ForgeDirection axis, int mask) - { - int rotMeta = worldObj.getBlockMetadata(x, y, z); - int masked = rotMeta & ~mask; - ForgeDirection orientation = ForgeDirection.getOrientation(rotMeta & mask); - ForgeDirection rotated = orientation.getRotation(axis); - worldObj.setBlockMetadataWithNotify(x, y, z, rotated.ordinal() & mask | masked, 3); - return true; - } + @Override + public boolean onUseWrench(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int side, float hitX, float hitY, float hitZ) + { + return this.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side)); + } - @Override - public ForgeDirection getDirection(World world, int x, int y, int z) - { - return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z)); - } + @Override + public boolean rotateBlock(World worldObj, int x, int y, int z, ForgeDirection axis) + { + int currentRotMeta = worldObj.getBlockMetadata(x, y, z); + ForgeDirection orientation = ForgeDirection.getOrientation(currentRotMeta); + ForgeDirection rotated = orientation.getRotation(axis); + int rmeta = rotated.ordinal(); + int rmetaBit = 1 << rmeta; + System.out.println(rmetaBit + ": " + (rmetaBit & this.rotationMask)); + if ((rmetaBit & this.rotationMask) == rmetaBit) + { + worldObj.setBlockMetadataWithNotify(x, y, z, rmeta, 3); + return true; + } - @Override - public void setDirection(World world, int x, int y, int z, ForgeDirection direction) - { - world.setBlockMetadataWithNotify(x, y, z, direction.ordinal(), 3); - } + return false; + } + + @Override + public ForgeDirection getDirection(World world, int x, int y, int z) + { + return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z)); + } + + @Override + public void setDirection(World world, int x, int y, int z, ForgeDirection direction) + { + world.setBlockMetadataWithNotify(x, y, z, direction.ordinal(), 3); + } } \ No newline at end of file From ea57bb5990129207613ebcbd3a481630ff0b69b9 Mon Sep 17 00:00:00 2001 From: Aidan Brady Date: Fri, 13 Dec 2013 23:03:20 -0500 Subject: [PATCH 3/4] Fix crash --- common/mekanism/common/tileentity/TileEntityDynamicValve.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/mekanism/common/tileentity/TileEntityDynamicValve.java b/common/mekanism/common/tileentity/TileEntityDynamicValve.java index 34756317f..bb19fe445 100644 --- a/common/mekanism/common/tileentity/TileEntityDynamicValve.java +++ b/common/mekanism/common/tileentity/TileEntityDynamicValve.java @@ -20,7 +20,7 @@ public class TileEntityDynamicValve extends TileEntityDynamicTank implements IFl @Override public FluidTankInfo[] getTankInfo(ForgeDirection from) { - return ((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure)) ? new FluidTankInfo[] {fluidTank.getInfo()} : null; + return ((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure)) ? new FluidTankInfo[] {fluidTank.getInfo()} : new FluidTankInfo[0]; } @Override From 9558c6f6ca41746ea0443e5463674ad660f22b4a Mon Sep 17 00:00:00 2001 From: Aidan Brady Date: Sat, 14 Dec 2013 17:58:01 -0500 Subject: [PATCH 4/4] Fix GregTech conflict --- common/mekanism/common/Mekanism.java | 2 - common/mekanism/common/MekanismHooks.java | 71 ++++++----------------- 2 files changed, 19 insertions(+), 54 deletions(-) diff --git a/common/mekanism/common/Mekanism.java b/common/mekanism/common/Mekanism.java index eabe48eef..003306295 100644 --- a/common/mekanism/common/Mekanism.java +++ b/common/mekanism/common/Mekanism.java @@ -1171,8 +1171,6 @@ public class Mekanism GasRegistry.register(new Gas("oxygen")).registerFluid(); Mekanism.proxy.preInit(); - - MinecraftForge.EVENT_BUS.register(hooks); //Register infuses InfuseRegistry.registerInfuseType(new InfuseType("CARBON", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 0, 0)); diff --git a/common/mekanism/common/MekanismHooks.java b/common/mekanism/common/MekanismHooks.java index e57cf1cef..c053788bc 100644 --- a/common/mekanism/common/MekanismHooks.java +++ b/common/mekanism/common/MekanismHooks.java @@ -15,10 +15,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInterModComms; -import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent; -import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage; /** * Hooks for Mekanism. Use to grab items or blocks out of different mods. @@ -57,19 +54,25 @@ public final class MekanismHooks if(IC2Loaded) { - Recipes.macerator.addRecipe(new RecipeInputOreDict("oreOsmium"), null, new ItemStack(Mekanism.Dust, 2, 2)); - - Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotOsmium"), null, new ItemStack(Mekanism.Dust, 1, 2)); - Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotRefinedObsidian"), null, new ItemStack(Mekanism.Dust, 1, 3)); - Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotRefinedGlowstone"), null, new ItemStack(Item.glowstone)); - Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotSteel"), null, new ItemStack(Mekanism.Dust, 1, 5)); - - Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpIron"), null, new ItemStack(Mekanism.DirtyDust, 1, 0)); - Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpGold"), null, new ItemStack(Mekanism.DirtyDust, 1, 1)); - Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpOsmium"), null, new ItemStack(Mekanism.DirtyDust, 1, 2)); - Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpCopper"), null, new ItemStack(Mekanism.DirtyDust, 1, 3)); - Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpTin"), null, new ItemStack(Mekanism.DirtyDust, 1, 4)); - Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpSilver"), null, new ItemStack(Mekanism.DirtyDust, 1, 5)); + try { + Recipes.macerator.addRecipe(new RecipeInputOreDict("oreOsmium"), null, new ItemStack(Mekanism.Dust, 2, 2)); + } catch(Exception e) {} + + try { + Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotOsmium"), null, new ItemStack(Mekanism.Dust, 1, 2)); + Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotRefinedObsidian"), null, new ItemStack(Mekanism.Dust, 1, 3)); + Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotRefinedGlowstone"), null, new ItemStack(Item.glowstone)); + Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotSteel"), null, new ItemStack(Mekanism.Dust, 1, 5)); + } catch(Exception e) {} + + try { + Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpIron"), null, new ItemStack(Mekanism.DirtyDust, 1, 0)); + Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpGold"), null, new ItemStack(Mekanism.DirtyDust, 1, 1)); + Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpOsmium"), null, new ItemStack(Mekanism.DirtyDust, 1, 2)); + Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpCopper"), null, new ItemStack(Mekanism.DirtyDust, 1, 3)); + Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpTin"), null, new ItemStack(Mekanism.DirtyDust, 1, 4)); + Recipes.macerator.addRecipe(new RecipeInputOreDict("clumpSilver"), null, new ItemStack(Mekanism.DirtyDust, 1, 5)); + } catch(Exception e) {} for(Map.Entry entry : Recipes.macerator.getRecipes().entrySet()) { @@ -182,40 +185,4 @@ public final class MekanismHooks return null; } } - - @EventHandler - public void handleIMC(IMCEvent event) - { - for(IMCMessage message : event.getMessages()) - { - try { - if(message.isNBTMessage()) - { - if(message.key.equalsIgnoreCase("PulverizerRecipe") && !message.getNBTValue().hasKey("secondaryChance") && !message.getNBTValue().hasKey("secondaryOutput")) - { - ItemStack input = ItemStack.loadItemStackFromNBT(message.getNBTValue().getCompoundTag("input")); - ItemStack output = ItemStack.loadItemStackFromNBT(message.getNBTValue().getCompoundTag("output")); - - if(input != null && output != null) - { - if(MekanismUtils.getName(input).startsWith("ore")) - { - if(!Recipe.ENRICHMENT_CHAMBER.containsRecipe(input)) - { - RecipeHandler.addEnrichmentChamberRecipe(input, output); - } - } - else if(MekanismUtils.getName(input).startsWith("ingot")) - { - if(!Recipe.CRUSHER.containsRecipe(input)) - { - RecipeHandler.addCrusherRecipe(input, output); - } - } - } - } - } - } catch(Exception e) {} - } - } }