Merge branch 'development' into 1.8

This commit is contained in:
Aidan C. Brady 2014-07-14 17:15:26 -04:00
commit a98bf8bba3
9 changed files with 86 additions and 38 deletions

View file

@ -78,7 +78,7 @@ task coreJar(type: Jar) {
}
from zipTree(reobf.outputs.getFiles().getSingleFile()).matching {
exclude 'mekanism/tools/**', 'mekanism/generators/**'
exclude 'mekanism/tools/**', 'mekanism/generators/**', 'mcmod.info'
}
}

View file

@ -342,7 +342,7 @@ public class GuiDigitalMiner extends GuiMekanism
{
if(stack.getItem() instanceof ItemBlock)
{
if(Block.getBlockFromItem(stack.getItem()) == Blocks.bedrock)
if(Block.getBlockFromItem(stack.getItem()) != Blocks.bedrock)
{
toUse = stack.copy();
toUse.stackSize = 1;

View file

@ -41,7 +41,7 @@ public class GuiTeleporter extends GuiMekanism
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
fontRendererObj.drawString(tileEntity.status, 66, 19, 0x00CD00);
fontRendererObj.drawString(tileEntity.getStatusDisplay(), 66, 19, 0x00CD00);
if(xAxis >= 165 && xAxis <= 169 && yAxis >= 17 && yAxis <= 69)
{

View file

@ -167,7 +167,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
*/
@Mod(modid = "Mekanism", name = "Mekanism", version = "8.0.0", guiFactory = "mekanism.client.gui.ConfigGuiFactory",
dependencies = "after:ForgeMultipart;after:BuildCraftAPI|power;after:BuildCraftAPI|tools;after:BuildCraftAPI|transport;after:IC2API;after:CoFHAPI|energy;after:ComputerCraft;after:Galacticraft API;" +
"after:MineFactoryReloaded;after:MetallurgyCore;after:EnderIO;after:ExtraUtilities")
"after:MineFactoryReloaded;after:MetallurgyCore;after:EnderIO;after:ExtraUtilities;after:Railcraft")
public class Mekanism
{
/** Mekanism Packet Pipeline */

View file

@ -307,6 +307,46 @@ public final class OreDictManager
} catch(Exception e) {}
}
for(ItemStack ore : OreDictionary.getOres("oreCertusQuartz"))
{
try {
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("dustCertusQuartz").get(0), 4));
} catch(Exception e) {}
}
for(ItemStack ore : OreDictionary.getOres("crystalCertusQuartz"))
{
try {
RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("dustCertusQuartz").get(0), 1));
} catch(Exception e) {}
}
for(ItemStack ore : OreDictionary.getOres("dustCertusQuartz"))
{
try {
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("crystalCertusQuartz").get(0), 1));
} catch(Exception e) {}
}
for(ItemStack ore : OreDictionary.getOres("gemQuartz"))
{
try {
RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("dustNetherQuartz").get(0), 1));
} catch(Exception e) {}
}
for(ItemStack ore : OreDictionary.getOres("dustNetherQuartz"))
{
try {
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("gemQuartz").get(0), 1));
} catch(Exception e) {}
}
for(ItemStack ore : OreDictionary.getOres("oreQuartz"))
{
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Items.quartz, 6));
}
for(ItemStack ore : OreDictionary.getOres("ingotCopper"))
{
RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Dust, 1, 6));

View file

@ -105,6 +105,11 @@ public class ItemBalloon extends ItemMekanism
obj.yCoord--;
}
if(!world.isSideSolid(x, y, z, ForgeDirection.UP))
{
return true;
}
if(canReplace(world, obj.xCoord, obj.yCoord+1, obj.zCoord) && canReplace(world, obj.xCoord, obj.yCoord+2, obj.zCoord))
{
world.setBlockToAir(obj.xCoord, obj.yCoord+1, obj.zCoord);

View file

@ -56,7 +56,7 @@ public class ItemPortableTeleporter extends ItemEnergized
case 2:
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.needsEnergy");
case 3:
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.linksCapacity");
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.exceeds");
case 4:
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noLink");
default:

View file

@ -17,6 +17,7 @@ import mekanism.common.block.BlockMachine.MachineType;
import mekanism.common.network.PacketPortalFX.PortalFXMessage;
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
import mekanism.common.util.ChargeUtils;
import mekanism.common.util.MekanismUtils;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.player.EntityPlayerMP;
@ -57,7 +58,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
public boolean prevShouldRender;
/** This teleporter's current status. */
public String status = (EnumColor.DARK_RED + "Not ready.");
public byte status = 0;
public TileEntityTeleporter()
{
@ -96,29 +97,9 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
Mekanism.teleporters.put(code, newCoords);
}
switch(canTeleport())
{
case 1:
status = EnumColor.DARK_GREEN + "Ready.";
break;
case 2:
status = EnumColor.DARK_RED + "No frame.";
break;
case 3:
status = EnumColor.DARK_RED + "No link found.";
break;
case 4:
status = EnumColor.DARK_RED + "Links > 2.";
break;
case 5:
status = EnumColor.DARK_RED + "Needs energy.";
break;
case 6:
status = EnumColor.DARK_GREEN + "Idle.";
break;
}
status = canTeleport();
if(canTeleport() == 1 && teleDelay == 0)
if(status == 1 && teleDelay == 0)
{
teleport();
}
@ -128,8 +109,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
cleanTeleportCache();
}
byte b = canTeleport();
shouldRender = b == 1 || b > 4;
shouldRender = status == 1 || status > 4;
if(shouldRender != prevShouldRender)
{
@ -144,6 +124,27 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
ChargeUtils.discharge(0, this);
}
public String getStatusDisplay()
{
switch(status)
{
case 1:
return EnumColor.DARK_GREEN + MekanismUtils.localize("gui.teleporter.ready");
case 2:
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noFrame");
case 3:
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noLink");
case 4:
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.exceeds");
case 5:
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.needsEnergy");
case 6:
return EnumColor.DARK_GREEN + MekanismUtils.localize("gui.idle");
}
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noLink");
}
public void cleanTeleportCache()
{
List<Entity> list = worldObj.getEntitiesWithinAABB(Entity.class, teleportBounds);
@ -487,12 +488,13 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
{
code.digitFour = dataStream.readInt();
}
return;
}
super.handlePacketData(dataStream);
status = PacketHandler.readString(dataStream).trim();
status = dataStream.readByte();
code.digitOne = dataStream.readInt();
code.digitTwo = dataStream.readInt();
code.digitThree = dataStream.readInt();

View file

@ -394,12 +394,6 @@ gui.materialFilter.details=Using material of
gui.portableTeleporter=Portable Teleporter
gui.teleporter.notReady=Not Ready
gui.teleporter.ready=Ready
gui.teleporter.needsEnergy=Needs energy
gui.teleporter.linksCapacity=Links > 2
gui.teleporter.noLink=No link found
gui.robit=Robit
gui.robit.smelting=Robit Smelting
gui.robit.inventory=Robit Inventory
@ -427,6 +421,13 @@ gui.logisticalSorter.roundRobin=Round-robin
gui.electricChest.editPassword=Edit Password
gui.teleporter.notReady=Not ready
gui.teleporter.ready=Ready
gui.teleporter.noFrame=No frame
gui.teleporter.noLink=No link
gui.teleporter.exceeds=Links > 2
gui.teleporter.needsEnergy=Needs energy
gui.digitalMinerConfig=Digital Miner Config
gui.digitalMiner.autoPull=Auto-pull