Making A Sword

9 posts / 0 new
Last post
Offline
Last seen: 1 year 9 months ago
Joined: 12/05/2015 - 22:18
Gems: 0
Making A Sword

Hey 

so i was trying to make this sword, but i need to know how to make it like a super OP weapon, probably about 100 times better than a diamond sword. But i dont know how, and if i set the item damage count to a high number, nothing changes

Please Help A.S.A.P

Edited by: OrcishXD on 12/06/2015 - 00:11


Brich036's picture
Offline
Last seen: 8 months 2 weeks ago
Joined: 05/11/2015 - 03:57
Gems: 1
click on the Sword element

click on the Sword element once then click "View Source" and find This Line

Item.ToolMaterial enumt = EnumHelper.addToolMaterial("Sword Name", 1, 1000, 4F, 9000, 64);block = (Item)(new ItemSword(enumt){public Set<String> getToolClasses(ItemStack stack){

Where it says "9000" The 4th Number  thats the damage number

will always keep modding and never forget that :D

Offline
Last seen: 1 year 9 months ago
Joined: 12/05/2015 - 22:18
Gems: 0
RE:click on the Sword element

@Brich036 ok thanks for the help i really appreciate it

:)

Offline
Last seen: 1 year 9 months ago
Joined: 12/05/2015 - 22:18
Gems: 0
@Brich036 i cant find the

@Brich036 i cant find the line in the code so ill just put the code in and you can see for yourself


import net.minecraftforge.fml.client.registry.*;
import net.minecraftforge.fml.common.*;
import net.minecraftforge.fml.common.asm.*;
import net.minecraftforge.fml.common.asm.transformers.*;
import net.minecraftforge.fml.common.discovery.*;
import net.minecraftforge.fml.common.discovery.asm.*;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.functions.*;
import net.minecraftforge.fml.common.network.*;
import net.minecraftforge.fml.common.registry.*;
import net.minecraftforge.fml.common.toposort.*;
import net.minecraftforge.fml.common.versioning.*;
import net.minecraftforge.fml.relauncher.*;
import net.minecraftforge.fml.server.*;
import net.minecraft.block.*;
import net.minecraft.block.material.*;
import net.minecraft.client.*;
import net.minecraft.client.audio.*;
import net.minecraft.client.entity.*;
import net.minecraft.client.gui.*;
import net.minecraft.client.gui.achievement.*;
import net.minecraft.client.gui.inventory.*;
import net.minecraft.client.model.*;
import net.minecraft.client.multiplayer.*;
import net.minecraft.client.particle.*;
import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.culling.*;
import net.minecraft.client.renderer.entity.*;
import net.minecraft.client.renderer.tileentity.*;
import net.minecraft.client.settings.*;
import net.minecraft.command.*;
import net.minecraft.crash.*;
import net.minecraft.creativetab.*;
import net.minecraft.dispenser.*;
import net.minecraft.enchantment.*;
import net.minecraft.entity.*;
import net.minecraft.entity.ai.*;
import net.minecraft.entity.boss.*;
import net.minecraft.entity.effect.*;
import net.minecraft.entity.item.*;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.*;
import net.minecraft.entity.player.*;
import net.minecraft.entity.projectile.*;
import net.minecraft.inventory.*;
import net.minecraft.item.*;
import net.minecraft.item.crafting.*;
import net.minecraft.nbt.*;
import net.minecraft.network.*;
import net.minecraft.network.rcon.*;
import net.minecraft.pathfinding.*;
import net.minecraft.potion.*;
import net.minecraft.profiler.*;
import net.minecraft.server.*;
import net.minecraft.server.dedicated.*;
import net.minecraft.server.gui.*;
import net.minecraft.server.integrated.*;
import net.minecraft.server.management.*;
import net.minecraft.stats.*;
import net.minecraft.tileentity.*;
import net.minecraft.util.*;
import net.minecraft.village.*;
import net.minecraft.world.*;
import net.minecraft.world.biome.*;
import net.minecraft.world.chunk.*;
import net.minecraft.world.chunk.storage.*;
import net.minecraft.world.demo.*;
import net.minecraft.world.gen.*;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.layer.*;
import net.minecraft.world.gen.structure.*;
import net.minecraft.world.storage.*;
import net.minecraftforge.classloading.*;
import net.minecraftforge.client.*;
import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.sound.*;
import net.minecraftforge.common.*;
import net.minecraftforge.event.*;
import net.minecraftforge.event.entity.*;
import net.minecraftforge.event.entity.item.*;
import net.minecraftforge.event.entity.living.*;
import net.minecraftforge.event.entity.minecart.*;
import net.minecraftforge.event.entity.player.*;
import net.minecraftforge.event.terraingen.*;
import net.minecraftforge.event.world.*;
import net.minecraftforge.oredict.*;
import net.minecraftforge.transformers.*;
import net.minecraft.init.*;
import java.util.*;
import net.minecraftforge.common.util.*;

import org.lwjgl.opengl.GL11;

import net.minecraft.client.resources.model.*;


@SuppressWarnings("unchecked")
public class mcreator_galaxySword{

public mcreator_galaxySword(){}

public static Item block;public static Object instance;public void load(FMLInitializationEvent event){
if(event.getSide() == Side.CLIENT)
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(block, 0, new ModelResourceLocation("TestEnvironmentMod:GalaxySword", "inventory"));

GameRegistry.addRecipe(new ItemStack(block, 1), new Object[]{
    "X12", "345", "67X", Character.valueOf('1'), new ItemStack(Items.diamond, 1), Character.valueOf('2'), new ItemStack(Items.diamond, 1), Character.valueOf('3'), new ItemStack(Items.leather, 1), Character.valueOf('4'), new ItemStack(Items.diamond_sword, 1), Character.valueOf('5'), new ItemStack(Items.diamond, 1), Character.valueOf('6'), new ItemStack(Items.stick, 1), Character.valueOf('7'), new ItemStack(Items.leather, 1), 
});}
public void generateNether(World world, Random random, int chunkX, int chunkZ){}
public void generateSurface(World world, Random random, int chunkX, int chunkZ){}
public int addFuel(ItemStack fuel){return 0;}
public void serverLoad(FMLServerStartingEvent event){}
public void preInit(FMLPreInitializationEvent event){}
public void registerRenderers(){
}


static{
block = (new ItemgalaxySword(432));

}

static class ItemgalaxySword extends Item{

public ItemgalaxySword(int par1){
setMaxDamage(15);
maxStackSize = 1;
setUnlocalizedName("GalaxySword");
GameRegistry.registerItem(this, "GalaxySword");
setCreativeTab(CreativeTabs.tabCombat);
setContainerItem(this);
}
public int getItemEnchantability()
{
    return 420;
}
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
    return 1000;
}
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
    return 1.0F;
}
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
{
list.add("A special Sword from a galaxy far away (not a Star Wars reference)");
}

 


}}

 

 

Offline
Last seen: 1 year 9 months ago
Joined: 12/05/2015 - 22:18
Gems: 0
Ohh i just saw my mistake i

Ohh i just saw my mistake i put it as an item not a tool.

Brich036's picture
Offline
Last seen: 8 months 2 weeks ago
Joined: 05/11/2015 - 03:57
Gems: 1
RE:Ohh i just saw my mistake i

@OrcishXD  oh lol i didnt know that either

will always keep modding and never forget that :D

Brich036's picture
Offline
Last seen: 8 months 2 weeks ago
Joined: 05/11/2015 - 03:57
Gems: 1
Ok try this change the number

Ok try this change the number on "SetMaxDamage" try that and let me know how that goes

will always keep modding and never forget that :D

Offline
Last seen: 1 year 9 months ago
Joined: 12/05/2015 - 22:18
Gems: 0
dont worry, i changed it to a

dont worry, i changed it to a sword tool so i fixed it

Thanks for the help anyways :)

Brich036's picture
Offline
Last seen: 8 months 2 weeks ago
Joined: 05/11/2015 - 03:57
Gems: 1
im glad to help and i wish

im glad to help and i wish you the best of luck with your mod

will always keep modding and never forget that :D