Possible fixed for icon call server side in framed wire
This commit is contained in:
parent
5db13056dd
commit
0d3001b3fc
2 changed files with 371 additions and 376 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue