Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow negative amplifiers in potion effects #3922

Merged
merged 3 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading