fix: refresh provider connections when changing color (#145)

This commit is contained in:
Worive authored and GitHub committed 2026-10-03 21:37:22 +02:00
1 parent 680655b990
commit 740adb8f8e
1 file changed
+8 -4
@@ -211,15 +211,19 @@ public abstract class TileProviderBase extends AENetworkTile
* Sets the color of the provider. This does not set the isColorForced flag to true. * Sets the color of the provider. This does not set the isColorForced flag to true.
*/ */
protected void setProviderColor(final AEColor gridColor) { protected void setProviderColor(final AEColor gridColor) {
boolean colorChanged = this.getProxy().getColor() != gridColor;
// Set our color to match // Set our color to match
this.getProxy().setColor(gridColor); this.getProxy().setColor(gridColor);
// Are we server side? // Are we server side?
if (EffectiveSide.isServerSide()) { if (EffectiveSide.isServerSide()) {
/* if (colorChanged) {
* // Get the grid node IGridNode gridNode = this.getProxy().getNode(); // Do we have a grid node? if( IGridNode gridNode = this.getProxy().getNode();
* gridNode != null ) { // Update the grid node this.getProxy().getNode().updateState(); } if (gridNode != null) {
*/ gridNode.updateState();
}
}
// Mark the tile as needing updates and to be saved // Mark the tile as needing updates and to be saved
this.markForUpdate(); this.markForUpdate();