mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-13 16:54:04 +00:00
Fix server causing error with NEI
This commit is contained in:
1 parent
5acd289a76
commit
83f4eef00e
6 files changed
+50
-47
No files matched your search
+8
-6
@@ -1,4 +1,4 @@
|
||||
//version: 1684218858
|
||||
//version: 1685785062
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
Also, you may replace this file at any time if there is an update available.
|
||||
@@ -1276,12 +1276,14 @@ tasks.register('faq') {
|
||||
description = 'Prints frequently asked questions about building a project'
|
||||
|
||||
doLast {
|
||||
print("If your build fails to fetch dependencies, they might have been deleted and replaced by newer " +
|
||||
"versions.\nCheck if the versions you try to fetch are still on the distributing sites.\n" +
|
||||
"The links can be found in repositories.gradle and build.gradle:repositories, " +
|
||||
"not build.gradle:buildscript.repositories - this one is for gradle plugin metadata.\n\n" +
|
||||
print("If your build fails to fetch dependencies, run './gradlew updateDependencies'. " +
|
||||
"Or you can manually check if the versions are still on the distributing sites - " +
|
||||
"the links can be found in repositories.gradle and build.gradle:repositories, " +
|
||||
"but not build.gradle:buildscript.repositories - those ones are for gradle plugin metadata.\n\n" +
|
||||
"If your build fails to recognize the syntax of new Java versions, enable Jabel in your " +
|
||||
"gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties.")
|
||||
"gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties. " +
|
||||
"However, keep in mind that Jabel enables only syntax features, but not APIs that were introduced in " +
|
||||
"Java 9 or later.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import fox.spiteful.avaritia.compat.bloodmagic.Bloody;
|
||||
import fox.spiteful.avaritia.compat.botania.Tsundere;
|
||||
import fox.spiteful.avaritia.compat.forestry.Ranger;
|
||||
import fox.spiteful.avaritia.compat.minetweaker.Tweak;
|
||||
import fox.spiteful.avaritia.compat.nei.NotEnough;
|
||||
import fox.spiteful.avaritia.compat.tails.InfiniteFoxes;
|
||||
import fox.spiteful.avaritia.compat.thaumcraft.Lucrum;
|
||||
import fox.spiteful.avaritia.compat.ticon.Tonkers;
|
||||
@@ -64,14 +63,6 @@ public class Compat {
|
||||
}
|
||||
|
||||
public static void compatify() {
|
||||
if (nei) {
|
||||
try {
|
||||
NotEnough.items();
|
||||
} catch (Throwable e) {
|
||||
Lumberjack.log(Level.INFO, e, "Avaritia had Too Many Items.");
|
||||
}
|
||||
}
|
||||
|
||||
if (tweak) {
|
||||
try {
|
||||
Tweak.registrate();
|
||||
|
||||
@@ -12,7 +12,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemInfinitatoCostume extends Item {
|
||||
|
||||
private static final String[] types = new String[] { "armstrong", "moon", "egbert", "francis" };
|
||||
public static final String[] types = new String[] { "armstrong", "moon", "egbert", "francis" };
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] icons;
|
||||
|
||||
@@ -5,12 +5,10 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import fox.spiteful.avaritia.blocks.LudicrousBlocks;
|
||||
import fox.spiteful.avaritia.compat.Compat;
|
||||
import fox.spiteful.avaritia.compat.nei.NotEnough;
|
||||
import fox.spiteful.avaritia.crafting.ExtremeCraftingManager;
|
||||
import fox.spiteful.avaritia.crafting.ExtremeShapedRecipe;
|
||||
import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
@@ -71,11 +69,6 @@ public class Tsundere {
|
||||
GameRegistry.registerTileEntity(TileInfinitato.class, "Avaritia_Infinitato");
|
||||
costumes = new ItemInfinitatoCostume();
|
||||
GameRegistry.registerItem(costumes, "costumes");
|
||||
if (Compat.nei) {
|
||||
try {
|
||||
NotEnough.hide(new ItemStack(costumes, 1, OreDictionary.WILDCARD_VALUE));
|
||||
} catch (Throwable e) {}
|
||||
}
|
||||
|
||||
Block potato = Compat.getBlock("Botania", "tinyPotato");
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package fox.spiteful.avaritia.compat.nei;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
import fox.spiteful.avaritia.compat.botania.ItemInfinitatoCostume;
|
||||
import fox.spiteful.avaritia.compat.botania.Tsundere;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class NEI_Avaritia_Config implements IConfigureNEI {
|
||||
|
||||
@Override
|
||||
public void loadConfig() {
|
||||
ExtremeShapedRecipeHandler shaped = new ExtremeShapedRecipeHandler();
|
||||
ExtremeShapelessRecipeHandler shapeless = new ExtremeShapelessRecipeHandler();
|
||||
CompressionHandler compress = new CompressionHandler();
|
||||
API.registerRecipeHandler(shaped);
|
||||
API.registerRecipeHandler(shapeless);
|
||||
API.registerRecipeHandler(compress);
|
||||
API.registerUsageHandler(shaped);
|
||||
API.registerUsageHandler(shapeless);
|
||||
API.registerUsageHandler(compress);
|
||||
|
||||
if (Tsundere.costumes != null) {
|
||||
for (int i = 0; i < ItemInfinitatoCostume.types.length; i++) {
|
||||
API.hideItem(new ItemStack(Tsundere.costumes, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Avaritia NEI plugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package fox.spiteful.avaritia.compat.nei;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import codechicken.nei.api.API;
|
||||
|
||||
public class NotEnough {
|
||||
|
||||
public static void items() {
|
||||
ExtremeShapedRecipeHandler shaped = new ExtremeShapedRecipeHandler();
|
||||
ExtremeShapelessRecipeHandler shapeless = new ExtremeShapelessRecipeHandler();
|
||||
CompressionHandler compress = new CompressionHandler();
|
||||
API.registerRecipeHandler(shaped);
|
||||
API.registerRecipeHandler(shapeless);
|
||||
API.registerRecipeHandler(compress);
|
||||
API.registerUsageHandler(shaped);
|
||||
API.registerUsageHandler(shapeless);
|
||||
API.registerUsageHandler(compress);
|
||||
}
|
||||
|
||||
public static void hide(ItemStack stack) {
|
||||
API.hideItem(stack);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user