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;
|
|
|
|
import quarris.enchantability.api.EnchantabilityApi;
|
|
|
|
import quarris.enchantability.api.EnchantabilityApi.IInternals;
|
|
|
|
|
|
|
|
import java.util.Collections;
|
2020-02-01 17:22:34 +01:00
|
|
|
|
|
|
|
public class EnchantibilityCompat implements ICompat {
|
|
|
|
@Override
|
|
|
|
public void preInit() {
|
2020-02-07 21:25:22 +01:00
|
|
|
IInternals api = EnchantabilityApi.getInstance();
|
2020-02-01 17:22:34 +01:00
|
|
|
api.registerEnchantEffect(EnchantibilityAuraMending.RES, ModEnchantments.AURA_MENDING, EnchantibilityAuraMending::new);
|
2020-02-07 21:25:22 +01:00
|
|
|
api.registerEffectComponent(EnchantibilityAuraMending.RES, TickEvent.PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));
|
2020-02-01 17:22:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void preInitClient() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void postInit() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void addItemTags(ItemTagProvider provider) {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|