Merge branch 'development'

This commit is contained in:
Ben Spiers 2014-09-07 00:27:45 +01:00
commit 2326048750
2 changed files with 18 additions and 2 deletions

View file

@ -692,7 +692,7 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti
{ {
TransporterUtils.incrementColor(this); TransporterUtils.incrementColor(this);
refreshConnections(); refreshConnections();
tile().notifyPartChange(this); tile().notifyTileChange();
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tile()), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tile()))); Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tile()), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tile())));
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleColor") + ": " + (color != null ? color.getName() : EnumColor.BLACK + MekanismUtils.localize("gui.none")))); player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleColor") + ": " + (color != null ? color.getName() : EnumColor.BLACK + MekanismUtils.localize("gui.none"))));

View file

@ -464,6 +464,16 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
protected void onRefresh() {} protected void onRefresh() {}
public void redstoneRefresh()
{
boolean nowPowered = redstoneReactive && world().isBlockIndirectlyGettingPowered(x(), y(), z());
if(nowPowered != redstonePowered)
{
refreshConnections();
}
}
public void refreshConnections() public void refreshConnections()
{ {
byte possibleTransmitters = getPossibleTransmitterConnections(); byte possibleTransmitters = getPossibleTransmitterConnections();
@ -486,7 +496,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
onRedstoneJoin(); onRedstoneJoin();
} }
tile().notifyPartChange(this); tile().notifyTileChange();
} }
} }
@ -529,6 +539,12 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
refreshConnections(); refreshConnections();
} }
@Override
public void onNeighborChanged()
{
redstoneRefresh();
}
@Override @Override
public void onPartChanged(TMultiPart part) public void onPartChanged(TMultiPart part)
{ {