diff --git a/src/main/java/com/ldtteam/structurize/client/BlueprintRenderer.java b/src/main/java/com/ldtteam/structurize/client/BlueprintRenderer.java index bf44ec7b2..7c20669aa 100644 --- a/src/main/java/com/ldtteam/structurize/client/BlueprintRenderer.java +++ b/src/main/java/com/ldtteam/structurize/client/BlueprintRenderer.java @@ -123,6 +123,7 @@ private void init(final BlueprintPreviewData previewData, final Map b.subtract(worldPos))); } else if (state.getBlock() == ModBlocks.blockFluidSubstitution.get()) @@ -72,4 +81,14 @@ else if (state.getBlock() == ModBlocks.blockTagSubstitution.get()) return state; } + + /** + * Set the solid placeholder blockstate override, only updates when the renderer is recalculated + * + * @return + */ + public void setSolidSubstitutionOverride(final BlockState solidSubstitutionOverride) + { + this.solidSubstitutionOverride = solidSubstitutionOverride; + } } diff --git a/src/main/java/com/ldtteam/structurize/storage/rendering/types/BlueprintPreviewData.java b/src/main/java/com/ldtteam/structurize/storage/rendering/types/BlueprintPreviewData.java index e55adc19c..eaff29646 100644 --- a/src/main/java/com/ldtteam/structurize/storage/rendering/types/BlueprintPreviewData.java +++ b/src/main/java/com/ldtteam/structurize/storage/rendering/types/BlueprintPreviewData.java @@ -14,6 +14,7 @@ import net.minecraft.util.Mth; import net.minecraft.world.level.block.Mirror; import net.minecraft.world.level.block.Rotation; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import org.jetbrains.annotations.Nullable; @@ -77,6 +78,11 @@ public class BlueprintPreviewData */ private boolean renderBlocksNice = Structurize.getConfig().getClient() != null && Structurize.getConfig().getClient().renderPlaceholdersNice.get(); + /** + * Override blockstate for solid placeholders + */ + private BlockState solidSubstitutionOverride = null; + /** * Default constructor to create a new setup. */ @@ -429,4 +435,24 @@ public float getOverridePreviewTransparency() { return overridePreviewTransparency; } + + /** + * Get the solid placeholder blockstate override + * + * @return + */ + public BlockState getSolidSubstitutionOverride() + { + return solidSubstitutionOverride; + } + + /** + * Set the solid placeholder blockstate override, only updates when the renderer is recalculated + * + * @return + */ + public void setSolidSubstitutionOverride(final BlockState solidSubstitutionOverride) + { + this.solidSubstitutionOverride = solidSubstitutionOverride; + } }