Skip to content

Commit

Permalink
Merged 1.9.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz authored Dec 31, 2023
2 parents 556a0e3 + 0f85942 commit 544a629
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- fixed game crash during Undead Army (reported by @NotTohm)
- fixed game crash caused by Blood Moon (reported by @ZacGames)
- fixed compatibility crash with Optifine (reported by @Fiocher)
- fixed bug with Bleeding chances exceeding 100% on items with custom chances (reported by @ZacGames)
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.majruszlibrary.events.OnItemAttributeTooltip;
import com.majruszlibrary.events.base.Event;
import com.majruszlibrary.events.base.Events;
import com.majruszlibrary.math.Range;
import com.majruszlibrary.text.TextHelper;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.MutableComponent;
Expand All @@ -27,7 +28,7 @@ public OnBleedingTooltip( OnItemAttributeTooltip data, int amplifier ) {
}

public void addItem( double chance ) {
MutableComponent component = TextHelper.translatable( "effect.majruszsdifficulty.bleeding.item_tooltip", TextHelper.percent( ( float )chance ), TextHelper.toRoman( this.amplifier + 1 ) )
MutableComponent component = TextHelper.translatable( "effect.majruszsdifficulty.bleeding.item_tooltip", TextHelper.percent( Range.CHANCE.clamp( ( float )chance ) ), TextHelper.toRoman( this.amplifier + 1 ) )
.withStyle( ChatFormatting.DARK_GREEN );

this.data.add( EquipmentSlot.MAINHAND, component );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public abstract class MixinBlockEntityWithoutLevelRenderer {
value = "INVOKE",
target = "Lcom/mojang/blaze3d/vertex/PoseStack;popPose ()V"
),
method = "renderByItem (Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemDisplayContext;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;II)V"
method = "renderByItem (Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemDisplayContext;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;II)V",
require = 0 // compatibility with Optifine
)
private void renderByItem( ItemStack itemStack, ItemDisplayContext context, PoseStack poseStack, MultiBufferSource multiBufferSource, int x, int y,
CallbackInfo callback
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.5
mod_version=1.9.6
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 544a629

Please sign in to comment.