Skip to content

Commit

Permalink
Merged 1.9.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz authored Dec 27, 2023
2 parents 64d1917 + 7a44674 commit 556a0e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
- fixed bug with game stages not reloading properly in the configuration file (reported by @Sully)
- fixed game crash caused by compatibility issues with Loot Beams mod (reported by @davey)
- fixed game crash when breaking chest with Cursed Armor inside (reported by @Jabkkm)
- fixed game crash during Undead Army (reported by @NotTohm)
- fixed game crash caused by Blood Moon (reported by @ZacGames)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.majruszsdifficulty.bloodmoon.BloodMoonHelper;
import net.minecraft.world.level.Level;

import java.util.Optional;

public class Trigger {
static {
OnServerTicked.listen( Trigger::start )
Expand All @@ -29,6 +31,6 @@ private static void finish( OnServerTicked data ) {
}

private static long getTime() {
return Side.getServer().overworld().getDayTime() % Level.TICKS_PER_DAY;
return Optional.ofNullable( Side.getServer() ).map( server->server.overworld().getDayTime() % Level.TICKS_PER_DAY ).orElse( 0L );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ public boolean isPartOfWave( Entity entity ) {

private void forEachSpawnedUndead( Consumer< LivingEntity > consumer ) {
this.mobsLeft.stream()
.filter( mobInfo->mobInfo.uuid != null )
.forEach( mobInfo->consumer.accept( ( LivingEntity )mobInfo.toEntity( this.getLevel() ) ) );
.map( mobInfo->mobInfo.toEntity( this.getLevel() ) )
.filter( entity->entity != null )
.forEach( entity->consumer.accept( ( LivingEntity )entity ) );
}

public ServerLevel getLevel() {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ minecraft_version=1.20.1
# Mod
mod_id=majruszsdifficulty
mod_archives_name=majruszs-difficulty
mod_version=1.9.4
mod_version=1.9.5
mod_display_name=Majrusz's Progressive Difficulty
mod_description=Mod that progressively increases the game difficulty over time.
mod_authors=Majrusz
Expand Down

0 comments on commit 556a0e3

Please sign in to comment.