Skip to content

Commit

Permalink
Allow negative amplifiers in potion effects (#3922)
Browse files Browse the repository at this point in the history
* Allow negative amplifiers in potion effects

* Remove IllegalArgumentException from amplifier signature

* run spotlessApply
  • Loading branch information
ImMorpheus authored Nov 18, 2023
1 parent 0b344ee commit 335891f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ public PotionEffect.Builder duration(final @NonNull Ticks duration) {
}

@Override
public PotionEffect.Builder amplifier(final int amplifier) throws IllegalArgumentException {
if (amplifier < 0) {
throw new IllegalArgumentException("Amplifier must not be negative");
}
public PotionEffect.Builder amplifier(final int amplifier) {
this.amplifier = amplifier;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@

import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.network.Connection;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.common.bridge.network.ConnectionHolderBridge;
import org.spongepowered.common.mixin.api.minecraft.client.multiplayer.ClientCommonPacketListenerImpl_API;

Expand Down

0 comments on commit 335891f

Please sign in to comment.