From 5b23398fef9632ba586fc3a191313599567f0301 Mon Sep 17 00:00:00 2001 From: MarbleGate Date: Mon, 18 Dec 2023 10:30:25 +0800 Subject: [PATCH] Remove AppleSkinCompat --- .../common/OriginsClassesCommon.java | 4 -- .../compat/AppleSkinCompat.java | 38 ------------------- 2 files changed, 42 deletions(-) delete mode 100644 src/main/java/dev/limonblaze/originsclasses/compat/AppleSkinCompat.java diff --git a/src/main/java/dev/limonblaze/originsclasses/common/OriginsClassesCommon.java b/src/main/java/dev/limonblaze/originsclasses/common/OriginsClassesCommon.java index 1ace2c2..3ca78e8 100644 --- a/src/main/java/dev/limonblaze/originsclasses/common/OriginsClassesCommon.java +++ b/src/main/java/dev/limonblaze/originsclasses/common/OriginsClassesCommon.java @@ -2,7 +2,6 @@ import dev.limonblaze.originsclasses.OriginsClasses; import dev.limonblaze.originsclasses.common.network.S2CInfiniteTrader; -import dev.limonblaze.originsclasses.compat.AppleSkinCompat; import dev.limonblaze.originsclasses.common.network.S2CMultiMining; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.ModList; @@ -22,9 +21,6 @@ public class OriginsClassesCommon { public static void setup(final FMLCommonSetupEvent event) { event.enqueueWork(OriginsClassesCommon::initNetwork); - if(ModList.get().isLoaded("appleskin")) { - MinecraftForge.EVENT_BUS.register(AppleSkinCompat.class); - } } private static void initNetwork() { diff --git a/src/main/java/dev/limonblaze/originsclasses/compat/AppleSkinCompat.java b/src/main/java/dev/limonblaze/originsclasses/compat/AppleSkinCompat.java deleted file mode 100644 index 91229e2..0000000 --- a/src/main/java/dev/limonblaze/originsclasses/compat/AppleSkinCompat.java +++ /dev/null @@ -1,38 +0,0 @@ -package dev.limonblaze.originsclasses.compat; - -import io.github.edwinmindcraft.apoli.api.configuration.ListConfiguration; -import io.github.edwinmindcraft.apoli.common.power.ModifyFoodPower; -import io.github.edwinmindcraft.apoli.common.power.configuration.ModifyFoodConfiguration; -import net.minecraft.world.entity.ai.attributes.AttributeModifier; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import squeek.appleskin.api.event.FoodValuesEvent; -import squeek.appleskin.api.food.FoodValues; - -import java.util.function.Function; - -public class AppleSkinCompat { - - @SubscribeEvent - public static void onAppleSkinFoodValueEvent(FoodValuesEvent event) { -// Player player = event.player; -// ItemStack stack = event.itemStack; -// int hunger = (int) ModifyFoodPower.apply( -// ModifyFoodPower.getValidPowers(player, stack), -// player.level(), -// stack, -// event.modifiedFoodValues.hunger, -// ModifyFoodConfiguration::foodModifiers -// ); -// float saturation = (float) ModifyFoodPower.apply( -// ModifyFoodPower.getValidPowers(player, stack), -// player.level(), -// stack, -// event.modifiedFoodValues.saturationModifier, -// ModifyFoodConfiguration::saturationModifiers -// ); -// event.modifiedFoodValues = new FoodValues(hunger, saturation); - } - -}