3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/controls/renderers/MinecraftUICustomRenderer.h"
7#include "mc/client/renderer/chunks/RenderChunkSorter.h"
8#include "mc/deps/application/AppPlatformListener.h"
9#include "mc/deps/core/math/Vec2.h"
10#include "mc/deps/core/math/Vec3.h"
11#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
12#include "mc/world/level/BlockChangedEventTarget.h"
13#include "mc/world/level/BlockPos.h"
14#include "mc/world/level/BlockSourceListener.h"
15#include "mc/world/level/Tick.h"
16#include "mc/world/phys/AABB.h"
51 ::ll::TypedStorage<1, 1, bool> mInitialize;
52 ::ll::TypedStorage<1, 1, bool> mListenerInitialized;
53 ::ll::TypedStorage<1, 1, bool> mRendered;
54 ::ll::TypedStorage<4, 8, ::Vec2> mRotation;
55 ::ll::TypedStorage<4, 24, ::AABB> mLastArea;
56 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::IRenderChunkGarbage>> mGarbage;
57 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RenderChunkBuilder>> mChunkBuilder;
58 ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::std::unique_ptr<::RenderChunkInstanced>>>
59 mRenderChunkInstances;
60 ::ll::TypedStorage<8, 8, ::Tick> mRenderTick;
61 ::ll::TypedStorage<4, 8, ::Vec2> mLastSortRotation;
62 ::ll::TypedStorage<4, 12, ::Vec3> mSortingCameraPos;
63 ::ll::TypedStorage<1, 1, bool> mResort;
64 ::ll::TypedStorage<8, 8, ::BlockSource*> mUnsafeSourcePointer;
65 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RenderChunkSorterSharedInfo>> mSharedSortInfo;
66 ::ll::TypedStorage<8, 448, ::RenderChunkSorter> mChunkSorter;
67 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mAxesMaterial;
73 virtual ~StructureVolumeRenderer() ;
75 virtual ::std::shared_ptr<::UICustomRenderer> clone() const ;
78 ::MinecraftUIRenderContext& renderContext,
79 ::IClientInstance& client,
84 virtual
void onSourceDestroyed(::BlockSource& source) ;
86 virtual
void onBlockChanged(
87 ::BlockSource& source,
88 ::BlockPos const& pos,
91 ::Block const& oldBlock,
93 ::ActorBlockSyncMessage const* syncMsg,
94 ::BlockChangedEventTarget eventTarget,
95 ::Actor* blockChangeSource
98 virtual
void onAppResumed() ;
100 virtual
void onAppSuspended() ;
106 MCAPI StructureVolumeRenderer();
108 MCAPI ::BlockPos _getBlockPosition(::UIPropertyBag const& bag) const;
110 MCAPI ::RenderChunkInstanced& _getRenderChunkInstanced(::BlockPos const& chunkPos);
112 MCAPI ::AABB _getStructureArea(::UIPropertyBag const& bag) const;
114 MCAPI
void _initializeChunkBuilder(
115 ::ClientBlockPipeline::TessellatorContext& pipelineContext,
116 ::BlockSource& region,
117 ::Tessellator& tessellator,
121 MCAPI
void _onAreaChanged(::AABB const& newArea);
124 ::MinecraftUIRenderContext& renderContext,
125 ::BlockSource& region,
126 ::IClientInstance& client,
131 ::UIActorOffscreenCaptureDescription,
132 ::UIThumbnailMeshOffscreenCaptureDescription,
133 ::UIMeshOffscreenCaptureDescription,
134 ::UIStructureVolumeOffscreenCaptureDescription> const& captureDescription,
135 ::std::optional<::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo> requestInfo
138 MCAPI
void _renderAxisHelpers(::ScreenContext& screenContext, ::UIControl const& owner) const;
140 MCAPI
bool _renderBlockEntities(
141 ::BaseActorRenderContext& renderContext,
142 ::BlockSource& region,
144 bool renderAlphaLayer
147 MCAPI
bool _renderBlocks(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area);
150 _renderEntities(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area) const;
152 MCAPI
bool _renderPlayers(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area) const;
154 MCAPI
bool _renderStructureWireframes(
155 ::BaseActorRenderContext& renderContext,
156 ::IClientInstance const& clientInstance,
157 ::BlockPos const& blockPos
160 MCAPI
void _renderThumbnailOffscreen(
161 ::MinecraftUIRenderContext& renderContext,
162 ::BlockSource& region,
163 ::IClientInstance& client,
166 ::UIActorOffscreenCaptureDescription,
167 ::UIThumbnailMeshOffscreenCaptureDescription,
168 ::UIMeshOffscreenCaptureDescription,
169 ::UIStructureVolumeOffscreenCaptureDescription> const& captureDescription,
170 ::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo const& requestInfo
173 MCAPI
void _updatePreviewRotation(::UIControl& owner,
float dt);
179 MCFOLD static ::std::vector<::BlockPos> _generateChunkStartPositions(::AABB const& area);
181 MCAPI static
void _iterateOverBlockEntities(
182 ::BlockSource& region,
184 ::std::function<
void(::BlockActor&)> const& processBlockActor
203 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
206 $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner,
int pass);
208 MCAPI
void $onSourceDestroyed(::BlockSource& source);
210 MCAPI
void $onBlockChanged(
211 ::BlockSource& source,
212 ::BlockPos const& pos,
214 ::Block const& block,
215 ::Block const& oldBlock,
217 ::ActorBlockSyncMessage const* syncMsg,
218 ::BlockChangedEventTarget eventTarget,
219 ::Actor* blockChangeSource
222 MCAPI
void $onAppResumed();
224 MCAPI
void $onAppSuspended();
Definition BaseActorRenderContext.h:5
Definition BlockActor.h:30
Definition BlockSourceListener.h:18
Definition BlockSource.h:71
Definition TessellatorContext.h:7
Definition IClientInstance.h:5
Definition IRenderChunkGarbage.h:5
Definition MinecraftUICustomRenderer.h:5
Definition MinecraftUIRenderContext.h:5
Definition RenderChunkBuilder.h:5
Definition RenderChunkInstanced.h:5
Definition RenderChunkSorterSharedInfo.h:5
Definition ScreenContext.h:5
Definition StructureVolumeRenderer.h:5
static MCAPI void ** $vftableForAppPlatformListener()
static MCAPI void ** $vftableForMinecraftUICustomRenderer()
static MCAPI void ** $vftableForBlockSourceListener()
Definition Tessellator.h:5
Definition UICustomRenderer.h:5
Definition UIPropertyBag.h:5
Definition ActorBlockSyncMessage.h:8
Definition UIActorOffscreenCaptureDescription.h:5
Definition UIMeshOffscreenCaptureDescription.h:5
Definition UIStructureVolumeOffscreenCaptureDescription.h:5
Definition UIThumbnailMeshOffscreenCaptureDescription.h:5
Definition StructureVolumeCaptureRequestInfo.h:7