Skip to content

Commit 8ce4afa

Browse files
committed
feat: adapt to LeviLamina 1.7.0
1 parent 94c339f commit 8ce4afa

File tree

17 files changed

+121
-141
lines changed

17 files changed

+121
-141
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.12.0] - 2025-11-04
11+
12+
### Changed
13+
14+
- Adapt to LeviLamina 1.7.0(BDS-1.21.120.4)
15+
1016
## [0.11.2] - 2025-11-02
1117

1218
### Fixed
@@ -132,7 +138,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
132138

133139
- Release the first version
134140

135-
[Unreleased]: https://github.com/LiteLDev/MoreDimensions/compare/v0.11.1...HEAD
141+
[Unreleased]: https://github.com/LiteLDev/MoreDimensions/compare/v0.12.0...HEAD
142+
[0.12.0]: https://github.com/LiteLDev/MoreDimensions/compare/v0.11.2...v0.12.0
143+
[0.11.2]: https://github.com/LiteLDev/MoreDimensions/compare/v0.11.1...v0.11.2
136144
[0.11.1]: https://github.com/LiteLDev/MoreDimensions/compare/v0.11.0...v0.11.1
137145
[0.11.0]: https://github.com/LiteLDev/MoreDimensions/compare/v0.10.1...v0.11.0
138146
[0.10.1]: https://github.com/LiteLDev/MoreDimensions/compare/v0.9.0...v0.10.1

src/more_dimensions/api/dimension/CustomDimensionManager.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#include "mc/world/level/dimension/VanillaDimensions.h"
2424
#include "mc/world/level/storage/LevelStorage.h"
2525

26-
class Scheduler;
27-
2826
namespace more_dimensions {
2927

3028
std::string compress(std::string_view sv) {
@@ -223,9 +221,9 @@ DimensionType CustomDimensionManager::addDimension(
223221
}
224222
ll::service::getLevel()->getDimensionFactory().mFactoryMap.emplace(
225223
dimName,
226-
[dimName, info, factory = std::move(factory)](ILevel& ilevel, Scheduler& scheduler) -> OwnerPtr<Dimension> {
224+
[dimName, info, factory = std::move(factory)](DerivedDimensionArguments&& arguments) -> OwnerPtr<Dimension> {
227225
loggerMoreDimMag.debug("Create dimension, name: {}, id: {}", dimName, info.id.id);
228-
return factory(DimensionFactoryInfo{ilevel, scheduler, info.nbt, info.id});
226+
return factory(DimensionFactoryInfo{arguments, info.nbt, info.id});
229227
}
230228
);
231229

src/more_dimensions/api/dimension/CustomDimensionManager.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
#include "mc/world/level/GeneratorType.h"
88

99
class Dimension;
10-
class ILevel;
11-
class Scheduler;
10+
class DerivedDimensionArguments;
1211

1312
namespace more_dimensions {
1413

1514
struct DimensionFactoryInfo {
16-
ILevel& level;
17-
Scheduler& scheduler;
18-
CompoundTag const& data;
19-
DimensionType dimId;
15+
DerivedDimensionArguments& arguments;
16+
CompoundTag const& data;
17+
DimensionType dimId;
2018
};
2119

2220
class CustomDimensionManager {

src/more_dimensions/api/dimension/SimpleCustomDimension.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,23 @@
88
#include "ll/api/service/Bedrock.h"
99

1010
#include "mc/common/Brightness.h"
11-
#include "mc/common/BrightnessPair.h"
1211
#include "mc/deps/core/math/Color.h"
13-
#include "mc/deps/core/string/HashedString.h"
1412
#include "mc/world/level/BlockSource.h"
1513
#include "mc/world/level/DimensionConversionData.h"
1614
#include "mc/world/level/Level.h"
1715
#include "mc/world/level/LevelSeed64.h"
1816
#include "mc/world/level/biome/registry/BiomeRegistry.h"
1917
#include "mc/world/level/biome/source/BiomeSource.h"
2018
#include "mc/world/level/biome/source/FixedBiomeSource.h"
21-
#include "mc/world/level/block/BlockVolume.h"
2219
#include "mc/world/level/chunk/vanilla_level_chunk_upgrade/VanillaLevelChunkUpgrade.h"
20+
#include "mc/world/level/dimension/DimensionArguments.h"
2321
#include "mc/world/level/dimension/DimensionHeightRange.h"
2422
#include "mc/world/level/dimension/NetherBrightnessRamp.h"
2523
#include "mc/world/level/dimension/OverworldBrightnessRamp.h"
2624
#include "mc/world/level/dimension/VanillaDimensions.h"
2725
#include "mc/world/level/levelgen/flat/FlatWorldGenerator.h"
2826
#include "mc/world/level/levelgen/structure/StructureFeatureRegistry.h"
2927
#include "mc/world/level/levelgen/structure/registry/StructureSetRegistry.h"
30-
#include "mc/world/level/levelgen/synth/PerlinNoise.h"
31-
#include "mc/world/level/levelgen/synth/PerlinSimplexNoise.h"
3228
#include "mc/world/level/levelgen/synth/SimplexNoise.h"
3329
#include "mc/world/level/levelgen/v1/NetherGenerator.h"
3430
#include "mc/world/level/levelgen/v1/OverworldGeneratorMultinoise.h"
@@ -48,8 +44,8 @@ namespace more_dimensions {
4844
namespace {
4945
using namespace ll::memory_literals;
5046

51-
DWORD overworld_addStructureFeatures_rva = 0x04ED250;
52-
DWORD nethrer_addStructureFeatures_rva = 0x04EBEE0;
47+
DWORD overworld_addStructureFeatures_rva = 0x04FDB80;
48+
DWORD nethrer_addStructureFeatures_rva = 0x04FC570;
5349

5450
// static auto* overworldAddress =
5551
// "`anonymous namespace'::unity_5c986e6b9d6571cc96912b0bfa0329e2::addStructureFeatures"_symp;
@@ -95,7 +91,7 @@ void netherAddStructureFeatures(
9591
auto& loggerMoreDim = MoreDimenison::getInstance().getSelf().getLogger();
9692

9793
SimpleCustomDimension::SimpleCustomDimension(std::string const& name, DimensionFactoryInfo const& info)
98-
: Dimension(info.level, info.dimId, {-64, 320}, info.scheduler, name) {
94+
: Dimension(DimensionArguments(info.arguments, info.dimId, {-64, 320}, name)) {
9995
loggerMoreDim.debug("{} dimension name:{}", __FUNCTION__, name);
10096
mDefaultBrightness->sky = Brightness::MAX();
10197
generatorType = *magic_enum::enum_cast<GeneratorType>((std::string_view)info.data["generatorType"]);

src/more_dimensions/core/dimension/MoreDimensionsPatch.h

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -16,53 +16,53 @@ struct AddressAndReg {
1616

1717
// VanillaDimensions::toSerializedInt and VanillaDimensions::fromSerializedInt(int)
1818
std::vector<AddressAndReg> data = {
19-
{0x0913f00, 0x0914164, 0x091418f, {0x89, 0xc8} },
20-
{0x099c570, 0x099c676, 0x099c699, {0x89, 0xcb} },
21-
{0x099c880, 0x099c992, 0x099c9b5, {0x89, 0xcb} },
22-
{0x099cba0, 0x099ccb0, 0x099ccd3, {0x89, 0xcb} },
23-
{0x09a3280, 0x09a3638, 0x09a365c, {0x89, 0xc7} },
24-
{0x11be120, 0x11be1e1, 0x11be1fd, {0x89, 0xc8} },
25-
{0x11be260, 0x11be2dd, 0x11be307, {0x89, 0xc6} },
26-
{0x14b4dd0, 0x14b5066, 0x14b5090, {0x89, 0x4e, 0x3c} },
27-
{0x154c370, 0x154c5f7, 0x154c613, {0x89, 0xcf} },
28-
{0x154c880, 0x154cde1, 0x154ce0c, {0x89, 0xc3} },
29-
{0x1980180, 0x19802ea, 0x1980306, {0x89, 0xcb} },
30-
{0x19d12b0, 0x19d1304, 0x19d132d, {0x89, 0xc2} },
31-
{0x1c57aa0, 0x1c57b16, 0x1c57b3f, {0x89, 0xc2} },
32-
{0x1d13a20, 0x1d13bda, 0x1d13bfd, {0x89, 0xc3} },
33-
{0x1df6730, 0x1df6780, 0x1df67a9, {0x89, 0xc2} },
34-
{0x1df7de0, 0x1df7e15, 0x1df7e3e, {0x89, 0xc2} },
35-
{0x1ecada0, 0x1ecae71, 0x1ecae9a, {0x89, 0xc2} },
36-
{0x2066f30, 0x2066f8d, 0x2066fb6, {0x89, 0xc2} },
37-
{0x21ea950, 0x21eaa11, 0x21eaa2d, {0x89, 0xc8} },
38-
{0x21eaa90, 0x21eab0d, 0x21eab37, {0x89, 0xc6} },
39-
{0x28b9d30, 0x28ba081, 0x28ba0a9, {0x41, 0x89, 0xc9} },
40-
{0x28ba300, 0x28ba3b1, 0x28ba3d9, {0x89, 0xcf} },
41-
{0x32dc680, 0x32dc705, 0x32dc728, {0x41, 0x89, 0x0a} },
42-
{0x34ae010, 0x34ae2fa, 0x34ae322, {0x41, 0x89, 0xc9} },
43-
{0x38d2ad0, 0x38d32c4, 0x38d32ef, {0x89, 0xcb} },
44-
{0x38d4b90, 0x38d5ac6, 0x38d5ae4, {0x41, 0x89, 0xc8} },
45-
{0x38efae0, 0x38efcbf, 0x38efcdb, {0x89, 0xc8} },
46-
{0x39f5480, 0x39f5579, 0x39f559b, {0x89, 0xc3} },
47-
{0x3bdbf50, 0x3bdc651, 0x3bdc677, {0x41, 0x89, 0xce} },
48-
{0x3bdcf80, 0x3bdd528, 0x3bdd557, {0x89, 0x8e, 0xd0, 0x0a, 0x00, 0x00}},
49-
{0x3bdec40, 0x3bdf07f, 0x3bdf0aa, {0x89, 0xc3} },
50-
{0x3bdec40, 0x3bdf514, 0x3bdf540, {0x89, 0xdf} },
51-
{0x3bf7710, 0x3bf7790, 0x3bf77c0, {0x89, 0x0b} },
52-
{0x3bf7810, 0x3bf7820, 0x3bf784b, {0x89, 0xd3} },
53-
{0x3bf7b20, 0x3bf7d5a, 0x3bf7d76, {0x89, 0xcb} },
54-
{0x3bf7e10, 0x3bf7f46, 0x3bf7f6f, {0x89, 0xc3} },
55-
{0x4260e30, 0x4260e90, 0x4260eb8, {0x41, 0x89, 0xd9} },
56-
{0x426dcc0, 0x426dda0, 0x426ddc9, {0x89, 0xc2} },
57-
{0x43fa280, 0x43fa3f1, 0x43fa40d, {0x89, 0xc8} },
58-
{0x43fa890, 0x43faad2, 0x43fab00, {0x41, 0x89, 0xc4} },
59-
{0x43fd740, 0x43fd894, 0x43fd8b8, {0x89, 0xc7} },
60-
{0x43fd930, 0x43fdac9, 0x43fdae5, {0x89, 0xc8} },
61-
{0x48926e0, 0x4892801, 0x4892837, {0x89, 0xcf} },
62-
{0x4893360, 0x48933df, 0x4893404, {0x89, 0xdf} },
63-
{0x4899570, 0x4899805, 0x4899821, {0x89, 0xc8} },
64-
{0x4984c20, 0x4984cf8, 0x4984d20, {0x89, 0xc7} },
65-
{0x4986750, 0x49867f5, 0x4986811, {} },
19+
{0x0933b40, 0x0933da4, 0x0933dcf, {0x89, 0xc8} },
20+
{0x09bda50, 0x09bdb56, 0x09bdb79, {0x89, 0xcb} },
21+
{0x09bdd60, 0x09bde72, 0x09bde95, {0x89, 0xcb} },
22+
{0x09be080, 0x09be190, 0x09be1b3, {0x89, 0xcb} },
23+
{0x09c4760, 0x09c4b18, 0x09c4b3c, {0x89, 0xc7} },
24+
{0x0e98e60, 0x0e990f6, 0x0e99120, {0x89, 0x4e, 0x3c} },
25+
{0x0f53180, 0x0f53407, 0x0f53423, {0x89, 0xcf} },
26+
{0x0f53690, 0x0f53bf1, 0x0f53c1c, {0x89, 0xc3} },
27+
{0x13ae3f0, 0x13ae55a, 0x13ae576, {0x89, 0xcb} },
28+
{0x13c84f0, 0x13c86aa, 0x13c86cd, {0x89, 0xc3} },
29+
{0x14ab810, 0x14ab864, 0x14ab88d, {0x89, 0xc2} },
30+
{0x1783630, 0x17836a6, 0x17836cf, {0x89, 0xc2} },
31+
{0x1911e90, 0x1911eed, 0x1911f16, {0x89, 0xc2} },
32+
{0x1bb2e30, 0x1bb2e65, 0x1bb2e8e, {0x89, 0xc2} },
33+
{0x1c80c20, 0x1c80cf1, 0x1c80d1a, {0x89, 0xc2} },
34+
{0x1c96990, 0x1c969e0, 0x1c96a09, {0x89, 0xc2} },
35+
{0x1e51e20, 0x1e51ee1, 0x1e51efd, {0x89, 0xc8} },
36+
{0x1e51f60, 0x1e51fdd, 0x1e52007, {0x89, 0xc6} },
37+
{0x20df720, 0x20dfa71, 0x20dfa99, {0x41, 0x89, 0xc9} },
38+
{0x20dfcf0, 0x20dfda1, 0x20dfdc9, {0x89, 0xcf} },
39+
{0x2ec8380, 0x2ec8405, 0x2ec8428, {0x41, 0x89, 0x0a} },
40+
{0x322fb70, 0x322fe5a, 0x322fe82, {0x41, 0x89, 0xc9} },
41+
{0x3474f10, 0x3475704, 0x347572f, {0x89, 0xcb} },
42+
{0x3476fd0, 0x3477f06, 0x3477f24, {0x41, 0x89, 0xc8} },
43+
{0x34df220, 0x34df3ff, 0x34df41b, {0x89, 0xc8} },
44+
{0x3529580, 0x3529679, 0x352969b, {0x89, 0xc3} },
45+
{0x3909800, 0x3909f01, 0x3909f27, {0x41, 0x89, 0xce} },
46+
{0x390a830, 0x390add8, 0x390ae07, {0x89, 0x8e, 0xd0, 0x0a, 0x00, 0x00}},
47+
{0x390c4f0, 0x390c92f, 0x390c95a, {0x89, 0xc3} },
48+
{0x390c4f0, 0x390cdc4, 0x390cdf0, {0x89, 0xdf} },
49+
{0x3924fa0, 0x3925020, 0x3925050, {0x89, 0x0b} },
50+
{0x39250a0, 0x39250b0, 0x39250db, {0x89, 0xd3} },
51+
{0x39253b0, 0x39255ea, 0x3925606, {0x89, 0xcb} },
52+
{0x39256a0, 0x39257d6, 0x39257ff, {0x89, 0xc3} },
53+
{0x3fdcc30, 0x3fdcc90, 0x3fdccb8, {0x41, 0x89, 0xd9} },
54+
{0x4002790, 0x4002870, 0x4002899, {0x89, 0xc2} },
55+
{0x4192920, 0x4192a91, 0x4192aad, {0x89, 0xc8} },
56+
{0x4192f30, 0x4193172, 0x41931a0, {0x41, 0x89, 0xc4} },
57+
{0x4195b80, 0x4195cd4, 0x4195cf8, {0x89, 0xc7} },
58+
{0x4195d70, 0x4195f09, 0x4195f25, {0x89, 0xc8} },
59+
{0x466aa10, 0x466ab31, 0x466ab67, {0x89, 0xcf} },
60+
{0x466b690, 0x466b70f, 0x466b734, {0x89, 0xdf} },
61+
{0x46717c0, 0x4671a55, 0x4671a71, {0x89, 0xc8} },
62+
{0x471dee0, 0x471dfb8, 0x471dfe0, {0x89, 0xc7} },
63+
{0x471fa10, 0x471fab5, 0x471fad1, {} },
64+
{0x57b1660, 0x57b1721, 0x57b173d, {0x89, 0xc8} },
65+
{0x57b17a0, 0x57b181d, 0x57b1847, {0x89, 0xc6} },
6666
};
6767

6868
bool PatchFunction(HMODULE hModule, DWORD faddress_start, DWORD faddress_end, const std::vector<BYTE>& native_code) {

src/test/generator/flat-gen-village/FlatVillageDimension.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
#include "test/generator/flat-gen-village/FlatVillageGenerator.h"
44

55
#include "mc/common/Brightness.h"
6-
#include "mc/common/BrightnessPair.h"
76
#include "mc/deps/core/math/Vec3.h"
87
#include "mc/world/level/BlockSource.h"
98
#include "mc/world/level/DimensionConversionData.h"
109
#include "mc/world/level/Level.h"
1110
#include "mc/world/level/LevelSeed64.h"
1211
#include "mc/world/level/chunk/vanilla_level_chunk_upgrade/VanillaLevelChunkUpgrade.h"
13-
#include "mc/world/level/dimension/DimensionBrightnessRamp.h"
14-
#include "mc/world/level/dimension/DimensionHeightRange.h"
12+
#include "mc/world/level/dimension/DimensionArguments.h"
1513
#include "mc/world/level/dimension/OverworldBrightnessRamp.h"
1614
#include "mc/world/level/dimension/VanillaDimensions.h"
1715
#include "mc/world/level/levelgen/structure/StructureFeatureRegistry.h"
@@ -24,7 +22,7 @@
2422
namespace flat_village_dimension {
2523

2624
FlatVillageDimension::FlatVillageDimension(std::string const& name, more_dimensions::DimensionFactoryInfo const& info)
27-
: Dimension(info.level, info.dimId, {-64, 320}, info.scheduler, name) {
25+
: Dimension(DimensionArguments(info.arguments, info.dimId, {-64, 320}, name)) {
2826
// 这里说明下,在DimensionFactoryInfo里面more-dimensions会提供维度id,请不要使用固定维度id,避免id冲突导致维度注册出现异常
2927
mDefaultBrightness->sky = Brightness::MAX();
3028
mSeaLevel = -61;

src/test/generator/flat-gen-village/FlatVillageGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ bool FlatVillageGenerator::postProcess(ChunkViewSource& neighborhood) {
3939
auto seed = mSeed;
4040

4141
// 必须,需要给区块上锁
42-
auto lockChunk = levelChunk->mDimension.mPostProcessingManager->tryLock(levelChunk->mPosition, neighborhood);
42+
auto lockChunk = levelChunk->mDimension.mPostProcessingManager->tryLock(levelChunk->mPosition, neighborhood, {});
4343

4444
if (!lockChunk.has_value()) {
4545
return false;
@@ -77,7 +77,7 @@ void FlatVillageGenerator::loadChunk(LevelChunk& levelchunk, bool forceImmediate
7777

7878
levelchunk.recomputeHeightMap(0);
7979
ChunkLocalNoiseCache chunkLocalNoiseCache(dividedPos2D, 8);
80-
mBiomeSource->fillBiomes(levelchunk, chunkLocalNoiseCache);
80+
mBiomeSource->fillBiomes(levelchunk, &chunkLocalNoiseCache);
8181
levelchunk.setSaved();
8282
auto loadState = ChunkState::Generating;
8383
levelchunk.mLoadState->compare_exchange_strong(loadState, ChunkState::Generated);

src/test/generator/generator-custom-structure/CustomStructure.cpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22

33
#include "ll/api/memory/Hook.h"
44

5-
#include "mc/deps/core/threading/WorkerPool.h"
6-
#include "mc/resources/BaseGameVersion.h"
5+
#include "mc/util/BaseGameVersion.h"
76
#include "mc/world/level/block/VanillaBlockTypeIds.h"
87
#include "mc/world/level/block/registry/BlockTypeRegistry.h"
98
#include "mc/world/level/levelgen/feature/registry/FeatureRegistry.h"
109
#include "mc/world/level/levelgen/structure/Projection.h"
1110
#include "mc/world/level/levelgen/structure/StructureManager.h"
12-
#include "mc/world/level/levelgen/structure/registry/JigsawStructureBlockRulesRegistry.h"
13-
#include "mc/world/level/levelgen/structure/registry/JigsawStructureElementRegistry.h"
1411
#include "mc/world/level/levelgen/structure/registry/JigsawStructureRegistry.h"
1512
#include "mc/world/level/levelgen/structure/registry/StructurePools.h"
1613
#include "mc/world/level/levelgen/structure/structurepools/StructurePoolBlockPredicateAlwaysTrue.h"
@@ -118,7 +115,7 @@ void CustomJigsawStructureElements::initialize(
118115
jigsawStructureElementRegistry->registerStructureElement(
119116
"mike:5x5intb",
120117
std::make_unique<StructurePoolElement>(
121-
manager,
118+
*reinterpret_cast<gsl::not_null<Bedrock::NonOwnerPointer<IStructureTemplateManager>>*>(&manager), // TODO: Workaround
122119
"custom/beds5x5int",
123120
ruleList,
124121
blockTagRuleList,
@@ -130,7 +127,7 @@ void CustomJigsawStructureElements::initialize(
130127
jigsawStructureElementRegistry->registerStructureElement(
131128
"mike:5x5intc",
132129
std::make_unique<StructurePoolElement>(
133-
manager,
130+
*reinterpret_cast<gsl::not_null<Bedrock::NonOwnerPointer<IStructureTemplateManager>>*>(&manager),
134131
"custom/chestcarpet5x5int",
135132
ruleList,
136133
blockTagRuleList,
@@ -142,7 +139,7 @@ void CustomJigsawStructureElements::initialize(
142139
jigsawStructureElementRegistry->registerStructureElement(
143140
"mike:5x5intk",
144141
std::make_unique<StructurePoolElement>(
145-
manager,
142+
*reinterpret_cast<gsl::not_null<Bedrock::NonOwnerPointer<IStructureTemplateManager>>*>(&manager),
146143
"custom/kitchen5x5int",
147144
ruleList,
148145
blockTagRuleList,
@@ -156,7 +153,7 @@ void CustomJigsawStructureElements::initialize(
156153
jigsawStructureElementRegistry->registerStructureElement(
157154
"mike:ew7x4h",
158155
std::make_unique<StructurePoolElement>(
159-
manager,
156+
*reinterpret_cast<gsl::not_null<Bedrock::NonOwnerPointer<IStructureTemplateManager>>*>(&manager),
160157
"custom/ewhall",
161158
ruleList,
162159
blockTagRuleList,
@@ -168,7 +165,7 @@ void CustomJigsawStructureElements::initialize(
168165
jigsawStructureElementRegistry->registerStructureElement(
169166
"mike:ew7x4r",
170167
std::make_unique<StructurePoolElement>(
171-
manager,
168+
*reinterpret_cast<gsl::not_null<Bedrock::NonOwnerPointer<IStructureTemplateManager>>*>(&manager),
172169
"custom/21room",
173170
ruleList,
174171
blockTagRuleList,
@@ -182,7 +179,7 @@ void CustomJigsawStructureElements::initialize(
182179
jigsawStructureElementRegistry->registerStructureElement(
183180
"mike:ns7x4h",
184181
std::make_unique<StructurePoolElement>(
185-
manager,
182+
*reinterpret_cast<gsl::not_null<Bedrock::NonOwnerPointer<IStructureTemplateManager>>*>(&manager),
186183
"custom/nshall",
187184
ruleList,
188185
blockTagRuleList,
@@ -194,7 +191,7 @@ void CustomJigsawStructureElements::initialize(
194191
jigsawStructureElementRegistry->registerStructureElement(
195192
"mike:ns7x4r",
196193
std::make_unique<StructurePoolElement>(
197-
manager,
194+
*reinterpret_cast<gsl::not_null<Bedrock::NonOwnerPointer<IStructureTemplateManager>>*>(&manager),
198195
"custom/21room",
199196
ruleList,
200197
blockTagRuleList,
@@ -208,7 +205,7 @@ void CustomJigsawStructureElements::initialize(
208205
jigsawStructureElementRegistry->registerStructureElement(
209206
"mike:ewcap",
210207
std::make_unique<StructurePoolElement>(
211-
manager,
208+
*reinterpret_cast<gsl::not_null<Bedrock::NonOwnerPointer<IStructureTemplateManager>>*>(&manager),
212209
"custom/ewcap",
213210
ruleList,
214211
blockTagRuleList,
@@ -222,7 +219,7 @@ void CustomJigsawStructureElements::initialize(
222219
jigsawStructureElementRegistry->registerStructureElement(
223220
"mike:nscap",
224221
std::make_unique<StructurePoolElement>(
225-
manager,
222+
*reinterpret_cast<gsl::not_null<Bedrock::NonOwnerPointer<IStructureTemplateManager>>*>(&manager),
226223
"custom/nscap",
227224
ruleList,
228225
blockTagRuleList,

0 commit comments

Comments
 (0)