Skip to content

Commit

Permalink
Fixed server crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz committed Feb 28, 2023
1 parent 04c4b50 commit 949274e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Binary file modified libs/majrusz-library-1.19.3-3.2.0.jar
Binary file not shown.
5 changes: 4 additions & 1 deletion src/main/java/com/majruszsdifficulty/items/SoulJarItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.level.Level;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.common.ForgeMod;
import net.minecraftforge.fml.DistExecutor;

import javax.annotation.Nullable;
import java.util.ArrayList;
Expand Down Expand Up @@ -149,8 +151,9 @@ private void increaseSpeed( OnBreakSpeed.Data data ) {
}

private void addTooltip( OnItemAttributeTooltip.Data data ) {
Player player = DistExecutor.unsafeCallWhenOn( Dist.CLIENT, ()->()->Minecraft.getInstance().player );
BonusInfo bonusInfo = new BonusInfo( data.itemStack.getOrCreateTag() );
float multiplier = getMultiplier( Minecraft.getInstance().player, data.itemStack );
float multiplier = getMultiplier( player, data.itemStack );
for( BonusType bonusType : bonusInfo.getBonusTypes() ) {
data.add( EquipmentSlot.OFFHAND, bonusType.getBonusComponent( multiplier ) );
}
Expand Down

0 comments on commit 949274e

Please sign in to comment.