diff --git a/build.gradle b/build.gradle index 60ab069c1..ca949e853 100644 --- a/build.gradle +++ b/build.gradle @@ -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' } } diff --git a/src/main/java/mekanism/client/gui/GuiDigitalMiner.java b/src/main/java/mekanism/client/gui/GuiDigitalMiner.java index 9115c5d5b..f1a5f6eb9 100644 --- a/src/main/java/mekanism/client/gui/GuiDigitalMiner.java +++ b/src/main/java/mekanism/client/gui/GuiDigitalMiner.java @@ -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; diff --git a/src/main/java/mekanism/client/gui/GuiTeleporter.java b/src/main/java/mekanism/client/gui/GuiTeleporter.java index fd0975bd2..af99eeebf 100644 --- a/src/main/java/mekanism/client/gui/GuiTeleporter.java +++ b/src/main/java/mekanism/client/gui/GuiTeleporter.java @@ -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) { diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index e780da8b7..958dd3bd3 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -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 */ diff --git a/src/main/java/mekanism/common/integration/OreDictManager.java b/src/main/java/mekanism/common/integration/OreDictManager.java index 4e45cd55b..d38d930b6 100644 --- a/src/main/java/mekanism/common/integration/OreDictManager.java +++ b/src/main/java/mekanism/common/integration/OreDictManager.java @@ -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)); diff --git a/src/main/java/mekanism/common/item/ItemBalloon.java b/src/main/java/mekanism/common/item/ItemBalloon.java index 30179407a..50c697ce2 100644 --- a/src/main/java/mekanism/common/item/ItemBalloon.java +++ b/src/main/java/mekanism/common/item/ItemBalloon.java @@ -104,6 +104,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)) { diff --git a/src/main/java/mekanism/common/item/ItemPortableTeleporter.java b/src/main/java/mekanism/common/item/ItemPortableTeleporter.java index 3e976ebfd..1b962bb28 100644 --- a/src/main/java/mekanism/common/item/ItemPortableTeleporter.java +++ b/src/main/java/mekanism/common/item/ItemPortableTeleporter.java @@ -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: diff --git a/src/main/java/mekanism/common/tile/TileEntityTeleporter.java b/src/main/java/mekanism/common/tile/TileEntityTeleporter.java index 0526c0caa..1a113a34a 100644 --- a/src/main/java/mekanism/common/tile/TileEntityTeleporter.java +++ b/src/main/java/mekanism/common/tile/TileEntityTeleporter.java @@ -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() { @@ -95,30 +96,10 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe newCoords.add(Coord4D.get(this)); Mekanism.teleporters.put(code, newCoords); } + + status = canTeleport(); - 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; - } - - 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) { @@ -143,6 +123,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() { @@ -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(); diff --git a/src/main/resources/assets/mekanism/lang/en_US.lang b/src/main/resources/assets/mekanism/lang/en_US.lang index aa67b96c0..eacb6ca8a 100644 --- a/src/main/resources/assets/mekanism/lang/en_US.lang +++ b/src/main/resources/assets/mekanism/lang/en_US.lang @@ -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