diff --git a/common/mekanism/client/gui/GuiDigitalMinerConfig.java b/common/mekanism/client/gui/GuiDigitalMinerConfig.java index 8602f51ed..00a069df5 100644 --- a/common/mekanism/client/gui/GuiDigitalMinerConfig.java +++ b/common/mekanism/client/gui/GuiDigitalMinerConfig.java @@ -203,6 +203,15 @@ public class GuiDigitalMinerConfig extends GuiMekanism mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F); setMaxY(); } + + if(xAxis >= 11 && xAxis <= 25 && yAxis >= 141 && yAxis <= 155) + { + ArrayList data = new ArrayList(); + data.add(10); + + PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data)); + mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F); + } } } @@ -288,6 +297,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism fontRenderer.drawString("T: " + tileEntity.filters.size(), 11, 28, 0x00CD00); fontRenderer.drawString("IS: " + getItemStackFilters().size(), 11, 37, 0x00CD00); fontRenderer.drawString("OD: " + getOreDictFilters().size(), 11, 46, 0x00CD00); + fontRenderer.drawString("I: " + (tileEntity.inverse ? MekanismUtils.localize("gui.on") : MekanismUtils.localize("gui.off")), 11, 131, 0x00CD00); fontRenderer.drawString("Radi: " + tileEntity.radius, 11, 58, 0x00CD00); @@ -342,6 +352,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism } } + if(xAxis >= 11 && xAxis <= 25 && yAxis >= 141 && yAxis <= 155) + { + drawCreativeTabHoveringText(MekanismUtils.localize("gui.digitalMiner.inverse"), xAxis, yAxis); + } + super.drawGuiContainerForegroundLayer(mouseX, mouseY); } @@ -413,6 +428,14 @@ public class GuiDigitalMinerConfig extends GuiMekanism drawTexturedModalRect(guiWidth + 39, guiHeight + 117, 176 + 11, 11, 11, 11); } + if(xAxis >= 11 && xAxis <= 25 && yAxis >= 141 && yAxis <= 155) + { + drawTexturedModalRect(guiWidth + 11, guiHeight + 141, 176 + 22, 0, 14, 14); + } + else { + drawTexturedModalRect(guiWidth + 11, guiHeight + 141, 176 + 22, 14, 14, 14); + } + radiusField.drawTextBox(); minField.drawTextBox(); maxField.drawTextBox(); diff --git a/common/mekanism/common/miner/ThreadMinerSearch.java b/common/mekanism/common/miner/ThreadMinerSearch.java index 7fc5667a2..21f10d488 100644 --- a/common/mekanism/common/miner/ThreadMinerSearch.java +++ b/common/mekanism/common/miner/ThreadMinerSearch.java @@ -63,13 +63,20 @@ public class ThreadMinerSearch extends Thread continue; } + boolean hasFilter = false; + for(MinerFilter filter : tileEntity.filters) { if(filter.canFilter(stack)) { - tileEntity.oresToMine.add(new Coord4D(x, y, z, tileEntity.worldObj.provider.dimensionId)); + hasFilter = true; } } + + if(tileEntity.inverse ? !hasFilter : hasFilter) + { + tileEntity.oresToMine.add(new Coord4D(x, y, z, tileEntity.worldObj.provider.dimensionId)); + } } } } diff --git a/common/mekanism/common/tileentity/TileEntityDigitalMiner.java b/common/mekanism/common/tileentity/TileEntityDigitalMiner.java index 36130290a..1bcf430c6 100644 --- a/common/mekanism/common/tileentity/TileEntityDigitalMiner.java +++ b/common/mekanism/common/tileentity/TileEntityDigitalMiner.java @@ -177,7 +177,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I } } - if(!hasFilter) + if(inverse ? hasFilter : !hasFilter) { toRemove.add(obj); continue; @@ -224,7 +224,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I else if(getEjectInv() instanceof ILogisticalTransporter) { ItemStack rejected = TransporterUtils.insert(getEjectTile(), (ILogisticalTransporter)getEjectInv(), getTopEject(false, null), null, true, 0); - System.out.println(rejected + " " + (rejected != null ? rejected.stackSize : 0)); + if(TransporterManager.didEmit(getTopEject(false, null), rejected)) { getTopEject(true, rejected); @@ -628,6 +628,10 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I { silkTouch = !silkTouch; } + else if(type == 10) + { + inverse = !inverse; + } for(EntityPlayer player : playersUsing) { @@ -746,6 +750,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I data.add(oresToMine.size()); data.add(controlType.ordinal()); + data.add(inverse); data.add(filters.size()); @@ -798,6 +803,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I data.add(oresToMine.size()); data.add(controlType.ordinal()); + data.add(inverse); return data; } diff --git a/resources/assets/mekanism/gui/GuiDigitalMinerConfig.png b/resources/assets/mekanism/gui/GuiDigitalMinerConfig.png index 7f12021c7..e3e078cfc 100644 Binary files a/resources/assets/mekanism/gui/GuiDigitalMinerConfig.png and b/resources/assets/mekanism/gui/GuiDigitalMinerConfig.png differ diff --git a/resources/assets/mekanism/lang/en_US.lang b/resources/assets/mekanism/lang/en_US.lang index 6df8df506..608682175 100644 --- a/resources/assets/mekanism/lang/en_US.lang +++ b/resources/assets/mekanism/lang/en_US.lang @@ -277,6 +277,7 @@ gui.digitalMiner.silk=Silk gui.digitalMiner.toMine=To mine gui.digitalMiner.running=Running gui.digitalMiner.idle=Idle +gui.digitalMiner.inverse=Inverse mode //Item and block tooltip text tooltip.configurator.modify=Modify