Machines eject into transporters.
This commit is contained in:
parent
a00a557f2b
commit
f0b6799409
|
@ -63,16 +63,14 @@ public class ThreadClientUpdate extends Thread
|
||||||
|
|
||||||
modulesBeingDownloaded--;
|
modulesBeingDownloaded--;
|
||||||
finalize();
|
finalize();
|
||||||
} catch(Throwable e)
|
} catch(Throwable t) {
|
||||||
{
|
|
||||||
GuiCredits.onErrorDownloading();
|
GuiCredits.onErrorDownloading();
|
||||||
System.err.println("[Mekanism] Error while finishing update thread: " + e.getMessage());
|
System.err.println("[Mekanism] Error while finishing update thread: " + t.getMessage());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
modulesBeingDownloaded--;
|
modulesBeingDownloaded--;
|
||||||
finalize();
|
finalize();
|
||||||
} catch (Throwable e1) {
|
} catch (Throwable t1) {}
|
||||||
System.err.println("[Mekanism] Error while finalizing update thread: " + e1.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -238,7 +238,7 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||||
{
|
{
|
||||||
int xAxis = (mouseX - (width - xSize) / 2);
|
int xAxis = (mouseX - (width - xSize) / 2);
|
||||||
int yAxis = (mouseY - (height - ySize) / 2);
|
int yAxis = (mouseY - (height - ySize) / 2);
|
||||||
|
|
||||||
|
@ -281,9 +281,6 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||||
{
|
{
|
||||||
OreDictFilter oreFilter = (OreDictFilter)filter;
|
OreDictFilter oreFilter = (OreDictFilter)filter;
|
||||||
|
|
||||||
fontRenderer.drawString("OreDict Filter", 78, yStart + 2, 0x404040);
|
|
||||||
fontRenderer.drawString(filter.color != null ? filter.color.getName() : "None", 78, yStart + 11, 0x404040);
|
|
||||||
|
|
||||||
if(!oreDictStacks.containsKey(oreFilter))
|
if(!oreDictStacks.containsKey(oreFilter))
|
||||||
{
|
{
|
||||||
updateStackList(oreFilter);
|
updateStackList(oreFilter);
|
||||||
|
@ -297,6 +294,9 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fontRenderer.drawString("OreDict Filter", 78, yStart + 2, 0x404040);
|
||||||
|
fontRenderer.drawString(filter.color != null ? filter.color.getName() : "None", 78, yStart + 11, 0x404040);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class SoundHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void preloadSound(String sound)
|
private void preloadSound(String sound)
|
||||||
{
|
{
|
||||||
String id = "pre_" + sound;
|
String id = "pre_" + sound;
|
||||||
URL url = getClass().getClassLoader().getResource("assets/mekanism/sound/" + sound);
|
URL url = getClass().getClassLoader().getResource("assets/mekanism/sound/" + sound);
|
||||||
|
|
|
@ -8,6 +8,7 @@ import mekanism.api.IEjector;
|
||||||
import mekanism.api.Object3D;
|
import mekanism.api.Object3D;
|
||||||
import mekanism.api.SideData;
|
import mekanism.api.SideData;
|
||||||
import mekanism.common.tileentity.TileEntityContainerBlock;
|
import mekanism.common.tileentity.TileEntityContainerBlock;
|
||||||
|
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||||
import mekanism.common.util.MekanismUtils;
|
import mekanism.common.util.MekanismUtils;
|
||||||
import mekanism.common.util.TransporterUtils;
|
import mekanism.common.util.TransporterUtils;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
|
@ -92,10 +93,17 @@ public class TileComponentEjector implements ITileComponent, IEjector
|
||||||
TileEntity tile = Object3D.get(tileEntity).getFromSide(side).getTileEntity(tileEntity.worldObj);
|
TileEntity tile = Object3D.get(tileEntity).getFromSide(side).getTileEntity(tileEntity.worldObj);
|
||||||
ItemStack prev = stack.copy();
|
ItemStack prev = stack.copy();
|
||||||
|
|
||||||
if(tile instanceof IInventory)
|
if(tile instanceof IInventory && !(tile instanceof TileEntityLogisticalTransporter))
|
||||||
{
|
{
|
||||||
stack = TransporterUtils.putStackInInventory((IInventory)tile, stack, side.ordinal());
|
stack = TransporterUtils.putStackInInventory((IInventory)tile, stack, side.ordinal());
|
||||||
}
|
}
|
||||||
|
else if(tile instanceof TileEntityLogisticalTransporter)
|
||||||
|
{
|
||||||
|
if(TransporterUtils.insert(tileEntity, (TileEntityLogisticalTransporter)tile, stack, null))
|
||||||
|
{
|
||||||
|
stack = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(stack == null || prev.stackSize != stack.stackSize)
|
if(stack == null || prev.stackSize != stack.stackSize)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue