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 de.ellpeck.naturesaura.compat.ICompat;
|
||||
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
||||
import net.minecraftforge.fml.DeferredWorkQueue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -25,9 +26,11 @@ public class CraftTweakerCompat implements ICompat {
|
|||
|
||||
@Override
|
||||
public void postInit() {
|
||||
for (Supplier<IAction> action : SCHEDULED_ACTIONS)
|
||||
CraftTweakerAPI.apply(action.get());
|
||||
SCHEDULED_ACTIONS.clear();
|
||||
DeferredWorkQueue.runLater(() -> {
|
||||
for (Supplier<IAction> action : SCHEDULED_ACTIONS)
|
||||
CraftTweakerAPI.apply(action.get());
|
||||
SCHEDULED_ACTIONS.clear();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,6 +4,7 @@ import de.ellpeck.naturesaura.compat.ICompat;
|
|||
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
||||
import de.ellpeck.naturesaura.enchant.ModEnchantments;
|
||||
import net.minecraftforge.event.TickEvent;
|
||||
import net.minecraftforge.fml.DeferredWorkQueue;
|
||||
import quarris.enchantability.api.EnchantabilityApi;
|
||||
import quarris.enchantability.api.EnchantabilityApi.IInternals;
|
||||
|
||||
|
@ -12,9 +13,11 @@ import java.util.Collections;
|
|||
public class EnchantibilityCompat implements ICompat {
|
||||
@Override
|
||||
public void preInit() {
|
||||
IInternals api = EnchantabilityApi.getInstance();
|
||||
api.registerEnchantEffect(EnchantibilityAuraMending.RES, ModEnchantments.AURA_MENDING, EnchantibilityAuraMending::new);
|
||||
api.registerEffectComponent(EnchantibilityAuraMending.RES, TickEvent.PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));
|
||||
DeferredWorkQueue.runLater(() -> {
|
||||
IInternals api = EnchantabilityApi.getInstance();
|
||||
api.registerEnchantEffect(EnchantibilityAuraMending.RES, ModEnchantments.AURA_MENDING, EnchantibilityAuraMending::new);
|
||||
api.registerEffectComponent(EnchantibilityAuraMending.RES, TickEvent.PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -57,8 +57,10 @@ public class PatchouliCompat implements ICompat {
|
|||
|
||||
@Override
|
||||
public void preInit() {
|
||||
PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":rf_converter", ModConfig.instance.rfConverter.get());
|
||||
PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":chunk_loader", ModConfig.instance.chunkLoader.get());
|
||||
DeferredWorkQueue.runLater(() -> {
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue