File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
src/main/java/dev/technici4n/moderndynamics/pipe Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -136,18 +136,20 @@ public void fromClientTag(CompoundTag tag) {
136136 for (var host : getHosts ()) {
137137 host .readClientNbt (tag );
138138 }
139- var attachmentTags = tag .getList ("attachments" , Tag .TAG_COMPOUND );
140- var attachments = new AttachmentModelData [6 ];
141- for (var direction : Direction .values ()) {
142- var attachmentTag = attachmentTags .getCompound (direction .get3DDataValue ());
143- attachments [direction .get3DDataValue ()] = AttachmentModelData .from (attachmentTag );
144- }
145139
146- clientModelData = new PipeModelData (connections , inventoryConnections , attachments );
147- clientSideConnections = connections | inventoryConnections ;
140+ if (tag .getBoolean ("#c" )) { // remesh flag, a bit hacky but it should work ;)
141+ var attachmentTags = tag .getList ("attachments" , Tag .TAG_COMPOUND );
142+ var attachments = new AttachmentModelData [6 ];
143+ for (var direction : Direction .values ()) {
144+ var attachmentTag = attachmentTags .getCompound (direction .get3DDataValue ());
145+ attachments [direction .get3DDataValue ()] = AttachmentModelData .from (attachmentTag );
146+ }
148147
149- updateCachedShape (connections , inventoryConnections );
148+ clientModelData = new PipeModelData (connections , inventoryConnections , attachments );
149+ clientSideConnections = connections | inventoryConnections ;
150150
151+ updateCachedShape (connections , inventoryConnections );
152+ }
151153 }
152154
153155 @ Override
You can’t perform that action at this time.
0 commit comments