From 9496f7dfa3b3073d190480e57d68636145cb3d98 Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Tue, 29 Oct 2013 18:13:30 -0400 Subject: [PATCH] Rewrote pathfinder, added in Restrictive Transporters, added option to have null color in filters, added default outputting filter for sorter whoo! --- .../client/gui/GuiItemStackFilter.java | 33 +- .../client/gui/GuiLogisticalSorter.java | 89 ++++-- .../mekanism/client/gui/GuiOreDictFilter.java | 35 +- .../block/TransmitterRenderingHandler.java | 5 +- .../RenderLogisticalTransporter.java | 13 +- .../common/block/BlockTransmitter.java | 6 +- .../common/item/ItemBlockTransmitter.java | 12 + .../TileEntityLogisticalSorter.java | 73 ++++- .../common/transporter/OreDictFilter.java | 2 +- .../common/transporter/TransporterFilter.java | 29 +- .../transporter/TransporterPathfinder.java | 301 ++++++------------ .../common/transporter/TransporterStack.java | 10 +- .../mekanism/common/util/MekanismUtils.java | 76 ++--- .../common/util/TransporterUtils.java | 7 +- .../mekanism/gui/GuiHydrogenGenerator.png | Bin 4117 -> 3730 bytes .../mekanism/gui/GuiLogisticalSorter.png | Bin 3652 -> 3722 bytes resources/assets/mekanism/lang/en_US.lang | 1 + .../render/RestrictiveTransporter.png | Bin 0 -> 9783 bytes 18 files changed, 379 insertions(+), 313 deletions(-) create mode 100644 resources/assets/mekanism/render/RestrictiveTransporter.png diff --git a/common/mekanism/client/gui/GuiItemStackFilter.java b/common/mekanism/client/gui/GuiItemStackFilter.java index 2ba6f8856..6041e7804 100644 --- a/common/mekanism/client/gui/GuiItemStackFilter.java +++ b/common/mekanism/client/gui/GuiItemStackFilter.java @@ -51,8 +51,6 @@ public class GuiItemStackFilter extends GuiMekanism tileEntity = tentity; isNew = true; - - filter.color = TransporterUtils.colors.get(0); } @Override @@ -128,20 +126,29 @@ public class GuiItemStackFilter extends GuiMekanism GL11.glPopMatrix(); } - GL11.glPushMatrix(); - GL11.glColor4f(1, 1, 1, 1); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - - mc.getTextureManager().bindTexture(MekanismRenderer.getColorResource(filter.color)); - itemRenderer.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16); - - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + if(filter.color != null) + { + GL11.glPushMatrix(); + GL11.glColor4f(1, 1, 1, 1); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + + mc.getTextureManager().bindTexture(MekanismRenderer.getColorResource(filter.color)); + itemRenderer.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16); + + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) { - drawCreativeTabHoveringText(filter.color.getName(), xAxis, yAxis); + if(filter.color != null) + { + drawCreativeTabHoveringText(filter.color.getName(), xAxis, yAxis); + } + else { + drawCreativeTabHoveringText("None", xAxis, yAxis); + } } super.drawGuiContainerForegroundLayer(mouseX, mouseY); diff --git a/common/mekanism/client/gui/GuiLogisticalSorter.java b/common/mekanism/client/gui/GuiLogisticalSorter.java index 3c5142df5..5e5bfd20c 100644 --- a/common/mekanism/client/gui/GuiLogisticalSorter.java +++ b/common/mekanism/client/gui/GuiLogisticalSorter.java @@ -3,21 +3,25 @@ package mekanism.client.gui; import java.util.ArrayList; import mekanism.api.Object3D; +import mekanism.client.render.MekanismRenderer; import mekanism.common.PacketHandler; import mekanism.common.PacketHandler.Transmission; import mekanism.common.inventory.container.ContainerNull; import mekanism.common.network.PacketLogisticalSorterGui; import mekanism.common.network.PacketLogisticalSorterGui.SorterGuiPacket; +import mekanism.common.network.PacketTileEntity; import mekanism.common.tileentity.TileEntityLogisticalSorter; import mekanism.common.transporter.ItemStackFilter; import mekanism.common.transporter.OreDictFilter; import mekanism.common.transporter.TransporterFilter; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import mekanism.common.util.TransporterUtils; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -60,35 +64,48 @@ public class GuiLogisticalSorter extends GuiMekanism { super.mouseClicked(mouseX, mouseY, button); - int xAxis = (mouseX - (width - xSize) / 2); - int yAxis = (mouseY - (height - ySize) / 2); - - if(xAxis >= 154 && xAxis <= 166 && yAxis >= getScroll()+18 && yAxis <= getScroll()+18+15) + if(button == 0) { - dragOffset = yAxis - (getScroll()+18); - isDragging = true; - } - - for(int i = 0; i < 4; i++) - { - if(tileEntity.filters.get(getFilterIndex()+i) != null) + int xAxis = (mouseX - (width - xSize) / 2); + int yAxis = (mouseY - (height - ySize) / 2); + + if(xAxis >= 154 && xAxis <= 166 && yAxis >= getScroll()+18 && yAxis <= getScroll()+18+15) { - int yStart = i*29 + 18; - - if(xAxis >= 56 && xAxis <= 152 && yAxis >= yStart && yAxis <= yStart+29) + dragOffset = yAxis - (getScroll()+18); + isDragging = true; + } + + for(int i = 0; i < 4; i++) + { + if(tileEntity.filters.get(getFilterIndex()+i) != null) { - TransporterFilter filter = tileEntity.filters.get(getFilterIndex()+i); + int yStart = i*29 + 18; - if(filter instanceof ItemStackFilter) + if(xAxis >= 56 && xAxis <= 152 && yAxis >= yStart && yAxis <= yStart+29) { - PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER_INDEX, Object3D.get(tileEntity), 1, getFilterIndex()+i)); - } - else if(filter instanceof OreDictFilter) - { - PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER_INDEX, Object3D.get(tileEntity), 2, getFilterIndex()+i)); + TransporterFilter filter = tileEntity.filters.get(getFilterIndex()+i); + + if(filter instanceof ItemStackFilter) + { + mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F); + PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER_INDEX, Object3D.get(tileEntity), 1, getFilterIndex()+i)); + } + else if(filter instanceof OreDictFilter) + { + mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F); + PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER_INDEX, Object3D.get(tileEntity), 2, getFilterIndex()+i)); + } } } } + + if(xAxis >= 13 && xAxis <= 29 && yAxis >= 137 && yAxis <= 153) + { + ArrayList data = new ArrayList(); + data.add(0); + + PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data)); + } } } @@ -153,11 +170,14 @@ public class GuiLogisticalSorter extends GuiMekanism int yAxis = (mouseY - (height - ySize) / 2); fontRenderer.drawString("Logistical Sorter", 43, 6, 0x404040); + fontRenderer.drawString("Filters:", 11, 19, 0x00CD00); 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("Default:", 12, 126, 0x00CD00); + for(int i = 0; i < 4; i++) { if(tileEntity.filters.get(getFilterIndex()+i) != null) @@ -168,7 +188,7 @@ public class GuiLogisticalSorter extends GuiMekanism if(filter instanceof ItemStackFilter) { fontRenderer.drawString("ItemStack Filter", 58, yStart + 2, 0x404040); - fontRenderer.drawString("Color: " + filter.color.getName(), 58, yStart + 11, 0x404040); + fontRenderer.drawString("Color: " + filter.color != null ? filter.color.getName() : "None", 58, yStart + 11, 0x404040); } else if(filter instanceof OreDictFilter) { @@ -178,6 +198,31 @@ public class GuiLogisticalSorter extends GuiMekanism } } + if(tileEntity.color != null) + { + GL11.glPushMatrix(); + GL11.glColor4f(1, 1, 1, 1); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + + mc.getTextureManager().bindTexture(MekanismRenderer.getColorResource(tileEntity.color)); + itemRenderer.renderIcon(13, 137, MekanismRenderer.getColorIcon(tileEntity.color), 16, 16); + + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } + + if(xAxis >= 13 && xAxis <= 29 && yAxis >= 137 && yAxis <= 153) + { + if(tileEntity.color != null) + { + drawCreativeTabHoveringText(tileEntity.color.getName(), xAxis, yAxis); + } + else { + drawCreativeTabHoveringText("None", xAxis, yAxis); + } + } + super.drawGuiContainerForegroundLayer(mouseX, mouseY); } diff --git a/common/mekanism/client/gui/GuiOreDictFilter.java b/common/mekanism/client/gui/GuiOreDictFilter.java index 2d967ffcd..f52a49cb9 100644 --- a/common/mekanism/client/gui/GuiOreDictFilter.java +++ b/common/mekanism/client/gui/GuiOreDictFilter.java @@ -71,8 +71,6 @@ public class GuiOreDictFilter extends GuiMekanism tileEntity = tentity; isNew = true; - - filter.color = TransporterUtils.colors.get(0); } @Override @@ -172,20 +170,29 @@ public class GuiOreDictFilter extends GuiMekanism GL11.glPopMatrix(); } - GL11.glPushMatrix(); - GL11.glColor4f(1, 1, 1, 1); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - - mc.getTextureManager().bindTexture(MekanismRenderer.getColorResource(filter.color)); - itemRenderer.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16); - - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + if(filter.color != null) + { + GL11.glPushMatrix(); + GL11.glColor4f(1, 1, 1, 1); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + + mc.getTextureManager().bindTexture(MekanismRenderer.getColorResource(filter.color)); + itemRenderer.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16); + + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + } if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) { - drawCreativeTabHoveringText(filter.color.getName(), xAxis, yAxis); + if(filter.color != null) + { + drawCreativeTabHoveringText(filter.color.getName(), xAxis, yAxis); + } + else { + drawCreativeTabHoveringText("None", xAxis, yAxis); + } } super.drawGuiContainerForegroundLayer(mouseX, mouseY); @@ -310,7 +317,7 @@ public class GuiOreDictFilter extends GuiMekanism for(String s : OreDictionary.getOreNames()) { - if(oreName.equals(s)) + if(oreName.equals(s) || oreName.equals("*")) { keys.add(s); } diff --git a/common/mekanism/client/render/block/TransmitterRenderingHandler.java b/common/mekanism/client/render/block/TransmitterRenderingHandler.java index 2e539c3f0..5328e2142 100644 --- a/common/mekanism/client/render/block/TransmitterRenderingHandler.java +++ b/common/mekanism/client/render/block/TransmitterRenderingHandler.java @@ -45,9 +45,12 @@ public class TransmitterRenderingHandler implements ISimpleBlockRenderingHandler case 3: Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LogisticalTransporter.png")); break; + case 4: + Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "RestrictiveTransporter.png")); + break; } - if(metadata != 3) + if(metadata != 3 && metadata != 4) { smallTransmitter.renderSide(ForgeDirection.UP, true); smallTransmitter.renderSide(ForgeDirection.DOWN, true); diff --git a/common/mekanism/client/render/tileentity/RenderLogisticalTransporter.java b/common/mekanism/client/render/tileentity/RenderLogisticalTransporter.java index f2a9fb9e1..6b386eec3 100644 --- a/common/mekanism/client/render/tileentity/RenderLogisticalTransporter.java +++ b/common/mekanism/client/render/tileentity/RenderLogisticalTransporter.java @@ -1,5 +1,6 @@ package mekanism.client.render.tileentity; +import mekanism.api.Object3D; import mekanism.client.model.ModelTransmitter; import mekanism.client.model.ModelTransmitter.Size; import mekanism.client.model.ModelTransporterBox; @@ -38,7 +39,17 @@ public class RenderLogisticalTransporter extends TileEntitySpecialRenderer public void renderAModelAt(TileEntityLogisticalTransporter tileEntity, double x, double y, double z, float partialTick) { - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LogisticalTransporter.png")); + int meta = Object3D.get(tileEntity).getMetadata(tileEntity.worldObj); + + if(meta == 3) + { + bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LogisticalTransporter.png")); + } + else if(meta == 4) + { + bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "RestrictiveTransporter.png")); + } + GL11.glPushMatrix(); GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F); GL11.glScalef(1.0F, -1F, -1F); diff --git a/common/mekanism/common/block/BlockTransmitter.java b/common/mekanism/common/block/BlockTransmitter.java index a965161bf..78067c719 100644 --- a/common/mekanism/common/block/BlockTransmitter.java +++ b/common/mekanism/common/block/BlockTransmitter.java @@ -44,6 +44,7 @@ import cpw.mods.fml.relauncher.SideOnly; * 1: Universal Cable * 2: Mechanical Pipe * 3: Logistical Transporter + * 4: Restrictive Transporter * @author AidanBrady * */ @@ -101,6 +102,7 @@ public class BlockTransmitter extends Block list.add(new ItemStack(i, 1, 1)); list.add(new ItemStack(i, 1, 2)); list.add(new ItemStack(i, 1, 3)); + list.add(new ItemStack(i, 1, 4)); } @Override @@ -241,7 +243,7 @@ public class BlockTransmitter extends Block { connectable = PipeUtils.getConnections(tileEntity); } - else if(world.getBlockMetadata(x, y, z) == 3) + else if(world.getBlockMetadata(x, y, z) == 3 || world.getBlockMetadata(x, y, z) == 4) { connectable = TransporterUtils.getConnections((TileEntityLogisticalTransporter)tileEntity); } @@ -371,6 +373,8 @@ public class BlockTransmitter extends Block return new TileEntityMechanicalPipe(); case 3: return new TileEntityLogisticalTransporter(); + case 4: + return new TileEntityLogisticalTransporter(); default: return null; } diff --git a/common/mekanism/common/item/ItemBlockTransmitter.java b/common/mekanism/common/item/ItemBlockTransmitter.java index 9b6acc2b0..0a86070e1 100644 --- a/common/mekanism/common/item/ItemBlockTransmitter.java +++ b/common/mekanism/common/item/ItemBlockTransmitter.java @@ -67,6 +67,13 @@ public class ItemBlockTransmitter extends ItemBlock list.add("- " + EnumColor.PURPLE + "Items (universal)"); list.add("- " + EnumColor.PURPLE + "Blocks (universal)"); } + else if(itemstack.getItemDamage() == 4) + { + list.add(EnumColor.DARK_GREY + "Capable of transferring:"); + list.add("- " + EnumColor.PURPLE + "Items (universal)"); + list.add("- " + EnumColor.PURPLE + "Blocks (universal)"); + list.add("- " + EnumColor.DARK_RED + "Only used if no other paths available"); + } } } @@ -86,6 +93,7 @@ public class ItemBlockTransmitter extends ItemBlock public String getUnlocalizedName(ItemStack itemstack) { String name = ""; + switch(itemstack.getItemDamage()) { case 0: @@ -100,10 +108,14 @@ public class ItemBlockTransmitter extends ItemBlock case 3: name = "LogisticalTransporter"; break; + case 4: + name = "RestrictiveTransporter"; + break; default: name = "Unknown"; break; } + return getUnlocalizedName() + "." + name; } } \ No newline at end of file diff --git a/common/mekanism/common/tileentity/TileEntityLogisticalSorter.java b/common/mekanism/common/tileentity/TileEntityLogisticalSorter.java index 87a377ce7..51b68ac27 100644 --- a/common/mekanism/common/tileentity/TileEntityLogisticalSorter.java +++ b/common/mekanism/common/tileentity/TileEntityLogisticalSorter.java @@ -31,6 +31,8 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen public RedstoneControl controlType = RedstoneControl.DISABLED; + public EnumColor color; + public final int MAX_DELAY = 10; public int delayTicks; @@ -74,18 +76,18 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen if(inInventory != null && inInventory.itemStack != null) { - EnumColor color = null; + EnumColor filterColor = color; for(TransporterFilter filter : filters) { if(filter.canFilter(inInventory.itemStack)) { - color = filter.color; + filterColor = filter.color; break; } } - if(TransporterUtils.insert(this, transporter, inInventory.itemStack, color)) + if(TransporterUtils.insert(this, transporter, inInventory.itemStack, filterColor)) { inventory.setInventorySlotContents(inInventory.slotID, null); setActive(true); @@ -116,6 +118,11 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen nbtTags.setInteger("controlType", controlType.ordinal()); + if(color != null) + { + nbtTags.setInteger("color", TransporterUtils.colors.indexOf(color)); + } + NBTTagList filterTags = new NBTTagList(); for(TransporterFilter filter : filters) @@ -138,6 +145,11 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen controlType = RedstoneControl.values()[nbtTags.getInteger("controlType")]; + if(nbtTags.hasKey("color")) + { + color = TransporterUtils.colors.get(nbtTags.getInteger("color")); + } + if(nbtTags.hasKey("filters")) { NBTTagList tagList = nbtTags.getTagList("filters"); @@ -152,6 +164,16 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen @Override public void handlePacketData(ByteArrayDataInput dataStream) { + if(!worldObj.isRemote) + { + if(dataStream.readInt() == 0) + { + color = TransporterUtils.increment(color); + } + + return; + } + super.handlePacketData(dataStream); int type = dataStream.readInt(); @@ -161,6 +183,16 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen isActive = dataStream.readBoolean(); controlType = RedstoneControl.values()[dataStream.readInt()]; + int c = dataStream.readInt(); + + if(c != -1) + { + color = TransporterUtils.colors.get(c); + } + else { + color = null; + } + filters.clear(); int amount = dataStream.readInt(); @@ -175,7 +207,17 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen else if(type == 1) { isActive = dataStream.readBoolean(); - controlType = RedstoneControl.values()[dataStream.readInt()]; + controlType = RedstoneControl.values()[dataStream.readInt()]; + + int c = dataStream.readInt(); + + if(c != -1) + { + color = TransporterUtils.colors.get(c); + } + else { + color = null; + } MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord); } @@ -202,6 +244,14 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen data.add(isActive); data.add(controlType.ordinal()); + if(color != null) + { + data.add(TransporterUtils.colors.indexOf(color)); + } + else { + data.add(-1); + } + data.add(filters.size()); for(TransporterFilter filter : filters) @@ -221,6 +271,14 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen data.add(isActive); data.add(controlType.ordinal()); + if(color != null) + { + data.add(TransporterUtils.colors.indexOf(color)); + } + else { + data.add(-1); + } + return data; } @@ -262,7 +320,12 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen @Override public int[] getAccessibleSlotsFromSide(int side) { - return new int[] {0}; + if(side == ForgeDirection.getOrientation(facing).ordinal() || side == ForgeDirection.getOrientation(facing).getOpposite().ordinal()) + { + return new int[] {0}; + } + + return null; } @Override diff --git a/common/mekanism/common/transporter/OreDictFilter.java b/common/mekanism/common/transporter/OreDictFilter.java index 4084bb880..e97115aee 100644 --- a/common/mekanism/common/transporter/OreDictFilter.java +++ b/common/mekanism/common/transporter/OreDictFilter.java @@ -23,7 +23,7 @@ public class OreDictFilter extends TransporterFilter return false; } - if(oreDictName.equals(oreKey)) + if(oreDictName.equals(oreKey) || oreDictName.equals("*")) { return true; } diff --git a/common/mekanism/common/transporter/TransporterFilter.java b/common/mekanism/common/transporter/TransporterFilter.java index 5cfe19451..079da7f19 100644 --- a/common/mekanism/common/transporter/TransporterFilter.java +++ b/common/mekanism/common/transporter/TransporterFilter.java @@ -17,22 +17,43 @@ public abstract class TransporterFilter public void write(NBTTagCompound nbtTags) { - nbtTags.setInteger("color", TransporterUtils.colors.indexOf(color)); + if(color != null) + { + nbtTags.setInteger("color", TransporterUtils.colors.indexOf(color)); + + } } protected void read(NBTTagCompound nbtTags) { - color = TransporterUtils.colors.get(nbtTags.getInteger("color")); + if(nbtTags.hasKey("color")) + { + color = TransporterUtils.colors.get(nbtTags.getInteger("color")); + } } public void write(ArrayList data) { - data.add(TransporterUtils.colors.indexOf(color)); + if(color != null) + { + data.add(TransporterUtils.colors.indexOf(color)); + } + else { + data.add(-1); + } } protected void read(ByteArrayDataInput dataStream) { - color = TransporterUtils.colors.get(dataStream.readInt()); + int c = dataStream.readInt(); + + if(c != -1) + { + color = TransporterUtils.colors.get(c); + } + else { + color = null; + } } public static TransporterFilter readFromNBT(NBTTagCompound nbtTags) diff --git a/common/mekanism/common/transporter/TransporterPathfinder.java b/common/mekanism/common/transporter/TransporterPathfinder.java index 635aec34d..b4eb3db17 100644 --- a/common/mekanism/common/transporter/TransporterPathfinder.java +++ b/common/mekanism/common/transporter/TransporterPathfinder.java @@ -1,13 +1,13 @@ package mekanism.common.transporter; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -import mekanism.api.EnumColor; import mekanism.api.Object3D; import mekanism.common.tileentity.TileEntityLogisticalTransporter; import mekanism.common.util.TransporterUtils; @@ -17,35 +17,33 @@ import net.minecraftforge.common.ForgeDirection; public final class TransporterPathfinder { - public static class IdleDest + public static class IdlePath { public World worldObj; - public Set iterated = new HashSet(); + public Object3D start; - public TileEntityLogisticalTransporter start; - - public Map destinations = new HashMap(); + public Set destinations = new HashSet(); public TransporterStack transportStack; - public IdleDest(World world, TileEntityLogisticalTransporter tileEntity, TransporterStack stack) + public IdlePath(World world, Object3D obj, TransporterStack stack) { worldObj = world; - start = tileEntity; + start = obj; transportStack = stack; } - public void loop(TileEntityLogisticalTransporter pointer, int dist) + public void loop(Object3D pointer, ArrayList currentPath, int dist) { if(pointer == null) { return; } - iterated.add(pointer); + currentPath.add(pointer); - if(pointer.color == EnumColor.BLACK) + if(pointer.getMetadata(worldObj) == 4) { dist += 1000; } @@ -57,69 +55,108 @@ public final class TransporterPathfinder for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - TileEntity tile = Object3D.get(pointer).getFromSide(side).getTileEntity(worldObj); + TileEntity tile = pointer.getFromSide(side).getTileEntity(worldObj); - if(transportStack.canInsertToTransporter(tile) && !iterated.contains(tile)) + if(transportStack.canInsertToTransporter(tile) && !currentPath.contains(Object3D.get(tile))) { - loop((TileEntityLogisticalTransporter)tile, dist); + loop(Object3D.get(tile), (ArrayList)currentPath.clone(), dist); found = true; } } if(!found) { - destinations.put(Object3D.get(pointer), dist); + destinations.add(new Destination(currentPath, null, dist)); } } - public Object3D find() + public List find() { - loop(start, 0); + loop(start, new ArrayList(), 0); - Object3D farthest = null; + Destination farthest = null; - for(Map.Entry entry : destinations.entrySet()) + for(Destination obj : destinations) { - if(farthest == null || destinations.get(farthest) < entry.getValue()) + if(farthest == null || obj.distance > farthest.distance) { - farthest = entry.getKey(); + if(!obj.path.isEmpty() && !obj.path.get(0).equals(start)) + { + farthest = obj; + } } } - return farthest; + if(farthest == null) + { + return null; + } + + return farthest.path; } } public static class Destination + { + public List path = new ArrayList(); + public int distance; + + public Destination(ArrayList list, Object3D dest, int i) + { + path = (List)list.clone(); + + if(dest != null) + { + path.add(dest); + } + + Collections.reverse(path); + distance = i; + } + + @Override + public int hashCode() + { + int code = 1; + code = 31 * code + path.hashCode(); + code = 31 * code + distance; + return code; + } + + @Override + public boolean equals(Object dest) + { + return dest instanceof Destination && ((Destination)dest).path.equals(path) && ((Destination)dest).distance == distance; + } + } + + public static class DestPath { public World worldObj; - public Set iterated = new HashSet(); + public Set destinations = new HashSet(); - public Map destinations = new HashMap(); - public Map prevNodes = new HashMap(); - - public TileEntityLogisticalTransporter start; + public Object3D start; public TransporterStack transportStack; - public Destination(World world, TileEntityLogisticalTransporter tileEntity, TransporterStack stack) + public DestPath(World world, Object3D obj, TransporterStack stack) { worldObj = world; - start = tileEntity; + start = obj; transportStack = stack; } - public void loop(TileEntityLogisticalTransporter pointer, int dist) + public void loop(Object3D pointer, ArrayList currentPath, int dist) { if(pointer == null) { return; } - iterated.add(pointer); + currentPath.add(pointer); - if(pointer.color == EnumColor.BLACK) + if(pointer.getMetadata(worldObj) == 4) { dist += 1000; } @@ -129,225 +166,69 @@ public final class TransporterPathfinder for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - TileEntity tile = Object3D.get(pointer).getFromSide(side).getTileEntity(worldObj); + TileEntity tile = pointer.getFromSide(side).getTileEntity(worldObj); if(TransporterUtils.canInsert(tile, transportStack.itemStack, side.ordinal()) && !(tile instanceof TileEntityLogisticalTransporter)) { - destinations.put(Object3D.get(tile), dist); - prevNodes.put(Object3D.get(tile), Object3D.get(pointer)); - return; + destinations.add(new Destination(currentPath, Object3D.get(tile), dist)); } - if(transportStack.canInsertToTransporter(tile) && !iterated.contains(tile)) + if(transportStack.canInsertToTransporter(tile) && !currentPath.contains(Object3D.get(tile))) { - loop((TileEntityLogisticalTransporter)tile, dist); + loop(Object3D.get(tile), (ArrayList)currentPath.clone(), dist); } } } - public Object3D find() + public List find() { - loop(start, 0); + loop(start, new ArrayList(), 0); - Object3D closest = null; + Destination closest = null; - for(Map.Entry entry : destinations.entrySet()) + for(Destination obj : destinations) { - if(closest == null || destinations.get(closest) > entry.getValue()) + if(closest == null || obj.distance < closest.distance) { - closest = entry.getKey(); - } - } - - return closest; - } - } - - public static class Path - { - public final Set openSet, closedSet; - - public final HashMap navMap; - - public final HashMap gScore, fScore; - - public final Object3D target; - - public final Object3D start; - - public final Object3D finalNode; - - public final TransporterStack transportStack; - - public List results; - - private World worldObj; - - public Path(World world, Object3D node, Object3D startObj, Object3D finishObj, TransporterStack stack) - { - worldObj = world; - finalNode = node; - start = startObj; - target = finishObj; - transportStack = stack; - - openSet = new HashSet(); - closedSet = new HashSet(); - - navMap = new HashMap(); - - gScore = new HashMap(); - fScore = new HashMap(); - - results = new ArrayList(); - } - - public boolean find(final Object3D start) - { - openSet.add(start); - gScore.put(start, 0d); - fScore.put(start, gScore.get(start) + getEstimate(start, finalNode)); - - int blockCount = 0; - - for(int i = 0; i < 6; i++) - { - ForgeDirection direction = ForgeDirection.getOrientation(i); - Object3D neighbor = finalNode.translate(direction.offsetX, direction.offsetY, direction.offsetZ); - - if(!transportStack.canInsertToTransporter(neighbor.getTileEntity(worldObj))) - { - blockCount++; - } - } - - if(blockCount >= 6) - { - return false; - } - - double maxSearchDistance = start.distanceTo(finalNode) * 2; - - while(!openSet.isEmpty()) - { - Object3D currentNode = null; - double lowestFScore = 0; - - for(Object3D node : openSet) - { - if(currentNode == null || fScore.get(node) < lowestFScore) + if(!obj.path.isEmpty() && !obj.path.get(0).equals(start)) { - currentNode = node; - lowestFScore = fScore.get(node); - } - } - - if(currentNode == null && start.distanceTo(currentNode) > maxSearchDistance) - { - break; - } - - if(currentNode.equals(finalNode)) - { - results = reconstructPath(navMap, finalNode); - return true; - } - - openSet.remove(currentNode); - closedSet.add(currentNode); - - for(int i = 0; i < 6; i++) - { - ForgeDirection direction = ForgeDirection.getOrientation(i); - Object3D neighbor = currentNode.getFromSide(direction); - - if(transportStack.canInsertToTransporter(neighbor.getTileEntity(worldObj))) - { - double tentativeG = gScore.get(currentNode) + currentNode.distanceTo(neighbor); - - if(closedSet.contains(neighbor)) - { - if(tentativeG >= gScore.get(neighbor)) - { - continue; - } - } - - if(!openSet.contains(neighbor) || tentativeG < gScore.get(neighbor)) - { - navMap.put(neighbor, currentNode); - gScore.put(neighbor, tentativeG); - fScore.put(neighbor, gScore.get(neighbor) + getEstimate(neighbor, finalNode)); - openSet.add(neighbor); - } + closest = obj; } } } - - return false; - } - - public List getPath() - { - boolean foundPath = find(start); - if(foundPath) + if(closest == null) { - if(target != null) - { - results.add(0, target); - } - - return results; + return null; } - return null; - } - - private List reconstructPath(HashMap naviMap, Object3D currentNode) - { - List path = new ArrayList(); - path.add(currentNode); - - if(naviMap.containsKey(currentNode)) - { - path.addAll(reconstructPath(naviMap, naviMap.get(currentNode))); - } - - return path; - } - - private double getEstimate(Object3D start, Object3D target2) - { - return start.distanceTo(target2); + return closest.path; } } public static List getNewPath(TileEntityLogisticalTransporter start, TransporterStack stack) { - Destination d = new Destination(start.worldObj, start, stack); - Object3D closest = d.find(); + DestPath d = new DestPath(start.worldObj, Object3D.get(start), stack); + List path = d.find(); - if(closest == null) + if(path == null) { return null; } - Path p = new Path(d.worldObj, d.prevNodes.get(closest), Object3D.get(start), closest, stack); - return p.getPath(); + return path; } public static List getIdlePath(TileEntityLogisticalTransporter start, TransporterStack stack) { - IdleDest d = new IdleDest(start.worldObj, start, stack); - Object3D farthest = d.find(); + IdlePath d = new IdlePath(start.worldObj, Object3D.get(start), stack); + List path = d.find(); - if(farthest == null || farthest.equals(Object3D.get(start))) + if(path == null) { return null; } - Path p = new Path(start.worldObj, farthest, Object3D.get(start), null, stack); - return p.getPath(); + return path; } } diff --git a/common/mekanism/common/transporter/TransporterStack.java b/common/mekanism/common/transporter/TransporterStack.java index 9182a6dfb..0070945b5 100644 --- a/common/mekanism/common/transporter/TransporterStack.java +++ b/common/mekanism/common/transporter/TransporterStack.java @@ -204,7 +204,10 @@ public class TransporterStack { if(progress < 50) { - return Object3D.get(tileEntity).sideDifference(getPrev(tileEntity)).ordinal(); + if(getPrev(tileEntity) != null) + { + return Object3D.get(tileEntity).sideDifference(getPrev(tileEntity)).ordinal(); + } } else if(progress == 50) { @@ -215,7 +218,10 @@ public class TransporterStack } else if(progress > 50) { - return getNext(tileEntity).sideDifference(Object3D.get(tileEntity)).ordinal(); + if(getNext(tileEntity) != null) + { + return getNext(tileEntity).sideDifference(Object3D.get(tileEntity)).ordinal(); + } } return 0; diff --git a/common/mekanism/common/util/MekanismUtils.java b/common/mekanism/common/util/MekanismUtils.java index 24c579be5..0715ddc85 100644 --- a/common/mekanism/common/util/MekanismUtils.java +++ b/common/mekanism/common/util/MekanismUtils.java @@ -71,50 +71,52 @@ public final class MekanismUtils */ public static boolean checkForUpdates(EntityPlayer entityplayer) { - if(Mekanism.updateNotifications && Mekanism.latestVersionNumber != null && Mekanism.recentNews != null) - { - if(!Mekanism.latestVersionNumber.equals("null")) + try { + if(Mekanism.updateNotifications && Mekanism.latestVersionNumber != null && Mekanism.recentNews != null) { - ArrayList list = new ArrayList(); - - for(IModule module : Mekanism.modulesLoaded) + if(!Mekanism.latestVersionNumber.equals("null")) { - if(Version.get(Mekanism.latestVersionNumber).comparedState(module.getVersion()) == 1) + ArrayList list = new ArrayList(); + + for(IModule module : Mekanism.modulesLoaded) { - list.add(module); + if(Version.get(Mekanism.latestVersionNumber).comparedState(module.getVersion()) == 1) + { + list.add(module); + } + } + + if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == 1 || !list.isEmpty()) + { + entityplayer.addChatMessage(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " -------------"); + entityplayer.addChatMessage(EnumColor.GREY + " Using outdated version on one or more modules."); + + if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == 1) + { + entityplayer.addChatMessage(EnumColor.INDIGO + " Mekanism: " + EnumColor.DARK_RED + Mekanism.versionNumber); + } + + for(IModule module : list) + { + entityplayer.addChatMessage(EnumColor.INDIGO + " Mekanism" + module.getName() + ": " + EnumColor.DARK_RED + module.getVersion()); + } + + entityplayer.addChatMessage(EnumColor.GREY + " Consider updating to version " + EnumColor.DARK_GREY + Mekanism.latestVersionNumber); + entityplayer.addChatMessage(EnumColor.GREY + " New features: " + EnumColor.INDIGO + Mekanism.recentNews); + entityplayer.addChatMessage(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"); + return true; + } + else if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == -1) + { + entityplayer.addChatMessage(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + "Using developer build " + EnumColor.DARK_GREY + Mekanism.versionNumber); + return true; } } - - if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == 1 || !list.isEmpty()) - { - entityplayer.addChatMessage(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " -------------"); - entityplayer.addChatMessage(EnumColor.GREY + " Using outdated version on one or more modules."); - - if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == 1) - { - entityplayer.addChatMessage(EnumColor.INDIGO + " Mekanism: " + EnumColor.DARK_RED + Mekanism.versionNumber); - } - - for(IModule module : list) - { - entityplayer.addChatMessage(EnumColor.INDIGO + " Mekanism" + module.getName() + ": " + EnumColor.DARK_RED + module.getVersion()); - } - - entityplayer.addChatMessage(EnumColor.GREY + " Consider updating to version " + EnumColor.DARK_GREY + Mekanism.latestVersionNumber); - entityplayer.addChatMessage(EnumColor.GREY + " New features: " + EnumColor.INDIGO + Mekanism.recentNews); - entityplayer.addChatMessage(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"); - return true; - } - else if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == -1) - { - entityplayer.addChatMessage(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + "Using developer build " + EnumColor.DARK_GREY + Mekanism.versionNumber); - return true; + else { + System.out.println("[Mekanism] Minecraft is in offline mode, could not check for updates."); } } - else { - System.out.println("[Mekanism] Minecraft is in offline mode, could not check for updates."); - } - } + } catch(Exception e) {} return false; } diff --git a/common/mekanism/common/util/TransporterUtils.java b/common/mekanism/common/util/TransporterUtils.java index 6b089314d..1c45786c8 100644 --- a/common/mekanism/common/util/TransporterUtils.java +++ b/common/mekanism/common/util/TransporterUtils.java @@ -35,7 +35,6 @@ public final class TransporterUtils ret.add(EnumColor.RED); ret.add(EnumColor.PINK); ret.add(EnumColor.YELLOW); - ret.add(EnumColor.BLACK); return ret; } @@ -357,10 +356,14 @@ public final class TransporterUtils public static EnumColor increment(EnumColor color) { - if(colors.indexOf(color) == colors.size()-1) + if(color == null) { return colors.get(0); } + else if(colors.indexOf(color) == colors.size()-1) + { + return null; + } return colors.get(colors.indexOf(color)+1); } diff --git a/resources/assets/mekanism/gui/GuiHydrogenGenerator.png b/resources/assets/mekanism/gui/GuiHydrogenGenerator.png index 772f62574034aa970c7edda1590b5b6742b661b9..8d870a167dfb2d6ba752a065e9ec003f60d558d6 100644 GIT binary patch delta 2651 zcmb`HYg7|=8pi)KJ4gaZ6VRxr5F@B80(KRmg}_u%xyVf@AlIk}s1QWtDrORG1*rmR zYEaHX)C1UnAWA?(Vp7=>5pA%D2*@SMMY%{IP(gz1_@STn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3svk0+%`~E%r_U+rN7cX9H zrug9-`w!P@%ij$9UsUF^H1PlHuHO-(zMh1IU#!>hIyT!!iG5w z)(ubJgsN@W0c0EvU%<$8nsWzp#JRXsrfzN^qlQ(AI7J1YnJ(ME+4Wuu&+CIOR!^YJYB^s+383XdyFf~RnG79XL>J_YCAufPl1#K17 zgIz&eJMdXij|hqZaYQ{@e9+qw_1F>x9UW1RGiB1p5%mL^_<;$tzE=>pM;p)HICsxE z+1lEA_1(L7zkl$GYdSE4$(jAY!Gj00em&ec=YYr|xt$<^BkvgWs(&oAHc;I2hVR*` z-_{M5ve!9y^b{D_;x~K*mTDY01nLPZp^b`ymH&kce%051?d$K)mu>woYLT4!ZNkR( z^3sikzh2EUz@p!{n=bUlnI6M}y$D3^u0gA_5H8TR!KV=9u%B^?}jVt3!#ug2}? z^HSF)##cX{eLt>F^uh+^XMEotm)~D!_w&u?J8bOlb3Xn5b-H?ObIRYP2ZURWpXL7Z z^HF;#!=JCG{mtWJj$VCo|L?=ilNot-PL}844`@95@^;ftG0)So%>Pc`T)ihMH?Q{N z`;~{=b;JaI{CwGc)qVb__=dXJqEGdIt_EE-ezk7DmR-fGe`|$nA+`K2*%$DbKKZ~Axi+6^E5z~Lh$+q{t?|L;ygaHUVUHx3vIVCg! E0LrmE-2eap diff --git a/resources/assets/mekanism/lang/en_US.lang b/resources/assets/mekanism/lang/en_US.lang index 52dc30598..ceb0e1b95 100644 --- a/resources/assets/mekanism/lang/en_US.lang +++ b/resources/assets/mekanism/lang/en_US.lang @@ -67,6 +67,7 @@ tile.Transmitter.PressurizedTube.name=Pressurized Tube tile.Transmitter.UniversalCable.name=Universal Cable tile.Transmitter.MechanicalPipe.name=Mechanical Pipe tile.Transmitter.LogisticalTransporter.name=Logistical Transporter +tile.Transmitter.RestrictiveTransporter.name=Restrictive Transporter //Energy Cubes tile.EnergyCube.Basic.name=Basic Energy Cube diff --git a/resources/assets/mekanism/render/RestrictiveTransporter.png b/resources/assets/mekanism/render/Restrict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