Jump to content

Recommended Posts

Posted

Would like to increase the damage of the weapon.

 

I typed source...

 

mod_CloudItem.java --

 

package net.minecraft.src.CloudOnlineItem;

 

import javax.swing.text.html.parser.Entity;

 

import net.minecraft.src.forge.NetworkMod;

import net.minecraft.src.Block;

import net.minecraft.src.DamageSource;

import net.minecraft.src.Item;

import net.minecraft.src.ItemStack;

import net.minecraft.src.Material;

import net.minecraft.src.ModLoader;

import net.minecraft.src.Block;

import net.minecraft.src.Item;

import net.minecraft.src.ItemStack;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.Mod.PostInit;

import cpw.mods.fml.common.Mod.PreInit;

 

public class mod_CloudItem extends NetworkMod

{

private static final ModLoader GameRegistry = null;

public Block BlockCloud;

public Item ItemCloudSword;

 

        @Override

        public String getVersion()

        {

                return "CloudItem Mod 1.0.0";

 

        }

 

        @Override

        public void load()

        {

        ItemCloudSword=new ItemCloudSword(200);

 

        BlockCloud = new BlockCloud(160);

 

        // Register Blocks

        ModLoader.registerBlock(BlockCloud);

 

       

        // Add Recipes

        ModLoader.addRecipe(new ItemStack(BlockCloud, 1), new Object[]

        {

                "OXO", "XOX", "OXO", 'X', Item.diamond,'O', Item.coal

               

        });

        ModLoader.addRecipe(new ItemStack(ItemCloudSword, 1), new Object[]

        {

            "X", "X", "X", 'X',BlockCloud

               

               

               

        });

 

        // Add Names

        ModLoader.addName(BlockCloud, "Cloud"); 

       

        ModLoader.addName(ItemCloudSword, "ItemCloudSword"); 

        }

       

}

 

 

------------------------------------------

 

BlockCloud.java----------------------

 

package net.minecraft.src.CloudOnlineItem;

 

import java.io.File;

import java.util.*;

import net.minecraft.client.Minecraft;

import net.minecraft.src.forge.*;

 

import net.minecraft.src.Block;

import net.minecraft.src.Material;

import net.minecraft.src.Block;

import net.minecraft.src.Item;

import net.minecraft.src.ItemStack;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.Mod.PostInit;

import cpw.mods.fml.common.Mod.PreInit;

 

public class BlockCloud extends Block

{

 

    public BlockCloud(int blockID)

    {

                super(blockID, Material.wood);

               

                blockIndexInTexture = 0;

        setHardness(2.0f);

        setResistance(5.0f);

        setStepSound(soundWoodFootstep);

       

        setBlockName("Cloud");

    }

       

        @Override

        public int getBlockTextureFromSide(int side)

        {

                switch(side)

                {

                case 0:

                        return 0;

                case 1:

                        return 0;

                }

                return blockIndexInTexture;

        }

       

        @Override

        public String getTextureFile()

        {

            return "/ItemDot.png";

        }

}

----------------------------------------------

ItemCloudSword.java----------------------<< SetDamage??

 

package net.minecraft.src.CloudOnlineItem;

 

import net.minecraft.src.EnumToolMaterial;

import net.minecraft.src.Item;

 

public class ItemCloudSword extends Item {

 

 

public ItemCloudSword(int id) {

super(id);

    maxStackSize = 64;

    setMaxDamage(100);

   

    setIconIndex(0);

    setItemName("ItemCloudSword");

// Constructor Configuration

 

}

    @Override

    public String getTextureFile()

    {

        return "/ItemDot.png";

    }

}

 

 

 

 

 

 

 

 

 

 

Help Please..

 

 

And

 

At that can use on the server?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.