Skip to content

Commit

Permalink
Merge remote-tracking branch 'arasium/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
tcooc committed Dec 18, 2013
2 parents ad7bb9c + 4594f98 commit 7372f7b
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 39 deletions.
2 changes: 1 addition & 1 deletion BuildCraft
Submodule BuildCraft updated 168 files
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
## Update of Additional Pipes for BC3+ and Minecraft 1.5+
## Update of Additional Pipes for BC4.2.1+ and Minecraft 1.6.4

### Cloning and Compiling ###

Windows

REM (optional) SET AP_VERSION=... and BC_VERSION=... to set versions
git clone https://github.com/tcooc/AdditionalPipesBC.git
git clone https://github.com/arasium/AdditionalPipesBC.git
cd AdditionalPipesBC
build.bat

Linux

# (optional) export AP_VERSION=... and export BC_VERSION=... to set versions
git clone https://github.com/tcooc/AdditionalPipesBC.git
git clone https://github.com/arasium/AdditionalPipesBC.git
cd AdditionalPipesBC
./build.sh

Compiled binaries can be found in `BuildCraft/bin/ap`.

### Download: [latest releases](https://github.com/tcooc/AdditionalPipesBC/releases), ([BuildCraft 4.0.2 and earlier](https://www.dropbox.com/sh/0hc1l4bn4dvjlni/t82-3--LmE)) ####
### Download: [latest releases](https://github.com/arasium/AdditionalPipesBC/releases), ([BuildCraft 4.2.1](http://minecraft.curseforge.com/mc-mods/buildcraft/files/10-build-craft-4-2-1/)) ####
To install, place in the standard minecraft/mods folder.
REQUIRE Forge 650+, BC 3.5.0, See also Logistics Pipes for 1.5.1
REQUIRE Forge 953+, BC 4.2.1, See also Logistics Pipes for 1.5.1
### Credits to Zeldo, DaStormBringer, Kyprus, tcooc, gejzer for their work on the mod.

1.2.5 Thread: http://www.minecraftforum.net/topic/856360-125bc2214-bc315rev213rev310-additional-pipes-for-buildcraft-teleport-pipes/
Expand Down
11 changes: 1 addition & 10 deletions additionalpipes/gui/GuiTeleportPipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public String getTooltip() {
private final GuiButton[] buttons = new GuiButton[8];

public GuiTeleportPipe(EntityPlayer player, PipeTeleport pipe) {
super(new ContainerTeleportPipe(player, pipe), null);
super(new ContainerTeleportPipe(player, pipe), null, Textures.GUI_TELEPORT);
this.pipe = pipe;
container = (ContainerTeleportPipe) inventorySlots;
xSize = 228;
Expand Down Expand Up @@ -172,15 +172,6 @@ protected void actionPerformed(GuiButton guibutton) {
PacketDispatcher.sendPacketToServer(packet.makePacket());
}

@Override
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(Textures.GUI_TELEPORT);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
}

@Override
protected void initLedgers(IInventory inventory) {
super.initLedgers(inventory);
Expand Down
38 changes: 17 additions & 21 deletions additionalpipes/pipes/PipeItemsTeleport.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
import buildcraft.transport.PipeTransportItems;
import buildcraft.transport.TileGenericPipe;
import buildcraft.transport.TravelingItem;
import buildcraft.transport.pipes.events.PipeEventItem;
import buildcraft.transport.utils.TransportUtils;

public class PipeItemsTeleport extends PipeTeleport implements IPipeTransportItemsHook {
public class PipeItemsTeleport extends PipeTeleport {
private static final int ICON = 0;

private final PipeTransportItems transport;
Expand All @@ -29,22 +30,13 @@ public PipeItemsTeleport(int itemID) {
super(new PipeTransportItems(), itemID);
transport = (PipeTransportItems) super.transport;
}

@Override
public void readjustSpeed(TravelingItem item) {
transport.defaultReajustSpeed(item);
}

@Override
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, TravelingItem item) {
return possibleOrientations;
}

@Override
public void entityEntered(TravelingItem item, ForgeDirection orientation) {
if(!AdditionalPipes.proxy.isServer(getWorld())) {

public void eventHandler(PipeEventItem.Entered event)
{
/*if(!AdditionalPipes.proxy.isServer(getWorld())) {
return;
}
}*/

List<PipeTeleport> connectedTeleportPipes = TeleportManager.instance.getConnectedPipes(this, false);
// no teleport pipes connected, use default
if(connectedTeleportPipes.size() <= 0 || (state & 0x1) == 0) {
Expand All @@ -71,11 +63,15 @@ public void entityEntered(TravelingItem item, ForgeDirection orientation) {
if(destination == null) {
return;
}

item.setPosition(container.xCoord + 0.5, container.yCoord + TransportUtils.getPipeFloorOf(item.getItemStack()), container.zCoord + 0.5);
((PipeTransportItems) destination.pipe.transport).injectItem(item, newOrientation);

AdditionalPipes.instance.logger.info(item + " from " + getPosition() + " to " + otherPipe.getPosition() + " " + newOrientation);

Position insertPoint = new Position(destination.xCoord + 0.5, destination.yCoord + TransportUtils.getPipeFloorOf(event.item.getItemStack()), destination.zCoord + 0.5, newOrientation.getOpposite());
insertPoint.moveForwards(0.5);
event.item.setPosition(insertPoint.x, insertPoint.y, insertPoint.z);

((PipeTransportItems) destination.pipe.transport).injectItem(event.item, newOrientation);

AdditionalPipes.instance.logger.info(event.item + " from " + getPosition() + " to " + otherPipe.getPosition() + " " + newOrientation);
event.cancelled = true;
}

@Override
Expand Down
1 change: 1 addition & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
git submodule update --init
cscript patchbuild.vbs > BuildCraft/build-patched.xml
ant
12 changes: 12 additions & 0 deletions build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/bin/bash

git submodule update --init

IFS=''
while read line; do
echo "$line"
if [[ "$line" = " <unzip dest=\"\${forge.dir}/..\" src=\"\${download.dir}/\${forge.name}\"/>" ]]; then
echo " <!-- Fix library URLs -->"
echo " <replace file=\"\${forge.dir}/fml/fml.py\" token=\"default_url = 'http://s3.amazonaws.com/Minecraft.Download/libraries'\" value=\"default_url = 'https://libraries.minecraft.net'\"/>"
echo " <replace file=\"\${forge.dir}/fml/fml.py\" token=\"base_url = 'http://s3.amazonaws.com/Minecraft.Resources'\" value=\"base_url = 'http://resources.download.minecraft.net'\"/>"

fi
done < BuildCraft/build.xml | sed 's/9.11.1.949/9.11.1.953/' > BuildCraft/build-patched.xml

ant
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!-- build BuildCraft -->
<target name="buildcraft">
<ant antfile="BuildCraft/build.xml" useNativeBasedir="true" inheritAll="false" />
<ant antfile="BuildCraft/build-patched.xml" useNativeBasedir="true" inheritAll="false" />
</target>

<target name="clean">
Expand Down
20 changes: 20 additions & 0 deletions patchbuild.vbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("BuildCraft/build.xml", ForReading)

Const ForReading = 1
Dim line
Do Until objFile.AtEndOfStream
line = objFile.ReadLine
IF line = " <property name=""forge.version"" value=""9.11.1.949""/>"
WScript.Echo " <property name=""forge.version"" value=""9.11.1.953""/>"
ELSE
WScript.Echo line
END IF

IF line = " <unzip dest=""${forge.dir}/.."" src=""${download.dir}/${forge.name}""/>"
WScript.Echo " <!-- Fix library URLs -->"
WScript.Echo " <replace file=""${forge.dir}/fml/fml.py"" token=""default_url = 'http://s3.amazonaws.com/Minecraft.Download/libraries'"" value=""default_url = 'https://libraries.minecraft.net'""/>"
WScript.Echo " <replace file=""${forge.dir}/fml/fml.py"" token=""base_url = 'http://s3.amazonaws.com/Minecraft.Resources'"" value=""base_url = 'http://resources.download.minecraft.net'""/>"
END IF
Loop
objFile.Close
2 changes: 1 addition & 1 deletion resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"modid": "APUnofficial",
"name": "Additional Pipes",
"version": "@AP_VERSION@",
"url": "https://github.com/tcooc/AdditionalPipesBC/",
"url": "https://github.com/arasium/AdditionalPipesBC/",
"updateUrl": "",
"description": "Teleport, insertion, extraction, and other pipes.",
"credits": "Credits to Zeldo, DaStormBringer, and Kyprus.",
Expand Down

0 comments on commit 7372f7b

Please sign in to comment.