This commit is contained in:
Calclavia 2014-02-20 10:30:36 +08:00
commit 5adbe0d757
2 changed files with 371 additions and 376 deletions

View file

@ -36,6 +36,7 @@ import codechicken.multipart.MultiPartRegistry;
import codechicken.multipart.PartMap;
import codechicken.multipart.TSlottedPart;
import codechicken.multipart.TileMultipart;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -44,13 +45,13 @@ public class PartFramedWire extends PartFramedConnection<EnumWireMaterial, ICond
public PartFramedWire()
{
super();
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
breakIcon = RenderFramedWire.breakIcon;
}
public PartFramedWire(EnumWireMaterial type)
{
super();
breakIcon = RenderFramedWire.breakIcon;
this();
material = type;
}
@ -215,9 +216,7 @@ public class PartFramedWire extends PartFramedConnection<EnumWireMaterial, ICond
return null;
}
/**
* Shouldn't need to be overridden. Override connectionPrevented instead
*/
/** Shouldn't need to be overridden. Override connectionPrevented instead */
@Override
public boolean canConnect(ForgeDirection direction, Object obj)
{

View file

@ -32,6 +32,8 @@ import codechicken.multipart.PartMap;
import codechicken.multipart.TMultiPart;
import codechicken.multipart.TSlottedPart;
import codechicken.multipart.TileMultipart;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public abstract class PartFramedConnection<M extends Enum, C extends IConnector<N>, N extends INodeNetwork> extends PartColorableMaterial<M> implements IConnector<N>, TSlottedPart, JNormalOcclusion, IHollowConnect, JIconHitEffects
{
@ -69,6 +71,8 @@ public abstract class PartFramedConnection<M extends Enum, C extends IConnector<
/** Client Side */
private ForgeDirection testingSide;
@SideOnly(Side.CLIENT)
protected Icon breakIcon;
public void preparePlacement(int meta)
@ -318,10 +322,8 @@ public abstract class PartFramedConnection<M extends Enum, C extends IConnector<
tile().markRender();
}
/**
* Should include connections that are in the current connection maps even if those connections
* aren't allowed any more. This is so that networks split correctly.
*/
/** Should include connections that are in the current connection maps even if those connections
* aren't allowed any more. This is so that networks split correctly. */
@Override
public TileEntity[] getConnections()
{
@ -349,9 +351,7 @@ public abstract class PartFramedConnection<M extends Enum, C extends IConnector<
return connectionMapContainsSide(getAllCurrentConnections(), side);
}
/**
* Shouldn't need to be overridden. Override connectionPrevented instead
*/
/** Shouldn't need to be overridden. Override connectionPrevented instead */
@Override
public boolean canConnect(ForgeDirection direction, Object source)
{
@ -404,9 +404,7 @@ public abstract class PartFramedConnection<M extends Enum, C extends IConnector<
this.setNetwork(other.getNetwork());
}
/**
* Packet Methods
*/
/** Packet Methods */
public void sendConnectionUpdate()
{
tile().getWriteStream(this).writeByte(0).writeByte(this.currentWireConnections).writeByte(this.currentAcceptorConnections);
@ -449,9 +447,7 @@ public abstract class PartFramedConnection<M extends Enum, C extends IConnector<
}
}
/**
* Network Methods
*/
/** Network Methods */
@Override
public void setNetwork(N network)
{