Skip to content

Commit

Permalink
Merged 1.9.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz authored Dec 20, 2023
2 parents a253903 + 7bcaa49 commit 64d1917
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
9 changes: 3 additions & 6 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
- changed required Majrusz Library version from 7.0.1+ to 7.0.2+
- readded missing Bleeding advancements
- updated Chinese translation (thanks to @UDTakerBean)
- fixed bug with blood particles not being visible on server
- fixed bug with some expert mode and master mode mechanics working on earlier game stages
- fixed bug with Cursed Armor spawns not working properly
- 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)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
public class BleedingTooltip {
static {
OnItemAttributeTooltip.listen( BleedingTooltip::addCustom )
.addCondition( Bleeding::isEnabled );
.addCondition( Bleeding::isEnabled )
.addCondition( data->Side.getLocalPlayer() != null /* compatibility check */ );
}

private static void addCustom( OnItemAttributeTooltip data ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.majruszsdifficulty.MajruszsDifficulty;
import com.majruszsdifficulty.bloodmoon.BloodMoonHelper;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Vec3i;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -254,7 +255,10 @@ private static void spawnCursedArmor( OnLootGenerated data ) {
CursedArmor cursedArmor = EntityHelper.createSpawner( MajruszsDifficulty.CURSED_ARMOR_ENTITY, data.getLevel() )
.position( CursedArmor.getSpawnPosition( data ) )
.beforeEvent( entity->{
float yRot = BlockHelper.getState( data.getLevel(), data.origin ).getValue( ChestBlock.FACING ).toYRot();
float yRot = BlockHelper.getState( data.getLevel(), data.origin )
.getOptionalValue( ChestBlock.FACING )
.map( Direction::toYRot )
.orElse( Random.nextInt( 0, 4 ) * 90.0f );
entity.setYRot( yRot );
entity.setYHeadRot( yRot );
entity.setYBodyRot( yRot );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ public List< MutableComponent > getMessages() {
.toList();
}

GameStage copy( GameStage gameStage ) {
this.format = gameStage.format;
this.trigger = gameStage.trigger;
this.messages = gameStage.messages;

return this;
}

public static class Builder {
private final GameStage gameStage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private static List< GameStage > keepOldReferencesValid( List< GameStage > newGa
GameStage newGameStage = newGameStages.get( idx );
for( GameStage oldGameStage : oldGameStages ) {
if( oldGameStage.is( newGameStage.getId() ) ) {
newGameStage = oldGameStage; // to keep references valid
newGameStage = oldGameStage.copy( newGameStage );
break;
}
}
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.3
mod_version=1.9.4
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 64d1917

Please sign in to comment.