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"
47 ::ll::TypedStorage<1, 1, bool> mInitialize;
48 ::ll::TypedStorage<1, 1, bool> mListenerInitialized;
49 ::ll::TypedStorage<1, 1, bool> mRendered;
50 ::ll::TypedStorage<4, 8, ::Vec2> mRotation;
51 ::ll::TypedStorage<4, 24, ::AABB> mLastArea;
52 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::IRenderChunkGarbage>> mGarbage;
53 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RenderChunkBuilder>> mChunkBuilder;
54 ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::std::unique_ptr<::RenderChunkInstanced>>>
55 mRenderChunkInstances;
56 ::ll::TypedStorage<8, 8, ::Tick> mRenderTick;
57 ::ll::TypedStorage<4, 8, ::Vec2> mLastSortRotation;
58 ::ll::TypedStorage<4, 12, ::Vec3> mSortingCameraPos;
59 ::ll::TypedStorage<1, 1, bool> mResort;
60 ::ll::TypedStorage<8, 8, ::BlockSource*> mUnsafeSourcePointer;
61 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RenderChunkSorterSharedInfo>> mSharedSortInfo;
62 ::ll::TypedStorage<8, 448, ::RenderChunkSorter> mChunkSorter;
63 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mAxesMaterial;
69 virtual ~StructureVolumeRenderer() =
default;
71 virtual ::std::shared_ptr<::UICustomRenderer> clone() const ;
74 ::MinecraftUIRenderContext& renderContext,
75 ::IClientInstance& client,
80 virtual
void onSourceDestroyed(::BlockSource& source) ;
82 virtual
void onBlockChanged(
83 ::BlockSource& source,
84 ::BlockPos const& pos,
87 ::Block const& oldBlock,
89 ::ActorBlockSyncMessage const* syncMsg,
90 ::BlockChangedEventTarget eventTarget,
91 ::Actor* blockChangeSource
94 virtual
void onAppResumed() ;
96 virtual
void onAppSuspended() ;
102 MCAPI StructureVolumeRenderer();
104 MCAPI
void _initializeChunkBuilder(
105 ::ClientBlockPipeline::TessellatorContext& pipelineContext,
106 ::BlockSource& region,
107 ::Tessellator& tessellator,
111 MCAPI
void _onAreaChanged(::AABB const& newArea);
114 ::MinecraftUIRenderContext& renderContext,
115 ::BlockSource& region,
116 ::IClientInstance& client,
119 ::OffscreenCaptureDescription const& captureDescription,
120 ::std::optional<::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo> requestInfo
123 MCAPI
bool _renderBlocks(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area);
125 MCAPI
void _renderThumbnailOffscreen(
126 ::MinecraftUIRenderContext& renderContext,
127 ::BlockSource& region,
128 ::IClientInstance& client,
129 ::OffscreenCaptureDescription const& captureDescription,
130 ::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo const& requestInfo
137 MCAPI static ::std::vector<::BlockPos> _generateChunkStartPositions(::AABB const& area);
139 MCAPI static
float _getAndResetFloatValue(::UIPropertyBag& bag, ::std::
string const& key);
141 MCAPI static
void _iterateOverBlockEntities(
142 ::BlockSource& region,
144 ::std::function<
void(::IVanillaRenderBlockActorComponent&)> const& processBlockActor
157 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
160 $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner,
int pass);
162 MCAPI
void $onSourceDestroyed(::BlockSource& source);
164 MCAPI
void $onBlockChanged(
165 ::BlockSource& source,
166 ::BlockPos const& pos,
168 ::Block const& block,
169 ::Block const& oldBlock,
171 ::ActorBlockSyncMessage const* syncMsg,
172 ::BlockChangedEventTarget eventTarget,
173 ::Actor* blockChangeSource
176 MCAPI
void $onAppResumed();
178 MCAPI
void $onAppSuspended();
Definition BaseActorRenderContext.h:5
Definition BlockSourceListener.h:18
Definition BlockSource.h:71
Definition TessellatorContext.h:7
Definition IClientInstance.h:5
Definition IRenderChunkGarbage.h:5
Definition IVanillaRenderBlockActorComponent.h:19
Definition MinecraftUICustomRenderer.h:5
Definition MinecraftUIRenderContext.h:5
Definition RenderChunkBuilder.h:5
Definition RenderChunkInstanced.h:5
Definition RenderChunkSorterSharedInfo.h:5
Definition StructureVolumeRenderer.h:5
Definition Tessellator.h:5
Definition UICustomRenderer.h:5
Definition UIPropertyBag.h:5
Definition ActorBlockSyncMessage.h:8
Definition OffscreenCaptureDescription.h:5
Definition StructureVolumeCaptureRequestInfo.h:7