diff --git a/changelog.md b/changelog.md index 54cac9e43..31d56b34d 100644 --- a/changelog.md +++ b/changelog.md @@ -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) \ No newline at end of file +- 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 \ No newline at end of file diff --git a/common/libs/majrusz-library-common-1.20.1-7.0.2.jar b/common/libs/majrusz-library-common-1.20.1-7.0.4.jar similarity index 83% rename from common/libs/majrusz-library-common-1.20.1-7.0.2.jar rename to common/libs/majrusz-library-common-1.20.1-7.0.4.jar index 03beede82..1bffc1fbc 100644 Binary files a/common/libs/majrusz-library-common-1.20.1-7.0.2.jar and b/common/libs/majrusz-library-common-1.20.1-7.0.4.jar differ diff --git a/common/src/main/java/com/majruszsdifficulty/entity/CursedArmor.java b/common/src/main/java/com/majruszsdifficulty/entity/CursedArmor.java index 0639479bb..945317479 100644 --- a/common/src/main/java/com/majruszsdifficulty/entity/CursedArmor.java +++ b/common/src/main/java/com/majruszsdifficulty/entity/CursedArmor.java @@ -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() ); } } diff --git a/common/src/main/java/com/majruszsdifficulty/features/ExperienceBonus.java b/common/src/main/java/com/majruszsdifficulty/features/ExperienceBonus.java index 860d8c010..13434c300 100644 --- a/common/src/main/java/com/majruszsdifficulty/features/ExperienceBonus.java +++ b/common/src/main/java/com/majruszsdifficulty/features/ExperienceBonus.java @@ -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 ) { diff --git a/common/src/main/java/com/majruszsdifficulty/items/CustomArmorMaterial.java b/common/src/main/java/com/majruszsdifficulty/items/CustomArmorMaterial.java index 0e4b3e5f3..d9f189b12 100644 --- a/common/src/main/java/com/majruszsdifficulty/items/CustomArmorMaterial.java +++ b/common/src/main/java/com/majruszsdifficulty/items/CustomArmorMaterial.java @@ -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; @@ -93,7 +91,6 @@ public Ingredient getRepairIngredient() { } @Override - @OnlyIn( Dist.CLIENT ) public String getName() { return this.name; } diff --git a/fabric/libs/majrusz-library-fabric-1.20.1-7.0.2.jar b/fabric/libs/majrusz-library-fabric-1.20.1-7.0.4.jar similarity index 88% rename from fabric/libs/majrusz-library-fabric-1.20.1-7.0.2.jar rename to fabric/libs/majrusz-library-fabric-1.20.1-7.0.4.jar index 9166f8031..fed75f319 100644 Binary files a/fabric/libs/majrusz-library-fabric-1.20.1-7.0.2.jar and b/fabric/libs/majrusz-library-fabric-1.20.1-7.0.4.jar differ diff --git a/forge/libs/majrusz-library-forge-1.20.1-7.0.2.jar b/forge/libs/majrusz-library-forge-1.20.1-7.0.4.jar similarity index 83% rename from forge/libs/majrusz-library-forge-1.20.1-7.0.2.jar rename to forge/libs/majrusz-library-forge-1.20.1-7.0.4.jar index 172a08603..8b46d8b6a 100644 Binary files a/forge/libs/majrusz-library-forge-1.20.1-7.0.2.jar and b/forge/libs/majrusz-library-forge-1.20.1-7.0.4.jar differ diff --git a/gradle.properties b/gradle.properties index 60467301a..d59f44e1c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 @@ -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 diff --git a/neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.2.jar b/neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.4.jar similarity index 83% rename from neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.2.jar rename to neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.4.jar index 7b1d398d6..59191b10a 100644 Binary files a/neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.2.jar and b/neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.4.jar differ