Omegapl Posted November 30, 2014 Share Posted November 30, 2014 Is there any information available about class EvolvedRecipe(class zombie.scripting.objects.EvolvedRecipe) ? Also is it possible to get somehow all kind of items needed for that evolvedrecipe ?something which is working like getSource() from normal recipes Link to comment Share on other sites More sharing options...
Omegapl Posted December 1, 2014 Author Share Posted December 1, 2014 Ok I solved it. In code below I get every evolved recipe and also name of every igredient in each recipe--from my kinda library LuaCHUtils.GetFieldValue = function(name,object)return object:getClass():getField(name):get(object);end--(...)for i=0,getEvolvedRecipes():size()-1 do local Recipes = getEvolvedRecipes():get(i); -- print(LuaCHUtils.GetFieldValue("baseItem", Recipes)) -- print(LuaCHUtils.GetFieldValue("itemsList", Recipes)) -- print(LuaCHUtils.GetFieldValue("resultItem", Recipes)) -- print(LuaCHUtils.GetFieldValue("maxItems", Recipes)) -- print(LuaCHUtils.GetFieldValue("itemsList", Recipes):values()) local map = LuaCHUtils.GetFieldValue("itemsList", Recipes) local value = map:values() local list = ArrayList.new(value)for j=0,list:size()-1 dolocal na = LuaCHUtils.GetFieldValue("name",list:get(j))endend--(...) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now