• 0

    posted a message on Rise Of The Automatons v0.1a *CleanedUpSourceCode
    Quote from miners»

    Oh my god.. I just found this post and I must say, JTFreeman99 is a hero for reviving the amazing Zeitgeist/Rise of the Automatons! I was devastated when the original discontinued, and am very happy to see it was picked up again! Honestly, if you need any help with modeling or texturing I am happy to help! :D


    Thank you very much for the supporting words :D Like I said to other participants, show me what you can do :).

    Quote from ASolvie98»

    PM me for anything you need.


    Ok, I will, just got to get some stuff done... Still trying to think of a new name for it, to make it different from the original xD.

    Posted in: WIP Mods
  • 0

    posted a message on Rise Of The Automatons v0.1a *CleanedUpSourceCode
    Quote from ASolvie98»

    http://techne.zeux.me/profile/ASolvie I made two bots. Not really sure what type you wanted so I just made these.


    :o I must say these models are amazing! They even give me ideas :D Your in

    Posted in: WIP Mods
  • 0

    posted a message on Rise Of The Automatons v0.1a *CleanedUpSourceCode

    Sure, Show me what you can do :)

    Posted in: WIP Mods
  • 0

    posted a message on Looking for someone to create textures for mod
    Quote from Dextar77»

    Guess this thing is over?


    Actually quite the opposite, my modding endeavors still require atleast one texturer, as well as other skilled people, like model makers, fellow coders, etc. Thank you for asking :)

    Posted in: Mods Discussion
  • 0

    posted a message on Rise Of The Automatons v0.1a *CleanedUpSourceCode

    And, as a broadcast to anyone out there who is willing to give me an
    assist in the reconstruction, please don't hesitate to sending a PM, or
    leaving a comment below with what help you can provide. I know through
    past experiences that this mod had alot of potential back in Beta
    minecraft, with it's interesting concepts, and I believe that with a
    little effort this mod can make a huge comeback in the minecraft mod
    community. Thank you for your time.

    Posted in: WIP Mods
  • 0

    posted a message on Rise Of The Automatons v0.1a *CleanedUpSourceCode

    It seems this mod may have died yet again. Please keep it going. I'd love to help if possible.


    Quite the opposite actually, I've been busy trying to get it fully fixed up, still a few problems I have to iron out. I just wish they weren't big xD. Had to fully decompile and deobfuscate the open source code. I will probably release the cleaned up code though for anyone who may want to help me in my endeavors.

    Posted in: WIP Mods
  • 0

    posted a message on Dire Help needed in coding predicament
    Ok, so I have made good progress in getting the bugs worked out with this. In that it now crafts all it can, and give back proper results, and remainders... Still have one problem, it seems to be something to do with the findMatching method. In the sense that it has problems with recipes with multiple ingredients, doesn't seem to correctly check if the other ingredients are present to craft.
    May just be a simple solution xD
    Here is the findMatching method, followed by the fully updated code:
    /**
         * Returns the matching {@link InWorldRecipe} that has the given items as
         * ingredients.
         * 
         * @param items
         *            A {@link List} of {@link ItemStack}s with items to test.
         * @return Either the mathing {@link InWorldRecipe} where the given items
         *         are ingredients or <code>null</code> if no recipe was found
         */
        public InWorldRecipe findMatching(List<ItemStack> items) {
            for (InWorldRecipe recipe : recipes) {
                if (recipe.getRecipeSize() != items.size()) {
                    continue; // the sizes do not match: next recipe please!
                }
                int nbMatchingItems = 0;
                for (ItemStack is : items) {
                    if (recipe.containsIngredient(is)) {
                        // okay, is is part of the recipe
                        nbMatchingItems++;
                    }
                }
                if (nbMatchingItems == recipe.getRecipeSize()) {
                    // yeah found recipe (but did not check correct amount!)
                    return recipe;
                } else {
                    // not enough matching items
                    return null;
                }
            }
            return null;
        }
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.List;
    import java.util.Vector;
    
    import net.minecraft.entity.item.EntityItem;
    import net.minecraft.init.Items;
    import net.minecraft.item.ItemStack;
    import net.minecraft.util.AxisAlignedBB;
    import net.minecraft.world.World;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    
    /**
     * A crafting manager that is capable of managing and crafting
     * {@link InWorldRecipe}s.
     * 
     * It is recommended to add recipes during the {@link FMLInitializationEvent}.
     * 
     * This crafting manager can (currently only) add recipes of type
     * {@link InWorldRecipe}. It is also able to find matching recipes for a given
     * list of ingredients and processes the complete 'crafting process' for a given
     * world and bounding box.
     * 
     * <p>
     * <b>Warning</b> This class was written quickly and did not went through JUnit
     * tests. Its also not very completed, since NBTTags do matter and this class
     * just ignores them. The original idea comes from the minecraft forge forums:
     * http://www.minecraftforge.net/forum/index.php/topic,24744.0.html
     * </p>
     * 
     * @author pickaxe_engineer
     * @Edited By Electrobob99
     * @version 1.3
     */
    public class InWorldCraftingManager {
    
        private Vector<InWorldRecipe> recipes;
    
        /**
         * The instance of this {@link InWorldCraftingManager}. Its thought to exist
         * only once per server?(not sure actually)
         */
        public static InWorldCraftingManager object = new InWorldCraftingManager();
    
        /**
         * Creates a new {@link InWorldCraftingManager}. This is private since it
         * should only exist one craftingmanager per server?
         */
        private InWorldCraftingManager() {
            recipes = new Vector<InWorldRecipe>(10);// avarage of such recipes
        }
    
        /**
         * Adds the given recipe to the list of recipes this manager knows. Like
         * registering a recipe to the GameRegistry.
         * 
         * @param recipe
         *            The recipe to add
         */
        public void addRecipe(InWorldRecipe recipe) {
            recipes.add(recipe);
            Collections.sort(recipes);
        }
    
        /**
         * Crafts whatever is possible within the given bounds. This method does a
         * lot at once. It firstly searches for {@link EntityItem}s within the given
         * {@link AxisAlignedBB}. Then it looks if a recipe matches (with
         * {@link InWorldCraftingManager#findMatching(List)}) and if found one - it
         * crafts as many times result as possible and consumes the used
         * ingredients.
         * 
         * @param world
         *            The world where the crafting should happen. This method tests
         *            if its executed on the server and if not, it returns
         *            immediatley.
         * @param bounds
         *            The bounds in where to look for items ( {@link EntityItem}s ).
         * @param x
         *            The x-coordinate on which the result-spawning-calculation will
         *            start
         * @param y
         *            The y-coordinate on which the result-spawning-calculation will
         *            start
         * @param z
         *            The z-coordinate on which the result-spawning-calculation will
         *            start
         */
        public void craftIfPossible(World world, AxisAlignedBB bounds, int x,
                int y, int z) {
            if (world.isRemote) {
                return;// don't craft on client
            }
            List<EntityItem> entities = world.getEntitiesWithinAABB(
                    EntityItem.class, bounds);
            if (entities == null || entities.size() == 0) {
                return;// no items found or the list has no entries (not sure if
                        // possible).
            }
            List<ItemStack> items = extractItemStacks(entities);
            InWorldRecipe recipe = findMatching(items);
            Vector<Integer> nbConsumed = craftRecipe(recipe, items, world, x, y, z);
            if (nbConsumed == null) {
                // nothing crafted
                System.out.println("Did not craft");
                return;
            } else {
                // crafted items spawned already in world!
            }
            for (int i = 0; i < nbConsumed.size(); i++) {
                // going through nbConsumed:
                // if actual nbConsumed > 0 -> entities[i].getEntityItem().stackSize
                // -= nbConsumed
                // if entities[i].getEntityItem().stackSize <= 0:
                // entities[i].setDead
                if (nbConsumed.get(i) > 0) {
                    entities.get(i).getEntityItem().stackSize -= nbConsumed.get(i);
                    if (entities.get(i).getEntityItem().stackSize <= 0) {
                        entities.get(i).setDead();
                        world.removeEntity(entities.get(i));
                    }
                }
            }
        }
    
        /**
         * Crafts a recipe and returns the amount of used items. The returning
         * list's entries do correspond to the argument {@link List} of
         * {@link ItemStack}s. Thus in the returning {@link Vector} at position i is
         * stored how much items of the ItemStack at position i are used.
         * <b>Warning: this method should only be invoked on server side, but does
         * not test it!</b>
         * 
         * @param recipe
         *            The recipe to craft
         * @param items
         *            The ingredients
         * @param world
         *            The world in where the crafting happens
         * @param x
         *            The x-coordinate on which the result-spawning-calculation will
         *            start
         * @param y
         *            The y-coordinate on which the result-spawning-calculation will
         *            start
         * @param z
         *            The z-coordinate on which the result-spawning-calculation will
         *            start
         * @return A {@link Vector} of {@link Integer}s which correspond to the
         *         amount of items used during the crafting process. If no crafting
         *         happend it returns NULL!
         */
        private Vector<Integer> craftRecipe(InWorldRecipe recipe,
                List<ItemStack> items, World world, int x, int y, int z) {
            if (recipe != null && items != null && items.size() > 0) {
                Vector<Integer> nbConsumed = new Vector<Integer>(items.size());
    
                //int nbResults = 0;
                for (ItemStack is : items) {
                    if(is.stackSize == recipe.demandedAmount(is)){
                        //can craft once the result, craft the item, spawn it, and set new stack size
                        ItemStack itemStack = recipe.getResult();
                        world.spawnEntityInWorld(new EntityItem(world, x, y+1, z, itemStack));
                        is.stackSize -= recipe.demandedAmount(is);
                        //return true;
                    }
                    if(is.stackSize > recipe.demandedAmount(is)){
                        int toCraft = is.stackSize / recipe.demandedAmount(is);
                        int rest = is.stackSize - (toCraft*recipe.demandedAmount(is));
                        ItemStack itemStack = new ItemStack(recipe.getResult().getItem(),toCraft,0);
                        world.spawnEntityInWorld(new EntityItem(world, x, y+1, z, itemStack));
                        is.stackSize = rest;
                        
                    }
                    if(is.stackSize < recipe.demandedAmount(is)){
                        System.out.println("Did not craft!");
                    }    
                }
            }
            // null recipe or empty list
            return null;
        }
    
        /**
         * Extracts the {@link ItemStack}s out of a list of {@link EntityItem}s
         * 
         * @param list
         *            The {@link EntityItem} {@link List} from where to extract
         * @return A {@link List} of {@link ItemStack}s which correspond to the
         *         {@link EntityItem} list. Or NULL if the list was null or empty.
         */
        private List<ItemStack> extractItemStacks(List<EntityItem> list) {
            if (list == null || list.size() == 0) {
                return null; // emtpy list
            }
            List<ItemStack> out = new Vector<ItemStack>(list.size());
            for (EntityItem ei : list) {
                out.add(ei.getEntityItem());
            }
            return out;
        }
    
        /**
         * Returns the matching {@link InWorldRecipe} that has the given items as
         * ingredients.
         * 
         * @param items
         *            A {@link List} of {@link ItemStack}s with items to test.
         * @return Either the mathing {@link InWorldRecipe} where the given items
         *         are ingredients or <code>null</code> if no recipe was found
         */
        public InWorldRecipe findMatching(List<ItemStack> items) {
            for (InWorldRecipe recipe : recipes) {
                if (recipe.getRecipeSize() != items.size()) {
                    continue; // the sizes do not match: next recipe please!
                }
                int nbMatchingItems = 0;
                for (ItemStack is : items) {
                    if (recipe.containsIngredient(is)) {
                        // okay, is is part of the recipe
                        nbMatchingItems++;
                    }
                }
                if (nbMatchingItems == recipe.getRecipeSize()) {
                    // yeah found recipe (but did not check correct amount!)
                    return recipe;
                } else {
                    // not enough matching items
                    return null;
                }
            }
            return null;
        }
        @Deprecated
        /**
         * Spawns a given amount of {@link EntityItem}s in the given world, near the
         * given position. This method respects the stacksize limits and thus spawns
         * several entities if the stacksize would overflow.
         * 
         * @param world
         *            The world in where to spawn the items. If this world is
         *            remote, the method does nothing
         * @param x
         *            The x-coordinate on which the result-spawning-calculation will
         *            start
         * @param y
         *            The y-coordinate on which the result-spawning-calculation will
         *            start
         * @param z
         *            The z-coordinate on which the result-spawning-calculation will
         *            start
         * @param item
         *            The item to spawn. If this is null, nothing happens
         * @param nbResults
         *            The amount of times the item should spawn. Example: the item
         *            is 9 redstone pieces and nbResults is 4, a stack of 36
         *            redstone pieces would spawn.
         */
        private void spawnItems(World world, int x, int y, int z, ItemStack item,
                int nbResults) {
            if (item != null && nbResults > 0 && !world.isRemote) {
                int total = item.stackSize * nbResults;
                if (total <= item.getMaxStackSize()) {
                    item.stackSize = total;
                    EntityItem ei = new EntityItem(world, x + 0.5, y + 1.5,
                            z + 0.5, item);
                    world.spawnEntityInWorld(ei);
                } else {
                    int nbStacks = total / item.getMaxStackSize();
                    int remaining = total % item.getMaxStackSize();
                    for (int i = 0; i < nbStacks; i++) {
                        ItemStack is = new ItemStack(item.getItem(),
                                item.getMaxStackSize(), item.getItemDamage());
                        EntityItem ei = new EntityItem(world, x + 0.5, y + 1.5,
                                z + 0.5, is);
                        world.spawnEntityInWorld(ei);
                    }
                    if (remaining > 0) {
                        ItemStack is = new ItemStack(item.getItem(), remaining,
                                item.getItemDamage());
                        EntityItem ei = new EntityItem(world, x + 0.5, y + 1.5,
                                z + 0.5, is);
                        world.spawnEntityInWorld(ei);
                    }
                }
            }
        }
    
    }
    Posted in: Modification Development
  • 0

    posted a message on Dire Help needed in coding predicament
    Basically what's stated in the subject, I have hit a bit of a snag with my code.

    I've been trying for months now to get a custom "crafting" manager working for a item or tool...

    Basically my "tool" should be able to:

    On right click it should search for items dropped in said area

    and craft them into resulting result.

    For example, if I threw 8 apples down and rightclicked it with the tool it would drop 1 arrow.

    Currently it does work, but I haven't been able to create a manager of recipes for something like this.

    Help would be appreciated :(

    Current code being used:
    public class DetectTest extends Item{

    private IIcon icons[];

    public DetectTest(){
    this.setHasSubtypes(true);
    this.setUnlocalizedName("plantmo:cuttool");
    this.setCreativeTab(CreativeTabsPLM.tabBlock);
    //this.setTextureName("plantmo" + ":dtoolk");
    //this.setMaxDamage(63);
    //this.setMaxStackSize(1);
    }

    @Override
    public IIcon getIconFromDamage(int par1){
    int i = MathHelper.clamp_int(par1, 0, EnumCuttingTools.values().length-1);
    return icons[i];
    }

    @Override
    @SideOnly(Side.CLIENT)
    public void registerIcons(IIconRegister iconregister){
    icons = new IIcon[EnumCuttingTools.values().length];
    for(int var4 = 0; var4 < EnumCuttingTools.values().length; var4++){
    icons[var4] = iconregister.registerIcon("plantmo:"+EnumCuttingTools.values()[var4].texname);
    }
    }

    @Override
    public void getSubItems(Item par1, CreativeTabs creativeTabs,
    List list){
    for(int var4 = 0;var4 < EnumCuttingTools.values().length; var4++){
    list.add(new ItemStack(par1, 1, var4));
    }
    }

    @Override
    public String getUnlocalizedName(ItemStack itemStack){
    return super.getUnlocalizedName(itemStack) + "."
    + EnumCuttingTools.values()[itemStack.getItemDamage()].texname;
    }

    @Override
    public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
    {

    List<EntityItem> list = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x-1, y-1, z-1, x+2, y+2, z+2));
    if(!world.isRemote)
    {
    int meta = itemstack.getItemDamage();
    if(list != null){
    Iterator it = list.iterator();
    while(it.hasNext()){
    EntityItem ai = (EntityItem) it.next();
    switch(meta){
    case 0:
    System.out.println("This is a MEAT KNIFE");
    break;
    case 1:
    System.out.println("This is a FILLET KNIFE");
    break;
    case 2:
    System.out.println("This is a BREAD KNIFE");
    break;
    case 3:
    System.out.println("This is a ALL KNIFE");
    break;
    default:
    break;
    }
    tocut(world, ai, x, y, z);
    }
    }
    }

    return false;
    }
    private boolean tocut(World world, EntityItem ai, int x, int y, int z){
    if(ai.getEntityItem().getItem() == Items.apple){
    int neededAmount = 8;
    ItemStack itemStack = new ItemStack(Items.arrow,1,0);
    if(ai.getEntityItem().stackSize == neededAmount){
    //can craft once the result, craft the item, spawn it, and set new stack size
    itemStack = new ItemStack(Items.arrow,1,0);
    world.spawnEntityInWorld(new EntityItem(world, x, y+1, z, itemStack));
    ai.getEntityItem().stackSize -= neededAmount;
    return true;
    }
    if(ai.getEntityItem().stackSize > neededAmount){
    int toCraft = ai.getEntityItem().stackSize / neededAmount;
    int rest = ai.getEntityItem().stackSize - (toCraft*neededAmount);
    itemStack = new ItemStack(Items.arrow,toCraft,0);
    world.spawnEntityInWorld(new EntityItem(world, x, y+1, z, itemStack));
    ai.getEntityItem().stackSize = rest;
    return true;
    }
    if(ai.getEntityItem().stackSize < neededAmount){
    return true;
    }

    }
    return false;
    }

    }
    Posted in: Modification Development
  • 0

    posted a message on Looking for someone to create textures for mod
    Exactly, and some should be similar to vanilla grown crops, only the ones that make sense, i.e beet/barley/cantaloupe/parsnip.

    Also, a few other items I would like textured include various knifes specifically:

    Butcher, Fillet, Bread, and Paring knives.
    Posted in: Mods Discussion
  • 0

    posted a message on Looking for someone to create textures for mod
    Ok current list added to original post. I'd suggest finish up tomato crop and seed first xD
    Posted in: Mods Discussion
  • 0

    posted a message on Looking for someone to create textures for mod
    Quote from illustr8tor »
    That should not be a problem ! :)

    I was hoping you'd say that. Working on the list now
    Posted in: Mods Discussion
  • 0

    posted a message on Looking for someone to create textures for mod
    Quote from illustr8tor»
    -snip-

    I must say I do like your texture work. Even took a look at your texturepack, even that is amazing. Just give me time to collect the names of the things I need for my mod, which I will add into the original post above :) I can already tell it will be a pleasure to work with you. I will give a small warning, from what I plan, there will be alot of textures needed.
    Posted in: Mods Discussion
  • 0

    posted a message on Looking for someone to create textures for mod
    Like the subject line details, I am a Java coder looking for atleast one person to create textures for a yet to be released mod I have been working on.

    Current textures needed:
    Blocks: Bushes may be blocks similar to Natura

    And seed items where appropriate

    • BlackBerry Bush
    • Blueberry Bush
    • Raspberry Bush
    • Strawberry Forb/ Bush
    • Fruit Bearing Cactus
    • Asparagus
    • Barley
    • Oats
    • Rye
    • Corn
    • Bamboo
    • Cantaloupe *similar setup as melon/pumpkin
    • Cucumber
    • Winter Squash
    • Zucchini
    • Beet
    • Onion
    • Parsnip
    • Peanut
    • Radish
    • Rutabaga
    • Sweet Potato
    • Turnip
    • Rhubarb
    • Celery
    • Garlic
    • Ginger
    • Coffee Bean
    • Mustard crop
    • Broccoli
    • Cauliflower
    • Leek
    • Lettuce
    • Scallion
    • Artichoke
    • Brussel Sprout
    • Cabbage
    • Growing Mushrooms
    • Beans *various
    • Pepper *various
    • Eggplant
    • Okra
    • Peas
    • Tomato
    • Pineapple
    • Grape Vine
    • Kiwi
    • Cranberry
    • Rice
    • Seaweed ?
    Current texturer/s:

    illustr8tor


    If you are willing to help me in this endeavor please reply below with the following:

    Minecraft Name:

    Willing to use teamspeak y/n:

    Examples of your textures:

    Mod description:

    Foods/plants/blocks/machines

    As a side note, Absolutely no textures from other/dead mods without explicit permission from the original owner.
    Posted in: Mods Discussion
  • 0

    posted a message on Rise Of The Automatons v0.1a *CleanedUpSourceCode
    Quote from EVO_Gamers»
    Any updates on this?

    Well.. On my end I have halted my personal efforts for now, mainly because of Aninon's return to the modding community :D He has already begun work on the port and future ports/updates of his old mod. Link here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1438947-1-2-5-open-source-rise-of-the-automatons

    He's already added a progress table :)
    Posted in: WIP Mods
  • 0

    posted a message on Gendustry 1.6.3 - Updated to forestry 4.2
    Just wondering, one has anyone actually done a video tutorial on creating your own custom bees, and two will we ever have an update that allows for custom saplings/butterflies?
    Posted in: Minecraft Mods
  • To post a comment, please or register a new account.