diff --git a/src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/ServerPastelNetwork.java b/src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/ServerPastelNetwork.java index d14059ed5d..7092fd54ed 100644 --- a/src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/ServerPastelNetwork.java +++ b/src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/ServerPastelNetwork.java @@ -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(); diff --git a/src/main/java/de/dafuqs/spectrum/blocks/pastel_network/nodes/PastelNodeBlockEntity.java b/src/main/java/de/dafuqs/spectrum/blocks/pastel_network/nodes/PastelNodeBlockEntity.java index e032f83206..ee87c137fd 100644 --- a/src/main/java/de/dafuqs/spectrum/blocks/pastel_network/nodes/PastelNodeBlockEntity.java +++ b/src/main/java/de/dafuqs/spectrum/blocks/pastel_network/nodes/PastelNodeBlockEntity.java @@ -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; @@ -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) { @@ -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 @@ -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) { @@ -368,7 +374,6 @@ public void readNbt(NbtCompound nbt) { if (this.getNodeType().usesFilters()) { FilterConfigurable.readFilterNbt(nbt, this.filterItems); } - updateUpgrades(); } @Override diff --git a/src/main/resources/assets/spectrum/textures/item/paltaeria_fragments.png b/src/main/resources/assets/spectrum/textures/item/paltaeria_fragments.png old mode 100644 new mode 100755 index 86700b95cb..847b5107cb Binary files a/src/main/resources/assets/spectrum/textures/item/paltaeria_fragments.png and b/src/main/resources/assets/spectrum/textures/item/paltaeria_fragments.png differ diff --git a/src/main/resources/assets/spectrum/textures/item/paltaeria_gem.png b/src/main/resources/assets/spectrum/textures/item/paltaeria_gem.png old mode 100644 new mode 100755 index 0d94d2feb4..ed72fb0c3a Binary files a/src/main/resources/assets/spectrum/textures/item/paltaeria_gem.png and b/src/main/resources/assets/spectrum/textures/item/paltaeria_gem.png differ diff --git a/src/main/resources/assets/spectrum/textures/item/stratine_fragments.png b/src/main/resources/assets/spectrum/textures/item/stratine_fragments.png old mode 100644 new mode 100755 index 007c26237b..c1c8ac5eeb Binary files a/src/main/resources/assets/spectrum/textures/item/stratine_fragments.png and b/src/main/resources/assets/spectrum/textures/item/stratine_fragments.png differ diff --git a/src/main/resources/assets/spectrum/textures/item/stratine_gem.png b/src/main/resources/assets/spectrum/textures/item/stratine_gem.png old mode 100644 new mode 100755 index 31099a1794..3b4a46a159 Binary files a/src/main/resources/assets/spectrum/textures/item/stratine_gem.png and b/src/main/resources/assets/spectrum/textures/item/stratine_gem.png differ