Skip to content

Commit

Permalink
style(utils): remove unnecessary access modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Mar 28, 2022
1 parent 7878059 commit 191b7d1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
Expand Up @@ -18,7 +18,7 @@

public class CreativeModeTabArgument implements ArgumentType<CreativeModeTab> {

private static final DynamicCommandExceptionType UNKNOWN_CREATIVE_MOD_TAB = new DynamicCommandExceptionType(
private static final DynamicCommandExceptionType UNKNOWN_CREATIVE_MODE_TAB = new DynamicCommandExceptionType(
(langId) -> TextUtils.I18nText(ArnicaLib.i18n("argument.creative_mod_tab.unknown"), langId)
);

Expand All @@ -33,7 +33,7 @@ public CreativeModeTab parse(StringReader reader) throws CommandSyntaxException
.stream()
.filter((tab) -> getLangId(tab).equals(langId))
.findAny()
.orElseThrow(() -> UNKNOWN_CREATIVE_MOD_TAB.create(langId));
.orElseThrow(() -> UNKNOWN_CREATIVE_MODE_TAB.create(langId));
}

@Override
Expand Down
Expand Up @@ -163,10 +163,10 @@ static void removeEffect(LivingEntity entity, Predicate<MobEffectInstance> condi
toRemove.forEach(effect -> entity.removeEffect(effect));
}

static Predicate<MobEffectInstance> IS_BENEFICIAL = (e) -> e.getEffect().isBeneficial();
static Predicate<MobEffectInstance> IS_NOT_BENEFICIAL = (e) -> !e.getEffect().isBeneficial();
static Predicate<MobEffectInstance> IS_HARMFUL = (e) -> e.getEffect().getCategory() == MobEffectCategory.HARMFUL;
static Predicate<MobEffectInstance> IS_NEUTRAL = (e) -> e.getEffect().getCategory() == MobEffectCategory.NEUTRAL;
Predicate<MobEffectInstance> IS_BENEFICIAL = (e) -> e.getEffect().isBeneficial();
Predicate<MobEffectInstance> IS_NOT_BENEFICIAL = (e) -> !e.getEffect().isBeneficial();
Predicate<MobEffectInstance> IS_HARMFUL = (e) -> e.getEffect().getCategory() == MobEffectCategory.HARMFUL;
Predicate<MobEffectInstance> IS_NEUTRAL = (e) -> e.getEffect().getCategory() == MobEffectCategory.NEUTRAL;


static int getEffectLevel(LivingEntity entity, MobEffect effect) {
Expand Down
Expand Up @@ -36,11 +36,9 @@ static String getRegistryName(ItemStack itemStack) {
return getRegistryName(itemStack.getItem());
}

static Predicate<ItemStack> IS_VANILLA_ITEM = (itemStack) -> RegistryUtils.IS_VANILLA.test(itemStack.getItem());

static Predicate<Item> IS_AIR = (item) -> item == Items.AIR;

static Predicate<Item> IS_CATEGORIZED = (item) -> item.getItemCategory() != null;
Predicate<ItemStack> IS_VANILLA_ITEM = (itemStack) -> RegistryUtils.IS_VANILLA.test(itemStack.getItem());
Predicate<Item> IS_AIR = (item) -> item == Items.AIR;
Predicate<Item> IS_CATEGORIZED = (item) -> item.getItemCategory() != null;

@SuppressWarnings("deprecation")
static int getMaxStackSize(Item item) {
Expand Down
Expand Up @@ -4,11 +4,11 @@

public interface MCTimeUtils {

static final int ticksAtMidnight = 18000;
static final int ticksPerDay = 24000;
static final int ticksPerHour = 1000;
static final double ticksPerMinute = 1000d / 60d;
static final double ticksPerSecond = 1000d / 60d / 60d;
int ticksAtMidnight = 18000;
int ticksPerDay = 24000;
int ticksPerHour = 1000;
double ticksPerMinute = 1000d / 60d;
double ticksPerSecond = 1000d / 60d / 60d;

static long[] getTime(Level level) {
return new long[] {level.getDayTime(), level.getGameTime(), System.currentTimeMillis()};
Expand Down

0 comments on commit 191b7d1

Please sign in to comment.