From 3c29370a0cae8e2e1f35ef55cd862d419af5c089 Mon Sep 17 00:00:00 2001 From: Majrusz Date: Sat, 19 Aug 2023 17:51:51 +0200 Subject: [PATCH 1/5] Updated version name --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 36f3c29ca..68e73d046 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,6 @@ versions_minecraft=1.20.1 versions_minecraft_range=[1.20.1,1.21) versions_forge=47.1.0 versions_forge_range=[47.1.0,) -versions_mod=1.8.0 +versions_mod=1.8.1-unfinished versions_mlib=5.0.0 versions_mlib_range=[5.0.0,6.0.0) \ No newline at end of file From abc05e7524a2fc84c251ae6bed0c6718c5c213b8 Mon Sep 17 00:00:00 2001 From: Majrusz Date: Sat, 19 Aug 2023 17:52:37 +0200 Subject: [PATCH 2/5] Fixed bug with Soul Jar not applying mine speed bonus properly (reported by @bomasborber) --- src/main/java/com/majruszsdifficulty/items/SoulJarItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/majruszsdifficulty/items/SoulJarItem.java b/src/main/java/com/majruszsdifficulty/items/SoulJarItem.java index da2dfc249..3e9f1e568 100644 --- a/src/main/java/com/majruszsdifficulty/items/SoulJarItem.java +++ b/src/main/java/com/majruszsdifficulty/items/SoulJarItem.java @@ -145,7 +145,7 @@ private void increaseDamage( OnPreDamaged.Data data ) { } private void increaseSpeed( OnBreakSpeed.Data data ) { - data.event.setNewSpeed( data.event.getNewSpeed() + data.event.getOriginalSpeed() * MINE_BONUS * getMultiplier( data.player ) ); + data.newSpeed *= 1.0f + MINE_BONUS * getMultiplier( data.player ); } private void applyRandomSouls( OnLoot.Data data ) { From a1db154f7759c248c01461dcbdd01716bbcbf991 Mon Sep 17 00:00:00 2001 From: Majrusz Date: Fri, 15 Sep 2023 15:17:23 +0200 Subject: [PATCH 3/5] Fixed crash on startup (reported by @Inf0214) --- .../java/com/majruszsdifficulty/items/EvokerFangScrollItem.java | 1 + .../java/com/majruszsdifficulty/items/SonicBoomScrollItem.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/com/majruszsdifficulty/items/EvokerFangScrollItem.java b/src/main/java/com/majruszsdifficulty/items/EvokerFangScrollItem.java index 0f7d7a1c3..1c8a3f986 100644 --- a/src/main/java/com/majruszsdifficulty/items/EvokerFangScrollItem.java +++ b/src/main/java/com/majruszsdifficulty/items/EvokerFangScrollItem.java @@ -92,6 +92,7 @@ private void increaseDamage( OnPreDamaged.Data data ) { public static class Tooltip { public Tooltip() { OnItemAttributeTooltip.listen( this::addSpellInfo ) + .addCondition( Condition.predicate( data->Registries.EVOKER_FANG_SCROLL.isPresent() ) ) .addCondition( Condition.predicate( data->data.itemStack.is( Registries.EVOKER_FANG_SCROLL.get() ) ) ); } diff --git a/src/main/java/com/majruszsdifficulty/items/SonicBoomScrollItem.java b/src/main/java/com/majruszsdifficulty/items/SonicBoomScrollItem.java index 4551027bf..76f84695b 100644 --- a/src/main/java/com/majruszsdifficulty/items/SonicBoomScrollItem.java +++ b/src/main/java/com/majruszsdifficulty/items/SonicBoomScrollItem.java @@ -63,6 +63,7 @@ protected SoundEvent getCastSound() { public static class Tooltip { public Tooltip() { OnItemAttributeTooltip.listen( this::addSpellInfo ) + .addCondition( Condition.predicate( data->Registries.SONIC_BOOM_SCROLL.isPresent() ) ) .addCondition( Condition.predicate( data->data.itemStack.is( Registries.SONIC_BOOM_SCROLL.get() ) ) ); } From b08fc6846bb41d494939e67869dd1606e99781b5 Mon Sep 17 00:00:00 2001 From: Majrusz Date: Fri, 15 Sep 2023 15:20:56 +0200 Subject: [PATCH 4/5] Fixed bug with certain treasure bags being available in survival mode even if they were disabled (reported by @Bosskiller2001) --- .../majruszsdifficulty/treasurebags/TreasureBagManager.java | 1 + .../undeadarmy/components/RewardsController.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/majruszsdifficulty/treasurebags/TreasureBagManager.java b/src/main/java/com/majruszsdifficulty/treasurebags/TreasureBagManager.java index d28d56704..6fcd525bf 100644 --- a/src/main/java/com/majruszsdifficulty/treasurebags/TreasureBagManager.java +++ b/src/main/java/com/majruszsdifficulty/treasurebags/TreasureBagManager.java @@ -96,6 +96,7 @@ public TreasureBagManager() { OnPlayerTick.listen( this::giveTreasureBagToHero ) .addCondition( Condition.isServer() ) .addCondition( Condition.< OnPlayerTick.Data > cooldown( 20, Dist.DEDICATED_SERVER ).configurable( false ) ) + .addCondition( Condition.predicate( data->TreasureBagItem.Pillager.CONFIG.isEnabled() ) ) .addCondition( Condition.predicate( data->{ Raid raid = data.getServerLevel().getRaidAt( data.player.blockPosition() ); if( raid == null || !raid.isVictory() || !data.player.hasEffect( MobEffects.HERO_OF_THE_VILLAGE ) ) { diff --git a/src/main/java/com/majruszsdifficulty/undeadarmy/components/RewardsController.java b/src/main/java/com/majruszsdifficulty/undeadarmy/components/RewardsController.java index 4427758aa..66fe95ab9 100644 --- a/src/main/java/com/majruszsdifficulty/undeadarmy/components/RewardsController.java +++ b/src/main/java/com/majruszsdifficulty/undeadarmy/components/RewardsController.java @@ -1,6 +1,7 @@ package com.majruszsdifficulty.undeadarmy.components; import com.majruszsdifficulty.Registries; +import com.majruszsdifficulty.items.TreasureBagItem; import com.majruszsdifficulty.undeadarmy.UndeadArmy; import com.majruszsdifficulty.undeadarmy.data.WaveDef; import com.mlib.entities.EntityHelper; @@ -12,7 +13,9 @@ record RewardsController( UndeadArmy undeadArmy ) implements IComponent { public void onWaveFinished() { this.giveExperienceReward(); if( this.undeadArmy.isLastWave() ) { - this.giveTreasureReward(); + if( TreasureBagItem.UndeadArmy.CONFIG.isEnabled() ) { + this.giveTreasureReward(); + } if( this.undeadArmy.config.isResetAllParticipantsKillRequirementsEnabled() ) { this.resetAllKillRequirements(); } From 2b10b2d147c2173166b8a47f47b2f63b4820be5b Mon Sep 17 00:00:00 2001 From: Majrusz Date: Fri, 15 Sep 2023 15:50:23 +0200 Subject: [PATCH 5/5] Removed unfinished tag --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 68e73d046..055f7b8bd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,6 @@ versions_minecraft=1.20.1 versions_minecraft_range=[1.20.1,1.21) versions_forge=47.1.0 versions_forge_range=[47.1.0,) -versions_mod=1.8.1-unfinished +versions_mod=1.8.1 versions_mlib=5.0.0 versions_mlib_range=[5.0.0,6.0.0) \ No newline at end of file