Jump to content

Armor help


CoDiEx

Recommended Posts

I created some armor for my mod followed a lot of tutorials, and it finally worked.

or no, it works fine in SP but when I try to connect to the modded server I have it gives me this:

Mismatched items : {739=(Item 739, Type net.minecraft.src.RubyArmor, owned by mod_timed, ordinal 3, name null, claimedModId null, Item 739, Type net.minecraft.src.RubyBoots, owned by mod_timed, ordinal 0, name null, claimedModId null), 738=(Item 738, Type net.minecraft.src.RubyArmor, owned by mod_timed, ordinal 2, name null, claimedModId null, Item 738, Type net.minecraft.src.RubyLegs, owned by mod_timed, ordinal 0, name null, claimedModId null), 737=(Item 737, Type net.minecraft.src.RubyArmor, owned by mod_timed, ordinal 1, name null, claimedModId null, Item 737, Type net.minecraft.src.RubyPlate, owned by mod_timed, ordinal 0, name null, claimedModId null), 736=(Item 736, Type net.minecraft.src.RubyArmor, owned by mod_timed, ordinal 0, name null, claimedModId null, Item 736, Type net.minecraft.src.RubyHelmet, owned by mod_timed, ordinal 0, name null, claimedModId null), 743=(Item 743, Type net.minecraft.src.FlintArmor, owned by mod_timed, ordinal 3, name null, claimedModId null, Item 743, Type net.minecraft.src.FlintBoots, owned by mod_timed, ordinal 0, name null, claimedModId null), 742=(Item 742, Type net.minecraft.src.FlintArmor, owned by mod_timed, ordinal 2, name null, claimedModId null, Item 742, Type net.minecraft.src.FlintLegs, owned by mod_timed, ordinal 0, name null, claimedModId null), 741=(Item 741, Type net.minecraft.src.FlintArmor, owned by mod_timed, ordinal 1, name null, claimedModId null, Item 741, Type net.minecraft.src.FlintPlate, owned by mod_timed, ordinal 0, name null, claimedModId null), 740=(Item 740, Type net.minecraft.src.FlintArmor, owned by mod_timed, ordinal 0, name null, claimedModId null, Item 740, Type net.minecraft.src.FlintHelmet, owned by mod_timed, ordinal 0, name null, claimedModId null)}

 

mod_timed(server version):

package net.minecraft.src;

import java.util.Map;
import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelPig;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderPig;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.EnumHelper;
import net.minecraft.entity.EntityEggInfo;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.ai.EntityAIControlledByPlayer;
import net.minecraft.entity.ai.EntityAIEatGrass;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMate;
import net.minecraft.entity.ai.EntityAIPanic;
import net.minecraft.entity.ai.EntityAITempt;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.passive.EntityPig;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.AchievementList;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
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.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.inventory.IInventory;
import net.minecraftforge.common.MinecraftForge;

public class mod_timed extends BaseMod {

static EnumArmorMaterial ArmorMaterialRuby = EnumHelper.addArmorMaterial("RubyArmor", 150, new int[]{5,6,2,3}, 15);
static EnumArmorMaterial ArmorMaterialFlint = EnumHelper.addArmorMaterial("FlintArmor", 25, new int[]{2,4,3,2}, 15);

public static final Item RubyHelmet = new RubyArmor(480, ArmorMaterialRuby, 3, 0) .setItemName("RubyPlate") .setIconCoord(2, ;
public static final Item RubyChestplate = new RubyArmor(481, ArmorMaterialRuby, 3, 1).setItemName("RubyPlate").setIconCoord(2, 7);
public static final Item RubyLeggins = new RubyArmor(482, ArmorMaterialRuby, 3, 2).setItemName("RubyLeg").setIconCoord(2, 6);
public static final Item RubyBoots = new RubyArmor(483, ArmorMaterialRuby, 3, 3) .setItemName("RubyBoot").setIconCoord(2, 5);
public static final Item FlintHelmet = new FlintArmor(484, ArmorMaterialFlint, 3, 0).setItemName("FlintHelm").setIconCoord(0, 6);
public static final Item FlintChestplate = new FlintArmor(485, ArmorMaterialFlint, 3, 1).setItemName("FlintPlate").setIconCoord(0, 7);
public static final Item FlintLeggins = new FlintArmor(486, ArmorMaterialFlint, 3, 2).setItemName("FlintLeg").setIconCoord(0, ;
public static final Item FlintBoots = new FlintArmor(487, ArmorMaterialFlint, 3, 3) .setItemName("FlintBoot").setIconCoord(0, 9);

public String getVersion() {

	return null;

}

@Init
public void load() {

	LanguageRegistry.addName(RubyHelmet, "Ruby Helmet");
        LanguageRegistry.addName(RubyChestplate, "Ruby Plate");
        LanguageRegistry.addName(RubyLeggins, "Ruby Legs");
        LanguageRegistry.addName(RubyBoots, "Ruby Boots");
        LanguageRegistry.addName(FlintHelmet, "Flint Helmet");
        LanguageRegistry.addName(FlintChestplate, "Flint Plate");
        LanguageRegistry.addName(FlintLeggins, "Flint Legs");
        LanguageRegistry.addName(FlintBoots, "Flint Boots");

	RubyBoots.setCreativeTab(mod_timed.tabmod);
	RubyLeggins.setCreativeTab(mod_timed.tabmod);
	RubyChestplate.setCreativeTab(mod_timed.tabmod);
	RubyHelmet.setCreativeTab(mod_timed.tabmod);
	FlintHelmet.setCreativeTab(mod_timed.tabmod);
	FlintLeggins.setCreativeTab(mod_timed.tabmod);
	FlintChestplate.setCreativeTab(mod_timed.tabmod);
	FlintBoots.setCreativeTab(mod_timed.tabmod);
	FlintHoe.setCreativeTab(mod_timed.tabmod);

}

}

 

RubyArmor:

package net.minecraft.src;

import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IArmorTextureProvider;

public class RubyArmor extends ItemArmor implements IArmorTextureProvider {

public RubyArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4)
{
    super(par1, par2EnumArmorMaterial, par3, par4);
}

@Override
public String getTextureFile() {
    return "/New/Untitled-1.png";
}

@Override
public String getArmorTextureFile(ItemStack itemstack) {

	if (itemstack.itemID == mod_timed.RubyHelmet.itemID || itemstack.itemID == mod_timed.RubyChestplate.itemID || itemstack.itemID == mod_timed.RubyBoots.itemID)
	{
	    return "/New/armor/blue_1.png";
	}
	else if (itemstack.itemID == mod_timed.RubyLeggins.itemID)
	{
	    return "/New/armor/blue_2.png";
	}

	return null;

}

}

 

FlintArmor

package net.minecraft.src;

import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IArmorTextureProvider;

public class FlintArmor extends ItemArmor implements IArmorTextureProvider {

public FlintArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4)
{
    super(par1, par2EnumArmorMaterial, par3, par4);
}

@Override
public String getTextureFile() {
    return "/TimedItems.png";
}

@Override
public String getArmorTextureFile(ItemStack itemstack) {

	if (itemstack.itemID == mod_timed.FlintHelmet.itemID || itemstack.itemID == mod_timed.FlintChestplate.itemID || itemstack.itemID == mod_timed.FlintBoots.itemID)
	{
	    return "/Flint01.png";
	}
	else if (itemstack.itemID == mod_timed.FlintLeggins.itemID)
	{
	    return "/Flint02.png";
	}

	return null;

}

}

Link to comment
Share on other sites

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.