Merge branch 'master' into development

This commit is contained in:
Aidan Brady 2014-05-04 12:22:12 -04:00
commit 750d468822
4 changed files with 108 additions and 78 deletions

View file

@ -84,6 +84,8 @@ import net.minecraftforge.common.ForgeDirection;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import dan200.computercraft.api.peripheral.IPeripheral;
import dan200.computercraft.api.peripheral.IPeripheralProvider;
/** /**
* Block class for handling multiple machine block IDs. * Block class for handling multiple machine block IDs.
@ -117,7 +119,7 @@ import cpw.mods.fml.relauncher.SideOnly;
* @author AidanBrady * @author AidanBrady
* *
*/ */
public class BlockMachine extends BlockContainer implements ISpecialBounds public class BlockMachine extends BlockContainer implements ISpecialBounds, IPeripheralProvider
{ {
public Icon[][] icons = new Icon[16][16]; public Icon[][] icons = new Icon[16][16];
public Random machineRand = new Random(); public Random machineRand = new Random();
@ -920,6 +922,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
itemStack.stackTagCompound.setBoolean("doEject", miner.doEject); itemStack.stackTagCompound.setBoolean("doEject", miner.doEject);
itemStack.stackTagCompound.setBoolean("doPull", miner.doPull); itemStack.stackTagCompound.setBoolean("doPull", miner.doPull);
itemStack.stackTagCompound.setBoolean("silkTouch", miner.silkTouch); itemStack.stackTagCompound.setBoolean("silkTouch", miner.silkTouch);
itemStack.stackTagCompound.setBoolean("inverse", miner.inverse);
if(miner.replaceStack != null) if(miner.replaceStack != null)
{ {
@ -1229,4 +1232,17 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
{ {
return false; return false;
} }
@Override
public IPeripheral getPeripheral(World world, int x, int y, int z, int side) {
TileEntity te = world.getBlockTileEntity(x, y, z);
if(te != null && te instanceof IPeripheral)
{
return (IPeripheral) te;
}
return null;
}
} }

View file

@ -10,6 +10,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import mekanism.common.Mekanism; import mekanism.common.Mekanism;
import mekanism.common.block.BlockMachine;
import mekanism.common.recipe.RecipeHandler; import mekanism.common.recipe.RecipeHandler;
import mekanism.common.recipe.RecipeHandler.Recipe; import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils;
@ -19,6 +20,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLInterModComms;
import dan200.computercraft.api.ComputerCraftAPI;
/** /**
* Hooks for Mekanism. Use to grab items or blocks out of different mods. * Hooks for Mekanism. Use to grab items or blocks out of different mods.
@ -36,6 +38,7 @@ public final class MekanismHooks
public boolean BasicComponentsLoaded = false; public boolean BasicComponentsLoaded = false;
public boolean BuildCraftLoaded = false; public boolean BuildCraftLoaded = false;
public boolean TELoaded = false; public boolean TELoaded = false;
public boolean CCLoaded = false;
public boolean MetallurgyCoreLoaded = false; public boolean MetallurgyCoreLoaded = false;
public boolean MetallurgyBaseLoaded = false; public boolean MetallurgyBaseLoaded = false;
@ -47,6 +50,7 @@ public final class MekanismHooks
if(Loader.isModLoaded("BasicComponents")) BasicComponentsLoaded = true; if(Loader.isModLoaded("BasicComponents")) BasicComponentsLoaded = true;
if(Loader.isModLoaded("BuildCraft|Energy")) BuildCraftLoaded = true; if(Loader.isModLoaded("BuildCraft|Energy")) BuildCraftLoaded = true;
if(Loader.isModLoaded("ThermalExpansion")) TELoaded = true; if(Loader.isModLoaded("ThermalExpansion")) TELoaded = true;
if(Loader.isModLoaded("ComputerCraft")) CCLoaded = true;
if(Loader.isModLoaded("Metallurgy3Core")) if(Loader.isModLoaded("Metallurgy3Core"))
{ {
@ -133,6 +137,14 @@ public final class MekanismHooks
{ {
System.out.println("[Mekanism] Hooked into BuildCraft successfully."); System.out.println("[Mekanism] Hooked into BuildCraft successfully.");
} }
if(CCLoaded)
{
try {
ComputerCraftAPI.registerPeripheralProvider((BlockMachine)Mekanism.MachineBlock);
} catch(Exception ex) {}
}
} }
public void addPulverizerRecipe(ItemStack input, ItemStack output, int energy) public void addPulverizerRecipe(ItemStack input, ItemStack output, int energy)

View file

@ -226,6 +226,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
miner.maxY = stack.stackTagCompound.getInteger("maxY"); miner.maxY = stack.stackTagCompound.getInteger("maxY");
miner.doEject = stack.stackTagCompound.getBoolean("doEject"); miner.doEject = stack.stackTagCompound.getBoolean("doEject");
miner.doPull = stack.stackTagCompound.getBoolean("doPull"); miner.doPull = stack.stackTagCompound.getBoolean("doPull");
miner.inverse = stack.stackTagCompound.getBoolean("inverse");
miner.silkTouch = stack.stackTagCompound.getBoolean("silkTouch"); miner.silkTouch = stack.stackTagCompound.getBoolean("silkTouch");
if(stack.stackTagCompound.hasKey("replaceStack")) if(stack.stackTagCompound.hasKey("replaceStack"))

View file

@ -94,7 +94,7 @@ tile.MachineBlock2.ChemicalCrystallizer.name=Cristalizador Químico
//Infuse types //Infuse types
infuse.carbon=Carbono infuse.carbon=Carbono
infuse.tin=Estanho infuse.tin=Estanho
infuse.diamond=Diamente infuse.diamond=Diamante
infuse.redstone=Redstone infuse.redstone=Redstone
infuse.fungi=Fungos infuse.fungi=Fungos
@ -104,7 +104,7 @@ tile.OreBlock.CopperOre.name=Minério de Cobre
tile.OreBlock.TinOre.name=Minério de Estanho tile.OreBlock.TinOre.name=Minério de Estanho
item.MultipartTransmitter.PressurizedTube.name=Tubo Pressurizado item.MultipartTransmitter.PressurizedTube.name=Tubo Pressurizado
item.MultipartTransmitter.BasicUniversalCable.name=Cabo Universal Basico item.MultipartTransmitter.BasicUniversalCable.name=Cabo Universal Básico
item.MultipartTransmitter.AdvancedUniversalCable.name=Cabo Universal Avançado item.MultipartTransmitter.AdvancedUniversalCable.name=Cabo Universal Avançado
item.MultipartTransmitter.EliteUniversalCable.name=Cabo Universal de Elite item.MultipartTransmitter.EliteUniversalCable.name=Cabo Universal de Elite
item.MultipartTransmitter.UltimateUniversalCable.name=Cabo Universal Definitivo item.MultipartTransmitter.UltimateUniversalCable.name=Cabo Universal Definitivo
@ -124,8 +124,9 @@ item.ironDust.name=Pó de Ferro
item.goldDust.name=Pó de Ouro item.goldDust.name=Pó de Ouro
item.osmiumDust.name=Pó de Ósmio item.osmiumDust.name=Pó de Ósmio
item.obsidianDust.name=Pó de Obsidiana Refinada item.obsidianDust.name=Pó de Obsidiana Refinada
item.diamondDust.name=Pó de Diamente item.diamondDust.name=Pó de Diamante
item.steelDust.name=Pó de Aço item.steelDust.name=Pó de Aço
item.copperDust.name=Pó de Cobre
item.tinDust.name=Pó de Estanho item.tinDust.name=Pó de Estanho
item.silverDust.name=Pó de Prata item.silverDust.name=Pó de Prata
item.leadDust.name=Pó de Chumbo item.leadDust.name=Pó de Chumbo
@ -291,9 +292,9 @@ gui.oredictFilter=Filtro OreDict
gui.oredictFilter.noKey=Nenhuma entrada digitada gui.oredictFilter.noKey=Nenhuma entrada digitada
gui.oredictFilter.sameKey=Mesma entrada gui.oredictFilter.sameKey=Mesma entrada
gui.itemFilter=Filtro de Items gui.itemFilter=Filtro de Itens
gui.itemFilter.noItem=Sem Items gui.itemFilter.noItem=Sem Itens
gui.itemFilter.details=Detalhes da PilhaDeItems gui.itemFilter.details=Detalhes da Pilha De Itens
gui.itemFilter.min=Min gui.itemFilter.min=Min
gui.itemFilter.max=Máx gui.itemFilter.max=Máx
@ -313,7 +314,7 @@ gui.robit.greeting=Olá eu sou
gui.robit.toggleFollow=Alternar modo 'seguir' gui.robit.toggleFollow=Alternar modo 'seguir'
gui.robit.rename=Renomear este Robit gui.robit.rename=Renomear este Robit
gui.robit.teleport=Teleportar para casa gui.robit.teleport=Teleportar para casa
gui.robit.togglePickup=Alternar modo 'coletar items' gui.robit.togglePickup=Alternar modo 'coletar itens'
gui.password.setPassword=Definir senha gui.password.setPassword=Definir senha
gui.password.enterPassword=Digitar senha gui.password.enterPassword=Digitar senha
@ -323,7 +324,7 @@ gui.password.identical=Idêntica
gui.password.invalid=Inválida gui.password.invalid=Inválida
gui.password=Senha gui.password=Senha
gui.logisticalSorter.default=Default gui.logisticalSorter.default=Padrão
gui.logisticalSorter.auto=Auto gui.logisticalSorter.auto=Auto
gui.logisticalSorter.roundRobin=Rodízio gui.logisticalSorter.roundRobin=Rodízio
@ -351,7 +352,7 @@ tooltip.configurator.toggleDiverter=Modo do Diversor alterado para
tooltip.configurator.toggleColor=Cor passada para tooltip.configurator.toggleColor=Cor passada para
tooltip.configurator.viewColor=Cor atual tooltip.configurator.viewColor=Cor atual
tooltip.configurator.unauth=Este baú está trancado tooltip.configurator.unauth=Este baú está trancado
tooltip.configurator.noLink=No link tooltip.configurator.noLink=Sem ligação
tooltip.configurator.linkMsg=Ligado a tooltip.configurator.linkMsg=Ligado a
tooltip.configurator.dim=dimensão tooltip.configurator.dim=dimensão
@ -386,7 +387,7 @@ tooltip.ChemicalWasher=An ultimate machine that cleans unprocessed !nslurry and
tooltip.ChemicalCrystallizer=An ultimate machine used to crystallize !npurified ore slurry into ore crystals. tooltip.ChemicalCrystallizer=An ultimate machine used to crystallize !npurified ore slurry into ore crystals.
tooltip.OsmiumOre=A strong mineral that can be found !nat nearly any height in the world. !nIt is known to have many uses in !nthe construction of machinery. tooltip.OsmiumOre=A strong mineral that can be found !nat nearly any height in the world. !nIt is known to have many uses in !nthe construction of machinery.
tooltip.CopperOre=A common, conductive material that !ncan be used in the production of !nwires. Its ability to withstand !nhigh heats also makes it essential !nto advanced machinery. tooltip.CopperOre=A common, conductive material that !ncan be used in the production of !nwires. It's ability to withstand !nhigh heats also makes it essential !nto advanced machinery.
tooltip.TinOre=A lightweight, yet sturdy, conductive !nmaterial that is found slightly less !ncommonly than Copper. tooltip.TinOre=A lightweight, yet sturdy, conductive !nmaterial that is found slightly less !ncommonly than Copper.
//Redstone control //Redstone control
@ -407,9 +408,9 @@ color.purple=Roxo
color.orange=Laranja color.orange=Laranja
color.grey=Cinza color.grey=Cinza
color.darkGrey=Cinza Escuro color.darkGrey=Cinza Escuro
color.indigo=Indigo color.indigo=Índigo
color.brightGreen=Verde Claro color.brightGreen=Verde Claro
color.aqua=Cian color.aqua=Ciano
color.red=Vermelho color.red=Vermelho
color.pink=Rosa color.pink=Rosa
color.yellow=Amarelo color.yellow=Amarelo
@ -452,80 +453,80 @@ gui.electrolyticSeparator.dump=Despejar
//*****// //*****//
//Vanilla Paxels //Vanilla Paxels
item.WoodPaxel.name=Wood Paxel item.WoodPaxel.name=Paxel de Madeira
item.StonePaxel.name=Stone Paxel item.StonePaxel.name=Paxel de Pedra
item.IronPaxel.name=Iron Paxel item.IronPaxel.name=Iron Paxel de Ferro
item.DiamondPaxel.name=Diamond Paxel item.DiamondPaxel.name=Paxel de Diamante
item.GoldPaxel.name=Gold Paxel item.GoldPaxel.name=Paxel de Ouro
//Obsidian //Obsidian
item.ObsidianHelmet.name=Obsidian Helmet item.ObsidianHelmet.name=Elmo de Obsidiana
item.ObsidianChestplate.name=Obsidian Chestplate item.ObsidianChestplate.name=Peitoral de Obsidiana
item.ObsidianLeggings.name=Obsidian Leggings item.ObsidianLeggings.name=Calças de Obsidiana
item.ObsidianBoots.name=Obsidian Boots item.ObsidianBoots.name=Botas de Obsidiana
item.ObsidianPaxel.name=Obsidian Paxel item.ObsidianPaxel.name=Paxel de Obsidiana
item.ObsidianPickaxe.name=Obsidian Pickaxe item.ObsidianPickaxe.name=Picareta de Obsidiana
item.ObsidianAxe.name=Obsidian Axe item.ObsidianAxe.name=Machado de Obsidiana
item.ObsidianShovel.name=Obsidian Shovel item.ObsidianShovel.name=Pá de Obsidiana
item.ObsidianHoe.name=Obsidian Hoe item.ObsidianHoe.name=Enxada de Obsidiana
item.ObsidianSword.name=Obsidian Sword item.ObsidianSword.name=Espada de Obsidiana
//Lapis Lazuli //Lapis Lazuli
item.LazuliHelmet.name=Lapis Lazuli Helmet item.LazuliHelmet.name=Elmo de Lápis-Lazúli
item.LazuliChestplate.name=Lapis Lazuli Chestplate item.LazuliChestplate.name=Peitoral de Lápis-Lazúli
item.LazuliLeggings.name=Lapis Lazuli Leggings item.LazuliLeggings.name=Calças de Lápis-Lazúli
item.LazuliBoots.name=Lapis Lazuli Boots item.LazuliBoots.name=Botas de Lápis-Lazúli
item.LazuliPaxel.name=Lapis Lazuli Paxel item.LazuliPaxel.name=Paxel de Lápis-Lazúli
item.LazuliPickaxe.name=Lapis Lazuli Pickaxe item.LazuliPickaxe.name=Picareta de Lápis-Lazúli
item.LazuliAxe.name=Lapis Lazuli Axe item.LazuliAxe.name=Machado de Lápis-Lazúli
item.LazuliShovel.name=Lapis Lazuli Shovel item.LazuliShovel.name=Pá de Lápis-Lazúli
item.LazuliHoe.name=Lapis Lazuli Hoe item.LazuliHoe.name=Enxada de Lápis-Lazúli
item.LazuliSword.name=Lapis Lazuli Sword item.LazuliSword.name=Espada de Lápis-Lazúli
//Osmium //Osmium
item.OsmiumHelmet.name=Osmium Helmet item.OsmiumHelmet.name=Elmo de Ósmio
item.OsmiumChestplate.name=Osmium Chestplate item.OsmiumChestplate.name=Peitoral de Ósmio
item.OsmiumLeggings.name=Osmium Leggings item.OsmiumLeggings.name=Calças de Ósmio
item.OsmiumBoots.name=Osmium Boots item.OsmiumBoots.name=Botas de Ósmio
item.OsmiumPaxel.name=Osmium Paxel item.OsmiumPaxel.name=Paxel de Ósmio
item.OsmiumPickaxe.name=Osmium Pickaxe item.OsmiumPickaxe.name=Picareta de Ósmio
item.OsmiumAxe.name=Osmium Axe item.OsmiumAxe.name=Machado de Ósmio
item.OsmiumShovel.name=Osmium Shovel item.OsmiumShovel.name=Pá de Ósmio
item.OsmiumHoe.name=Osmium Hoe item.OsmiumHoe.name=Enxada de Ósmio
item.OsmiumSword.name=Osmium Sword item.OsmiumSword.name=Espada de Ósmio
//Bronze //Bronze
item.BronzeHelmet.name=Bronze Helmet item.BronzeHelmet.name=Elmo de Bronze
item.BronzeChestplate.name=Bronze Chestplate item.BronzeChestplate.name=Peitoral de Bronze
item.BronzeLeggings.name=Bronze Leggings item.BronzeLeggings.name=Calças de Bronze
item.BronzeBoots.name=Bronze Boots item.BronzeBoots.name=Botas de Bronze
item.BronzePaxel.name=Bronze Paxel item.BronzePaxel.name=Paxel de Bronze
item.BronzePickaxe.name=Bronze Pickaxe item.BronzePickaxe.name=Picareta de Bronze
item.BronzeAxe.name=Bronze Axe item.BronzeAxe.name=Machado de Bronze
item.BronzeShovel.name=Bronze Shovel item.BronzeShovel.name=Pá de Bronze
item.BronzeHoe.name=Bronze Hoe item.BronzeHoe.name=Enxada de Bronze
item.BronzeSword.name=Bronze Sword item.BronzeSword.name=Espada de Bronze
//Glow //Glow
item.GlowstoneHelmet.name=Glowstone Helmet item.GlowstoneHelmet.name=Elmo de Glowstone
item.GlowstoneChestplate.name=Glowstone Chestplate item.GlowstoneChestplate.name=Peitoral de Glowstone
item.GlowstoneLeggings.name=Glowstone Leggings item.GlowstoneLeggings.name=Calças de Glowstone
item.GlowstoneBoots.name=Glowstone Boots item.GlowstoneBoots.name=Botas de Glowstone
item.GlowstonePaxel.name=Glowstone Paxel item.GlowstonePaxel.name=Paxel de Glowstone
item.GlowstonePickaxe.name=Glowstone Pickaxe item.GlowstonePickaxe.name=Picareta de Glowstone
item.GlowstoneAxe.name=Glowstone Axe item.GlowstoneAxe.name=Machado de Glowstone
item.GlowstoneShovel.name=Glowstone Shovel item.GlowstoneShovel.name=Pá de Glowstone
item.GlowstoneHoe.name=Glowstone Hoe item.GlowstoneHoe.name=Enxada de Glowstone
item.GlowstoneSword.name=Glowstone Sword item.GlowstoneSword.name=Espada de Glowstone
//Steel //Steel
item.SteelHelmet.name=Steel Helmet item.SteelHelmet.name=Elmo de Aço
item.SteelChestplate.name=Steel Chestplate item.SteelChestplate.name=Peitoral de Aço
item.SteelLeggings.name=Steel Leggings item.SteelLeggings.name=Calças de Aço
item.SteelBoots.name=Steel Boots item.SteelBoots.name=Botas de Aço
item.SteelPaxel.name=Steel Paxel item.SteelPaxel.name=Paxel de Aço
item.SteelPickaxe.name=Steel Pickaxe item.SteelPickaxe.name=Picareta de Aço
item.SteelAxe.name=Steel Axe item.SteelAxe.name=Machado de Aço
item.SteelShovel.name=Steel Shovel item.SteelShovel.name=Pá de Aço
item.SteelHoe.name=Steel Hoe item.SteelHoe.name=Enxada de Aço
item.SteelSword.name=Steel Sword item.SteelSword.name=Espada de Aço