Skip to content

Commit 79aa90b

Browse files
committed
Fix Evo Tools with potion efffects crashing.
1 parent 3f01480 commit 79aa90b

File tree

1 file changed

+1
-0
lines changed
  • common/src/main/java/generations/gg/generations/core/generationscore/common/world/item/tools/effects

1 file changed

+1
-0
lines changed

common/src/main/java/generations/gg/generations/core/generationscore/common/world/item/tools/effects/PotionToolEffect.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
public record PotionToolEffect(Holder<MobEffect> potionEffect, int amplifier, int duration, int durabilityCost) implements ToolEffect {
1515
@Override
1616
public boolean use(Level world, Player player, InteractionHand usedHand) {
17+
if(world.isClientSide) return false;
1718
MobEffectInstance currentEffect = player.getEffect(potionEffect);
1819
if (currentEffect != null && currentEffect.getAmplifier() > amplifier) return false;
1920
if (currentEffect != null && currentEffect.getAmplifier() == amplifier && currentEffect.getDuration() >= duration) return false;

0 commit comments

Comments
 (0)