Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog - Deeper and Darker

## [1.3.6] - 2026-02-09

### English
- **Fixed**: Game crash when teleporting to the dimension or generating fossils in Crystallized Amber blocks (NoSuchElementException).

### Français
- **Corrigé** : Plantage du jeu lors de la téléportation vers la dimension ou de la génération de fossiles dans les blocs d'ambre cristallisé (NoSuchElementException).
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ gradlew build
```

Build files are located in the project's `build/libs` folder.
---
**Latest Version: 1.3.6** (Fixed Crystallized Amber crash)
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ emi_version=1.1.22
mod_id=deeperdarker
mod_name=Deeper and Darker
mod_license=AGPL-3.0
mod_version=1.3.5
mod_version=1.3.6
mod_group_id=com.kyanite.deeperdarker
mod_authors=Kyanite Team
mod_credits=NewJumperr, nitro_dynamite18, angxdd, pr_ib, JustJussi, Rotch_Gwylt, DanielArtist
mod_credits=NewJumperr, nitro_dynamite18, angxdd, pr_ib, JustJussi, Rotch_Gwylt, DanielArtist, vyrriox
mod_description=A Minecraft mod featuring new blocks, items, armor, and hidden mysteries to complement the Deep Dark.
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,23 @@ public CrystallizedAmberBlockEntity(BlockPos pos, BlockState blockState) {
}

public void generateFossil(ServerLevel level, BlockPos pos) {
if(fossilizedEntity || !loot.isEmpty()) return;
if (fossilizedEntity || !loot.isEmpty())
return;

RandomSource random = new XoroshiroRandomSource(pos.asLong());
fossilizedEntity = random.nextFloat() < 0.2f;
if(!fossilizedEntity) {
if (!fossilizedEntity) {
LootTable table = level.getServer().reloadableRegistries().getLootTable(DDChestLoot.CRYSTALLIZED_AMBER);
LootParams lootParams = new LootParams.Builder(level)
.withParameter(LootContextParams.ORIGIN, this.getBlockPos().getCenter())
.withParameter(LootContextParams.BLOCK_ENTITY, this)
.create(LootContextParamSets.CHEST);
List<ItemStack> list = table.getRandomItems(lootParams);

this.loot = list.getFirst();
if (!list.isEmpty()) {
this.loot = list.getFirst();
} else {
fossilizedEntity = true;
}
}

this.setChanged();
Expand Down Expand Up @@ -74,8 +78,10 @@ public CompoundTag getUpdateTag(HolderLookup.Provider registries) {
@Override
protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) {
super.loadAdditional(tag, registries);
if(tag.contains("item")) this.loot = ItemStack.parseOptional(registries, tag.getCompound("item"));
if(tag.contains("leech")) this.fossilizedEntity = tag.getBoolean("leech");
if (tag.contains("item"))
this.loot = ItemStack.parseOptional(registries, tag.getCompound("item"));
if (tag.contains("leech"))
this.fossilizedEntity = tag.getBoolean("leech");
}

@Override
Expand Down