Merge branch 'master' of github.com:SirSengir/BuildCraft

This commit is contained in:
SirSengir 2012-11-17 09:13:39 +01:00
commit df4531e839
9 changed files with 20 additions and 26 deletions

View file

@ -1,8 +1,8 @@
/**
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
@ -395,7 +395,7 @@ public class TileFiller extends TileBuildCraft implements ISidedInventory, IPowe
public int getStartInventorySide(ForgeDirection side) {
if(side == ForgeDirection.UP)
return 0;
return 9;
return 9;
}
/**

View file

@ -170,7 +170,6 @@ public class TileRefinery extends TileMachine implements ITankContainer, IPowerR
return;
} else if (CoreProxy.proxy.isSimulating(worldObj) && updateNetworkTime.markTimeIfDelay(worldObj, 2 * BuildCraftCore.updateFactor)) {
System.out.printf("Server Anim state: %d %f\n", animationStage, animationSpeed);
sendNetworkUpdate();
}

View file

@ -325,14 +325,11 @@ public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInvent
}
}
for (ItemStack output : outputs) {
System.out.printf("Output stack is %s\n",output);
boolean putToPipe = Utils.addToRandomPipeEntry(this, ForgeDirection.UP, output);
if (!putToPipe)
{
System.out.println(output);
for (int i = 0; i < storageSlots.length; i++)
{
System.out.printf("%d: %s %s\n", i,output, storageSlots[i]);
if (output.stackSize <= 0) {
break;
}
@ -345,11 +342,8 @@ public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInvent
output.stackSize = 0;
}
} else if (storageSlots[i] == null) {
System.out.println(output);
storageSlots[i] = output.copy();
System.out.println(storageSlots[i]+":"+output);
output.stackSize = 0;
System.out.println(storageSlots[i]+":"+output);
}
}
if (output.stackSize > 0) {

View file

@ -62,7 +62,7 @@ public class PacketHandlerSilicon implements IPacketHandler {
private void onSelectionUpdate(EntityPlayer player, PacketUpdate packet) {
Container container = player.inventoryContainer;
Container container = player.openContainer;
if (container instanceof ContainerAssemblyTable) {
SelectionMessage message = new SelectionMessage();

View file

@ -16,6 +16,7 @@ import java.util.TreeMap;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftTransport;
import net.minecraftforge.common.ForgeDirection;
import buildcraft.api.tools.IToolWrench;
@ -581,7 +582,7 @@ public class BlockGenericPipe extends BlockContainer {
if (pipe != null) {
return pipe.getConstructor(int.class).newInstance(key);
} else {
System.err.printf("[BuildCraft] Detected pipe with unknown key (" + key + "). Did you remove a buildcraft addon?\n");
BuildCraftCore.bcLog.warning("Detected pipe with unknown key (" + key + "). Did you remove a buildcraft addon?");
}
} catch (Throwable t) {

View file

@ -31,10 +31,10 @@ public class GuiHandler implements IGuiHandler {
switch (ID) {
case GuiIds.PIPE_DIAMOND:
return new ContainerDiamondPipe(player.inventory, (PipeLogicDiamond)pipe.pipe.logic);
case GuiIds.GATES:
return new ContainerGateInterface(player.inventory, pipe.pipe);
default:
return null;
}
@ -57,10 +57,10 @@ public class GuiHandler implements IGuiHandler {
switch (ID) {
case GuiIds.PIPE_DIAMOND:
return new GuiDiamondPipe(player.inventory, pipe);
case GuiIds.GATES:
return new GuiGateInterface(player.inventory, pipe.pipe);
default:
return null;
}

View file

@ -184,7 +184,7 @@ public class PipeTransportPower extends PipeTransport {
internalPower = internalNextPower;
internalNextPower = next;
for (int i = 0; i < nextPowerQuery.length; i++) {
if (powerQuery[i] == 0.0d) {
if (powerQuery[i] == 0.0d && internalNextPower[i] > 0) {
internalNextPower[i]-=1;
}
}

View file

@ -374,7 +374,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank
initialize(BlockGenericPipe.createPipe(packet.getPipeId()));
}
renderState = packet.getRenderState();
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
return;
}
@ -621,7 +621,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank
}
break;
}
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
@Override

View file

@ -108,7 +108,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
/**
* Clears list of potential actions and refills it according to packet.
*
*
* @param packet
*/
public void updateActions(PacketUpdate packet) {
@ -123,7 +123,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
/**
* Clears list of potential triggers and refills it according to packet.
*
*
* @param packet
*/
public void updateTriggers(PacketUpdate packet) {
@ -136,7 +136,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
/**
* Sets the currently selected actions and triggers according to packet.
*
*
* @param packet
*/
public void setSelection(PacketUpdate packet) {
@ -260,7 +260,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
/**
* Sends the list of potential actions to the client
*
*
* @param player
*/
private void sendActions(EntityPlayer player) {
@ -281,7 +281,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
/**
* Sends the list of potential triggers to the client
*
*
* @param player
*/
private void sendTriggers(EntityPlayer player) {
@ -302,7 +302,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
/**
* Sends the current selection on the gate to the client.
*
*
* @param player
*/
public void sendSelection(EntityPlayer player) {