mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
made all of the compat modules run later because honestly
This commit is contained in:
parent
bbe138ac78
commit
0f23eb834b
3 changed files with 16 additions and 8 deletions
|
@ -4,6 +4,7 @@ import com.blamejared.crafttweaker.api.CraftTweakerAPI;
|
||||||
import com.blamejared.crafttweaker.api.actions.IAction;
|
import com.blamejared.crafttweaker.api.actions.IAction;
|
||||||
import de.ellpeck.naturesaura.compat.ICompat;
|
import de.ellpeck.naturesaura.compat.ICompat;
|
||||||
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
||||||
|
import net.minecraftforge.fml.DeferredWorkQueue;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -25,9 +26,11 @@ public class CraftTweakerCompat implements ICompat {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postInit() {
|
public void postInit() {
|
||||||
for (Supplier<IAction> action : SCHEDULED_ACTIONS)
|
DeferredWorkQueue.runLater(() -> {
|
||||||
CraftTweakerAPI.apply(action.get());
|
for (Supplier<IAction> action : SCHEDULED_ACTIONS)
|
||||||
SCHEDULED_ACTIONS.clear();
|
CraftTweakerAPI.apply(action.get());
|
||||||
|
SCHEDULED_ACTIONS.clear();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,7 @@ import de.ellpeck.naturesaura.compat.ICompat;
|
||||||
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
||||||
import de.ellpeck.naturesaura.enchant.ModEnchantments;
|
import de.ellpeck.naturesaura.enchant.ModEnchantments;
|
||||||
import net.minecraftforge.event.TickEvent;
|
import net.minecraftforge.event.TickEvent;
|
||||||
|
import net.minecraftforge.fml.DeferredWorkQueue;
|
||||||
import quarris.enchantability.api.EnchantabilityApi;
|
import quarris.enchantability.api.EnchantabilityApi;
|
||||||
import quarris.enchantability.api.EnchantabilityApi.IInternals;
|
import quarris.enchantability.api.EnchantabilityApi.IInternals;
|
||||||
|
|
||||||
|
@ -12,9 +13,11 @@ import java.util.Collections;
|
||||||
public class EnchantibilityCompat implements ICompat {
|
public class EnchantibilityCompat implements ICompat {
|
||||||
@Override
|
@Override
|
||||||
public void preInit() {
|
public void preInit() {
|
||||||
IInternals api = EnchantabilityApi.getInstance();
|
DeferredWorkQueue.runLater(() -> {
|
||||||
api.registerEnchantEffect(EnchantibilityAuraMending.RES, ModEnchantments.AURA_MENDING, EnchantibilityAuraMending::new);
|
IInternals api = EnchantabilityApi.getInstance();
|
||||||
api.registerEffectComponent(EnchantibilityAuraMending.RES, TickEvent.PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));
|
api.registerEnchantEffect(EnchantibilityAuraMending.RES, ModEnchantments.AURA_MENDING, EnchantibilityAuraMending::new);
|
||||||
|
api.registerEffectComponent(EnchantibilityAuraMending.RES, TickEvent.PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -57,8 +57,10 @@ public class PatchouliCompat implements ICompat {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void preInit() {
|
public void preInit() {
|
||||||
PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":rf_converter", ModConfig.instance.rfConverter.get());
|
DeferredWorkQueue.runLater(() -> {
|
||||||
PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":chunk_loader", ModConfig.instance.chunkLoader.get());
|
PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":rf_converter", ModConfig.instance.rfConverter.get());
|
||||||
|
PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":chunk_loader", ModConfig.instance.chunkLoader.get());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue