Skip to content

Commit

Permalink
refactor(next): remove LivingEatAddEffectEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Sep 28, 2022
1 parent 2571f00 commit 5fc3963
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 85 deletions.

This file was deleted.

@@ -1,23 +1,18 @@
package org.auioc.mcmod.arnicalib.server.event;

import static org.auioc.mcmod.arnicalib.ArnicaLib.LOGGER;
import java.util.List;
import java.util.Random;
import java.util.function.Function;
import org.apache.logging.log4j.Marker;
import org.auioc.mcmod.arnicalib.base.log.LogUtil;
import org.auioc.mcmod.arnicalib.game.chat.TextUtils;
import org.auioc.mcmod.arnicalib.server.event.impl.EyeOfEnderSurvivableEvent;
import org.auioc.mcmod.arnicalib.server.event.impl.LivingEatAddEffectEvent;
import org.auioc.mcmod.arnicalib.server.event.impl.ServerLoginEvent;
import net.minecraft.network.Connection;
import net.minecraft.network.protocol.handshake.ClientIntentionPacket;
import net.minecraft.network.protocol.login.ClientboundLoginDisconnectPacket;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.projectile.EyeOfEnder;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;

Expand All @@ -44,14 +39,6 @@ public static boolean onServerLogin(final ClientIntentionPacket packet, final Co
return false;
}

public static List<MobEffectInstance> onLivingEatAddEffect(LivingEntity entity, ItemStack food, List<MobEffectInstance> effects) {
LivingEatAddEffectEvent event = new LivingEatAddEffectEvent(entity, food, effects);
if (BUS.post(event)) {
event.getEffects().clear();
}
return event.getEffects();
}

public static Function<Random, Boolean> onEyeOfEnderSetSurvivable(ServerPlayer player, EyeOfEnder eye) {
EyeOfEnderSurvivableEvent event = new EyeOfEnderSurvivableEvent(player, eye);
BUS.post(event);
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/arnicalib.mixin.json
Expand Up @@ -10,7 +10,6 @@
"common.MixinEnchantment",
"server.MixinServerLifecycleHooks",
"server.MixinLootContext",
"server.MixinLivingEntity",
"server.MixinEyeOfEnder",
"server.MixinEnderEyeItem"
],
Expand Down

0 comments on commit 5fc3963

Please sign in to comment.