Résolu Render Item 3D
-
Bonjour, j’ai encore un probleme :D, j’ai suivi le tutoriel afin d’avoir un Item en 3D mais ça ne fonctionne pas
Donc voici ma class “main”
package mod.skycraft.common; import java.awt.Color; import mod.skycraft.creativeTab.ArmorSkycraftCreativeTab; import mod.skycraft.creativeTab.BlockSkycraftCreativeTab; import mod.skycraft.creativeTab.CombatSkycraftCreativeTab; import mod.skycraft.creativeTab.MaterialSkycraftCreativeTab; import mod.skycraft.proxy.CommonProxy; import mod.skycraft.world.OreGenerator; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EnumCreatureType; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; 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.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "skycraft", name = "Skycraft", version = "1.0.0") public class Skycraft { @Instance("skycraft") public static Skycraft instance; @SidedProxy(clientSide = "mod.skycraft.proxy.ClientProxy", serverSide = "mod.skycraft.proxy.CommonProxy") public static CommonProxy proxy; public static Item itemOrichalque; public static Item itemDwemer; public static Item itemLune; public static Item itemMalachite; public static Item itemCorindon; public static Item itemSteel; public static Item itemDaedricHearth; public static Item itemDragonBone; public static Item itemOrichalqueHelmet; public static Item itemOrichalqueChestplate; public static Item itemOrichalqueLeg; public static Item itemOrichalqueShoes; public static Item itemDwemerHelmet; public static Item itemDwemerChestplate; public static Item itemDwemerLeg; public static Item itemDwemerShoes; public static Item itemElvenHelmet; public static Item itemElvenChestplate; public static Item itemElvenLeg; public static Item itemElvenShoes; public static Item itemMalachiteHelmet; public static Item itemMalachiteChestplate; public static Item itemMalachiteLeg; public static Item itemMalachiteShoes; public static Item itemDragonHelmet; public static Item itemDragonChestplate; public static Item itemDragonLeg; public static Item itemDragonShoes; public static Item itemSteelHelmet; public static Item itemSteelChestplate; public static Item itemSteelLeg; public static Item itemSteelShoes; public static Item itemDaedricHelmet; public static Item itemDaedricChestplate; public static Item itemDaedricLeg; public static Item itemDaedricShoes; public static Item itemPlateHelmet; public static Item itemPlateChestplate; public static Item itemPlateLeg; public static Item itemPlateShoes; public static Block blockOrichalque; public static Block blockDwemer; public static Block blockLune; public static Block blockMalachite; public static Block blockCorindon; public static Block blockSkyrimite; public static Item swordDaedric; public static Item swordDragon; public static Item swordOrichalque; public static Item swordMalachite; public static Item swordSteel; public static Item swordDwemer; public static Item swordElven; public static Item hammerDragon; static ToolMaterial DaedricMaterial = EnumHelper.addToolMaterial("Daedric", 3, 5000, 14.0F, 6.0F, 30); static ToolMaterial DragonMaterial = EnumHelper.addToolMaterial("Dragon", 3, 3000, 12.0F, 5.0F, 13); static ToolMaterial OrichalqueMaterial = EnumHelper.addToolMaterial("Orichalque", 3, 2000, 10.0F, 4.0F, 15); static ToolMaterial MalachiteMaterial = EnumHelper.addToolMaterial("Malachite", 3, 1561, 8.0F, 3.0F, 20); static ToolMaterial SteelMaterial = EnumHelper.addToolMaterial("Steel", 3, 1561, 8.0F, 2.5F, 10); static ToolMaterial DwemerMaterial = EnumHelper.addToolMaterial("Dwemer", 3, 1561, 8.0F, 2.0F, 17); static ToolMaterial ElvenMaterial = EnumHelper.addToolMaterial("Eleven", 3, 1561, 8.0F, 1.5F, 25); public static ArmorMaterial armorOrichalque = EnumHelper.addArmorMaterial("armorOrichalque", 36, new int[] {4, 6, 5, 4}, 15); public static ArmorMaterial armorElven = EnumHelper.addArmorMaterial("armorElven", 10, new int[] {4, 6, 5, 4}, 25); public static ArmorMaterial armorMalachite = EnumHelper.addArmorMaterial("armorMalachite", 33, new int[] {4, 6, 5, 4}, 20); public static ArmorMaterial armorPlate = EnumHelper.addArmorMaterial("armorPlate", 25, new int[] {4, 6, 5, 4}, 15); public static ArmorMaterial armorDaedric = EnumHelper.addArmorMaterial("armorDaedric", 50, new int[] {4, 6, 5, 4}, 30); public static ArmorMaterial armorDragon = EnumHelper.addArmorMaterial("armorDragon", 45, new int[] {4, 6, 5, 4}, 13); public static ArmorMaterial armorDwemer = EnumHelper.addArmorMaterial("armorDwemer", 15, new int[] {4, 6, 5, 4}, 17); public static ArmorMaterial armorSteel = EnumHelper.addArmorMaterial("armorSteel", 20, new int[] {4, 6, 5, 4}, 10); public static final CreativeTabs armorSkycraftCreativeTab = new ArmorSkycraftCreativeTab("armorSkycraftCreativeTab"); public static final CreativeTabs combatSkycraftCreativeTab = new CombatSkycraftCreativeTab("combatSkycraftCreativeTab"); public static final CreativeTabs materialSkycraftCreativeTab = new MaterialSkycraftCreativeTab("materialSkycraftCreativeTab"); public static final CreativeTabs blockSkycraftCreativeTab = new BlockSkycraftCreativeTab("blockSkycraftCreativeTab"); public static int dimensionId = 2; @EventHandler public void preInit(FMLPreInitializationEvent event) { itemOrichalque = new ItemOrichalque().setUnlocalizedName("orichalqueingot").setTextureName("modtest:itemorichalque").setCreativeTab(materialSkycraftCreativeTab); itemDwemer = new ItemDwemer().setUnlocalizedName("dwemeringot").setTextureName("modtest:itemdwemer").setCreativeTab(materialSkycraftCreativeTab); itemLune = new ItemLune().setUnlocalizedName("luneingot").setTextureName("modtest:itemlune").setCreativeTab(materialSkycraftCreativeTab); itemMalachite = new ItemMalachite().setUnlocalizedName("malachiteingot").setTextureName("modtest:itemmalachite").setCreativeTab(materialSkycraftCreativeTab); itemCorindon = new ItemCorindon().setUnlocalizedName("corindoningot").setTextureName("modtest:itemcoridon").setCreativeTab(materialSkycraftCreativeTab); itemSteel = new ItemSteel().setUnlocalizedName("steelingot").setTextureName("modtest:itemsteel").setCreativeTab(materialSkycraftCreativeTab); itemDragonBone = new ItemDragonScale().setUnlocalizedName("dragonbone").setTextureName("modtest:itemdragonbone").setCreativeTab(materialSkycraftCreativeTab); itemDaedricHearth = new ItemDaedricHearth().setUnlocalizedName("daedrichearth").setTextureName("modtest:itemdaedrichearth").setCreativeTab(materialSkycraftCreativeTab); blockOrichalque = new BlockOrichalque(Material.rock).setBlockName("orichalque").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("modtest:block_orichalque").setCreativeTab(blockSkycraftCreativeTab); blockDwemer = new BlockDwemer(Material.rock).setBlockName("dwemer").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("modtest:block_dwemer").setCreativeTab(blockSkycraftCreativeTab); blockLune = new BlockLune(Material.rock).setBlockName("lune").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("modtest:block_lune").setCreativeTab(blockSkycraftCreativeTab); blockMalachite = new BlockMalachite(Material.rock).setBlockName("malachite").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("modtest:block_malachite").setCreativeTab(blockSkycraftCreativeTab); blockCorindon = new BlockCorindon(Material.rock).setBlockName("corindon").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("modtest:block_corindon").setCreativeTab(blockSkycraftCreativeTab); blockSkyrimite = new BlockSkyrimite(Material.rock).setBlockName("skyrimite").setHardness(3.0F).setResistance(5.0F).setBlockTextureName("modtest:block_skyrimite").setCreativeTab(blockSkycraftCreativeTab); itemOrichalqueHelmet = new ItemOrichalqueArmor(armorOrichalque, 0).setUnlocalizedName("helmetOrichalque").setTextureName("modtest:helmet_orichalque").setCreativeTab(armorSkycraftCreativeTab); itemOrichalqueChestplate = new ItemOrichalqueArmor(armorOrichalque, 1).setUnlocalizedName("chestPlateOrichalque").setTextureName("modtest:chestplate_orichalque").setCreativeTab(armorSkycraftCreativeTab); itemOrichalqueLeg = new ItemOrichalqueArmor(armorOrichalque, 2).setUnlocalizedName("leggingsOrichalque").setTextureName("modtest:leggings_orichalque").setCreativeTab(armorSkycraftCreativeTab); itemOrichalqueShoes = new ItemOrichalqueArmor(armorOrichalque, 3).setUnlocalizedName("bootsOrichalque").setTextureName("modtest:boots_orichalque").setCreativeTab(armorSkycraftCreativeTab); itemDwemerHelmet = new ItemDwemerArmor(armorDwemer, 0).setUnlocalizedName("helmetDwemer").setTextureName("modtest:helmet_dwemer").setCreativeTab(armorSkycraftCreativeTab); itemDwemerChestplate = new ItemDwemerArmor(armorDwemer, 1).setUnlocalizedName("chestPlateDwemer").setTextureName("modtest:chestplate_dwemer").setCreativeTab(armorSkycraftCreativeTab); itemDwemerLeg = new ItemDwemerArmor(armorDwemer, 2).setUnlocalizedName("leggingsDwemer").setTextureName("modtest:leggings_dwemer").setCreativeTab(armorSkycraftCreativeTab); itemDwemerShoes = new ItemDwemerArmor(armorDwemer, 3).setUnlocalizedName("bootsDwemer").setTextureName("modtest:boots_dwemer").setCreativeTab(armorSkycraftCreativeTab); itemElvenHelmet = new ItemElvenArmor(armorElven, 0).setUnlocalizedName("helmetElven").setTextureName("modtest:helmet_elven").setCreativeTab(armorSkycraftCreativeTab); itemElvenChestplate = new ItemElvenArmor(armorElven, 1).setUnlocalizedName("chestPlateElven").setTextureName("modtest:chestplate_elven").setCreativeTab(armorSkycraftCreativeTab); itemElvenLeg = new ItemElvenArmor(armorElven, 2).setUnlocalizedName("leggingsElven").setTextureName("modtest:leggings_elven").setCreativeTab(armorSkycraftCreativeTab); itemElvenShoes = new ItemElvenArmor(armorElven, 3).setUnlocalizedName("bootsElven").setTextureName("modtest:boots_elven").setCreativeTab(armorSkycraftCreativeTab); itemMalachiteHelmet = new ItemMalachiteArmor(armorMalachite, 0).setUnlocalizedName("helmetMalachite").setTextureName("modtest:helmet_malachite").setCreativeTab(armorSkycraftCreativeTab); itemMalachiteChestplate = new ItemMalachiteArmor(armorMalachite, 1).setUnlocalizedName("chestPlateMalachite").setTextureName("modtest:chestplate_malachite").setCreativeTab(armorSkycraftCreativeTab); itemMalachiteLeg = new ItemMalachiteArmor(armorMalachite, 2).setUnlocalizedName("leggingsMalachite").setTextureName("modtest:leggings_malachite").setCreativeTab(armorSkycraftCreativeTab); itemMalachiteShoes = new ItemMalachiteArmor(armorMalachite, 3).setUnlocalizedName("bootsMalachite").setTextureName("modtest:boots_malachite").setCreativeTab(armorSkycraftCreativeTab); itemPlateHelmet = new ItemPlateArmor(armorPlate, 0).setUnlocalizedName("helmetPlate").setTextureName("modtest:helmet_plate").setCreativeTab(armorSkycraftCreativeTab); itemPlateChestplate = new ItemPlateArmor(armorPlate, 1).setUnlocalizedName("chestPlatePlate").setTextureName("modtest:chestplate_plate").setCreativeTab(armorSkycraftCreativeTab); itemPlateLeg = new ItemPlateArmor(armorPlate, 2).setUnlocalizedName("leggingsPlate").setTextureName("modtest:leggings_plate").setCreativeTab(armorSkycraftCreativeTab); itemPlateShoes = new ItemPlateArmor(armorPlate, 3).setUnlocalizedName("bootsPlate").setTextureName("modtest:boots_plate").setCreativeTab(armorSkycraftCreativeTab); itemDaedricHelmet = new ItemDaedricArmor(armorDaedric, 0).setUnlocalizedName("helmetDaedric").setTextureName("modtest:helmet_daedric").setCreativeTab(armorSkycraftCreativeTab); itemDaedricChestplate = new ItemDaedricArmor(armorDaedric, 1).setUnlocalizedName("chestPlateDaedric").setTextureName("modtest:chestplate_daedric").setCreativeTab(armorSkycraftCreativeTab); itemDaedricLeg = new ItemDaedricArmor(armorDaedric, 2).setUnlocalizedName("leggingsDaedric").setTextureName("modtest:leggings_daedric").setCreativeTab(armorSkycraftCreativeTab); itemDaedricShoes = new ItemDaedricArmor(armorDaedric, 3).setUnlocalizedName("bootsDaedric").setTextureName("modtest:boots_daedric").setCreativeTab(armorSkycraftCreativeTab); itemDragonHelmet = new ItemDragonArmor(armorDragon, 0).setUnlocalizedName("helmetDragon").setTextureName("modtest:helmet_dragon").setCreativeTab(armorSkycraftCreativeTab); itemDragonChestplate = new ItemDragonArmor(armorDragon, 1).setUnlocalizedName("chestPlateDragon").setTextureName("modtest:chestplate_dragon").setCreativeTab(armorSkycraftCreativeTab); itemDragonLeg = new ItemDragonArmor(armorDragon, 2).setUnlocalizedName("leggingsDragon").setTextureName("modtest:leggings_dragon").setCreativeTab(armorSkycraftCreativeTab); itemDragonShoes = new ItemDragonArmor(armorDragon, 3).setUnlocalizedName("bootsDragon").setTextureName("modtest:boots_dragon").setCreativeTab(armorSkycraftCreativeTab); itemSteelHelmet = new ItemSteelArmor(armorSteel, 0).setUnlocalizedName("helmetSteel").setTextureName("modtest:helmet_steel").setCreativeTab(armorSkycraftCreativeTab); itemSteelChestplate = new ItemSteelArmor(armorSteel, 1).setUnlocalizedName("chestPlateSteel").setTextureName("modtest:chestplate_steel").setCreativeTab(armorSkycraftCreativeTab); itemSteelLeg = new ItemSteelArmor(armorSteel, 2).setUnlocalizedName("leggingsSteel").setTextureName("modtest:leggings_steel").setCreativeTab(armorSkycraftCreativeTab); itemSteelShoes = new ItemSteelArmor(armorSteel, 3).setUnlocalizedName("bootsSteel").setTextureName("modtest:boots_steel").setCreativeTab(armorSkycraftCreativeTab); swordDaedric = new SwordDaedric(DaedricMaterial).setUnlocalizedName("swordDaedric").setTextureName("modtest:sword_daedric").setCreativeTab(combatSkycraftCreativeTab); swordDragon = new SwordDragon(DragonMaterial).setUnlocalizedName("swordDragon").setTextureName("modtest:sword_dragon").setCreativeTab(combatSkycraftCreativeTab); swordOrichalque = new SwordOrichalque(OrichalqueMaterial).setUnlocalizedName("swordOrichalque").setTextureName("modtest:sword_orichalque").setCreativeTab(combatSkycraftCreativeTab); swordMalachite = new SwordMalachite(MalachiteMaterial).setUnlocalizedName("swordMalachite").setTextureName("modtest:sword_malachite").setCreativeTab(combatSkycraftCreativeTab); swordSteel = new SwordSteel(SteelMaterial).setUnlocalizedName("swordSteel").setTextureName("modtest:sword_steel").setCreativeTab(combatSkycraftCreativeTab); swordDwemer = new SwordDwemer(DwemerMaterial).setUnlocalizedName("swordDwemer").setTextureName("modtest:sword_dwemer").setCreativeTab(combatSkycraftCreativeTab); swordElven = new SwordElven(ElvenMaterial).setUnlocalizedName("swordElven").setTextureName("modtest:sword_elven").setCreativeTab(combatSkycraftCreativeTab); hammerDragon = new HammerDragon(DragonMaterial).setUnlocalizedName("hammerDragon").setCreativeTab(combatSkycraftCreativeTab); GameRegistry.registerItem(itemOrichalque, "item_orichalque"); GameRegistry.registerItem(itemDwemer, "item_dwemer"); GameRegistry.registerItem(itemLune, "item_lune"); GameRegistry.registerItem(itemMalachite, "item_malachite"); GameRegistry.registerItem(itemCorindon, "item_corindon"); GameRegistry.registerItem(itemDragonBone, "item_dragon_bone"); GameRegistry.registerItem(itemDaedricHearth, "item_daedric_hearth"); GameRegistry.registerItem(itemSteel, "item_steel"); GameRegistry.registerBlock(blockOrichalque, "block_orichalque"); GameRegistry.registerBlock(blockDwemer, "block_dwemer"); GameRegistry.registerBlock(blockLune, "block_lune"); GameRegistry.registerBlock(blockMalachite, "block_malachite"); GameRegistry.registerBlock(blockCorindon, "block_coridon"); GameRegistry.registerBlock(blockSkyrimite, "block_skyrimite"); GameRegistry.registerItem(itemOrichalqueHelmet, "orichalque_helmet"); GameRegistry.registerItem(itemOrichalqueChestplate, "orichalque_chestplate"); GameRegistry.registerItem(itemOrichalqueLeg, "orichalque_leggings"); GameRegistry.registerItem(itemOrichalqueShoes, "orichalque_boots"); GameRegistry.registerItem(itemDwemerHelmet, "dwemer_helmet"); GameRegistry.registerItem(itemDwemerChestplate, "dwemer_chestplate"); GameRegistry.registerItem(itemDwemerLeg, "dwemer_leggings"); GameRegistry.registerItem(itemDwemerShoes, "dwemer_boots"); GameRegistry.registerItem(itemElvenHelmet, "elven_helmet"); GameRegistry.registerItem(itemElvenChestplate, "elven_chestplate"); GameRegistry.registerItem(itemElvenLeg, "elven_leggings"); GameRegistry.registerItem(itemElvenShoes, "elven_boots"); GameRegistry.registerItem(itemMalachiteHelmet, "malachite_helmet"); GameRegistry.registerItem(itemMalachiteChestplate, "malachite_chestplate"); GameRegistry.registerItem(itemMalachiteLeg, "malachite_leggings"); GameRegistry.registerItem(itemMalachiteShoes, "malachite_boots"); GameRegistry.registerItem(itemPlateHelmet, "plate_helmet"); GameRegistry.registerItem(itemPlateChestplate, "plate_chestplate"); GameRegistry.registerItem(itemPlateLeg, "plate_leggings"); GameRegistry.registerItem(itemPlateShoes, "plate_boots"); GameRegistry.registerItem(itemDaedricHelmet, "daedric_helmet"); GameRegistry.registerItem(itemDaedricChestplate, "daedric_chestplate"); GameRegistry.registerItem(itemDaedricLeg, "daedric_leggings"); GameRegistry.registerItem(itemDaedricShoes, "daedric_boots"); GameRegistry.registerItem(itemDragonHelmet, "dragon_helmet"); GameRegistry.registerItem(itemDragonChestplate, "dragon_chestplate"); GameRegistry.registerItem(itemDragonLeg, "dragon_leggings"); GameRegistry.registerItem(itemDragonShoes, "dragon_boots"); GameRegistry.registerItem(itemSteelHelmet, "steel_helmet"); GameRegistry.registerItem(itemSteelChestplate, "steel_chestplate"); GameRegistry.registerItem(itemSteelLeg, "steel_leggings"); GameRegistry.registerItem(itemSteelShoes, "steel_boots"); GameRegistry.registerItem(swordDaedric, "daedric_sword"); GameRegistry.registerItem(swordDragon, "dragon_sword"); GameRegistry.registerItem(swordOrichalque, "orichalque_sword"); GameRegistry.registerItem(swordMalachite, "malachite_sword"); GameRegistry.registerItem(swordSteel, "steel_sword"); GameRegistry.registerItem(swordDwemer, "dwemer_sword"); GameRegistry.registerItem(swordElven, "elven_sword"); GameRegistry.registerItem(hammerDragon, "hammer_dragon"); GameRegistry.addSmelting(blockOrichalque, new ItemStack(itemOrichalque, 1), 3.5F); GameRegistry.addSmelting(blockMalachite, new ItemStack(itemMalachite, 1), 2.4F); GameRegistry.addSmelting(blockCorindon, new ItemStack(itemCorindon, 1), 1.3F); GameRegistry.addSmelting(blockDwemer, new ItemStack(itemDwemer, 1), 0.2F); GameRegistry.addSmelting(blockLune, new ItemStack(itemLune, 1), 0.2F); GameRegistry.addRecipe(new ItemStack(itemOrichalqueHelmet, 1), new Object[] {"XXX", "X X", 'X', itemOrichalque}); GameRegistry.addRecipe(new ItemStack(itemOrichalqueChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X', itemOrichalque}); GameRegistry.addRecipe(new ItemStack(itemOrichalqueLeg, 1), new Object[] {"XXX", "X X", "X X", 'X', itemOrichalque}); GameRegistry.addRecipe(new ItemStack(itemOrichalqueShoes, 1), new Object[] {"X X", "X X", 'X', itemOrichalque}); GameRegistry.addRecipe(new ItemStack(itemDwemerHelmet, 1), new Object[] {"XXX", "X X", 'X', itemDwemer}); GameRegistry.addRecipe(new ItemStack(itemDwemerChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X', itemDwemer}); GameRegistry.addRecipe(new ItemStack(itemDwemerLeg, 1), new Object[] {"XXX", "X X", "X X", 'X', itemDwemer}); GameRegistry.addRecipe(new ItemStack(itemDwemerShoes, 1), new Object[] {"X X", "X X", 'X', itemDwemer}); GameRegistry.addRecipe(new ItemStack(itemElvenHelmet, 1), new Object[] {"XXX", "X X", 'X', itemLune}); GameRegistry.addRecipe(new ItemStack(itemElvenChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X', itemLune}); GameRegistry.addRecipe(new ItemStack(itemElvenLeg, 1), new Object[] {"XXX", "X X", "X X", 'X', itemLune}); GameRegistry.addRecipe(new ItemStack(itemElvenShoes, 1), new Object[] {"X X", "X X", 'X', itemLune}); GameRegistry.addRecipe(new ItemStack(itemMalachiteHelmet, 1), new Object[] {"XXX", "X X", 'X', itemMalachite}); GameRegistry.addRecipe(new ItemStack(itemMalachiteChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X', itemMalachite}); GameRegistry.addRecipe(new ItemStack(itemMalachiteLeg, 1), new Object[] {"XXX", "X X", "X X", 'X', itemMalachite}); GameRegistry.addRecipe(new ItemStack(itemMalachiteShoes, 1), new Object[] {"X X", "X X", 'X', itemMalachite}); GameRegistry.addRecipe(new ItemStack(itemPlateHelmet, 1), new Object[] {"XXX", "Y Y", 'X', itemSteel, 'Y', Items.iron_ingot}); GameRegistry.addRecipe(new ItemStack(itemPlateChestplate, 1), new Object[] {"X X", "XYX", "YYY", 'X', itemSteel, 'Y', Items.iron_ingot}); GameRegistry.addRecipe(new ItemStack(itemPlateLeg, 1), new Object[] {"XXX", "Y Y", "Y Y", 'X', itemSteel, 'Y', Items.iron_ingot}); GameRegistry.addRecipe(new ItemStack(itemPlateShoes, 1), new Object[] {"X X", "Y Y", 'X', itemSteel, 'Y', Items.iron_ingot}); GameRegistry.addRecipe(new ItemStack(itemDaedricHelmet, 1), new Object[] {"XXX", "X X", 'X', itemDaedricHearth}); GameRegistry.addRecipe(new ItemStack(itemDaedricChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X', itemDaedricHearth}); GameRegistry.addRecipe(new ItemStack(itemDaedricLeg, 1), new Object[] {"XXX", "X X", "X X", 'X', itemDaedricHearth}); GameRegistry.addRecipe(new ItemStack(itemDaedricShoes, 1), new Object[] {"X X", "X X", 'X', itemDaedricHearth}); GameRegistry.addRecipe(new ItemStack(itemDragonHelmet, 1), new Object[] {"XXX", "X X", 'X', itemDragonBone}); GameRegistry.addRecipe(new ItemStack(itemDragonChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X', itemDragonBone}); GameRegistry.addRecipe(new ItemStack(itemDragonLeg, 1), new Object[] {"XXX", "X X", "X X", 'X', itemDragonBone}); GameRegistry.addRecipe(new ItemStack(itemDragonShoes, 1), new Object[] {"X X", "X X", 'X', itemDragonBone}); GameRegistry.addRecipe(new ItemStack(itemSteelHelmet, 1), new Object[] {"XXX", "X X", 'X', itemSteel}); GameRegistry.addRecipe(new ItemStack(itemSteelChestplate, 1), new Object[] {"X X", "XXX", "XXX", 'X', itemSteel}); GameRegistry.addRecipe(new ItemStack(itemSteelLeg, 1), new Object[] {"XXX", "X X", "X X", 'X', itemSteel}); GameRegistry.addRecipe(new ItemStack(itemSteelShoes, 1), new Object[] {"X X", "X X", 'X', itemSteel}); GameRegistry.addRecipe(new ItemStack(swordDaedric, 1), new Object[] {"X", "X", "Y", 'X', itemDaedricHearth, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(swordDragon, 1), new Object[] {"X", "X", "Y", 'X', itemDragonBone, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(swordOrichalque, 1), new Object[] {"X", "X", "Y", 'X', itemOrichalque, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(swordMalachite, 1), new Object[] {"X", "X", "Y", 'X', itemMalachite, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(swordSteel, 1), new Object[] {"X", "X", "Y", 'X', itemSteel, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(swordDwemer, 1), new Object[] {"X", "X", "Y", 'X', itemDwemer, 'Y', Items.stick}); GameRegistry.addRecipe(new ItemStack(swordElven, 1), new Object[] {"X", "X", "Y", 'X', itemLune, 'Y', Items.stick}); GameRegistry.addShapelessRecipe(new ItemStack(itemSteel, 1), new Object[] {Items.iron_ingot, itemCorindon}); GameRegistry.registerWorldGenerator(new OreGenerator(), 0); DimensionManager.registerProviderType(Skycraft.dimensionId, WorldProviderSkycraft.class, false); DimensionManager.registerDimension(Skycraft.dimensionId, Skycraft.dimensionId); } @EventHandler public void init(FMLInitializationEvent event) { EntityRegistry.registerGlobalEntityID(EntityDaedra.class, "mobDaedra", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityDaedra.class, "mobDaedra", 420, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityDaedra.class, 2, 0, 2, EnumCreatureType.creature, BiomeGenBase.extremeHills);// change the values to vary the spawn rarity, biome, etc. proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityAltmer.class, "mobAltmer", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityAltmer.class, "mobAltmer", 421, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityAltmer.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.beach.birchForest.birchForestHills.coldBeach.coldTaiga.coldTaigaHills.desert.desertHills.extremeHills.extremeHillsEdge.extremeHillsPlus.forest.forestHills.iceMountains.icePlains.jungle.jungleEdge.jungleHills.megaTaiga.megaTaigaHills.mesa.mesaPlateau.mesaPlateau_F.plains.roofedForest.savanna.savannaPlateau.stoneBeach.swampland.taiga.taigaHills);// change // the // values // to // vary // the // spawn // rarity, // biome, // etc. proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityArgonian.class, "mobArgonian", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityArgonian.class, "mobArgonian", 422, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityArgonian.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.beach.birchForest.birchForestHills.coldBeach.coldTaiga.coldTaigaHills.desert.desertHills.extremeHills.extremeHillsEdge.extremeHillsPlus.forest.forestHills.iceMountains.icePlains.jungle.jungleEdge.jungleHills.megaTaiga.megaTaigaHills.mesa.mesaPlateau.mesaPlateau_F.plains.roofedForest.savanna.savannaPlateau.stoneBeach.swampland.taiga.taigaHills);// change // the // values // to // vary // the // spawn // rarity, // biome, // etc. proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityBosmer.class, "mobBosmer", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityBosmer.class, "mobBosmer", 423, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityBosmer.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.beach.birchForest.birchForestHills.coldBeach.coldTaiga.coldTaigaHills.desert.desertHills.extremeHills.extremeHillsEdge.extremeHillsPlus.forest.forestHills.iceMountains.icePlains.jungle.jungleEdge.jungleHills.megaTaiga.megaTaigaHills.mesa.mesaPlateau.mesaPlateau_F.plains.roofedForest.savanna.savannaPlateau.stoneBeach.swampland.taiga.taigaHills);// change // the // values // to // vary // the // spawn // rarity, // biome, // etc. proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityDunmer.class, "mobDunmer", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityDunmer.class, "mobDunmer", 424, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityDunmer.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.beach.birchForest.birchForestHills.coldBeach.coldTaiga.coldTaigaHills.desert.desertHills.extremeHills.extremeHillsEdge.extremeHillsPlus.forest.forestHills.iceMountains.icePlains.jungle.jungleEdge.jungleHills.megaTaiga.megaTaigaHills.mesa.mesaPlateau.mesaPlateau_F.plains.roofedForest.savanna.savannaPlateau.stoneBeach.swampland.taiga.taigaHills);// change // the // values // to // vary // the // spawn // rarity, // biome, // etc. proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityImperial.class, "mobImperial", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityImperial.class, "mobImperial", 425, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityImperial.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.beach.birchForest.birchForestHills.coldBeach.coldTaiga.coldTaigaHills.desert.desertHills.extremeHills.extremeHillsEdge.extremeHillsPlus.forest.forestHills.iceMountains.icePlains.jungle.jungleEdge.jungleHills.megaTaiga.megaTaigaHills.mesa.mesaPlateau.mesaPlateau_F.plains.roofedForest.savanna.savannaPlateau.stoneBeach.swampland.taiga.taigaHills);// change // the // values // to // vary // the // spawn // rarity, // biome, // etc. proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityKhajit.class, "mobKhajit", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityKhajit.class, "mobKhajit", 426, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityKhajit.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.beach.birchForest.birchForestHills.coldBeach.coldTaiga.coldTaigaHills.desert.desertHills.extremeHills.extremeHillsEdge.extremeHillsPlus.forest.forestHills.iceMountains.icePlains.jungle.jungleEdge.jungleHills.megaTaiga.megaTaigaHills.mesa.mesaPlateau.mesaPlateau_F.plains.roofedForest.savanna.savannaPlateau.stoneBeach.swampland.taiga.taigaHills);// change // the // values // to // vary // the // spawn // rarity, // biome, // etc. proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityNordic.class, "mobNordic", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityNordic.class, "mobNordic", 427, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityNordic.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.beach.birchForest.birchForestHills.coldBeach.coldTaiga.coldTaigaHills.desert.desertHills.extremeHills.extremeHillsEdge.extremeHillsPlus.forest.forestHills.iceMountains.icePlains.jungle.jungleEdge.jungleHills.megaTaiga.megaTaigaHills.mesa.mesaPlateau.mesaPlateau_F.plains.roofedForest.savanna.savannaPlateau.stoneBeach.swampland.taiga.taigaHills);// change // the // values // to // vary // the // spawn // rarity, // biome, // etc. proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityOrc.class, "mobOrc", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityOrc.class, "mobOrc", 428, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityOrc.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.beach.birchForest.birchForestHills.coldBeach.coldTaiga.coldTaigaHills.desert.desertHills.extremeHills.extremeHillsEdge.extremeHillsPlus.forest.forestHills.iceMountains.icePlains.jungle.jungleEdge.jungleHills.megaTaiga.megaTaigaHills.mesa.mesaPlateau.mesaPlateau_F.plains.roofedForest.savanna.savannaPlateau.stoneBeach.swampland.taiga.taigaHills);// change // the // values // to // vary // the // spawn // rarity, // biome, // etc. proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityRedguard.class, "mobRedguard", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 0).getRGB(), new Color(255, 0, 0).getRGB()); EntityRegistry.registerModEntity(EntityRedguard.class, "mobRedguard", 429, this.instance, 40, 1, true); EntityRegistry.addSpawn(EntityRedguard.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.beach.birchForest.birchForestHills.coldBeach.coldTaiga.coldTaigaHills.desert.desertHills.extremeHills.extremeHillsEdge.extremeHillsPlus.forest.forestHills.iceMountains.icePlains.jungle.jungleEdge.jungleHills.megaTaiga.megaTaigaHills.mesa.mesaPlateau.mesaPlateau_F.plains.roofedForest.savanna.savannaPlateau.stoneBeach.swampland.taiga.taigaHills);// change // the // values // to // vary // the // spawn // rarity, // biome, // etc. proxy.registerRender(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } public static final String MODID = "skycraft"; }
Ma class de l’item
package mod.skycraft.common; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; public class HammerDragon extends ItemSword { public HammerDragon(ToolMaterial material) { super(material); } public boolean getIsRepairable(ItemStack input, ItemStack repair) { if(repair.getItem() == Skycraft.itemDragonBone) { return true; } return false; } }
Ma class Render de l’Item
package mod.skycraft.common; import org.lwjgl.opengl.GL11; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; public class RenderHammerDragon implements IItemRenderer { public RenderHammerDragon() { model = new ModelHammer(); } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch(type) { case EQUIPPED: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch(type) { case EQUIPPED: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } default: break; } } protected ModelHammer model; protected static final ResourceLocation texture = new ResourceLocation("/assets/modtest/textures/items/hammer_dragon.png"); }
La class Model
package mod.skycraft.common; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelHammer extends ModelBase { // fields ModelRenderer Shape1; ModelRenderer Shape2; public ModelHammer() { textureWidth = 64; textureHeight = 64; Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(0F, 0F, 0F, 1, 30, 1); Shape1.setRotationPoint(0F, -6F, 0F); Shape1.setTextureSize(64, 64); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 0, 0); Shape2.addBox(0F, 0F, 0F, 11, 5, 7); Shape2.setRotationPoint(-5F, -5F, -3F); Shape2.setTextureSize(64, 64); Shape2.mirror = true; setRotation(Shape2, 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, entity); } 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, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } }
Puis la class ClientProxy
package mod.skycraft.proxy; import net.minecraft.client.model.ModelBiped; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.MinecraftForgeClient; import mod.skycraft.common.EntityAltmer; import mod.skycraft.common.EntityArgonian; import mod.skycraft.common.EntityBosmer; import mod.skycraft.common.EntityDaedra; import mod.skycraft.common.EntityDunmer; import mod.skycraft.common.EntityImperial; import mod.skycraft.common.EntityKhajit; import mod.skycraft.common.EntityNordic; import mod.skycraft.common.EntityOrc; import mod.skycraft.common.EntityRedguard; import mod.skycraft.common.RenderHammerDragon; import mod.skycraft.common.RenderAltmer; import mod.skycraft.common.RenderArgonian; import mod.skycraft.common.RenderBosmer; import mod.skycraft.common.RenderDaedra; import mod.skycraft.common.RenderDunmer; import mod.skycraft.common.RenderImperial; import mod.skycraft.common.RenderKhajit; import mod.skycraft.common.RenderNordic; import mod.skycraft.common.RenderOrc; import mod.skycraft.common.RenderRedguard; import mod.skycraft.common.Skycraft; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends CommonProxy { @Override public void registerRender() { RenderingRegistry.registerEntityRenderingHandler(EntityDaedra.class, new RenderDaedra(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityAltmer.class, new RenderAltmer(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityArgonian.class, new RenderArgonian(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityBosmer.class, new RenderBosmer(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityDunmer.class, new RenderDunmer(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityImperial.class, new RenderImperial(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityKhajit.class, new RenderKhajit(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityNordic.class, new RenderNordic(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityOrc.class, new RenderOrc(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityRedguard.class, new RenderRedguard(new ModelBiped(), 0.5F)); MinecraftForgeClient.registerItemRenderer(Skycraft.hammerDragon, (IItemRenderer)new RenderHammerDragon()); } }
Merci d’avance pour votre aide et si vous avez besoin d’une autre class, demandez moi
Bonne journée -
normalement le rendu 3D est fait a la 3eme personne (sinon tu peux aussi utiliser les balises java).
-
Oui excusez moi je n’avais pas vu
C’est pourtant à la troisième personne non ? :huh:
Car pour un rendu à la 1er personne il y a EQUIPPED_FIRST_PERSON -
EQUIPPED_FIRST_PERSON pour un rendu dans le “f5”
-
a ok ce que je comprend pas c’est que j’ai bien suivi le tuto :huh:
-
@Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch(type) { case EQUIPPED: return true; case EQUIPPED_FIRST_PERSON: return true; default: return false; } }
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch(type) { case EQUIPPED: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } case EQUIPPED_FIRST_PERSON: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } default: break; } }
-
bon il y a un mieux, je ne vois pas le texture en mode Item mais je ne vois rien du tout, sans doute un problème dans mes texture en tout cas merci je vous redis si ça fonctionne
bon rien au niveau de la texture je cherche …
j’ai rajouté INVENTORY et ENTITY pour faire plus stylé Par contre toujour pas de texture :huh:
-
trouvé le problème, dans Techne, je n’ai pas bougé les textures elles étaient donc toutes les unes sur les autres merci à tous pour votre aide