Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion finders.c
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,6 @@ int isViableStructurePos(int structureType, Generator *g, int x, int z, uint32_t
if (g->mc <= MC_1_19) goto L_not_viable;
goto L_feature;
case Ocean_Ruin:
case Shipwreck:
case Treasure:
if (g->mc <= MC_1_12) goto L_not_viable;
goto L_feature;
Expand Down Expand Up @@ -1289,6 +1288,28 @@ int isViableStructurePos(int structureType, Generator *g, int x, int z, uint32_t
goto L_not_viable;
goto L_viable;

case Shipwreck:
if (g->mc <= MC_1_12)
goto L_not_viable;
if (g->mc <= MC_1_15)
{
g->entry = &g->ls.layers[L_VORONOI_1];
sampleX = chunkX * 16 + 9;
sampleZ = chunkZ * 16 + 9;
}
else
{
if (g->mc <= MC_1_17)
g->entry = &g->ls.layers[L_RIVER_MIX_4];
sampleX = chunkX * 4 + 2;
sampleZ = chunkZ * 4 + 2;
}
id = getBiomeAt(g, 0, sampleX, 319>>2, sampleZ);
if (id < 0 || !isViableFeatureBiome(g->mc, structureType, id))
goto L_not_viable;
viable = id; // biome for further analysis
goto L_viable;

case Desert_Well:
if (g->mc <= MC_1_15)
{
Expand Down