added back enchantability compat

This commit is contained in:
Ellpeck 2020-02-07 21:25:22 +01:00
parent 352be206f2
commit d1de398db4
3 changed files with 13 additions and 5 deletions

View file

@ -92,6 +92,9 @@ repositories {
maven {
url = "https://maven.theillusivec4.top/"
}
maven {
url 'https://pkgs.dev.azure.com/quarris/Enchantability/_packaging/Release%40Local/maven/v1'
}
}
dependencies {
@ -102,6 +105,7 @@ dependencies {
compile fg.deobf("com.blamejared.crafttweaker:CraftTweaker-1.15.1:6.0.0.4")
compile fg.deobf("vazkii.patchouli:Patchouli:1.15.2-1.1-25.16")
compile fg.deobf("quarris.enchantability:enchantability:1.3.0.7")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.15.2-2.0-beta2")
compileOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.15.2-2.0-beta2:api")
@ -144,7 +148,7 @@ publishing {
pom.withXml {
def node = asNode()
if(node.dependencies.size() > 0)
if (node.dependencies.size() > 0)
node.remove(node.dependencies)
}
}

View file

@ -1,4 +1,3 @@
/* TODO Enchantability
package de.ellpeck.naturesaura.compat.enchantibility;
import de.ellpeck.naturesaura.NaturesAura;
@ -35,4 +34,3 @@ public class EnchantibilityAuraMending extends AbstractEnchantEffect {
return RES;
}
}
*/

View file

@ -2,13 +2,19 @@ package de.ellpeck.naturesaura.compat.enchantibility;
import de.ellpeck.naturesaura.compat.ICompat;
import de.ellpeck.naturesaura.data.ItemTagProvider;
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;
public class EnchantibilityCompat implements ICompat {
@Override
public void preInit() {
/*IInternals api = EnchantabilityApi.getInstance();
IInternals api = EnchantabilityApi.getInstance();
api.registerEnchantEffect(EnchantibilityAuraMending.RES, ModEnchantments.AURA_MENDING, EnchantibilityAuraMending::new);
api.registerEffectComponent(EnchantibilityAuraMending.RES, PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));*/
api.registerEffectComponent(EnchantibilityAuraMending.RES, TickEvent.PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));
}
@Override