mirror of
https://github.com/Cubitect/cubiomes.git
synced 2025-09-09 20:29:20 -04:00
support checking for igloos with basement
This commit is contained in:
parent
960d5d64b6
commit
f2c96306c7
19
finders.c
19
finders.c
@ -1950,6 +1950,25 @@ int getVariant(StructureVariant *r, int structType, int mc, uint64_t seed,
|
|||||||
r->sx = r->sz = 58;
|
r->sx = r->sz = 58;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
case Igloo:
|
||||||
|
if (mc <= MC_1_12)
|
||||||
|
{
|
||||||
|
setSeed(&rng, getPopulationSeed(mc, seed, (x>>4) - 1, (z>>4) - 1));
|
||||||
|
}
|
||||||
|
r->rotation = nextInt(&rng, 4);
|
||||||
|
r->basement = nextDouble(&rng) < 0.5;
|
||||||
|
r->size = nextInt(&rng, 8) + 4;
|
||||||
|
sx = 7; sy = 5; sz = 8;
|
||||||
|
r->sy = sy;
|
||||||
|
switch (r->rotation)
|
||||||
|
{ // orientation: 0:north, 1:east, 2:south, 3:west
|
||||||
|
case 0: r->rotation = 0; r->mirror = 0; r->sx = sx; r->sz = sz; break;
|
||||||
|
case 1: r->rotation = 1; r->mirror = 0; r->sx = sz; r->sz = sx; break;
|
||||||
|
case 2: r->rotation = 0; r->mirror = 1; r->sx = sx; r->sz = sz; break;
|
||||||
|
case 3: r->rotation = 1; r->mirror = 1; r->sx = sz; r->sz = sx; break;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
|
||||||
case Desert_Pyramid:
|
case Desert_Pyramid:
|
||||||
sx = 21; sy = 15; sz = 21;
|
sx = 21; sy = 15; sz = 21;
|
||||||
goto L_rotate_temple;
|
goto L_rotate_temple;
|
||||||
|
@ -85,8 +85,9 @@ STRUCT(StructureVariant)
|
|||||||
uint8_t giant :1; // giant portal variant
|
uint8_t giant :1; // giant portal variant
|
||||||
uint8_t underground :1; // underground portal
|
uint8_t underground :1; // underground portal
|
||||||
uint8_t airpocket :1; // portal with air pocket
|
uint8_t airpocket :1; // portal with air pocket
|
||||||
|
uint8_t basement :1; // igloo with basement
|
||||||
uint8_t cracked :1; // geode with crack
|
uint8_t cracked :1; // geode with crack
|
||||||
uint8_t size; // geode size
|
uint8_t size; // geode size | igloo middel pieces
|
||||||
uint8_t start; // starting piece index
|
uint8_t start; // starting piece index
|
||||||
short biome; // biome variant
|
short biome; // biome variant
|
||||||
uint8_t rotation; // 0:0, 1:cw90, 2:cw180, 3:cw270=ccw90
|
uint8_t rotation; // 0:0, 1:cw90, 2:cw180, 3:cw270=ccw90
|
||||||
|
Loading…
x
Reference in New Issue
Block a user