Skip to content

Commit

Permalink
chore: Remove Preconditions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcchampions committed Dec 22, 2024
1 parent 7d99115 commit 9769e07
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.thebusybiscuit.slimefun4.core.attributes;

import com.google.common.base.Preconditions;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.utils.RadiationUtils;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedPotionEffectType;
Expand Down Expand Up @@ -31,9 +30,6 @@ public enum RadiationSymptom {
private final PotionEffect potionEffect;

RadiationSymptom(int minExposure, PotionEffectType type, int level) {
Preconditions.checkArgument(minExposure > 0, "The minimum exposure must be greater than 0.");
Preconditions.checkArgument(level >= 0, "The status effect level must be non-negative.");

this.minExposure = minExposure;
this.potionEffect = new PotionEffect(
type, Slimefun.getCfg().getOrSetDefault("options.radiation-update-interval", 1) * 20 + 20, level);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.thebusybiscuit.slimefun4.core.multiblocks;

import com.google.common.base.Preconditions;
import io.github.bakedlibs.dough.inventory.InvUtils;
import io.github.bakedlibs.dough.protection.Interaction;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
Expand Down Expand Up @@ -104,9 +103,6 @@ public void postRegister() {
public void load() {
super.load();

Preconditions.checkArgument(
displayRecipes.size() % 2 == 0, "This MultiBlockMachine's display recipes were illegally modified!");

for (int i = 0; i < displayRecipes.size(); i += 2) {
ItemStack inputStack = displayRecipes.get(i);
ItemStack outputStack = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.thebusybiscuit.slimefun4.core.services.sounds;

import com.google.common.base.Preconditions;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import java.util.logging.Level;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -112,9 +111,6 @@ public enum SoundEffect {
private final float defaultPitch;

SoundEffect(Sound sound, float volume, float pitch) {
Preconditions.checkArgument(volume >= 0, "The volume cannot be a negative number.");
Preconditions.checkArgument(pitch >= 0.5, "A pitch below 0.5 has no effect on the sound.");

this.defaultSound = sound.getKey().getKey();
this.defaultVolume = volume;
this.defaultPitch = pitch;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.thebusybiscuit.slimefun4.core.services.sounds;

import com.google.common.base.Preconditions;
import io.github.bakedlibs.dough.config.Config;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import java.util.EnumMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.thebusybiscuit.slimefun4.implementation.tasks.armor;

import com.google.common.base.Preconditions;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import java.util.logging.Level;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.thebusybiscuit.slimefun4.utils;

import com.google.common.base.Preconditions;
import io.github.thebusybiscuit.slimefun4.api.player.StatusEffect;
import io.github.thebusybiscuit.slimefun4.core.attributes.RadiationSymptom;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
Expand Down

0 comments on commit 9769e07

Please sign in to comment.