• 0

    posted a message on [Creating Mods] Miscellaneous Tutorials [01/13/12]
    Quote from Stewiecraft

    I found that the image 1 referred to in your onUpdate code has to be a different file than the defile image. If they aren't different copies of the same image it doesn't work.


    this still returns nothing, perhaps the error lays somewhere else in my item file?

    kind of embarrassing not being able to figure out something so simple :sad.gif:

    package net.minecraft.src;
    
    import java.util.Random;
    
    public class ItemcopperBow extends Item
    {
    
        public ItemcopperBow(int i)
        {
            super(i);
            maxStackSize = 1;
            setMaxDamage(384);
        }
        public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag)
        {
            EntityPlayer entityplayer = (EntityPlayer)entity;
            ItemStack itemstack1 = entityplayer.inventory.getCurrentItem();
            if(entityplayer.isUsingItem() && itemstack1.itemID == mod_bows.copperBow.shiftedIndex)
            {
    		    int k = itemstack1.getMaxItemUseDuration() - entityplayer.func_35205_Y();
    			    if(k >= 18)
    			    {
    			        iconIndex = mod_bows.copperBow4;
    			    } else
    			    if(k > 13)
    			    {
    			        iconIndex = mod_bows.copperBow3;
    			    } else
    			    if(k > 0)
    			    {
    			        iconIndex = mod_bows.copperBow2;
    			    } else
    			    	iconIndex = mod_bows.copperBow1;
    		    }}
            public void onPlayerStoppedUsing(ItemStack itemstack, World world, EntityPlayer entityplayer, int i)
            {
                if(entityplayer.capabilities.depleteBuckets || entityplayer.inventory.hasItem(Item.arrow.shiftedIndex))
                {
                    int j = getMaxItemUseDuration(itemstack) - i;
                    float f = (float)j / 20F;
                    f = (f * f + f * 2.0F) / 3F;
                    if((double)f < 0.10000000000000001D)
                    {
                        return;
                    }
                    if(f > 1.0F)
                    {
                        f = 1.0F;
                    }
                    EntityArrow entityarrow = new EntityArrow(world, entityplayer, f * 2.0F);
                    if(f == 1.0F)
                    {
                        entityarrow.arrowCritical = true;
                    }
    	                itemstack.damageItem(1, entityplayer);
    	                world.playSoundAtEntity(entityplayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
    	                entityplayer.inventory.consumeInventoryItem(Item.arrow.shiftedIndex);
    	                	if(!world.multiplayerWorld)
    	                	{
    	                		world.spawnEntityInWorld(entityarrow);
                    }}
                }
        public ItemStack onFoodEaten(ItemStack itemstack, World world, EntityPlayer entityplayer)
        {
            return itemstack;
        }
        public int getMaxItemUseDuration(ItemStack itemstack)
        {
            return 0x11940;
        }
        public EnumAction getItemUseAction(ItemStack itemstack)
        {
            return EnumAction.bow;
        }
        public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
        {
            if(entityplayer.capabilities.depleteBuckets || entityplayer.inventory.hasItem(Item.arrow.shiftedIndex))
            {
                entityplayer.setItemInUse(itemstack, getMaxItemUseDuration(itemstack));
            }
            return itemstack;
        }
    }
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Miscellaneous Tutorials [01/13/12]
    Quote from Stewiecraft

    The damage for the bow is calculated inside of the actual arrow entity. I don't know of any easy way to change it because of the way damage is handled.

    i wasn't aware it was based on arrows, i could try making tiered arrows that only work with specific bows i suppose


    Quote from Stewiecraft

    As to why your code isn't working, I have no idea. So it doesn't return any recompile errors?

    none. i've tried dozens of different things, the bow just pulls back slightly as if that bit of code wasn't even there. to verify: image1-4, 1 is default and 4 is max pullback? 2 and 3 being the other images found in the /gui/items file?
    Posted in: Tutorials
  • 0

    posted a message on How do you mod flowers?
    is your picture actually transparent?

    if so, have you properly created a blockflower and worldgenflower for your own specific types? i've never made a new flowergen, but i imagine those are the 2 files that require edits.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Miscellaneous Tutorials [01/13/12]
    for me personally, this does nothing:

        public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag)
        {
            EntityPlayer entityplayer = (EntityPlayer)entity;
            ItemStack itemstack1 = entityplayer.inventory.getCurrentItem();
            if(entityplayer.isUsingItem() && itemstack1.itemID == mod_bows.testBow.shiftedIndex)
            {
    		    int k = itemstack.getMaxItemUseDuration() - entityplayer.func_35205_Y();
    			    if(k >= 18)
    			    {
    			        iconIndex = mod_bows.testBow4;
    			    } else
    			    if(k > 13)
    			    {
    			        iconIndex = mod_bows.testBow3;
    			    } else
    			    if(k > 0)
    			    {
    			        iconIndex = mod_bows.testBow2;
    			    } else
    			    	iconIndex = mod_bows.testBow1;
    		    }}


    anyone know how to make this work?

    also, how do you set a damage for a specific bow? i see durability, but no mention of how hard it'll hit.
    Posted in: Tutorials
  • 0

    posted a message on Why Do People Think Minecraft is Good for Architecture?
    Quote from miguelsz2

    My what intelligent and articulate arguments.

    thank you for your kind compliments, sir.

    op likes the pictures, and what people build in minecraft, but says not one other person should ever declare them as "good". why? why can't they be "good"? what's so different about blocks placed in minecraft than the squiggled lines hanging in a museum?

    ah, right. the blocks in minecraft take a helluva lot more imagination than what you can do with pencil.

    a man has made millions taking pictures of semen he unloaded on a piece of paper, yet minecraft can't even be called "good"?

    useless topic, op is an idiot
    Posted in: Discussion
  • 0

    posted a message on Why Do People Think Minecraft is Good for Architecture?
    don't like blocks, plays minecraft

    what is this i don't even
    Posted in: Discussion
  • 0

    posted a message on towns/people
    • they're useless
    • they wander around without any functions
    • they seem to not know how to get back into their homes
    • their homes are generated very stupidly
    • they have a knack at spawning next to a pit of lava, and as if they were cultist, all eventually jump in

    also, they look exactly like 'rito', the bird people from the legend of zelda

    i preferred that village mod, tbh.
    Posted in: 1.0 Update Discussion
  • 0

    posted a message on minecraft nominated for a golden joystick award
    browsed a bit, nobody seems to know.

    http://www.goldenjoystick.com/awards/best-downloadable
    Posted in: Discussion
  • To post a comment, please .