Skip to content

Commit

Permalink
Merged 1.9.7 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz authored Jan 27, 2024
2 parents 544a629 + 923ab83 commit eae964c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 9 deletions.
5 changes: 3 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- fixed compatibility crash with Optifine (reported by @Fiocher)
- fixed bug with Bleeding chances exceeding 100% on items with custom chances (reported by @ZacGames)
- fixed compatibility crash with Tinkerer's Smithing (reported by @FLSoz)
- fixed game crash caused by Cursed Armor (reported by @GenericCherrySwitch, @JackZhangCNCC)
- fixed invalid experience bonus structure in the configuration file
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,10 @@ private static Vec3 getSpawnPosition( OnLootGenerated data ) {
if( isAir.apply( 1.0f ) && isAir.apply( 2.0f ) ) {
return data.origin.add( 0.0, 0.5, 0.0 );
} else {
Vec3i offset = BlockHelper.getState( level, data.origin ).getValue( ChestBlock.FACING ).getNormal();
Vec3i offset = BlockHelper.getState( level, data.origin )
.getOptionalValue( ChestBlock.FACING )
.map( Direction::getNormal )
.orElse( new Vec3i( 1, 0, 0 ) );
return data.origin.add( offset.getX(), offset.getY(), offset.getZ() );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ public class ExperienceBonus {
.addCondition( data->IS_ENABLED );

Serializables.getStatic( Config.Features.class )
.define( "experience_bonus", ExperienceBonus.class );

Serializables.getStatic( ExperienceBonus.class )
.define( "is_enabled", Reader.bool(), ()->IS_ENABLED, v->IS_ENABLED = v )
.define( "experience_bonus", Reader.map( Reader.number() ), ()->BONUS.get(), v->BONUS = GameStageValue.of( Range.of( 0.0f, 10.0f ).clamp( v ) ) );
.define( "extra_multiplier", Reader.map( Reader.number() ), ()->BONUS.get(), v->BONUS = GameStageValue.of( Range.of( 0.0f, 10.0f ).clamp( v ) ) );
}

private static void increase( OnExpOrbPickedUp data ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.majruszsdifficulty.items;

import com.majruszlibrary.annotation.Dist;
import com.majruszlibrary.annotation.OnlyIn;
import com.majruszsdifficulty.MajruszsDifficulty;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
Expand Down Expand Up @@ -93,7 +91,6 @@ public Ingredient getRepairIngredient() {
}

@Override
@OnlyIn( Dist.CLIENT )
public String getName() {
return this.name;
}
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions 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.6
mod_version=1.9.7
mod_display_name=Majrusz's Progressive Difficulty
mod_description=Mod that progressively increases the game difficulty over time.
mod_authors=Majrusz
Expand Down Expand Up @@ -40,7 +40,7 @@ fabric_minecraft_version_range=>=1.20.1
fabric_majruszlibrary_version_range=>=7.0.2

# Majrusz Library
majruszlibrary_version=1.20.1-7.0.2
majruszlibrary_version=1.20.1-7.0.4

# Publishing
modrinth_project_id=GGDBwjOg
Expand Down
Binary file not shown.

0 comments on commit eae964c

Please sign in to comment.