Skip to content

Commit caa18fb

Browse files
committed
Fix #66: Pipes not rendering correctly after quitting and coming back to game
1 parent b1c0a6d commit caa18fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/dev/technici4n/moderndynamics/pipe/PipeBlockEntity.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ public void fromClientTag(CompoundTag tag) {
137137
host.readClientNbt(tag);
138138
}
139139

140-
if (tag.getBoolean("#c")) { // remesh flag, a bit hacky but it should work ;)
140+
// remesh flag, a bit hacky but it should work ;)
141+
// the second check ensures that the very first packet is processed even though it doesn't have the remesh flag
142+
if (tag.getBoolean("#c") || clientModelData == null) {
141143
var attachmentTags = tag.getList("attachments", Tag.TAG_COMPOUND);
142144
var attachments = new AttachmentModelData[6];
143145
for (var direction : Direction.values()) {

0 commit comments

Comments
 (0)