2020-02-01 17:22:34 +01:00
|
|
|
package de.ellpeck.naturesaura.compat.enchantibility;
|
|
|
|
|
|
|
|
import de.ellpeck.naturesaura.compat.ICompat;
|
|
|
|
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
2020-02-07 21:25:22 +01:00
|
|
|
import de.ellpeck.naturesaura.enchant.ModEnchantments;
|
|
|
|
import net.minecraftforge.event.TickEvent;
|
2020-04-01 01:46:33 +02:00
|
|
|
import net.minecraftforge.fml.DeferredWorkQueue;
|
2021-03-30 16:22:40 +02:00
|
|
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
2020-02-07 21:25:22 +01:00
|
|
|
import quarris.enchantability.api.EnchantabilityApi;
|
|
|
|
|
|
|
|
import java.util.Collections;
|
2020-02-01 17:22:34 +01:00
|
|
|
|
|
|
|
public class EnchantibilityCompat implements ICompat {
|
2021-03-30 16:22:40 +02:00
|
|
|
|
2020-02-01 17:22:34 +01:00
|
|
|
@Override
|
2021-03-30 16:22:40 +02:00
|
|
|
public void setup(FMLCommonSetupEvent event) {
|
|
|
|
event.enqueueWork(() -> {
|
2020-05-20 14:55:59 +02:00
|
|
|
EnchantabilityApi.registerEnchantEffect(EnchantibilityAuraMending.RES, ModEnchantments.AURA_MENDING, EnchantibilityAuraMending::new);
|
|
|
|
EnchantabilityApi.registerEffectComponent(EnchantibilityAuraMending.RES, TickEvent.PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));
|
2020-04-01 01:46:33 +02:00
|
|
|
});
|
2020-02-01 17:22:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2020-04-26 20:40:28 +02:00
|
|
|
public void setupClient() {
|
2020-02-01 17:22:34 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void addItemTags(ItemTagProvider provider) {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|