diff --git a/build.gradle b/build.gradle index 7b0c3d9cc..d8fe2aeb8 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ dependencies { compile ':forgemultipart:1.0.0.228' } -version = "6.0.4." + "$System.env.BUILD_NUMBER" +version = "6.0.5." + "$System.env.BUILD_NUMBER" archivesBaseName = "MekanismAll" libsDirName = "../output" distsDirName = "../output" diff --git a/build.properties b/build.properties index b1d0c6380..03082e140 100644 --- a/build.properties +++ b/build.properties @@ -3,4 +3,4 @@ dir.mcp=${dir.development}forge/mcp version.minecraft=1.6.4 version.mod.major=6 version.mod.minor=0 -version.mod.revis=3 +version.mod.revis=5 diff --git a/common/mekanism/api/transmitters/DynamicNetwork.java b/common/mekanism/api/transmitters/DynamicNetwork.java index a9b00d972..3c4f63eb7 100644 --- a/common/mekanism/api/transmitters/DynamicNetwork.java +++ b/common/mekanism/api/transmitters/DynamicNetwork.java @@ -14,6 +14,7 @@ import mekanism.api.Coord4D; import mekanism.api.IClientTicker; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.MinecraftForge; @@ -28,6 +29,8 @@ public abstract class DynamicNetwork> implemen public HashMap acceptorDirections = new HashMap(); private List updateQueue = new ArrayList(); + + protected AxisAlignedBB packetRange = null; protected int ticksSinceCreate = 0; @@ -50,6 +53,65 @@ public abstract class DynamicNetwork> implemen { return transmitters.iterator().next().equals(transmitter); } + + public AxisAlignedBB getPacketRange() + { + if(packetRange == null) + { + return genPacketRange(); + } + + return packetRange; + } + + public int getDimension() + { + if(getSize() == 0) + { + return 0; + } + + return transmitters.iterator().next().getLocation().dimensionId; + } + + protected AxisAlignedBB genPacketRange() + { + if(getSize() == 0) + { + deregister(); + return null; + } + + Coord4D initCoord = transmitters.iterator().next().getLocation(); + + int minX = initCoord.xCoord; + int minY = initCoord.yCoord; + int minZ = initCoord.zCoord; + int maxX = initCoord.xCoord; + int maxY = initCoord.yCoord; + int maxZ = initCoord.zCoord; + + for(IGridTransmitter transmitter : transmitters) + { + Coord4D coord = transmitter.getLocation(); + + if(coord.xCoord < minX) minX = coord.xCoord; + if(coord.yCoord < minY) minY = coord.yCoord; + if(coord.zCoord < minZ) minZ = coord.zCoord; + if(coord.xCoord > maxX) maxX = coord.xCoord; + if(coord.yCoord > maxY) maxY = coord.yCoord; + if(coord.zCoord > maxZ) maxZ = coord.zCoord; + } + + minX -= 40; + minY -= 40; + minZ -= 40; + maxX += 40; + maxY += 40; + maxZ += 40; + + return AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ); + } @Override public void removeTransmitter(IGridTransmitter transmitter) diff --git a/common/mekanism/api/transmitters/IGridTransmitter.java b/common/mekanism/api/transmitters/IGridTransmitter.java index 13edf3f4d..28b2c944e 100644 --- a/common/mekanism/api/transmitters/IGridTransmitter.java +++ b/common/mekanism/api/transmitters/IGridTransmitter.java @@ -1,5 +1,6 @@ package mekanism.api.transmitters; +import mekanism.api.Coord4D; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; @@ -60,4 +61,6 @@ public interface IGridTransmitter> extends ITrans public String getTransmitterNetworkFlow(); public int getCapacity(); + + public Coord4D getLocation(); } diff --git a/common/mekanism/client/render/tileentity/RenderDynamicTank.java b/common/mekanism/client/render/tileentity/RenderDynamicTank.java index 4395ea059..daf6c5320 100644 --- a/common/mekanism/client/render/tileentity/RenderDynamicTank.java +++ b/common/mekanism/client/render/tileentity/RenderDynamicTank.java @@ -49,7 +49,7 @@ public class RenderDynamicTank extends TileEntitySpecialRenderer bindTexture(MekanismRenderer.getBlocksTexture()); - if(data.location != null && data.height > 0 && tileEntity.structure.fluidStored.getFluid() != null) + if(data.location != null && data.height >= 3 && tileEntity.structure.fluidStored.getFluid() != null) { push(); diff --git a/common/mekanism/common/EnergyNetwork.java b/common/mekanism/common/EnergyNetwork.java index 921a7a5e8..abb8db075 100644 --- a/common/mekanism/common/EnergyNetwork.java +++ b/common/mekanism/common/EnergyNetwork.java @@ -18,6 +18,7 @@ import mekanism.api.transmitters.TransmissionType; import mekanism.common.util.CableUtils; import mekanism.common.util.MekanismUtils; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.Event; @@ -315,6 +316,7 @@ public class EnergyNetwork extends DynamicNetwork possibleAcceptors.clear(); acceptorDirections.clear(); + packetRange = null; while(it.hasNext()) { diff --git a/common/mekanism/common/Mekanism.java b/common/mekanism/common/Mekanism.java index 4ebf24f52..80e8e553f 100644 --- a/common/mekanism/common/Mekanism.java +++ b/common/mekanism/common/Mekanism.java @@ -159,7 +159,7 @@ import cpw.mods.fml.common.registry.GameRegistry; * @author AidanBrady * */ -@Mod(modid = "Mekanism", name = "Mekanism", version = "6.0.4") +@Mod(modid = "Mekanism", name = "Mekanism", version = "6.0.5") @NetworkMod(channels = {"MEK"}, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) public class Mekanism { @@ -184,7 +184,7 @@ public class Mekanism public static Configuration configuration; /** Mekanism version number */ - public static Version versionNumber = new Version(6, 0, 4); + public static Version versionNumber = new Version(6, 0, 5); /** Map of Teleporters */ public static Map> teleporters = new HashMap>(); @@ -670,6 +670,7 @@ public class Mekanism RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.stoneBrick, 1, 2), new ItemStack(Block.stoneBrick, 1, 0)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.stoneBrick, 1, 0), new ItemStack(Block.stoneBrick, 1, 3)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.stoneBrick, 1, 1), new ItemStack(Block.stoneBrick, 1, 0)); + RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.oreNetherQuartz), new ItemStack(Item.netherQuartz, 2)); //Combiner recipes RecipeHandler.addCombinerRecipe(new ItemStack(Item.redstone, 16), new ItemStack(Block.oreRedstone)); @@ -737,7 +738,7 @@ public class Mekanism RecipeHandler.addElectrolyticSeparatorRecipe(FluidRegistry.getFluidStack("water", 2), new ChemicalPair(new GasStack(GasRegistry.getGas("hydrogen"), 2), new GasStack(GasRegistry.getGas("oxygen"), 1))); RecipeHandler.addElectrolyticSeparatorRecipe(FluidRegistry.getFluidStack("brine", 10), new ChemicalPair(new GasStack(GasRegistry.getGas("hydrogen"), 1), new GasStack(GasRegistry.getGas("chlorine"), 1))); - //Chemical Washer Recipes + //T4 Processing Recipes for(Gas gas : GasRegistry.getRegisteredGasses()) { if(gas instanceof OreGas && !((OreGas)gas).isClean()) @@ -748,6 +749,9 @@ public class Mekanism RecipeHandler.addChemicalCrystalizerRecipe(new GasStack(oreGas.getCleanGas(), 200), new ItemStack(Crystal, 1, Resource.getFromName(oreGas.getName()).ordinal())); } } + + //Chemical Dissolution Chamber Recipes + RecipeHandler.addChemicalDissolutionChamberRecipe(new ItemStack(Block.obsidian), new GasStack(GasRegistry.getGas("obsidian"), 1000)); //Infuse objects InfuseRegistry.registerInfuseObject(new ItemStack(Item.coal, 1, 0), new InfuseObject(InfuseRegistry.get("CARBON"), 10)); @@ -1245,7 +1249,7 @@ public class Mekanism public void onEnergyTransferred(EnergyTransferEvent event) { try { - PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTransmitterUpdate().setParams(PacketType.ENERGY, event.energyNetwork.transmitters.iterator().next(), event.power)); + PacketHandler.sendPacket(Transmission.CLIENTS_CUBOID, new PacketTransmitterUpdate().setParams(PacketType.ENERGY, event.energyNetwork.transmitters.iterator().next(), event.power), event.energyNetwork.getPacketRange(), event.energyNetwork.getDimension()); } catch(Exception e) {} } @@ -1253,7 +1257,7 @@ public class Mekanism public void onGasTransferred(GasTransferEvent event) { try { - PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTransmitterUpdate().setParams(PacketType.GAS, event.gasNetwork.transmitters.iterator().next(), event.transferType, event.didTransfer)); + PacketHandler.sendPacket(Transmission.CLIENTS_CUBOID, new PacketTransmitterUpdate().setParams(PacketType.GAS, event.gasNetwork.transmitters.iterator().next(), event.transferType, event.didTransfer), event.gasNetwork.getPacketRange(), event.gasNetwork.getDimension()); } catch(Exception e) {} } @@ -1261,7 +1265,7 @@ public class Mekanism public void onLiquidTransferred(FluidTransferEvent event) { try { - PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTransmitterUpdate().setParams(PacketType.FLUID, event.fluidNetwork.transmitters.iterator().next(), event.fluidType, event.didTransfer)); + PacketHandler.sendPacket(Transmission.CLIENTS_CUBOID, new PacketTransmitterUpdate().setParams(PacketType.FLUID, event.fluidNetwork.transmitters.iterator().next(), event.fluidType, event.didTransfer), event.fluidNetwork.getPacketRange(), event.fluidNetwork.getDimension()); } catch(Exception e) {} } diff --git a/common/mekanism/common/PacketHandler.java b/common/mekanism/common/PacketHandler.java index a418e13c8..9f098c4ce 100644 --- a/common/mekanism/common/PacketHandler.java +++ b/common/mekanism/common/PacketHandler.java @@ -10,7 +10,10 @@ import mekanism.common.network.IMekanismPacket; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetworkManager; +import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet250CustomPayload; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.AxisAlignedBB; import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; @@ -187,6 +190,9 @@ public class PacketHandler implements IPacketHandler Coord4D obj = (Coord4D)transParams[0]; PacketDispatcher.sendPacketToAllAround(obj.xCoord, obj.yCoord, obj.zCoord, (Double)transParams[1], obj.dimensionId, packet); break; + case CLIENTS_CUBOID: + sendToCuboid(packet, (AxisAlignedBB)transParams[0], (Integer)transParams[1]); + break; case CLIENTS_DIM: PacketDispatcher.sendPacketToAllInDimension(packet, (Integer)transParams[0]); break; @@ -197,6 +203,22 @@ public class PacketHandler implements IPacketHandler log(trans, packetType, transParams); } + + private static void sendToCuboid(Packet packet, AxisAlignedBB cuboid, int dimId) + { + MinecraftServer server = MinecraftServer.getServer(); + + if(server != null && cuboid != null) + { + for(EntityPlayerMP player : (List)server.getConfigurationManager().playerEntityList) + { + if(cuboid.isVecInside(player.getPosition(1.0F))) + { + player.playerNetServerHandler.sendPacketToPlayer(packet); + } + } + } + } /** * Writes a log to the console with information about a packet recently sent. @@ -219,6 +241,9 @@ public class PacketHandler implements IPacketHandler case CLIENTS_RANGE: System.out.println("[Mekanism] Sent '" + packetType.getName() + "' packet to clients in a " + (Double)transParams[1] + " block range."); break; + case CLIENTS_CUBOID: + System.out.println("[Mekanism] Sent '" + packetType.getName() + "' packet to clients within the cuboid " + ((AxisAlignedBB)transParams[0]).toString()); + break; case CLIENTS_DIM: System.out.println("[Mekanism] Sent '" + packetType.getName() + "' packet to clients in dimension ID " + (Integer)transParams[0] + "."); break; @@ -239,6 +264,9 @@ public class PacketHandler implements IPacketHandler /** 2 parameters - Object3D representing the location of the transmission, and a double of the distance this packet can be sent in. */ CLIENTS_RANGE(2), + + /** 2 parameter - AxisAlignedBB representing the area where the packet will be sent, and an int of the dimensionId the cuboid is in. */ + CLIENTS_CUBOID(2), /** 1 parameter - int representing the dimension ID to send this packet to. */ CLIENTS_DIM(1), diff --git a/common/mekanism/common/multipart/PartMechanicalPipe.java b/common/mekanism/common/multipart/PartMechanicalPipe.java index cd066e75a..2ba931b02 100644 --- a/common/mekanism/common/multipart/PartMechanicalPipe.java +++ b/common/mekanism/common/multipart/PartMechanicalPipe.java @@ -160,7 +160,7 @@ public class PartMechanicalPipe extends PartTransmitter implements { super.save(nbtTags); - if(getTransmitterNetwork().fluidStored != null) + if(getTransmitterNetwork(false) != null && getTransmitterNetwork(false).getSize() > 0 && getTransmitterNetwork(false).fluidStored != null) { int remain = getTransmitterNetwork().fluidStored.amount%getTransmitterNetwork().transmitters.size(); int toSave = getTransmitterNetwork().fluidStored.amount/getTransmitterNetwork().transmitters.size(); diff --git a/common/mekanism/common/multipart/PartPressurizedTube.java b/common/mekanism/common/multipart/PartPressurizedTube.java index 4655c6481..f2d9c83cb 100644 --- a/common/mekanism/common/multipart/PartPressurizedTube.java +++ b/common/mekanism/common/multipart/PartPressurizedTube.java @@ -149,7 +149,7 @@ public class PartPressurizedTube extends PartTransmitter { super.save(nbtTags); - if(getTransmitterNetwork().gasStored != null) + if(getTransmitterNetwork(false) != null && getTransmitterNetwork(false).getSize() > 0 && getTransmitterNetwork(false).gasStored != null) { int remain = getTransmitterNetwork().gasStored.amount%getTransmitterNetwork().transmitters.size(); int toSave = getTransmitterNetwork().gasStored.amount/getTransmitterNetwork().transmitters.size(); diff --git a/common/mekanism/common/multipart/PartTransmitter.java b/common/mekanism/common/multipart/PartTransmitter.java index 88186077d..6b27f4526 100644 --- a/common/mekanism/common/multipart/PartTransmitter.java +++ b/common/mekanism/common/multipart/PartTransmitter.java @@ -217,6 +217,12 @@ public abstract class PartTransmitter> extends Pa PacketHandler.sendPacket(Transmission.CLIENTS_DIM, new PacketTransmitterUpdate().setParams(PacketType.UPDATE, tile()), world().provider.dimensionId); } } + + @Override + public Coord4D getLocation() + { + return Coord4D.get(tile()); + } @Override public void chunkLoad() {} diff --git a/common/mekanism/common/network/PacketPortableTeleport.java b/common/mekanism/common/network/PacketPortableTeleport.java index 12533446e..959b50c7c 100644 --- a/common/mekanism/common/network/PacketPortableTeleport.java +++ b/common/mekanism/common/network/PacketPortableTeleport.java @@ -54,6 +54,11 @@ public class PacketPortableTeleport implements IMekanismPacket teleporter.teleDelay = 5; item.setEnergy(itemstack, item.getEnergy(itemstack) - item.calculateEnergyCost(player, coords)); + + if(player instanceof EntityPlayerMP) + { + ((EntityPlayerMP)player).playerNetServerHandler.ticksForFloatKick = 0; + } if(world.provider.dimensionId != coords.dimensionId) { diff --git a/common/mekanism/common/network/PacketTransmitterUpdate.java b/common/mekanism/common/network/PacketTransmitterUpdate.java index 62d60cb0b..0b89f7d11 100644 --- a/common/mekanism/common/network/PacketTransmitterUpdate.java +++ b/common/mekanism/common/network/PacketTransmitterUpdate.java @@ -73,14 +73,14 @@ public class PacketTransmitterUpdate implements IMekanismPacket if(transmitterType == 0) { - IGridTransmitter transmitter = (IGridTransmitter)world.getBlockTileEntity(x, y, z); + TileEntity tileEntity = world.getBlockTileEntity(x, y, z); - if(transmitter != null) + if(tileEntity instanceof IGridTransmitter) { - transmitter.refreshTransmitterNetwork(); + ((IGridTransmitter)tileEntity).refreshTransmitterNetwork(); } } - if(transmitterType == 1) + else if(transmitterType == 1) { double powerLevel = dataStream.readDouble(); diff --git a/common/mekanism/common/tile/TileEntityChargepad.java b/common/mekanism/common/tile/TileEntityChargepad.java index c0dbb1b47..f2ec23377 100644 --- a/common/mekanism/common/tile/TileEntityChargepad.java +++ b/common/mekanism/common/tile/TileEntityChargepad.java @@ -54,7 +54,7 @@ public class TileEntityChargepad extends TileEntityElectricBlock implements IAct { isActive = false; - List entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord+1, yCoord+0.2, zCoord+1)); + List entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord+1, yCoord+0.2, zCoord+1)); for(EntityLivingBase entity : entities) { diff --git a/common/mekanism/common/tile/TileEntityChemicalCrystalizer.java b/common/mekanism/common/tile/TileEntityChemicalCrystalizer.java index b7d39d193..deac9b843 100644 --- a/common/mekanism/common/tile/TileEntityChemicalCrystalizer.java +++ b/common/mekanism/common/tile/TileEntityChemicalCrystalizer.java @@ -85,7 +85,7 @@ public class TileEntityChemicalCrystalizer extends TileEntityElectricBlock imple sideOutputs.add(new SideData(EnumColor.DARK_GREEN, new int[] {2})); inventory = new ItemStack[3]; - ejectorComponent = new TileComponentEjector(this, sideOutputs.get(1)); + ejectorComponent = new TileComponentEjector(this, sideOutputs.get(2)); } @Override diff --git a/common/mekanism/common/tile/TileEntityElectrolyticSeparator.java b/common/mekanism/common/tile/TileEntityElectrolyticSeparator.java index 5322a9f76..0d82f8ca8 100644 --- a/common/mekanism/common/tile/TileEntityElectrolyticSeparator.java +++ b/common/mekanism/common/tile/TileEntityElectrolyticSeparator.java @@ -84,7 +84,7 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp { FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(inventory[0]); - if(fluidTank.getFluid() == null || fluid.isFluidEqual(fluidTank.getFluid()) && fluidTank.getFluid().amount+fluid.amount <= fluidTank.getCapacity()) + if(fluid != null && fluidTank.getFluid() == null || fluid.isFluidEqual(fluidTank.getFluid()) && fluidTank.getFluid().amount+fluid.amount <= fluidTank.getCapacity()) { fluidTank.fill(fluid, true); diff --git a/common/mekanism/common/tile/TileEntityEnergyCube.java b/common/mekanism/common/tile/TileEntityEnergyCube.java index 48eade9d0..822c8c91b 100644 --- a/common/mekanism/common/tile/TileEntityEnergyCube.java +++ b/common/mekanism/common/tile/TileEntityEnergyCube.java @@ -239,7 +239,7 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IPe if(!worldObj.isRemote) { - int newScale = getScaledEnergyLevel(100); + int newScale = getScaledEnergyLevel(20); if(newScale != prevScale) { diff --git a/common/mekanism/common/tile/TileEntityLogisticalSorter.java b/common/mekanism/common/tile/TileEntityLogisticalSorter.java index d0f21a889..412b4bb2d 100644 --- a/common/mekanism/common/tile/TileEntityLogisticalSorter.java +++ b/common/mekanism/common/tile/TileEntityLogisticalSorter.java @@ -85,9 +85,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen { IInventory inventory = (IInventory)back; - InvStack inInventory = null; - boolean hasFilter = false; - EnumColor filterColor = color; + boolean sentItems = false; int min = 0; for(TransporterFilter filter : filters) @@ -98,10 +96,6 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen { if(filter.canFilter(invStack.getStack())) { - filterColor = filter.color; - hasFilter = true; - inInventory = invStack; - if(filter instanceof TItemStackFilter) { TItemStackFilter itemFilter = (TItemStackFilter)filter; @@ -112,57 +106,35 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen } } + ItemStack used = emitItemToTransporter(front, invStack, filter.color, min); + + if(used != null) + { + invStack.use(used.stackSize); + inventory.onInventoryChanged(); + setActive(true); + sentItems = true; + } + break; } } } - if(!hasFilter && autoEject) + if(!sentItems && autoEject) { - inInventory = InventoryUtils.takeTopStack(inventory, ForgeDirection.getOrientation(facing).getOpposite().ordinal(), new FirstFinder()); - } + InvStack invStack = InventoryUtils.takeTopStack(inventory, ForgeDirection.getOrientation(facing).getOpposite().ordinal(), new FirstFinder()); - if(inInventory != null && inInventory.getStack() != null) - { - ItemStack used = null; - - if(front instanceof ILogisticalTransporter) + if(invStack != null && invStack.getStack() != null) { - ILogisticalTransporter transporter = (ILogisticalTransporter)front; + ItemStack used = emitItemToTransporter(front, invStack, null, 0); - if(!roundRobin) + if(used != null) { - ItemStack rejects = TransporterUtils.insert(this, transporter, inInventory.getStack(), filterColor, true, min); - - if(TransporterManager.didEmit(inInventory.getStack(), rejects)) - { - used = TransporterManager.getToUse(inInventory.getStack(), rejects); - } + invStack.use(used.stackSize); + inventory.onInventoryChanged(); + setActive(true); } - else { - ItemStack rejects = TransporterUtils.insertRR(this, transporter, inInventory.getStack(), filterColor, true, min); - - if(TransporterManager.didEmit(inInventory.getStack(), rejects)) - { - used = TransporterManager.getToUse(inInventory.getStack(), rejects); - } - } - } - else if(front instanceof IInventory) - { - ItemStack rejects = InventoryUtils.putStackInInventory((IInventory)front, inInventory.getStack(), facing, false); - - if(TransporterManager.didEmit(inInventory.getStack(), rejects)) - { - used = TransporterManager.getToUse(inInventory.getStack(), rejects); - } - } - - if(used != null) - { - inInventory.use(used.stackSize); - inventory.onInventoryChanged(); - setActive(true); } } @@ -180,6 +152,48 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen } } + /* + * Returns used + */ + public ItemStack emitItemToTransporter(TileEntity front, InvStack inInventory, EnumColor filterColor, int min) + { + ItemStack used = null; + + if(front instanceof ILogisticalTransporter) + { + ILogisticalTransporter transporter = (ILogisticalTransporter)front; + + if(!roundRobin) + { + ItemStack rejects = TransporterUtils.insert(this, transporter, inInventory.getStack(), filterColor, true, min); + + if(TransporterManager.didEmit(inInventory.getStack(), rejects)) + { + used = TransporterManager.getToUse(inInventory.getStack(), rejects); + } + } + else { + ItemStack rejects = TransporterUtils.insertRR(this, transporter, inInventory.getStack(), filterColor, true, min); + + if(TransporterManager.didEmit(inInventory.getStack(), rejects)) + { + used = TransporterManager.getToUse(inInventory.getStack(), rejects); + } + } + } + else if(front instanceof IInventory) + { + ItemStack rejects = InventoryUtils.putStackInInventory((IInventory)front, inInventory.getStack(), facing, false); + + if(TransporterManager.didEmit(inInventory.getStack(), rejects)) + { + used = TransporterManager.getToUse(inInventory.getStack(), rejects); + } + } + + return used; + } + @Override public void writeToNBT(NBTTagCompound nbtTags) { @@ -540,4 +554,4 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen { return true; } -} +} \ No newline at end of file diff --git a/common/mekanism/generators/common/MekanismGenerators.java b/common/mekanism/generators/common/MekanismGenerators.java index e1ba4da48..82e7311dc 100644 --- a/common/mekanism/generators/common/MekanismGenerators.java +++ b/common/mekanism/generators/common/MekanismGenerators.java @@ -35,7 +35,7 @@ import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; -@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "6.0.4", dependencies = "required-after:Mekanism") +@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "6.0.5", dependencies = "required-after:Mekanism") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class MekanismGenerators implements IModule { @@ -46,7 +46,7 @@ public class MekanismGenerators implements IModule public static MekanismGenerators instance; /** MekanismGenerators version number */ - public static Version versionNumber = new Version(6, 0, 4); + public static Version versionNumber = new Version(6, 0, 5); //Items public static Item BioFuel; diff --git a/common/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java b/common/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java index f236202bf..0e84e6ee3 100644 --- a/common/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java +++ b/common/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java @@ -13,7 +13,7 @@ public class TileEntityAdvancedSolarGenerator extends TileEntitySolarGenerator i { public TileEntityAdvancedSolarGenerator() { - super("AdvancedSolarGenerator", 200000, 360, MekanismGenerators.advancedSolarGeneration*2); + super("AdvancedSolarGenerator", 200000, MekanismGenerators.advancedSolarGeneration*2); GENERATION_RATE = MekanismGenerators.advancedSolarGeneration; } diff --git a/common/mekanism/generators/common/tile/TileEntitySolarGenerator.java b/common/mekanism/generators/common/tile/TileEntitySolarGenerator.java index 020407626..2223bda21 100644 --- a/common/mekanism/generators/common/tile/TileEntitySolarGenerator.java +++ b/common/mekanism/generators/common/tile/TileEntitySolarGenerator.java @@ -34,10 +34,9 @@ public class TileEntitySolarGenerator extends TileEntityGenerator inventory = new ItemStack[1]; } - public TileEntitySolarGenerator(String name, double maxEnergy, double output, double generation) + public TileEntitySolarGenerator(String name, double maxEnergy, double output) { super(name, maxEnergy, output); - GENERATION_RATE = generation; inventory = new ItemStack[1]; } diff --git a/common/mekanism/tools/common/MekanismTools.java b/common/mekanism/tools/common/MekanismTools.java index ceb78a4f6..04cc5db27 100644 --- a/common/mekanism/tools/common/MekanismTools.java +++ b/common/mekanism/tools/common/MekanismTools.java @@ -35,7 +35,7 @@ import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; -@Mod(modid = "MekanismTools", name = "MekanismTools", version = "6.0.4", dependencies = "required-after:Mekanism") +@Mod(modid = "MekanismTools", name = "MekanismTools", version = "6.0.5", dependencies = "required-after:Mekanism") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class MekanismTools implements IModule { @@ -43,7 +43,7 @@ public class MekanismTools implements IModule public static MekanismTools instance; /** MekanismTools version number */ - public static Version versionNumber = new Version(6, 0, 4); + public static Version versionNumber = new Version(6, 0, 5); //Enums: Tools public static EnumToolMaterial toolOBSIDIAN; diff --git a/etc/core/mcmod.info b/etc/core/mcmod.info index afa136ecd..7bcf89fe3 100755 --- a/etc/core/mcmod.info +++ b/etc/core/mcmod.info @@ -3,7 +3,7 @@ "modid": "Mekanism", "name": "Mekanism", "description": "Energy, Armor, Tools, Weapons, Machines, Magic.", - "version": "6.0.4", + "version": "6.0.5", "mcversion": "1.6.4", "updateUrl": "", "authors": [ diff --git a/etc/generators/mcmod.info b/etc/generators/mcmod.info index f76a5e47f..c9397f5ee 100755 --- a/etc/generators/mcmod.info +++ b/etc/generators/mcmod.info @@ -3,7 +3,7 @@ "modid": "MekanismGenerators", "name": "MekanismGenerators", "description": "Generators module of Mekanism.", - "version": "6.0.4", + "version": "6.0.5", "mcversion": "1.6.4", "updateUrl": "", "authors": [ diff --git a/etc/tools/mcmod.info b/etc/tools/mcmod.info index bee712dbf..11a935f5a 100755 --- a/etc/tools/mcmod.info +++ b/etc/tools/mcmod.info @@ -3,7 +3,7 @@ "modid": "MekanismTools", "name": "MekanismTools", "description": "Tools module for Mekanism.", - "version": "6.0.4", + "version": "6.0.5", "mcversion": "1.6.4", "updateUrl": "", "authors": [