Skip to content

Commit

Permalink
fix: correct identifier of end city in configured structure feature r…
Browse files Browse the repository at this point in the history
…egistry

Closes #19
  • Loading branch information
Samarium150 committed Apr 12, 2022
1 parent 22129be commit 49ad610
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ loaderVersion=0.13.3
fabricVersion=0.50.0+1.18.2
loomVersion=0.11-SNAPSHOT
# Mod Properties
prevVersion=1.18.2-1.4.0
modVersion=1.18.2-1.4.1
prevVersion=1.18.2-1.4.1
modVersion=1.18.2-1.4.2
mavenGroup=io.github.samarium150
archivesBaseName=structures_compass-fabric
# Kotlin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ fun ItemStack.search(player: ServerPlayerEntity, structureId: Identifier) {
val world = player.world as ServerWorld
setStructure(structureId)
player.sendMessage(TranslatableText("${prefix}msg_searching"), false)
val registryEntryList = world.registryManager
.get(Registry.CONFIGURED_STRUCTURE_FEATURE_KEY)
.getEntry(RegistryKey.of(Registry.CONFIGURED_STRUCTURE_FEATURE_KEY, structureId))
.map {
val registryEntryList = world.registryManager.get(Registry.CONFIGURED_STRUCTURE_FEATURE_KEY)
.getEntry(
RegistryKey.of(Registry.CONFIGURED_STRUCTURE_FEATURE_KEY,
Identifier(structureId.namespace, structureId.path.replace("endcity", "end_city")))
).map {
RegistryEntryList.of(it)
}.get()
val result = world.chunkManager.chunkGenerator.locateStructure(
Expand Down

0 comments on commit 49ad610

Please sign in to comment.