mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-26 06:53:22 +00:00
Done
This commit is contained in:
1 parent
48b68bef9d
commit
b0c538392d
13 files changed
+513
-11
No files matched your search
@@ -64,8 +64,8 @@ public class Avaritia {
|
||||
|
||||
LudicrousEntities.letLooseTheDogsOfWar();
|
||||
proxy.prepareForPretty();
|
||||
if(Compat.botan && Config.alfheim)
|
||||
Alfheim.packYourBags();
|
||||
//if(Compat.botan && Config.alfheim)
|
||||
//Alfheim.packYourBags();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
@@ -33,12 +33,14 @@ public class Config {
|
||||
public static boolean metallurgy = true;
|
||||
public static boolean enderio = true;
|
||||
public static boolean forestry = true;
|
||||
public static boolean bees = false;
|
||||
public static boolean ee3 = true;
|
||||
public static boolean extracells = true;
|
||||
public static boolean witch = true;
|
||||
public static boolean rotisserie = true;
|
||||
|
||||
public static boolean alfheim = false;
|
||||
//public static int alfheimID;
|
||||
|
||||
public static boolean copper = true;
|
||||
public static boolean tin = true;
|
||||
@@ -83,12 +85,14 @@ public class Config {
|
||||
metallurgy = conf.get("compatibility", "Metallurgy", true).getBoolean(true);
|
||||
enderio = conf.get("compatibility", "EnderIO", true).getBoolean(true);
|
||||
forestry = conf.get("compatibility", "Forestry", true).getBoolean(true);
|
||||
bees = conf.get("compatibility", "Forestry Bees", false).getBoolean(false);
|
||||
ee3 = conf.get("compatibility", "Equivalent Exchange 3", true).getBoolean(true);
|
||||
extracells = conf.get("compatibility", "Extra Cells", true).getBoolean(true);
|
||||
witch = conf.get("compatibility", "Witchery", true).getBoolean(true);
|
||||
rotisserie = conf.get("compatibility", "Rotarycraft", true).getBoolean(true);
|
||||
|
||||
alfheim = conf.get("compatibility", "Alfheim", false).getBoolean(false);
|
||||
//alfheim = conf.get("compatibility", "Alfheim", false).getBoolean(false);
|
||||
alfheim = false;
|
||||
|
||||
conf.addCustomCategoryComment("materials", "Disable to stop using that material in recipes. Useful if a mod adds unobtainable placeholder ores.");
|
||||
copper = conf.get("materials", "Copper", true).getBoolean(true);
|
||||
|
||||
@@ -54,6 +54,16 @@ public class AchievementTrigger {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onItemSmelted(PlayerEvent.ItemSmeltedEvent event) {
|
||||
if(event.smelting != null){
|
||||
|
||||
if(event.smelting.getItem() == LudicrousItems.singularity){
|
||||
event.player.addStat(Achievements.singularity, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBorken(BreakEvent event){
|
||||
if(event.block == LudicrousBlocks.dire_crafting && event.getPlayer() != null)
|
||||
|
||||
@@ -8,7 +8,7 @@ import fox.spiteful.avaritia.blocks.LudicrousBlocks;
|
||||
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.modtweaker.Tweak;
|
||||
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;
|
||||
@@ -17,7 +17,6 @@ import fox.spiteful.avaritia.crafting.ExtremeCraftingManager;
|
||||
import fox.spiteful.avaritia.crafting.Grinder;
|
||||
import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
@@ -2,6 +2,7 @@ package fox.spiteful.avaritia.compat;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import fox.spiteful.avaritia.Config;
|
||||
import fox.spiteful.avaritia.compat.botania.RenderInfinitato;
|
||||
import fox.spiteful.avaritia.compat.botania.RenderTileInfinitato;
|
||||
import fox.spiteful.avaritia.compat.botania.TileInfinitato;
|
||||
@@ -28,7 +29,7 @@ public class CompatClient {
|
||||
}
|
||||
|
||||
public static void lateComprettify() {
|
||||
if(Compat.forestry){
|
||||
if(Compat.forestry && Config.bees){
|
||||
MinecraftForgeClient.registerItemRenderer(LudicrousItems.beesource, new FancyHaloRenderer());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ public class Tsundere {
|
||||
Grinder.catalyst.getInput().add(terra);
|
||||
Grinder.catalyst.getInput().add(gaia);
|
||||
|
||||
if(Config.alfheim)
|
||||
Alfheim.vacationTime();
|
||||
//if(Config.alfheim)
|
||||
//Alfheim.vacationTime();
|
||||
|
||||
BotaniaAPI.registerSubTile("asgardandelion", SubTileCheaty.class);
|
||||
BotaniaAPI.registerSubTileSignature(SubTileCheaty.class, new Signature("asgardandelion"));
|
||||
|
||||
@@ -3,6 +3,7 @@ package fox.spiteful.avaritia.compat.forestry;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import fox.spiteful.avaritia.Config;
|
||||
import fox.spiteful.avaritia.compat.Compat;
|
||||
import fox.spiteful.avaritia.crafting.Grinder;
|
||||
import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
@@ -33,6 +34,9 @@ public class Ranger {
|
||||
honeydew = Compat.getItem("Forestry", "honeydew");
|
||||
Item panel = Compat.getItem("Forestry", "craftingMaterial");
|
||||
|
||||
if(!Config.bees)
|
||||
return;
|
||||
|
||||
LudicrousItems.combs = new ItemComb();
|
||||
GameRegistry.registerItem(LudicrousItems.combs, "Combs");
|
||||
LudicrousItems.beesource = new ItemBeesource();
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
package fox.spiteful.avaritia.compat.minetweaker;
|
||||
|
||||
import fox.spiteful.avaritia.crafting.CompressOreRecipe;
|
||||
import fox.spiteful.avaritia.crafting.CompressorManager;
|
||||
import fox.spiteful.avaritia.crafting.CompressorRecipe;
|
||||
import fox.spiteful.avaritia.crafting.ExtremeCraftingManager;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import minetweaker.api.oredict.IOreDictEntry;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
@ZenClass("mods.avaritia.Compressor")
|
||||
public class Compressor {
|
||||
|
||||
@ZenMethod
|
||||
public static void add(IItemStack output, int amount, IIngredient input, boolean exact){
|
||||
CompressorRecipe recipe = null;
|
||||
if(input instanceof IOreDictEntry)
|
||||
recipe = new CompressOreRecipe(toStack(output), amount, toString((IOreDictEntry)input), exact);
|
||||
else if(input instanceof IItemStack)
|
||||
recipe = new CompressorRecipe(toStack(output), amount, toStack((IItemStack)input), exact);
|
||||
if(recipe != null)
|
||||
MineTweakerAPI.apply(new Add(recipe));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void add(IItemStack output, int amount, IIngredient input){
|
||||
add(output, amount, input, true);
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void remove(IItemStack output){
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction {
|
||||
CompressorRecipe recipe;
|
||||
|
||||
public Add(CompressorRecipe add){
|
||||
recipe = add;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
|
||||
CompressorManager.getRecipes().add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo(){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo(){
|
||||
CompressorManager.getRecipes().remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe(){
|
||||
return "Adding Compressor Recipe for " + recipe.getOutput().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo(){
|
||||
return "Un-adding Compressor Recipe for " + recipe.getOutput().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class Remove implements IUndoableAction {
|
||||
CompressorRecipe recipe = null;
|
||||
ItemStack remove;
|
||||
|
||||
public Remove(ItemStack rem){
|
||||
remove = rem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
|
||||
for(Object obj : ExtremeCraftingManager.getInstance().getRecipeList()){
|
||||
if(obj instanceof IRecipe){
|
||||
CompressorRecipe craft = (CompressorRecipe)obj;
|
||||
if(craft.getOutput().isItemEqual(remove)) {
|
||||
recipe = craft;
|
||||
CompressorManager.getRecipes().remove(obj);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo(){
|
||||
return recipe != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo(){
|
||||
CompressorManager.getRecipes().add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe(){
|
||||
return "Removing Compressor Recipe for " + remove.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo(){
|
||||
return "Un-removing Compressor Recipe for " + remove.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static ItemStack toStack(IItemStack item){
|
||||
if (item == null) return null;
|
||||
else {
|
||||
Object internal = item.getInternal();
|
||||
if (internal == null || !(internal instanceof ItemStack)) {
|
||||
MineTweakerAPI.getLogger().logError("Not a valid item stack: " + item);
|
||||
}
|
||||
return (ItemStack) internal;
|
||||
}
|
||||
}
|
||||
|
||||
private static Object toObject(IIngredient ingredient){
|
||||
if (ingredient == null) return null;
|
||||
else {
|
||||
if (ingredient instanceof IOreDictEntry) {
|
||||
return toString((IOreDictEntry)ingredient);
|
||||
} else if (ingredient instanceof IItemStack) {
|
||||
return toStack((IItemStack) ingredient);
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static Object[] toObjects(IIngredient[] list){
|
||||
if(list == null)
|
||||
return null;
|
||||
Object[] ingredients = new Object[list.length];
|
||||
for(int x = 0;x < list.length;x++){
|
||||
ingredients[x] = toObject(list[x]);
|
||||
}
|
||||
return ingredients;
|
||||
}
|
||||
|
||||
private static Object toActualObject(IIngredient ingredient){
|
||||
if (ingredient == null) return null;
|
||||
else {
|
||||
if (ingredient instanceof IOreDictEntry) {
|
||||
return OreDictionary.getOres(toString((IOreDictEntry) ingredient));
|
||||
} else if (ingredient instanceof IItemStack) {
|
||||
return toStack((IItemStack) ingredient);
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static String toString(IOreDictEntry entry) {
|
||||
return ((IOreDictEntry) entry).getName();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
package fox.spiteful.avaritia.compat.minetweaker;
|
||||
|
||||
import fox.spiteful.avaritia.crafting.ExtremeCraftingManager;
|
||||
import fox.spiteful.avaritia.crafting.ExtremeShapedOreRecipe;
|
||||
import fox.spiteful.avaritia.crafting.Grinder;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import minetweaker.api.oredict.IOreDictEntry;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ZenClass("mods.avaritia.ExtremeCrafting")
|
||||
public class ExtremeCrafting {
|
||||
|
||||
@ZenMethod
|
||||
public static void addShapeless(IItemStack output, IIngredient[] ingredients){
|
||||
|
||||
MineTweakerAPI.apply(new Add(new ShapelessOreRecipe(toStack(output), toObjects(ingredients))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addShaped(IItemStack output, IIngredient[][] ingredients){
|
||||
int height = ingredients.length;
|
||||
int width = 0;
|
||||
for(IIngredient[] row : ingredients){
|
||||
if(width < row.length)
|
||||
width = row.length;
|
||||
}
|
||||
Object[] input = new Object[width * height];
|
||||
int x = 0;
|
||||
for(IIngredient[] row : ingredients){
|
||||
for(IIngredient ingredient : row){
|
||||
input[x++] = toActualObject(ingredient);
|
||||
}
|
||||
}
|
||||
|
||||
MineTweakerAPI.apply(new Add(new ExtremeShapedOreRecipe(toStack(output), input, width, height)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void remove(IItemStack target){
|
||||
MineTweakerAPI.apply(new Remove(toStack(target)));
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction {
|
||||
IRecipe recipe;
|
||||
|
||||
public Add(IRecipe add){
|
||||
recipe = add;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
|
||||
ExtremeCraftingManager.getInstance().getRecipeList().add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo(){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo(){
|
||||
ExtremeCraftingManager.getInstance().getRecipeList().remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe(){
|
||||
return "Adding Xtreme Crafting Recipe for " + recipe.getRecipeOutput().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo(){
|
||||
return "Un-adding Xtreme Crafting Recipe for " + recipe.getRecipeOutput().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class Remove implements IUndoableAction {
|
||||
IRecipe recipe = null;
|
||||
ItemStack remove;
|
||||
|
||||
public Remove(ItemStack rem){
|
||||
remove = rem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
|
||||
for(Object obj : ExtremeCraftingManager.getInstance().getRecipeList()){
|
||||
if(obj instanceof IRecipe){
|
||||
IRecipe craft = (IRecipe)obj;
|
||||
if(craft.getRecipeOutput().isItemEqual(remove)) {
|
||||
recipe = craft;
|
||||
ExtremeCraftingManager.getInstance().getRecipeList().remove(obj);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo(){
|
||||
return recipe != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo(){
|
||||
ExtremeCraftingManager.getInstance().getRecipeList().add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe(){
|
||||
return "Removing Xtreme Crafting Recipe for " + remove.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo(){
|
||||
return "Un-removing Xtreme Crafting Recipe for " + remove.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class AddCatalyst implements IUndoableAction {
|
||||
Object ingredient;
|
||||
|
||||
public AddCatalyst(Object add){
|
||||
ingredient = add;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
|
||||
Grinder.catalyst.getInput().add(ingredient);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo(){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo(){
|
||||
Grinder.catalyst.getInput().remove(ingredient);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe(){
|
||||
if(ingredient instanceof ItemStack)
|
||||
return "Adding " + ((ItemStack)ingredient).getDisplayName() + " to Infinity Catalyst recipe.";
|
||||
else if(ingredient instanceof List)
|
||||
return "Adding " + ((ItemStack)(((List)ingredient).get(0))).getDisplayName() + " to Infinity Catalyst recipe.";
|
||||
else
|
||||
return "Adding something to Infinity Catalyst recipe.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo(){
|
||||
if(ingredient instanceof ItemStack)
|
||||
return "Removing " + ((ItemStack)ingredient).getDisplayName() + " from Infinity Catalyst recipe.";
|
||||
else if(ingredient instanceof List)
|
||||
return "Removing " + ((ItemStack)(((List)ingredient).get(0))).getDisplayName() + " from Infinity Catalyst recipe.";
|
||||
else
|
||||
return "Removing something from Infinity Catalyst recipe.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class RemoveCatalyst implements IUndoableAction {
|
||||
IIngredient ingredient;
|
||||
|
||||
public RemoveCatalyst(IIngredient rem){
|
||||
ingredient = rem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
|
||||
Grinder.catalyst.getInput().add(ingredient);
|
||||
for(Object ingredient : Grinder.catalyst.getInput()){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo(){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo(){
|
||||
Grinder.catalyst.getInput().remove(ingredient);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe(){
|
||||
return "Adding something to Infinity Catalyst recipe.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo(){
|
||||
return "Removing something from Infinity Catalyst recipe.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static ItemStack toStack(IItemStack item){
|
||||
if (item == null) return null;
|
||||
else {
|
||||
Object internal = item.getInternal();
|
||||
if (internal == null || !(internal instanceof ItemStack)) {
|
||||
MineTweakerAPI.getLogger().logError("Not a valid item stack: " + item);
|
||||
}
|
||||
return (ItemStack) internal;
|
||||
}
|
||||
}
|
||||
|
||||
private static Object toObject(IIngredient ingredient){
|
||||
if (ingredient == null) return null;
|
||||
else {
|
||||
if (ingredient instanceof IOreDictEntry) {
|
||||
return toString((IOreDictEntry)ingredient);
|
||||
} else if (ingredient instanceof IItemStack) {
|
||||
return toStack((IItemStack) ingredient);
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static Object[] toObjects(IIngredient[] list){
|
||||
if(list == null)
|
||||
return null;
|
||||
Object[] ingredients = new Object[list.length];
|
||||
for(int x = 0;x < list.length;x++){
|
||||
ingredients[x] = toObject(list[x]);
|
||||
}
|
||||
return ingredients;
|
||||
}
|
||||
|
||||
private static Object toActualObject(IIngredient ingredient){
|
||||
if (ingredient == null) return null;
|
||||
else {
|
||||
if (ingredient instanceof IOreDictEntry) {
|
||||
return OreDictionary.getOres(toString((IOreDictEntry) ingredient));
|
||||
} else if (ingredient instanceof IItemStack) {
|
||||
return toStack((IItemStack) ingredient);
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static String toString(IOreDictEntry entry) {
|
||||
return ((IOreDictEntry) entry).getName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package fox.spiteful.avaritia.compat.minetweaker;
|
||||
|
||||
import fox.spiteful.avaritia.Config;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
|
||||
public class Tweak {
|
||||
|
||||
public static void registrate(){
|
||||
MineTweakerAPI.registerClass(ExtremeCrafting.class);
|
||||
if(Config.craftingOnly)
|
||||
return;
|
||||
|
||||
MineTweakerAPI.registerClass(Compressor.class);
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ public class Mincer {
|
||||
"cropFerranium", "cropAurigold", "cropDiamahlia", "cropLapender", "cropEmeryllis", "cropRedstodendron", "cropCuprosia",
|
||||
"cropPetinia", "cropPlombean", "cropSilverweed", "cropJaslumine", "cropNiccissus", "cropPlatiolus", "cropOsmonium",
|
||||
"cropSandPear", "cropCitron"};
|
||||
private static final String[] knownMeatEntries = new String[]{"ingotMeatRaw", "dustMeat", "rawMutton", "rawCalamari"};
|
||||
private static final String[] knownMeatEntries = new String[]{"ingotMeatRaw", "dustMeat", "rawMutton"};
|
||||
private static List<ItemStack> knownMeats = new ArrayList<ItemStack>();
|
||||
|
||||
static {
|
||||
|
||||
@@ -42,8 +42,16 @@ public class CosmicBowRenderer extends CosmicItemRenderer implements IItemRender
|
||||
@Override
|
||||
public IIcon getStackIcon(ItemStack stack, int pass, EntityPlayer player) {
|
||||
Item item = stack.getItem();
|
||||
ItemStack inuse = ReflectionHelper.getPrivateValue(EntityPlayer.class, player, iiuObf);
|
||||
int time = ReflectionHelper.getPrivateValue(EntityPlayer.class, player, iiucObf);
|
||||
ItemStack inuse;
|
||||
if(player != null)
|
||||
inuse = ReflectionHelper.getPrivateValue(EntityPlayer.class, player, iiuObf);
|
||||
else
|
||||
inuse = stack;
|
||||
int time;
|
||||
if(player != null)
|
||||
time = ReflectionHelper.getPrivateValue(EntityPlayer.class, player, iiucObf);
|
||||
else
|
||||
time = 0;
|
||||
|
||||
return item.getIcon(stack, pass, player, inuse, time);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user