Skip to content

Commit

Permalink
Cleanup id creation for land-specific loot tables
Browse files Browse the repository at this point in the history
  • Loading branch information
kirderf1 committed May 9, 2024
1 parent ac2e559 commit fac5ac8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -854,12 +854,12 @@ public void generate(BiConsumer<ResourceLocation, LootTable.Builder> lootProcess
public static ResourceLocation locationForTerrain(Supplier<TerrainLandType> landType, ResourceLocation baseLoot)
{
ResourceLocation landName = Objects.requireNonNull(LandTypes.TERRAIN_REGISTRY.getKey(landType.get()));
return new ResourceLocation(baseLoot.getNamespace(), baseLoot.getPath() + "/terrain/" + landName.toString().replace(':', '/'));
return baseLoot.withSuffix("/terrain/" + landName.getNamespace() + "/" + landName.getPath());
}

public static ResourceLocation locationForTitle(Supplier<TitleLandType> landType, ResourceLocation baseLoot)
{
ResourceLocation landName = Objects.requireNonNull(LandTypes.TITLE_REGISTRY.getKey(landType.get()));
return new ResourceLocation(baseLoot.getNamespace(), baseLoot.getPath() + "/title/" + landName.toString().replace(':', '/'));
return baseLoot.withSuffix("/title/" + landName.getNamespace() + "/" + landName.getPath());
}
}

0 comments on commit fac5ac8

Please sign in to comment.