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 7a0c98f commit 3413873
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ plugins {
}
apply plugin: 'net.minecraftforge.gradle'

def previousVersion = '1.3.1'
def baseVersion = '1.4.0'
def previousVersion = '1.4.0'
def baseVersion = '1.4.1'
def minecraftVersion = '1.18.2'
version = "${minecraftVersion}-${baseVersion}" as Object
group = 'io.github.samarium150'
Expand Down Expand Up @@ -73,7 +73,7 @@ minecraft {
// sourceSets.main.resources { srcDir 'src/generated/resources' }

dependencies {
minecraft 'net.minecraftforge:forge:1.18.2-40.0.12'
minecraft 'net.minecraftforge:forge:1.18.2-40.0.45'
}

compileJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@ public static void search(@Nonnull ServerLevel world, Player player, @Nonnull St
HolderSet<ConfiguredStructureFeature<?, ?>> holderSet = world
.registryAccess()
.registryOrThrow(Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY)
.getHolder(ResourceKey.create(Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY, structureRegistryName))
.map(HolderSet::direct)
.getHolder(ResourceKey.create(Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY,
new ResourceLocation(structureRegistryName.getNamespace(),
structureRegistryName.getPath().replace("endcity", "end_city"))
)).map(HolderSet::direct)
.orElseThrow();
Pair<BlockPos, Holder<ConfiguredStructureFeature<?, ?>>> result = generator.findNearestMapFeature(
world, holderSet, player.blockPosition(), StructuresCompassConfig.radius.get(), isSkip(stack)
Expand Down

0 comments on commit 3413873

Please sign in to comment.