Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.20.1-aria-for-painters' into 1…
Browse files Browse the repository at this point in the history
….20.1-aria-for-painters
  • Loading branch information
DaFuqs committed Jan 22, 2025
2 parents 3d08c09 + e99c9d7 commit 18917b2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ public void incorporate(ServerPastelNetwork networkToIncorporate, PastelNodeBloc
networkToIncorporate.graph.edgeSet().forEach(edge -> {
graph.addEdge(networkToIncorporate.getGraph().getEdgeSource(edge), networkToIncorporate.getGraph().getEdgeTarget(edge));
});
addNode(node);
addNode(otherNode);
addEdge(node, otherNode);

this.transmissionLogic.invalidateCache();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class PastelNodeBlockEntity extends BlockEntity implements FilterConfigur
protected long itemCountUnderway = 0;

// upgrade impl stuff
protected boolean lit, triggerTransfer, triggered, waiting, lamp, sensor;
protected boolean lit, triggerTransfer, triggered, waiting, lamp, sensor, updated;
protected int transferCount = PastelTransmissionLogic.DEFAULT_MAX_TRANSFER_AMOUNT;
protected int transferTime = PastelTransmissionLogic.DEFAULT_TRANSFER_TICKS_PER_NODE;
protected int filterSlotRows = DEFAULT_FILTER_SLOT_ROWS;
Expand Down Expand Up @@ -136,6 +136,10 @@ public static void tick(@NotNull World world, BlockPos pos, BlockState state, Pa
if (node.spinTicks > 0)
node.spinTicks--;
}
else if(!node.updated) {
node.updateUpgrades();
node.updated = true;
}
}

public void changeState(State state) {
Expand Down Expand Up @@ -219,6 +223,7 @@ public void updateUpgrades() {
lit = false;
lamp = false;
sensor = false;
var oldPriority = priority;
priority = PastelNetwork.NodePriority.GENERIC;

//First one processed can't compound because it has nothing to compound on
Expand All @@ -235,9 +240,10 @@ public void updateUpgrades() {
lit = false;
}

if (world != null && getCachedState().get(Properties.LIT) != lit) {
networkUUID.ifPresent(uuid -> ServerPastelNetworkManager.get((ServerWorld) world).getNetwork(uuid));
world.setBlockState(pos, getCachedState().with(Properties.LIT, lit));
if (world != null) {
networkUUID.ifPresent(uuid -> ServerPastelNetworkManager.get((ServerWorld) world).getNetwork(uuid).ifPresent(n -> n.updateNodePriority(this, oldPriority)));
if (getCachedState().get(Properties.LIT) != lit)
world.setBlockState(pos, getCachedState().with(Properties.LIT, lit));
}

if (filterSlotRows < oldFilterSlotCount) {
Expand Down Expand Up @@ -368,7 +374,6 @@ public void readNbt(NbtCompound nbt) {
if (this.getNodeType().usesFilters()) {
FilterConfigurable.readFilterNbt(nbt, this.filterItems);
}
updateUpgrades();
}

@Override
Expand Down
Binary file modified src/main/resources/assets/spectrum/textures/item/paltaeria_fragments.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/spectrum/textures/item/paltaeria_gem.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/spectrum/textures/item/stratine_fragments.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/spectrum/textures/item/stratine_gem.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 18917b2

Please sign in to comment.