Cherry pick: Fix not sending tile updates
Conflicts: src/main/java/mekanism/common/multipart/PartSidedPipe.java
This commit is contained in:
parent
cb1a40a137
commit
c178f471f4
2 changed files with 18 additions and 2 deletions
|
@ -692,7 +692,7 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti
|
|||
{
|
||||
TransporterUtils.incrementColor(this);
|
||||
refreshConnections();
|
||||
tile().notifyPartChange(this);
|
||||
tile().notifyTileChange();
|
||||
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"))));
|
||||
|
||||
|
|
|
@ -464,6 +464,16 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
|
||||
protected void onRefresh() {}
|
||||
|
||||
public void redstoneRefresh()
|
||||
{
|
||||
boolean nowPowered = redstoneReactive && world().isBlockIndirectlyGettingPowered(x(), y(), z());
|
||||
|
||||
if(nowPowered != redstonePowered)
|
||||
{
|
||||
refreshConnections();
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshConnections()
|
||||
{
|
||||
byte possibleTransmitters = getPossibleTransmitterConnections();
|
||||
|
@ -486,7 +496,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
onRedstoneJoin();
|
||||
}
|
||||
|
||||
tile().notifyPartChange(this);
|
||||
tile().notifyTileChange();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -529,6 +539,12 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
refreshConnections();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborChanged()
|
||||
{
|
||||
redstoneRefresh();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPartChanged(TMultiPart part)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue