File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/main/java/aztech/modern_industrialization/machines/multiblocks Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 2323 */
2424package aztech .modern_industrialization .machines .multiblocks ;
2525
26+ import aztech .modern_industrialization .machines .multiblocks .structure .member .StructureMember ;
2627import aztech .modern_industrialization .machines .multiblocks .world .ChunkEventListener ;
2728import aztech .modern_industrialization .machines .multiblocks .world .ChunkEventListeners ;
2829import java .util .ArrayList ;
@@ -247,9 +248,14 @@ public int buildMultiblock(Level level) {
247248 int setBlocks = 0 ;
248249
249250 for (var entry : simpleMembers .entrySet ()) {
250- var current = level .getBlockState (entry .getKey ()); // TODO SWEDZ: account for rotation
251+ BlockPos pos = entry .getKey ();
252+ var current = level .getBlockState (pos );
251253 if (!entry .getValue ().matchesState (current )) {
252- level .setBlockAndUpdate (entry .getKey (), entry .getValue ().getPreviewState ()); // TODO SWEDZ: account for rotation
254+ BlockState state = entry .getValue ().getPreviewState ();
255+ if (entry .getValue () instanceof StructureMember ) {
256+ state = toWorldState (level , pos , state , controllerDirection );
257+ }
258+ level .setBlockAndUpdate (pos , state );
253259 ++setBlocks ;
254260 }
255261 }
You can’t perform that action at this time.
0 commit comments