@@ -105,8 +105,9 @@ public void updateBlueprint(final BlueprintPreviewData previewData)
105105 }
106106 }
107107
108- private void init (final Blueprint blueprint , final Map <Object , Exception > suppressedExceptions , final BlueprintPreviewData previewData )
108+ private void init (final BlueprintPreviewData previewData , final Map <Object , Exception > suppressedExceptions )
109109 {
110+ final Blueprint blueprint = previewData .getBlueprint ();
110111 final BlockRenderDispatcher blockRenderer = Minecraft .getInstance ().getBlockRenderer ();
111112 final RandomSource random = RandomSource .create ();
112113
@@ -130,7 +131,7 @@ private void init(final Blueprint blueprint, final Map<Object, Exception> suppre
130131 final BlockPos blockPos = blockInfo .getPos ();
131132 BlockState state = blockInfo .getState ();
132133 // specially handle blockTagSub here cuz of block entity changes
133- if (Structurize . getConfig (). getClient (). renderPlaceholdersNice . get () && state .getBlock () == ModBlocks .blockTagSubstitution .get ())
134+ if (previewData . getRenderBlocksNice () && state .getBlock () == ModBlocks .blockTagSubstitution .get ())
134135 {
135136 if (tileEntitiesMap .remove (blockPos ) instanceof final BlockEntityTagSubstitution tagTE )
136137 {
@@ -150,7 +151,7 @@ private void init(final Blueprint blueprint, final Map<Object, Exception> suppre
150151 }
151152 else
152153 {
153- state = blockAccess .prepareBlockStateForRendering (state , blockPos );
154+ state = blockAccess .prepareBlockStateForRendering (state , blockPos , previewData );
154155 }
155156
156157 final FluidState fluidState = state .getFluidState ();
@@ -309,7 +310,7 @@ public Map<Object, Exception> drawUnsafe(final BlueprintPreviewData previewData,
309310 // init
310311 if (vertexBuffers == null )
311312 {
312- init (previewData . getBlueprint () , suppressedExceptions , previewData );
313+ init (previewData , suppressedExceptions );
313314 }
314315
315316 profiler .popPush ("struct_render_prepare" );
@@ -634,11 +635,15 @@ public static void apply(final float overrideValue)
634635 }
635636
636637 float alpha = Structurize .getConfig ().getClient ().rendererTransparency .get ().floatValue ();
638+ if (overrideValue != -1 )
639+ {
640+ alpha = Mth .clamp (overrideValue , 0 , 1 );
641+ }
642+
637643 if (alpha < 0 || alpha > THRESHOLD )
638644 {
639645 return ;
640646 }
641- alpha = overrideValue < 0 ? alpha : Mth .clamp (overrideValue , 0 , 1 );
642647
643648 applied = true ;
644649
0 commit comments