• 0

    posted a message on One damage
    package moweapons.minecraft.kaiidinoxd;
    import net.minecraft.block.Block;
    import net.minecraft.item.ItemStack;
    import net.minecraft.item.Item;
    import cpw.mods.fml.common.Mod;
    import cpw.mods.fml.common.Mod.EventHandler; // used in 1.6.2
    //import cpw.mods.fml.common.Mod.PreInit;    // used in 1.5.2
    //import cpw.mods.fml.common.Mod.Init;	   // used in 1.5.2
    //import cpw.mods.fml.common.Mod.PostInit;   // used in 1.5.2
    import cpw.mods.fml.common.Mod.Instance;
    import cpw.mods.fml.common.SidedProxy;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    import cpw.mods.fml.common.event.FMLPostInitializationEvent;
    import cpw.mods.fml.common.event.FMLPreInitializationEvent;
    import cpw.mods.fml.common.network.NetworkMod;
    import cpw.mods.fml.common.registry.GameRegistry;
    import cpw.mods.fml.common.registry.LanguageRegistry;
    import net.minecraft.item.EnumToolMaterial;
    @Mod(modid = "moweapons" , name="MoWeapons", version="0.0.1")
    @NetworkMod(clientSideRequired=true, serverSideRequired=false, versionBounds = "[0.0.1]")
    public class MoWeapons {
    public static final String modid = "kaiidinoxd_moweapons";
    // The instance of your mod that Forge uses.
    	    @Instance(value = "moweapons")
    	    public static MoWeapons instance;
    	    public static Item fireSword;
    	    public static Item ghastScythe;
    	    public static Item battleAxeGold;
    	    public static Item battleAxeDiamond;
    	    public static Item battleAxeWood;
    	    public static Item battleAxeIron;
    	    public static Item battleAxeStone;
    	   
    		 // Says where the client and server 'proxy' code is loaded.
    	    @SidedProxy(clientSide="moweapons.minecraft.kaiidinoxd.client.ClientProxy", serverSide="moweapons.minecraft.kaiidinoxd.CommonProxy")
    	    public static CommonProxy proxy;
    	    @EventHandler // used in 1.6.2
    	    //@PreInit    // used in 1.5.2
    	    public void preInit(FMLPreInitializationEvent event) {
    		
    	    }
    	   
    	    @EventHandler // used in 1.6.2
    	    //@Init	   // used in 1.5.2
    	    public void load(FMLInitializationEvent event) {
    			    proxy.registerRenderers();
    			    fireSword = new FireSword(5001).setUnlocalizedName("fireSword");
    			    LanguageRegistry.addName(fireSword, "Fire Sword");
    			    GameRegistry.addRecipe(new ItemStack(fireSword), new Object[]{
    				 "Y Z",
    				 " Z ",
    				 "X Y",
    				 'X', Item.stick, 'Y', Item.blazePowder, 'Z', Item.diamond
    			    });
    			    ghastScythe = new ghastScythe(5000).setUnlocalizedName("ghastScythe");
    			    LanguageRegistry.addName(ghastScythe, "Ghasts Scythe");
    			    GameRegistry.addRecipe(new ItemStack(ghastScythe), new Object[]{
    				 "YYW",
    				 " Z ",
    				 "X ",
    				 'X', Item.stick, 'Y', Block.obsidian, 'Z', Item.diamond, 'W', Item.ghastTear
    			    });
    			   
    			   
    			    //Battle Axes
    			    battleAxeGold = new BattleAxe(10002,EnumToolMaterial.GOLD).setUnlocalizedName("battleAxeGold");
    			    battleAxeDiamond = new BattleAxe(10003,EnumToolMaterial.EMERALD).setUnlocalizedName("battleAxeD");
    			    battleAxeStone = new BattleAxe(10004,EnumToolMaterial.STONE).setUnlocalizedName("battleAxeS");
    			    battleAxeWood = new BattleAxe(10005,EnumToolMaterial.WOOD).setUnlocalizedName("battleAxeW");
    			    battleAxeIron = new BattleAxe(10006,EnumToolMaterial.IRON).setUnlocalizedName("battleAxeI");
    			    LanguageRegistry.addName(battleAxeGold, "Gold Battle Axe");
    			    LanguageRegistry.addName(battleAxeDiamond, "Diamond Battle Axe");
    			    LanguageRegistry.addName(battleAxeStone, "Stone Battle Axe");
    			    LanguageRegistry.addName(battleAxeWood, "Wood Battle Axe");
    			    LanguageRegistry.addName(battleAxeIron, "Iron Battle Axe");
    			   
    			   GameRegistry.addRecipe(new ItemStack(battleAxeGold), new Object[]{
    				 " Y ","YXY","XY ",
    		 'X', Item.stick, 'Y', Item.ingotGold });
    			    GameRegistry.addRecipe(new ItemStack(battleAxeDiamond), new Object[]{
    				 " Y ","YXY","XY ",
    		 'X', Item.stick, 'Y', Item.diamond });
    			    GameRegistry.addRecipe(new ItemStack(battleAxeStone), new Object[]{
    				 " Y ","YXY","XY ",
    		 'X', Item.stick, 'Y', Block.cobblestone });
    			    GameRegistry.addRecipe(new ItemStack(battleAxeWood), new Object[]{
    			    " Y ","YXY","XY ",
    		 'X', Item.stick, 'Y', Block.planks });
    			    GameRegistry.addRecipe(new ItemStack(battleAxeIron), new Object[]{
    				 " Y ","YXY","XY ",
    		 'X', Item.stick, 'Y', Item.ingotIron });
       
       
       
    			   
    	    }
    	   
    	    @EventHandler // used in 1.6.2
    	    //@PostInit   // used in 1.5.2
    	    public void postInit(FMLPostInitializationEvent event) {
    			    // Stub Method
    	    }
    }

    This is The Base Mod file
    Posted in: Modification Development
  • 0

    posted a message on One damage
    Could anyone tell me why i am only getting one damage when hitting mobs.

    package moweapons.minecraft.kaiidinoxd;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import net.minecraft.block.Block;
    import net.minecraft.client.renderer.texture.IconRegister;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.EntityLiving;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.EnumAction;
    import net.minecraft.item.EnumToolMaterial;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.world.World;
    public class BattleAxe extends Item
    {
        private float weaponDamage;
        private final EnumToolMaterial toolMaterial;
        public BattleAxe(int par1, EnumToolMaterial par2EnumToolMaterial)
        {
    	    super(par1);
    	    toolMaterial = par2EnumToolMaterial;
    	    maxStackSize = 1;
    	    setMaxDamage(par2EnumToolMaterial.getMaxUses());
    	    weaponDamage = 6.0F + par2EnumToolMaterial.getDamageVsEntity();
    	    setCreativeTab(CreativeTabs.tabCombat);
        }
    @SideOnly(Side.CLIENT)
    public void registerIcons(IconRegister par1IconRegister)
    {
      this.itemIcon =par1IconRegister.registerIcon(MoWeapons.modid + ":"+ (this.getUnlocalizedName().substring(5)));
    }
        public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
        {
    	    par1ItemStack.damageItem(1, par3EntityLiving);
    	    return true;
        }
        public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving)
        {
    	    par1ItemStack.damageItem(2, par6EntityLiving);
    	    return true;
        }
        /**
    	 * Returns the damage against a given entity.
    	 */
        public int getDamageVsEntity(Entity par1Entity)
        {
    		    return (int) weaponDamage;
    	    }
        public boolean isFull3D()
        {
    	    return true;
        }
        public EnumAction getItemUseAction(ItemStack par1ItemStack)
        {
    	    return EnumAction.block;
        }
        public int getMaxItemUseDuration(ItemStack par1ItemStack)
        {
    	    return 0x11940;
        }
        public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
        {
    	    par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
    	    return par1ItemStack;
        }
        public int getItemEnchantability()
        {
    	    return toolMaterial.getEnchantability();
        }
    }


    THANK YOU (:
    Posted in: Modification Development
  • 0

    posted a message on Switching to Forge
    thank you (:
    Posted in: Modification Development
  • 0

    posted a message on Switching to Forge
    Is there any simple way of telling the server that the player is getting healed?
    Posted in: Modification Development
  • 0

    posted a message on Switching to Forge
    so im trying to heal the player a random value when hitting an entity I had this working with mod loader a while ago but im using forge now so i was wondering if there was a forge equivalent to

    ModLoader.getMinecraftInstance().thePlayer.heal(1);

    any help would be appreciated
    Posted in: Modification Development
  • 0

    posted a message on shooting an entity from an item thats not a bow
    i would like it so when i right click is shoots a fireball in the direction that i am pointing but i can only get it to fire randomly please help
    import java.util.Random;
    
    public class ItemFireRock extends Item
    {
    
    	public ItemFireRock(int i)
    	{
    		super(i);
    		maxStackSize = 1;
    		setMaxDamage(384);
    		}
    
    
    	public int getMaxItemUseDuration(ItemStack itemstack)
    	{
    		return 0x11940;
    	}
    
    
    	public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
    	{
    
    			EntityFireball entityfireball = new EntityFireball(world, entityplayer, 0.9F, 1, 1);
    
    
    
    			itemstack.damageItem(1, entityplayer);
    			world.playSoundAtEntity(entityplayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + 0.5F);
    
    
    			if (!world.isRemote)
    			{
    				world.spawnEntityInWorld(entityfireball);
    			}
    
    
    		return itemstack;
    	}
    }
    Posted in: Modification Development
  • 0

    posted a message on Sword durability generation?
    Quote from TCISHADDER

    Thanks for the help!


    not a problem did it work?
    Posted in: Modification Development
  • 0

    posted a message on Sword durability generation?
    like i said set the max damage very high say 5000 then set the damage done to the item under hit entity to say around 50 or 500 then it will still regenerate but since the maxdamage is so high it will take a while to restore the damage
    Posted in: Modification Development
  • 0

    posted a message on Sword durability generation?
    Quote from TCISHADDER

    Is it possible to make a sword able to generate its durability after it's been lost?


    Most defiantly add this code into your item

    public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag)
        {
            if (itemstack.getItemDamage() > 0)
            {
                itemstack.damageItem(-1, (EntityLiving)entity);
            }
        } 
    but doing this will make it regenerate really fast so you should set the mAxdamage very high and when ever you hit an entity with the sword have it take a good size chunk from the durability
    Posted in: Modification Development
  • 0

    posted a message on Entity invisible for throwable
    Quote from CowedOffACliff

    The "byte0" in the EntityThrowable file that you copied from the Snowball, with that piece about EntityBlaze. That tells it that if the Snowball hits a Blaze it will do 3 points of damage, otherwise byte0 is 0. Byte0 is the amount of damage it does on a hit.


    Also properly mapping the rendering of these things is a PITA because of how ModLoader registers textures.


    Thank you for letting me know that about the damage and do you know if it is even possible to map the rendering?
    Quote from ops99

    public class ItemThrowingStar extends Item

    Item needs to be:
    public class ItemThrowingStar extends ItemThrowable

    This gives me errors as there is no ItemThrowable class
    Posted in: Modification Development
  • 0

    posted a message on Entity invisible for throwable
    so i am making a trowing star and my problem is when ever i try to throw it it just makes the noise and doesn't throw anything i was hoping someone could help
    Entity


    package net.minecraft.src;

    public class EntityThrowingStar extends EntityThrowable
    {
    public EntityThrowingStar(World par1World)
    {
    super(par1World);
    }

    public EntityThrowingStar(World par1World, EntityLiving par2EntityLiving)
    {
    super(par1World, par2EntityLiving);
    }

    public EntityThrowingStar(World par1World, double par2, double par4, double par6)
    {
    super(par1World, par2, par4, par6);
    }

    /**
    * Called when the throwable hits a block or entity.
    */
    protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
    {
    if (par1MovingObjectPosition.entityHit != null)
    {
    byte byte0 = 0;

    if (par1MovingObjectPosition.entityHit instanceof EntityBlaze)
    {
    byte0 = 3;
    }

    if (!par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, thrower), byte0));
    }

    for (int i = 0; i < 8; i++)
    {
    worldObj.spawnParticle("snowballpoof", posX, posY, posZ, 0.0D, 0.0D, 0.0D);
    }

    if (!worldObj.isRemote)
    {
    setEntityDead();
    }
    }
    }

    Render


    package net.minecraft.src;

    import org.lwjgl.opengl.GL11;
    import org.lwjgl.opengl.GL12;

    public class RenderThrowingStar extends Render
    {
    /**
    * Have the icon index (in items.png) that will be used to render the image. Currently, eggs and snowballs uses this
    * classes.
    */
    private int itemIconIndex;

    public RenderThrowingStar(int par1)
    {
    itemIconIndex = par1;
    }

    /**
    * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
    * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
    * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
    * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
    */
    public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    {
    GL11.glPushMatrix();
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glScalef(0.5F, 0.5F, 0.5F);
    loadTexture("/Mo' Weapons/star.png");
    Tessellator tessellator = Tessellator.instance;

    if (itemIconIndex == 154)
    {
    int i = PotionHelper.func_40358_a(((EntityPotion)par1Entity).getPotionDamage(), false);
    float f = (float)(i >> 16 & 0xff) / 255F;
    float f1 = (float)(i >> 8 & 0xff) / 255F;
    float f2 = (float)(i & 0xff) / 255F;
    GL11.glColor3f(f, f1, f2);
    GL11.glPushMatrix();
    func_40265_a(tessellator, 141);
    GL11.glPopMatrix();
    GL11.glColor3f(1.0F, 1.0F, 1.0F);
    }

    func_40265_a(tessellator, itemIconIndex);
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
    }

    private void func_40265_a(Tessellator par1Tessellator, int par2)
    {
    float f = (float)((par2 % 16) * 16 + 0) / 256F;
    float f1 = (float)((par2 % 16) * 16 + 16) / 256F;
    float f2 = (float)((par2 / 16) * 16 + 0) / 256F;
    float f3 = (float)((par2 / 16) * 16 + 16) / 256F;
    float f4 = 1.0F;
    float f5 = 0.5F;
    float f6 = 0.25F;
    GL11.glRotatef(180F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    par1Tessellator.startDrawingQuads();
    par1Tessellator.setNormal(0.0F, 1.0F, 0.0F);
    par1Tessellator.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3);
    par1Tessellator.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3);
    par1Tessellator.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2);
    par1Tessellator.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2);
    par1Tessellator.draw();
    }
    }

    Item


    package net.minecraft.src;

    import java.util.Random;

    public class ItemThrowingStar extends Item
    {

    public ItemThrowingStar(int i)
    {
    super(i);
    maxStackSize = 64;
    }

    public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
    {
    if (!entityplayer.capabilities.depleteBuckets)
    {
    itemstack.stackSize--;
    }
    world.playSoundAtEntity(entityplayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
    return itemstack;
    }
    }

    and how im including the render in the mod



    public void AddRenderer(Map map)
    {
    map.put(net.minecraft.src.EntityThrowingStar.class, new RenderThrowingStar(mod_MoWeapons.throwingStar.getIconFromDamage(1)));
    }


    i would absolutely love for this to deal damage when it hits a mob please help thanks
    Posted in: Modification Development
  • 0

    posted a message on Enchanting Tools + Weapons Not Working?
    So i added a weapon using the sword sourcecode got everything working but the enchanting i cant seem to find anything on this topic any help would be great Thanks if you need any code ill be happy to provide it [:
    Posted in: Modification Development
  • 0

    posted a message on ITMA First Lets Play
    Youtube messed up the sound by like 1 second

    Posted in: Let's Play (and Live Stream)
  • 0

    posted a message on Making a New Minecraft Group
    First name: Jeff
    IGN: KaiidinoXD
    Gender: Guy
    Skype: InTheMountainAir
    Can you host: i already have a server up and running that we can use [:
    Age: 18
    YouTube: Inthemountainair
    Posted in: Video/Series Help
  • 0

    posted a message on Single Player Commands [V4.9] - Official Download [SPC] [+NoClip]
    i made a how to install video for any mac users having problems with 1.0.0 [:

    Posted in: Minecraft Mods
  • To post a comment, please .