Skip to content

Commit

Permalink
Hanky jacks
Browse files Browse the repository at this point in the history
  • Loading branch information
DaFuqs committed Jan 14, 2025
1 parent 70f9a99 commit 127e40e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import de.dafuqs.spectrum.blocks.pastel_network.network.*;
import de.dafuqs.spectrum.helpers.*;
import de.dafuqs.spectrum.inventories.*;
import de.dafuqs.spectrum.networking.*;
import de.dafuqs.spectrum.progression.*;
import de.dafuqs.spectrum.registries.*;
import net.fabricmc.fabric.api.lookup.v1.block.*;
Expand Down Expand Up @@ -396,6 +397,11 @@ public Packet<ClientPlayPacketListener> toUpdatePacket() {

@Override
public NbtCompound toInitialChunkDataNbt() {
Optional<ServerPastelNetwork> network = getServerNetwork();
if (network.isPresent()) {
SpectrumS2CPacketSender.syncPastelNetworkEdges(network.get(), pos);
}

NbtCompound nbtCompound = new NbtCompound();
this.writeNbt(nbtCompound);
return nbtCompound;
Expand All @@ -405,7 +411,6 @@ public NbtCompound toInitialChunkDataNbt() {
@Override
public void markRemoved() {
super.markRemoved();
// Hanky jacks
if (!world.isClient()) {
Pastel.getServerInstance().removeNode(this, NodeRemovalReason.UNLOADED);
}
Expand Down

0 comments on commit 127e40e

Please sign in to comment.