mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 19:58:34 +01:00
updated dependencies
This commit is contained in:
parent
1ad751583b
commit
8c56d67133
7 changed files with 38 additions and 28 deletions
16
build.gradle
16
build.gradle
|
@ -101,18 +101,18 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft 'net.minecraftforge:forge:1.16.3-34.0.9'
|
minecraft 'net.minecraftforge:forge:1.16.5-36.1.3'
|
||||||
|
|
||||||
compileOnly fg.deobf("mezz.jei:jei-1.16.2:7.3.2.25:api")
|
compileOnly fg.deobf("mezz.jei:jei-1.16.5:7.6.1.75:api")
|
||||||
runtimeOnly fg.deobf("mezz.jei:jei-1.16.2:7.3.2.25")
|
runtimeOnly fg.deobf("mezz.jei:jei-1.16.5:7.6.1.75")
|
||||||
|
|
||||||
compileOnly fg.deobf("vazkii.patchouli:Patchouli:1.16.2-47:api")
|
compileOnly fg.deobf("vazkii.patchouli:Patchouli:1.16.4-50:api")
|
||||||
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:1.16.2-47")
|
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:1.16.4-50")
|
||||||
|
|
||||||
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.3-4.0.2.0")
|
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.5-4.0.5.0")
|
||||||
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.3-4.0.2.0:api")
|
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.5-4.0.5.0:api")
|
||||||
|
|
||||||
compile fg.deobf("quarris.enchantability:Enchantability:8.5.25")
|
compile fg.deobf("quarris.enchantability:Enchantability:11.0.48")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Example for how to get properties into the manifest for reading by the runtime..
|
// Example for how to get properties into the manifest for reading by the runtime..
|
||||||
|
|
|
@ -35,7 +35,6 @@ public final class NaturesAura {
|
||||||
|
|
||||||
public static final String MOD_ID = NaturesAuraAPI.MOD_ID;
|
public static final String MOD_ID = NaturesAuraAPI.MOD_ID;
|
||||||
public static final String MOD_NAME = "Nature's Aura";
|
public static final String MOD_NAME = "Nature's Aura";
|
||||||
public static final String VERSION = "@VERSION@";
|
|
||||||
|
|
||||||
public static final Logger LOGGER = LogManager.getLogger(MOD_NAME);
|
public static final Logger LOGGER = LogManager.getLogger(MOD_NAME);
|
||||||
public static final ItemGroup CREATIVE_TAB = new ItemGroup(MOD_ID) {
|
public static final ItemGroup CREATIVE_TAB = new ItemGroup(MOD_ID) {
|
||||||
|
@ -45,7 +44,7 @@ public final class NaturesAura {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
public static NaturesAura instance;
|
public static NaturesAura instance;
|
||||||
public static IProxy proxy = DistExecutor.runForDist(() -> ClientProxy::new, () -> ServerProxy::new);
|
public static IProxy proxy = DistExecutor.safeRunForDist(() -> ClientProxy::new, () -> ServerProxy::new);
|
||||||
|
|
||||||
public NaturesAura() {
|
public NaturesAura() {
|
||||||
instance = this;
|
instance = this;
|
||||||
|
@ -68,7 +67,7 @@ public final class NaturesAura {
|
||||||
Helper.registerCap(IAuraChunk.class);
|
Helper.registerCap(IAuraChunk.class);
|
||||||
Helper.registerCap(IWorldData.class);
|
Helper.registerCap(IWorldData.class);
|
||||||
|
|
||||||
Compat.setup();
|
Compat.setup(event);
|
||||||
PacketHandler.init();
|
PacketHandler.init();
|
||||||
new Multiblocks();
|
new Multiblocks();
|
||||||
|
|
||||||
|
@ -78,7 +77,7 @@ public final class NaturesAura {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(FMLCommonSetupEvent event) {
|
private void init(FMLCommonSetupEvent event) {
|
||||||
DeferredWorkQueue.runLater(ModConfig.instance::apply);
|
event.enqueueWork(ModConfig.instance::apply);
|
||||||
|
|
||||||
ModRecipes.init();
|
ModRecipes.init();
|
||||||
ModRegistry.init();
|
ModRegistry.init();
|
||||||
|
|
|
@ -6,6 +6,7 @@ import de.ellpeck.naturesaura.compat.enchantibility.EnchantibilityCompat;
|
||||||
import de.ellpeck.naturesaura.compat.patchouli.PatchouliCompat;
|
import de.ellpeck.naturesaura.compat.patchouli.PatchouliCompat;
|
||||||
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
||||||
import net.minecraftforge.fml.ModList;
|
import net.minecraftforge.fml.ModList;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -21,9 +22,9 @@ public final class Compat {
|
||||||
.build();
|
.build();
|
||||||
private static final Map<String, ICompat> MODULES = new HashMap<>();
|
private static final Map<String, ICompat> MODULES = new HashMap<>();
|
||||||
|
|
||||||
public static void setup() {
|
public static void setup(FMLCommonSetupEvent event) {
|
||||||
populateModules(ModList.get()::isLoaded);
|
populateModules(ModList.get()::isLoaded);
|
||||||
MODULES.values().forEach(ICompat::setup);
|
MODULES.values().forEach(c -> c.setup(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setupClient() {
|
public static void setupClient() {
|
||||||
|
|
|
@ -17,9 +17,11 @@ import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||||
import net.minecraftforge.common.util.LazyOptional;
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
import net.minecraftforge.event.AttachCapabilitiesEvent;
|
import net.minecraftforge.event.AttachCapabilitiesEvent;
|
||||||
import net.minecraftforge.fml.InterModComms;
|
import net.minecraftforge.fml.InterModComms;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
|
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
|
||||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||||
import top.theillusivec4.curios.api.CuriosCapability;
|
import top.theillusivec4.curios.api.CuriosCapability;
|
||||||
|
import top.theillusivec4.curios.api.SlotContext;
|
||||||
import top.theillusivec4.curios.api.SlotTypeMessage;
|
import top.theillusivec4.curios.api.SlotTypeMessage;
|
||||||
import top.theillusivec4.curios.api.type.capability.ICurio;
|
import top.theillusivec4.curios.api.type.capability.ICurio;
|
||||||
|
|
||||||
|
@ -39,7 +41,7 @@ public class CuriosCompat implements ICompat {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup(FMLCommonSetupEvent event) {
|
||||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::sendImc);
|
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::sendImc);
|
||||||
MinecraftForge.EVENT_BUS.addGenericListener(ItemStack.class, this::onCapabilitiesAttach);
|
MinecraftForge.EVENT_BUS.addGenericListener(ItemStack.class, this::onCapabilitiesAttach);
|
||||||
}
|
}
|
||||||
|
@ -65,7 +67,7 @@ public class CuriosCompat implements ICompat {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canRightClickEquip() {
|
public boolean canEquipFromUse(SlotContext slotContext) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package de.ellpeck.naturesaura.compat;
|
package de.ellpeck.naturesaura.compat;
|
||||||
|
|
||||||
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
import de.ellpeck.naturesaura.data.ItemTagProvider;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
|
|
||||||
public interface ICompat {
|
public interface ICompat {
|
||||||
|
|
||||||
void setup();
|
void setup(FMLCommonSetupEvent event);
|
||||||
|
|
||||||
void setupClient();
|
void setupClient();
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,16 @@ 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 net.minecraftforge.fml.DeferredWorkQueue;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
import quarris.enchantability.api.EnchantabilityApi;
|
import quarris.enchantability.api.EnchantabilityApi;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
public class EnchantibilityCompat implements ICompat {
|
public class EnchantibilityCompat implements ICompat {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup(FMLCommonSetupEvent event) {
|
||||||
DeferredWorkQueue.runLater(() -> {
|
event.enqueueWork(() -> {
|
||||||
EnchantabilityApi.registerEnchantEffect(EnchantibilityAuraMending.RES, ModEnchantments.AURA_MENDING, EnchantibilityAuraMending::new);
|
EnchantabilityApi.registerEnchantEffect(EnchantibilityAuraMending.RES, ModEnchantments.AURA_MENDING, EnchantibilityAuraMending::new);
|
||||||
EnchantabilityApi.registerEffectComponent(EnchantibilityAuraMending.RES, TickEvent.PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));
|
EnchantabilityApi.registerEffectComponent(EnchantibilityAuraMending.RES, TickEvent.PlayerTickEvent.class, EnchantibilityAuraMending::onPlayerTick, e -> Collections.singletonList(e.player));
|
||||||
});
|
});
|
||||||
|
|
|
@ -26,19 +26,21 @@ import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.DeferredWorkQueue;
|
import net.minecraftforge.fml.DeferredWorkQueue;
|
||||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
import vazkii.patchouli.api.BookDrawScreenEvent;
|
import vazkii.patchouli.api.BookDrawScreenEvent;
|
||||||
|
import vazkii.patchouli.api.IMultiblock;
|
||||||
import vazkii.patchouli.api.IVariable;
|
import vazkii.patchouli.api.IVariable;
|
||||||
import vazkii.patchouli.api.PatchouliAPI;
|
import vazkii.patchouli.api.PatchouliAPI;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.Month;
|
import java.time.Month;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class PatchouliCompat implements ICompat {
|
public class PatchouliCompat implements ICompat {
|
||||||
|
|
||||||
private static final ResourceLocation BOOK = new ResourceLocation(NaturesAura.MOD_ID, "book");
|
private static final ResourceLocation BOOK = new ResourceLocation(NaturesAura.MOD_ID, "book");
|
||||||
|
private static final Map<ResourceLocation, IMultiblock> MULTIBLOCKS = new HashMap<>();
|
||||||
|
|
||||||
public static void addPatchouliMultiblock(ResourceLocation name, String[][] pattern, Object... rawMatchers) {
|
public static void addPatchouliMultiblock(ResourceLocation name, String[][] pattern, Object... rawMatchers) {
|
||||||
for (int i = 1; i < rawMatchers.length; i += 2) {
|
for (int i = 1; i < rawMatchers.length; i += 2) {
|
||||||
|
@ -46,13 +48,13 @@ public class PatchouliCompat implements ICompat {
|
||||||
Matcher matcher = (Matcher) rawMatchers[i];
|
Matcher matcher = (Matcher) rawMatchers[i];
|
||||||
Matcher.ICheck check = matcher.getCheck();
|
Matcher.ICheck check = matcher.getCheck();
|
||||||
if (check == null)
|
if (check == null)
|
||||||
rawMatchers[i] = PatchouliAPI.instance.anyMatcher();
|
rawMatchers[i] = PatchouliAPI.get().anyMatcher();
|
||||||
else
|
else
|
||||||
rawMatchers[i] = PatchouliAPI.instance.predicateMatcher(matcher.getDefaultState(),
|
rawMatchers[i] = PatchouliAPI.get().predicateMatcher(matcher.getDefaultState(),
|
||||||
state -> check.matches(null, null, null, null, state, (char) 0));
|
state -> check.matches(null, null, null, null, state, (char) 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DeferredWorkQueue.runLater(() -> PatchouliAPI.instance.registerMultiblock(name, PatchouliAPI.instance.makeMultiblock(pattern, rawMatchers)));
|
MULTIBLOCKS.put(name, PatchouliAPI.get().makeMultiblock(pattern, rawMatchers));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends IRecipe<?>> T getRecipe(String type, String name) {
|
public static <T extends IRecipe<?>> T getRecipe(String type, String name) {
|
||||||
|
@ -68,10 +70,13 @@ public class PatchouliCompat implements ICompat {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup(FMLCommonSetupEvent event) {
|
||||||
DeferredWorkQueue.runLater(() -> {
|
event.enqueueWork(() -> {
|
||||||
PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":rf_converter", ModConfig.instance.rfConverter.get());
|
for (Map.Entry<ResourceLocation, IMultiblock> entry : MULTIBLOCKS.entrySet())
|
||||||
PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":chunk_loader", ModConfig.instance.chunkLoader.get());
|
PatchouliAPI.get().registerMultiblock(entry.getKey(), entry.getValue());
|
||||||
|
|
||||||
|
PatchouliAPI.get().setConfigFlag(NaturesAura.MOD_ID + ":rf_converter", ModConfig.instance.rfConverter.get());
|
||||||
|
PatchouliAPI.get().setConfigFlag(NaturesAura.MOD_ID + ":chunk_loader", ModConfig.instance.chunkLoader.get());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue