Fossil structures can't generate in far east and south blocks of a chunk
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.

(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
int x = random.nextInt(16 - size.getX());
int z = random.nextInt(16 - size.getZ());
However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to x + size.get(X) - 1 = 16 - 1 - 1 = 14
Created Issue:
Fossil structures cant generate in far east and south blocks of a chunk
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
{{int x = random.nextInt(16 - size.getX());}}
{{ int z = random.nextInt(16 - size.getZ());}}However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
{{int x = random.nextInt(16 - size.getX());}}
{{ int z = random.nextInt(16 - size.getZ());}}However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
in{{t x = random.nextInt(16 - size.getX());}}
{{ int z = random.nextInt(16 - size.getZ());}}However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
in{{t x = random.nextInt(16 - size.getX());}}
{{ int z = random.nextInt(16 - size.getZ());}}However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
int j = random.nextInt(16 - vec3i.getX());
int k = random.nextInt(16 - vec3i.getZ());However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to _x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
int
j= random.nextInt(16 -vec3i.getX());
intk= random.nextInt(16 -vec3i.getZ());However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to _x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
int x = random.nextInt(16 - size.getX());
int z = random.nextInt(16 - size.getZ());However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to _x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
int x = random.nextInt(16 - size.getX());
int z = random.nextInt(16 - size.getZ());However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to
_x + size.get(X) - 1 = 16 - 1 - 1 = 14
Fossil structures can't generate in far east and south blocks of a chunk
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
int x = random.nextInt(16 - size.getX());
int z = random.nextInt(16 - size.getZ());However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
int x = random.nextInt(16 - size.getX());
int z = random.nextInt(16 - size.getZ());However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
int x = random.nextInt(16 - size.getX());
int z = random.nextInt(16 - size.getZ());However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to x + size.get(X) - 1 = 16 - 1 - 1 = 14
When generating a fossil feature the structure is placed at a random position in the chunk. However this position never includes the far east and south blocks in that chunk (chunk coordinates X=15 or Z=15). This is most obvious when generating structures with size 15x15 as those are always placed at chunk coordinate 0, 0 leaving a one block gap.
(Note that the placement in a grid is not a bug as the feature explicitly makes sure that the structures do not cross chunk boundaries.)
How to reproduce:
- Create a world with the attached datapack
- Teleport to a savanna
- Go into spectator mode and fly downwards
- You will see the structures as in the image above
(Note that while this reproduction involves a datapack the bug also affects the vanilla fossils, although its much less obvious because of their smaller size and rarity)
Code analysis:
(using the official mappings and some variable renaming)
The position to place the structure in the chunk is calculated by
int x = random.nextInt(16 - size.getX());
int z = random.nextInt(16 - size.getZ());However, as the upper bound of random.nextInt is exclusive, the maximum value of x is 16 - size.getX() - 1. The structure would then reach to x + size.get(X) - 1 = 16 - 1 - 1 = 14




Not fixed in 1.18 Pre-release 1.
1.18 Pre-release 1 added an in_square placement modifier. However this simply caused
MC-241234. If (in a datapack), this placement modifier is not used, the fossil feature still does it's own placement inside the chunk, but is still unable to generate in the far east or south blocks of the chunk.I've attached an updated Datapack to confirm this. This datapack generated two different fossil features in two layers.
Can confirm not fixed in 1.18 Pre-release 1. Please reopen this issue.
Fixed in 1.18 Pre-release 2. No reopen necessary anymore. (Fossils are now supposed to be used with a in_square placement modifier)