Jump to content

cartoonfamily

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by cartoonfamily

  1. I want edit IDs Item and Block In Configuration file How to
  2. Doctor, help, pain, hurts. Fix it! (Hint: tell us your problems...) ItemStack stack = par5EntityPlayer.inventory.getCurrentItem(); if (stack != null && stack.getItem() == Item.appleGold) { Random t = new Random(); int random = t.nextInt(10); switch (random) { case 0: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.appleGold)); this.useItem(par5EntityPlayer, stack); break; case 1: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.appleRed)); this.useItem(par5EntityPlayer, stack); break; case 3: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.arrow)); this.useItem(par5EntityPlayer, stack); break; case 4: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.axeWood)); this.useItem(par5EntityPlayer, stack); break; case 5: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.bed)); this.useItem(par5EntityPlayer, stack); break; case 6: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.bakedPotato)); this.useItem(par5EntityPlayer, stack); break; case 7: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.axeStone)); this.useItem(par5EntityPlayer, stack); break; case 8: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.blazeRod)); this.useItem(par5EntityPlayer, stack); break; case 9: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.helmetLeather)); this.useItem(par5EntityPlayer, stack); break; case 10: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.swordDiamond)); this.useItem(par5EntityPlayer, stack); break; default: break; } I want Updata Mod 1.7.x
  3. [embed=425,349]BlockPMC_Main @Mod(modid = "BlockMc",name = "BlockMc",version = "xxx") public class BlockPMC_Main { @SidedProxy (clientSide = "BlockMc.client",serverSide = "BlockMc.server") public static server proxy; public static Block RandomBlock; @EventHandler public void load (FMLInitializationEvent e){ RandomBlock = new BlockPMC(2043,Material.rock).setCreativeTab(CreativeTabs.tabBlock); GameRegistry.registerBlock(RandomBlock, "RandomBlock"); LanguageRegistry.addName(RandomBlock, "RandomBlaok"); } }[/embed] ________________________________________________________________________________________________________ [embed=425,349]public BlockPMC(int par1, Material par2Material) { super(par2Material); } private void useItem(EntityPlayer par1, ItemStack itemstack) { if (!par1.capabilities.isCreativeMode) { --itemstack.stackSize; if (itemstack.stackSize <= 0) { par1.inventory.setInventorySlotContents( par1.inventory.currentItem, (ItemStack) null); } } } @Override public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { Minecraft mc = FMLClientHandler.instance().getClient();; ItemStack stack = par5EntityPlayer.inventory.getCurrentItem(); if (stack != null && stack.getItem() == Item.appleGold) { Random t = new Random(); int random = t.nextInt(10); switch (random) { case 0: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.appleGold)); this.useItem(par5EntityPlayer, stack); break; case 1: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.appleRed)); this.useItem(par5EntityPlayer, stack); break; case 3: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.arrow)); this.useItem(par5EntityPlayer, stack); break; case 4: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.axeWood)); this.useItem(par5EntityPlayer, stack); break; case 5: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.bed)); this.useItem(par5EntityPlayer, stack); break; case 6: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.bakedPotato)); this.useItem(par5EntityPlayer, stack); break; case 7: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.axeStone)); this.useItem(par5EntityPlayer, stack); break; case 8: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.blazeRod)); this.useItem(par5EntityPlayer, stack); break; case 9: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.helmetLeather)); this.useItem(par5EntityPlayer, stack); break; case 10: par5EntityPlayer.inventory .addItemStackToInventory(new ItemStack(Item.swordDiamond)); this.useItem(par5EntityPlayer, stack); break; default: break; } }else{ mc.thePlayer.sendChatMessage("I like stone "); } return false; } }[/embed]
  4. @SideOnly(Side.CLIENT) ModelBiped armorModel = new ModelBiped(); public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { if(itemStack != null){ if(itemStack.getItem() instanceof MyCraftWing1){ int type = ((ItemArmor)itemStack.getItem()).armorType; if(type == 1 || type == 1){ armorModel = getArmorModel(1); }else{ armorModel = getArmorModel(1); } } if(armorModel != null){ armorModel.bipedHead.showModel = armorSlot == 1; armorModel.bipedHeadwear.showModel = armorSlot == 1; armorModel.bipedBody.showModel = armorSlot == 1; armorModel.bipedRightArm.showModel = armorSlot == 1; armorModel.bipedLeftArm.showModel = armorSlot == 1; armorModel.bipedRightLeg.showModel = armorSlot == 1; armorModel.bipedLeftLeg.showModel = armorSlot == 1; armorModel.isSneak = entityLiving.isSneaking(); armorModel.isRiding = entityLiving.isRiding(); armorModel.isChild = entityLiving.isChild(); armorModel.heldItemRight = entityLiving.getCurrentItemOrArmor(0) != null ? 1 :0; return armorModel; } } return null; } }
  5. sword right Click error help me http://image.ohozaa.com/i/7a4/1HG6zv.png
  6. [16:30:51] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [16:30:51] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [16:30:51] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [16:30:51] [main/INFO] [FML]: Forge Mod Loader version 7.2.211.1121 for Minecraft 1.7.2 loading [16:30:51] [main/INFO] [FML]: Java is Java HotSpot Client VM, version 1.8.0_20, running on Windows 7:x86:6.1, installed at C:\Program Files\Java\jre1.8.0_20 [16:30:51] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [16:30:51] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:30:51] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [16:30:51] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:30:51] [main/ERROR] [LaunchWrapper]: Unable to launch java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[?:1.8.0_20] at java.util.ArrayList$Itr.remove(Unknown Source) ~[?:1.8.0_20] at net.minecraft.launchwrapper.Launch.launch(Launch.java:117) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] Java HotSpot Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
  7. I Test Mod in Eclipse Texturepack Ok and exporting our mod 1.7.2 Code :http://pastebin.com/HdYmLGb3
  8. I Create Mod I want protection copy mod of others I want Mod I Only
  9. <img src="http://image.ohozaa.com/i/e5b/ab1qP7.png"> <img src="http://image.ohozaa.com/i/e5b/ab1qP7.png"> Code: GL11.glRotatef(0.0F, 0.0F, 0.0F, 0.0F); GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, 0.5F, -0.5F); float scale = 2.5F; GL11.glScalef(scale, scale, scale);
  10. You Create Mod Armor 3D Techne ? Please Tutorial I
  11. style as image Sorry for any incorrect on my conversation, my English is not good T_T Model ClientProxy package tutorial; import net.minecraft.client.model.ModelBiped; public class ClientProxy extends CommonProxy { private static final tutarm tutChest = new tutarm((float) 1.0); private static final tutarm tutLegs = new tutarm((float) 1.0); @Override public ModelBiped getArmorModel(int id){ switch (id) { case 0: return tutChest; case 1: return tutLegs; default: break; } return tutChest; //default, if whenever you should have passed on a wrong id } } _____________________________________________ tutarm package tutorial; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class tutarm extends ModelBiped { //fields ModelRenderer Shape1; public tutarm(float f) { super(f,0, 64,64); textureWidth = 64; textureHeight = 64; Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(0F, 0F, 0F, 2, 3, 2); Shape1.setRotationPoint(-15, 53, -3F); Shape1.setTextureSize(64, 64); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) { super.setRotationAngles(f, f1, f2, f3, f4, f5, null); } } ____________________________________ mod_ArmorTutorial package tutorial; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; 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.LanguageRegistry; @Mod(modid="ArmorTutorial", name="ArmorTutorial", version="tutorial") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class mod_ArmorTutorial { @SidedProxy(serverSide="tutorial.CommonProxy", clientSide="tutorial.ClientProxy") public static CommonProxy proxy; public static Item chest; public static Item legs; public static Item boots; public static Item helmet; @EventHandler public void load(FMLInitializationEvent e) { helmet = new CustomArmor(8469, EnumArmorMaterial.IRON, 4, 0).setUnlocalizedName("a.iron_helmet"); chest = new CustomArmor(8470, EnumArmorMaterial.IRON, 4, 1).setUnlocalizedName("a.iron_chestplate"); legs = new CustomArmor(8471, EnumArmorMaterial.IRON, 4, 2).setUnlocalizedName("a.armor:tutorial_chest.png"); boots = new CustomArmor(8472, EnumArmorMaterial.IRON, 4, 3).setUnlocalizedName("a.armor:tutorial_chest.png"); LanguageRegistry.addName(helmet, "Armor:หมวก"); LanguageRegistry.addName(chest, "Armor:เสื้อ"); LanguageRegistry.addName(legs, "Armor:กางเกง"); LanguageRegistry.addName(boots, "Armor:รองเท้า"); } } _____________________________________________
  12. Sorry!! Model Techne !! Code:: package tutorial; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; public class CustomArmor extends ItemArmor{ public CustomArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); // TODO Auto-generated constructor stub } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { String itemName = getUnlocalizedName().substring(getUnlocalizedName().lastIndexOf(".") + 1); this.itemIcon = par1IconRegister.registerIcon(itemName); } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if (stack.itemID == mod_ArmorTutorial.chest.itemID || stack.itemID == mod_ArmorTutorial.boots.itemID || stack.itemID == mod_ArmorTutorial.helmet.itemID) { return "armor:tutorial_chest.png"; } if (stack.itemID == mod_ArmorTutorial.legs.itemID) { return "armor:tutorial_legs.png"; } return null; } ModelBiped armorModel = new ModelBiped(); @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { if(itemStack != null){ if(itemStack.getItem() instanceof CustomArmor){ int type = ((ItemArmor)itemStack.getItem()).armorType; if(type == 1 || type == 3){ armorModel = mod_ArmorTutorial.proxy.getArmorModel(0); }else{ armorModel = mod_ArmorTutorial.proxy.getArmorModel(1); armorModel = mod_ArmorTutorial.proxy.getArmorModel(2); } } if(armorModel != null){ armorModel.bipedHead.showModel = armorSlot == 0; armorModel.bipedHeadwear.showModel = armorSlot == 0; armorModel.bipedBody.showModel = armorSlot == 1 || armorSlot == 2; armorModel.bipedRightArm.showModel = armorSlot == 1; armorModel.bipedLeftArm.showModel = armorSlot == 1; armorModel.bipedRightLeg.showModel = armorSlot == 2 || armorSlot == 3; armorModel.bipedLeftLeg.showModel = armorSlot == 2 || armorSlot == 3; armorModel.isSneak = entityLiving.isSneaking(); armorModel.isRiding = entityLiving.isRiding(); armorModel.isChild = entityLiving.isChild(); armorModel.heldItemRight = entityLiving.getCurrentItemOrArmor(0) != null ? 1 :0; if(entityLiving instanceof EntityPlayer){ armorModel.aimedBow =((EntityPlayer)entityLiving).getItemInUseDuration() > 2; } return armorModel; } } return null; } } ********************************* package tutorial; import net.minecraft.client.model.ModelBiped; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; 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.LanguageRegistry; @Mod(modid="ArmorTutorial", name="ArmorTutorial", version="tutorial") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class mod_ArmorTutorial { @SidedProxy(serverSide="tutorial.CommonProxy", clientSide="tutorial.ClientProxy") public static CommonProxy proxy; public static Item chest; public static Item legs; public static Item boots; public static Item helmet; @EventHandler public void load(FMLInitializationEvent e) { helmet = new CustomArmor(8469, EnumArmorMaterial.IRON, 4, 0).setUnlocalizedName("a.iron_helmet"); chest = new CustomArmor(8470, EnumArmorMaterial.IRON, 4, 1).setUnlocalizedName("a.iron_chestplate"); legs = new CustomArmor(8471, EnumArmorMaterial.IRON, 4, 2).setUnlocalizedName("a.armor:tutorial_chest.png"); boots = new CustomArmor(8472, EnumArmorMaterial.IRON, 4, 3).setUnlocalizedName("a.armor:tutorial_chest.png"); LanguageRegistry.addName(helmet, "Armor:หมวก"); LanguageRegistry.addName(chest, "Armor:เสื้อ"); LanguageRegistry.addName(legs, "Armor:กางเกง"); LanguageRegistry.addName(boots, "Armor:รองเท้า"); } public static ModelBiped getArmorModel() { // TODO Auto-generated method stub return null; } } ****************************** package tutorial; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class tutarm extends ModelBiped { //fields ModelRenderer head; ModelRenderer body; ModelRenderer rightarm; ModelRenderer leftarm; ModelRenderer rightleg; ModelRenderer leftleg; public tutarm(float f) { super(f,0, 128,128); textureWidth = 128; textureHeight = 128; head = new ModelRenderer(this, 0, 35); head.addBox(-7F, -8F, -4F, 14, 13, 14); head.setRotationPoint(0F, 0F, -3F); head.setTextureSize(128, 128); head.mirror = true; setRotation(head, 0F, 0F, 0F); body = new ModelRenderer(this, 61, 2); body.addBox(-4F, 0F, -5F, 8, 12, 10); body.setRotationPoint(0F, 0F, 0F); body.setTextureSize(128, 128); body.mirror = true; setRotation(body, 0F, 0F, 0F); rightarm = new ModelRenderer(this, 40, 16); rightarm.addBox(-5F, -2F, -2F, 6, 12, 4); rightarm.setRotationPoint(-5F, 2F, 0F); rightarm.setTextureSize(128, 128); rightarm.mirror = true; setRotation(rightarm, 0F, 0F, 0F); leftarm = new ModelRenderer(this, 40, 16); leftarm.addBox(-1F, -2F, -2F, 6, 12, 4); leftarm.setRotationPoint(5F, 2F, 0F); leftarm.setTextureSize(128, 128); leftarm.mirror = true; setRotation(leftarm, 0F, 0F, 0F); rightleg = new ModelRenderer(this, 0, 16); rightleg.addBox(-2F, 0F, -2F, 4, 12, 4); rightleg.setRotationPoint(-2F, 12F, 0F); rightleg.setTextureSize(128, 128); rightleg.mirror = true; setRotation(rightleg, 0F, 0F, 0F); leftleg = new ModelRenderer(this, 0, 16); leftleg.addBox(-2F, 0F, -2F, 4, 12, 4); leftleg.setRotationPoint(2F, 12F, 0F); leftleg.setTextureSize(128, 128); leftleg.mirror = true; setRotation(leftleg, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5); head.render(f5); body.render(f5); rightarm.render(f5); leftarm.render(f5); rightleg.render(f5); leftleg.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) { super.setRotationAngles(f, f1, f2, f3, f4, f5, null); } } Help Me !!!!
  13. Sorry!! Model Techne !! Code:: package tutorial; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; public class CustomArmor extends ItemArmor{ public CustomArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); // TODO Auto-generated constructor stub } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { String itemName = getUnlocalizedName().substring(getUnlocalizedName().lastIndexOf(".") + 1); this.itemIcon = par1IconRegister.registerIcon(itemName); } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if (stack.itemID == mod_ArmorTutorial.chest.itemID || stack.itemID == mod_ArmorTutorial.boots.itemID || stack.itemID == mod_ArmorTutorial.helmet.itemID) { return "armor:tutorial_chest.png"; } if (stack.itemID == mod_ArmorTutorial.legs.itemID) { return "armor:tutorial_legs.png"; } return null; } ModelBiped armorModel = new ModelBiped(); @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { if(itemStack != null){ if(itemStack.getItem() instanceof CustomArmor){ int type = ((ItemArmor)itemStack.getItem()).armorType; if(type == 1 || type == 3){ armorModel = mod_ArmorTutorial.proxy.getArmorModel(0); }else{ armorModel = mod_ArmorTutorial.proxy.getArmorModel(1); armorModel = mod_ArmorTutorial.proxy.getArmorModel(2); } } if(armorModel != null){ armorModel.bipedHead.showModel = armorSlot == 0; armorModel.bipedHeadwear.showModel = armorSlot == 0; armorModel.bipedBody.showModel = armorSlot == 1 || armorSlot == 2; armorModel.bipedRightArm.showModel = armorSlot == 1; armorModel.bipedLeftArm.showModel = armorSlot == 1; armorModel.bipedRightLeg.showModel = armorSlot == 2 || armorSlot == 3; armorModel.bipedLeftLeg.showModel = armorSlot == 2 || armorSlot == 3; armorModel.isSneak = entityLiving.isSneaking(); armorModel.isRiding = entityLiving.isRiding(); armorModel.isChild = entityLiving.isChild(); armorModel.heldItemRight = entityLiving.getCurrentItemOrArmor(0) != null ? 1 :0; if(entityLiving instanceof EntityPlayer){ armorModel.aimedBow =((EntityPlayer)entityLiving).getItemInUseDuration() > 2; } return armorModel; } } return null; } } ********************************* package tutorial; import net.minecraft.client.model.ModelBiped; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; 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.LanguageRegistry; @Mod(modid="ArmorTutorial", name="ArmorTutorial", version="tutorial") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class mod_ArmorTutorial { @SidedProxy(serverSide="tutorial.CommonProxy", clientSide="tutorial.ClientProxy") public static CommonProxy proxy; public static Item chest; public static Item legs; public static Item boots; public static Item helmet; @EventHandler public void load(FMLInitializationEvent e) { helmet = new CustomArmor(8469, EnumArmorMaterial.IRON, 4, 0).setUnlocalizedName("a.iron_helmet"); chest = new CustomArmor(8470, EnumArmorMaterial.IRON, 4, 1).setUnlocalizedName("a.iron_chestplate"); legs = new CustomArmor(8471, EnumArmorMaterial.IRON, 4, 2).setUnlocalizedName("a.armor:tutorial_chest.png"); boots = new CustomArmor(8472, EnumArmorMaterial.IRON, 4, 3).setUnlocalizedName("a.armor:tutorial_chest.png"); LanguageRegistry.addName(helmet, "Armor:หมวก"); LanguageRegistry.addName(chest, "Armor:เสื้อ"); LanguageRegistry.addName(legs, "Armor:กางเกง"); LanguageRegistry.addName(boots, "Armor:รองเท้า"); } public static ModelBiped getArmorModel() { // TODO Auto-generated method stub return null; } } ****************************** package tutorial; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class tutarm extends ModelBiped { //fields ModelRenderer head; ModelRenderer body; ModelRenderer rightarm; ModelRenderer leftarm; ModelRenderer rightleg; ModelRenderer leftleg; public tutarm(float f) { super(f,0, 128,128); textureWidth = 128; textureHeight = 128; head = new ModelRenderer(this, 0, 35); head.addBox(-7F, -8F, -4F, 14, 13, 14); head.setRotationPoint(0F, 0F, -3F); head.setTextureSize(128, 128); head.mirror = true; setRotation(head, 0F, 0F, 0F); body = new ModelRenderer(this, 61, 2); body.addBox(-4F, 0F, -5F, 8, 12, 10); body.setRotationPoint(0F, 0F, 0F); body.setTextureSize(128, 128); body.mirror = true; setRotation(body, 0F, 0F, 0F); rightarm = new ModelRenderer(this, 40, 16); rightarm.addBox(-5F, -2F, -2F, 6, 12, 4); rightarm.setRotationPoint(-5F, 2F, 0F); rightarm.setTextureSize(128, 128); rightarm.mirror = true; setRotation(rightarm, 0F, 0F, 0F); leftarm = new ModelRenderer(this, 40, 16); leftarm.addBox(-1F, -2F, -2F, 6, 12, 4); leftarm.setRotationPoint(5F, 2F, 0F); leftarm.setTextureSize(128, 128); leftarm.mirror = true; setRotation(leftarm, 0F, 0F, 0F); rightleg = new ModelRenderer(this, 0, 16); rightleg.addBox(-2F, 0F, -2F, 4, 12, 4); rightleg.setRotationPoint(-2F, 12F, 0F); rightleg.setTextureSize(128, 128); rightleg.mirror = true; setRotation(rightleg, 0F, 0F, 0F); leftleg = new ModelRenderer(this, 0, 16); leftleg.addBox(-2F, 0F, -2F, 4, 12, 4); leftleg.setRotationPoint(2F, 12F, 0F); leftleg.setTextureSize(128, 128); leftleg.mirror = true; setRotation(leftleg, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5); head.render(f5); body.render(f5); rightarm.render(f5); leftarm.render(f5); rightleg.render(f5); leftleg.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) { super.setRotationAngles(f, f1, f2, f3, f4, f5, null); } }
  14. style as image Sorry for any incorrect on my conversation, my English is not good T_T Model ClientProxy package tutorial; import net.minecraft.client.model.ModelBiped; public class ClientProxy extends CommonProxy { private static final tutarm tutChest = new tutarm((float) 1.0); private static final tutarm tutLegs = new tutarm((float) 1.0); @Override public ModelBiped getArmorModel(int id){ switch (id) { case 0: return tutChest; case 1: return tutLegs; default: break; } return tutChest; //default, if whenever you should have passed on a wrong id } } _____________________________________________ tutarm package tutorial; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class tutarm extends ModelBiped { //fields ModelRenderer Shape1; public tutarm(float f) { super(f,0, 64,64); textureWidth = 64; textureHeight = 64; Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(0F, 0F, 0F, 2, 3, 2); Shape1.setRotationPoint(-15, 53, -3F); Shape1.setTextureSize(64, 64); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) { super.setRotationAngles(f, f1, f2, f3, f4, f5, null); } } ____________________________________ mod_ArmorTutorial package tutorial; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; 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.LanguageRegistry; @Mod(modid="ArmorTutorial", name="ArmorTutorial", version="tutorial") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class mod_ArmorTutorial { @SidedProxy(serverSide="tutorial.CommonProxy", clientSide="tutorial.ClientProxy") public static CommonProxy proxy; public static Item chest; public static Item legs; public static Item boots; public static Item helmet; @EventHandler public void load(FMLInitializationEvent e) { helmet = new CustomArmor(8469, EnumArmorMaterial.IRON, 4, 0).setUnlocalizedName("a.iron_helmet"); chest = new CustomArmor(8470, EnumArmorMaterial.IRON, 4, 1).setUnlocalizedName("a.iron_chestplate"); legs = new CustomArmor(8471, EnumArmorMaterial.IRON, 4, 2).setUnlocalizedName("a.armor:tutorial_chest.png"); boots = new CustomArmor(8472, EnumArmorMaterial.IRON, 4, 3).setUnlocalizedName("a.armor:tutorial_chest.png"); LanguageRegistry.addName(helmet, "Armor:หมวก"); LanguageRegistry.addName(chest, "Armor:เสื้อ"); LanguageRegistry.addName(legs, "Armor:กางเกง"); LanguageRegistry.addName(boots, "Armor:รองเท้า"); } } _____________________________________________
  15. Model Armor HelpMe !! http://image.ohozaa.com/i/adf/Vj4lOI.jpg
×
×
  • Create New...

Important Information

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