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
float _getAndResetFloatValue(::UIPropertyBag& bag, ::std::
string const& key) const;
110 MCAPI ::BlockPos _getBlockPosition(::UIPropertyBag const& bag) const;
112 MCAPI ::RenderChunkInstanced& _getRenderChunkInstanced(::BlockPos const& chunkPos);
114 MCAPI ::AABB _getStructureArea(::UIPropertyBag const& bag) const;
116 MCAPI
void _initializeChunkBuilder(
117 ::ClientBlockPipeline::TessellatorContext& pipelineContext,
118 ::BlockSource& region,
119 ::Tessellator& tessellator,
123 MCAPI
void _onAreaChanged(::AABB const& newArea);
126 ::MinecraftUIRenderContext& renderContext,
127 ::BlockSource& region,
128 ::IClientInstance& client,
130 int captureDescription,
133 ::UIActorOffscreenCaptureDescription,
134 ::UIThumbnailMeshOffscreenCaptureDescription,
135 ::UIMeshOffscreenCaptureDescription,
136 ::UIStructureVolumeOffscreenCaptureDescription> const& requestInfo,
137 ::std::optional<::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo>
140 MCAPI
void _renderAxisHelpers(::ScreenContext& screenContext, ::UIControl const& owner) const;
142 MCAPI
bool _renderBlocks(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area);
145 _renderEntities(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area) const;
147 MCAPI
bool _renderPlayers(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area) const;
149 MCAPI
bool _renderStructureWireframes(
150 ::BaseActorRenderContext& renderContext,
151 ::IClientInstance const& clientInstance,
152 ::BlockPos const& blockPos
155 MCAPI
void _renderThumbnailOffscreen(
156 ::MinecraftUIRenderContext& renderContext,
157 ::BlockSource& region,
158 ::IClientInstance& client,
161 ::UIActorOffscreenCaptureDescription,
162 ::UIThumbnailMeshOffscreenCaptureDescription,
163 ::UIMeshOffscreenCaptureDescription,
164 ::UIStructureVolumeOffscreenCaptureDescription> const& captureDescription,
165 ::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo const& requestInfo
168 MCAPI
void _updatePreviewRotation(::UIControl& owner,
float dt);
170 MCAPI
void offscreenThumbnailCapture(
171 ::MinecraftUIRenderContext& renderContext,
172 ::BlockSource& region,
173 ::IClientInstance& client,
176 ::UIActorOffscreenCaptureDescription,
177 ::UIThumbnailMeshOffscreenCaptureDescription,
178 ::UIMeshOffscreenCaptureDescription,
179 ::UIStructureVolumeOffscreenCaptureDescription> const& captureDescription,
180 ::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo requestInfo
187 MCFOLD static ::std::vector<::BlockPos> _generateChunkStartPositions(::AABB const& area);
189 MCAPI static
void _iterateOverBlockEntities(
190 ::BlockSource& region,
192 ::std::function<
void(::BlockActor&)> const& processBlockActor
211 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
214 $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner,
int pass);
216 MCAPI
void $onSourceDestroyed(::BlockSource& source);
218 MCAPI
void $onBlockChanged(
219 ::BlockSource& source,
220 ::BlockPos const& pos,
222 ::Block const& block,
223 ::Block const& oldBlock,
225 ::ActorBlockSyncMessage const* syncMsg,
226 ::BlockChangedEventTarget eventTarget,
227 ::Actor* blockChangeSource
230 MCFOLD
void $onAppResumed();
232 MCAPI
void $onAppSuspended();
Definition BaseActorRenderContext.h:5
Definition BlockActor.h:30
Definition BlockSourceListener.h:18
Definition BlockSource.h:73
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