mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-19 03:39:17 +00:00
Started with 1.10 and 1.11.2
This commit is contained in:
125 files changed
+4845
-4991
No files matched your search
@@ -3,6 +3,7 @@ package minetweaker;
|
||||
import minetweaker.annotations.BracketHandler;
|
||||
import minetweaker.annotations.ModOnly;
|
||||
import minetweaker.api.client.IClient;
|
||||
import minetweaker.api.compat.*;
|
||||
import minetweaker.api.event.IEventManager;
|
||||
import minetweaker.api.formatting.IFormatter;
|
||||
import minetweaker.api.game.IGame;
|
||||
@@ -68,8 +69,9 @@ public class MineTweakerAPI {
|
||||
"Red",
|
||||
"Black"
|
||||
};
|
||||
|
||||
static {
|
||||
private static IJEIRecipeRegistry ijeiRecipeRegistry = new DummyJEIRecipeRegistry();
|
||||
|
||||
static {
|
||||
registerClassRegistry(ClassRegistry.class, "MT-API");
|
||||
|
||||
registerGlobalSymbol("logger", getJavaStaticGetterSymbol(MineTweakerAPI.class, "getLogger"));
|
||||
@@ -436,4 +438,12 @@ public class MineTweakerAPI {
|
||||
public static IJavaMethod getJavaMethod(Class cls, String name, Class... arguments) {
|
||||
return JavaMethod.get(GlobalRegistry.getTypeRegistry(), cls, name, arguments);
|
||||
}
|
||||
|
||||
public static IJEIRecipeRegistry getIjeiRecipeRegistry() {
|
||||
return ijeiRecipeRegistry;
|
||||
}
|
||||
|
||||
public static void setIjeiRecipeRegistry(IJEIRecipeRegistry ijeiRecipeRegistry) {
|
||||
MineTweakerAPI.ijeiRecipeRegistry = ijeiRecipeRegistry;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package minetweaker.api.compat;
|
||||
|
||||
import minetweaker.api.item.IIngredient;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class DummyJEIRecipeRegistry implements IJEIRecipeRegistry {
|
||||
|
||||
@Override
|
||||
public void addRecipe(Object object) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRecipe(Object object, String category) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeRecipe(Object object) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeRecipe(Object output, String category) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addFurnace(List<Object> inputs, Object output) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeFurnace(Object object) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addFuel(Collection<Object> input, int burnTime) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeFuel(Object object) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reloadItemList() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeItem(Object stack) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addItem(Object stack) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidateTooltips(IIngredient ingredient) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package minetweaker.api.compat;
|
||||
|
||||
import minetweaker.api.item.IIngredient;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public interface IJEIRecipeRegistry {
|
||||
|
||||
void addRecipe(Object object);
|
||||
|
||||
void addRecipe(Object object, String category);
|
||||
|
||||
void removeRecipe(Object output);
|
||||
|
||||
void removeRecipe(Object output, String category);
|
||||
|
||||
|
||||
void addFurnace(List<Object> inputs, Object output);
|
||||
|
||||
void removeFurnace(Object output);
|
||||
|
||||
void addFuel(Collection<Object> input, int burnTime);
|
||||
|
||||
void removeFuel(Object object);
|
||||
|
||||
void invalidateTooltips(IIngredient ingredient);
|
||||
|
||||
//To update the items in 1.10.2
|
||||
void reloadItemList();
|
||||
|
||||
//To update the items in 1.11.2 both below are used
|
||||
void removeItem(Object stack);
|
||||
|
||||
void addItem(Object stack);
|
||||
}
|
||||
Reference in new issue
Block a user