Jump to content

DeathSeeker512

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by DeathSeeker512

  1. Hello, as the name probably suggests, KingCreeperEli and I are having quite an issue getting our model for our entity rendering. Now I am not going to post the source code here as it is on github.. so here is a link https://github.com/KingCreeperEli/Faith-Craft All of the source code are in the common folder, but the ones of interest are base mod class: https://github.com/KingCreeperEli/Faith-Craft/blob/master/Common/common/FaithCraft.java and the rest should be self explanatory https://github.com/KingCreeperEli/Faith-Craft/blob/master/Common/client/ModelAngel.java https://github.com/KingCreeperEli/Faith-Craft/blob/master/Common/client/ClientProxy.java https://github.com/KingCreeperEli/Faith-Craft/blob/master/Common/common/entity/EntityAngel.java https://github.com/KingCreeperEli/Faith-Craft/blob/master/Common/common/render/RenderAngel.java All criticizm is welcomed, as we need it. So if you have the time, and don't mind, could you please give it a look and tell us what we are doing wrong, or what we have forgotten. Please and thank you, ahead of time.
  2. or you know, my tutorial on youtube
  3. the flowing block id has to be one lower than the still id, also when you do public void registerIcons(IconRegister iconReg) { System.out.println(Main.modid + ":" + this.getUnlocalizedName()); this.theIcon = new Icon[] { iconReg.registerIcon(Main.modid + ":" + this.name.substring(0, 12)), iconReg.registerIcon(Main.modid + ":" + this.name.substring(0, 12)) }; } change it to public void registerIcons(IconRegister iconReg) { System.out.println(Main.modid + ":" + this.getUnlocalizedName()); this.theIcon = new Icon[] { iconReg.registerIcon(Main.modid + ":" + this.name.substring(5)), iconReg.registerIcon(Main.modid + ":" + this.name.substring(5)) }; }
  4. So did it work? I was mostly just testing to see how much I have learned...
  5. If you don't know how to fix the problem for the second error you need to learn java... the only issue with that line is that you forgot the return type. there are an infinite number of return types so i am not going to list them all, however for this one I think you would have to use void public void RenderPenguin(ModelPenguin par1ModelBase, float par2) { the problem with the second one is that it is not a valid HEX number, however it is a valid HTML color...... when you have a hex value you do not have the # in it, unless if the language is html and you are using it for a color so registerEntityEgg(EntityPenguin.class, 0x000000, 0xFFA500); and for the first error, you do not have a type on your model so I think it will just be easier for me to correct this class so all of your classed with the fixes package assassinhero.parallelworlds; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; public class RenderPenguin extends RenderLiving{ protected ModelPenguinModel model; public RenderPenguin(ModelPenguin par1ModelBase, float par2) { super(par1ModelBase, par2); this.model = ((ModelPenguin)mainModel); } public RenderPenguin(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); } public void renderPenguin(EntityPenguin par1EntityPenguin, double par2, double par4, double par6, float par8, float par9) { super.doRenderLiving(par1EntityPenguin, par2, par4, par6, par8, par9); } public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9) { this.renderPenguin((EntityPenguin)par1EntityLiving, par2, par4, par6, par8, par9); } public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { this.renderPenguin((EntityPenguin)par1Entity, par2, par4, par6, par8, par9); } } and package assassinhero.parallelworlds; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityEggInfo; import net.minecraft.entity.EntityList; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomChestContent; import net.minecraftforge.common.ChestGenHooks; import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingDropsEvent; import assassinhero.parallelworlds.client.ClientPacketHandler; import assassinhero.parallelworlds.common.CommonProxy; import assassinhero.parallelworlds.common.ServerPacketHandler; import assassinhero.parallelworlds.common.blocks.BlockArcticiteBlock; import assassinhero.parallelworlds.common.blocks.BlockAscariteBlock; import assassinhero.parallelworlds.common.blocks.BlockHellStoneBlock; import assassinhero.parallelworlds.common.blocks.BlockHelliteBlock; import assassinhero.parallelworlds.common.blocks.BlockNightOre; import assassinhero.parallelworlds.common.blocks.BlockNightiumBlock; import assassinhero.parallelworlds.common.blocks.BlockSapphireBlock; import assassinhero.parallelworlds.common.blocks.BlockTimeOre; import assassinhero.parallelworlds.common.blocks.BlockTiminiumBlock; import assassinhero.parallelworlds.common.items.CookedLambChopFood; import assassinhero.parallelworlds.common.items.ItemHellShardItem; import assassinhero.parallelworlds.common.items.ItemHellSoulsItem; import assassinhero.parallelworlds.common.items.ItemIceGemItem; import assassinhero.parallelworlds.common.items.ItemIceShardItem; import assassinhero.parallelworlds.common.items.ItemNightGemItem; import assassinhero.parallelworlds.common.items.ItemPureSoulsItem; import assassinhero.parallelworlds.common.items.ItemPurityGemItem; import assassinhero.parallelworlds.common.items.ItemSapphireItem; import assassinhero.parallelworlds.common.items.ItemTimeGemItem; import assassinhero.parallelworlds.common.items.ItemTimeShardItem; import assassinhero.parallelworlds.common.items.RawLambChopFood; import assassinhero.parallelworlds.common.items.TimeAxe; import assassinhero.parallelworlds.common.items.TimeBlade; import assassinhero.parallelworlds.common.items.TimeHoe; 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.event.FMLPreInitializationEvent; 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; @NetworkMod(clientSideRequired=true,serverSideRequired=false, clientPacketHandlerSpec = @SidedPacketHandler(channels = {"ParallelWorlds" }, packetHandler = ClientPacketHandler.class), serverPacketHandlerSpec = @SidedPacketHandler(channels = {"ParallelWorlds"}, packetHandler = ServerPacketHandler.class)) @Mod(modid="AssassinHero_ParallelWorlds",name="ParallelWorlds",version="1.0") public class ParallelWorldsMain { @Instance("ParallelWorlds") public static ParallelWorldsMain instance = new ParallelWorldsMain(); @SidedProxy(clientSide = "assassinhero.parallelworlds.client.ClientProxy", serverSide = "assassinhero.parallelworlds.common.CommonProxy") public static CommonProxy proxy; static int startEntityId = 300; public static Item IceShard; public static Block NightOre; public static Block Nightium; public static Item NightGem; public static Block TimeOre; public static Block Timinium; public static Item TimeGem; public static Block Arcticite; public static Block Hellite; public static Item HellShard; public static Block Ascarite; public static Item HellSoul; public static Item PureSoul; public static Item PurityGem; public static Block SapphireBlock; public static Item RawLambChop; public static Item TimePickaxe; public static Item Sapphire; public static Item IceGem; public static Item TimeBlade; public static Item TimeShard; public static Item CookedLambChop; public static Item TimeShovel; public static Item TimeAxe; public static Item TimeHoe; public static Block HellStone; @cpw.mods.fml.common.Mod.PreInit public void PreInit(FMLPreInitializationEvent event){ Nightium = new BlockNightiumBlock(3000, Material.iron).setUnlocalizedName("Nightium"); NightOre = new BlockNightOre(3001, Material.rock).setUnlocalizedName("Night Ore"); TimeOre = new BlockTimeOre(3003, Material.rock).setUnlocalizedName("Time Ore"); Timinium = new BlockTiminiumBlock(3004, Material.iron).setUnlocalizedName("Timinium"); Arcticite = new BlockArcticiteBlock(3005, Material.iron).setUnlocalizedName("Arcticite"); Hellite = new BlockHelliteBlock(3006, Material.iron).setUnlocalizedName("Hellite"); Ascarite = new BlockAscariteBlock(3007, Material.iron).setUnlocalizedName("Ascarite"); SapphireBlock = new BlockSapphireBlock(3008, Material.iron).setUnlocalizedName("Sapphire Block"); HellStone = new BlockHellStoneBlock(3009, Material.iron).setUnlocalizedName("HellStone"); NightGem = new ItemNightGemItem(5000).setUnlocalizedName("Night Gem"); TimeGem = new ItemTimeGemItem(5001).setUnlocalizedName("Time Gem"); HellShard = new ItemHellShardItem(5002).setUnlocalizedName("Hell Shard"); HellSoul = new ItemHellSoulsItem(5003).setUnlocalizedName("Hell Soul"); PureSoul = new ItemPureSoulsItem(5004).setUnlocalizedName("Pure Soul"); PurityGem = new ItemPurityGemItem(5005).setUnlocalizedName("Purity Gem"); RawLambChop = new RawLambChopFood(5006, 3, 4.0F, true).setUnlocalizedName("Raw Lamb Chop"); Sapphire = new ItemSapphireItem(5007).setUnlocalizedName("Sapphire"); IceGem = new ItemIceGemItem(5008).setUnlocalizedName("IceGem"); TimeShard = new ItemTimeShardItem(5009).setUnlocalizedName("Time Shard"); CookedLambChop = new CookedLambChopFood(5010, 8, 8.0F, true).setUnlocalizedName("Cooked Lamb Chop"); IceShard = new ItemIceShardItem(5011).setUnlocalizedName("Ice Shard"); TimeBlade = new TimeBlade(15000, EnumToolMaterial.TIME).setUnlocalizedName("Time Blade"); TimePickaxe = new assassinhero.parallelworlds.common.items.TimePickaxe(15001, EnumToolMaterial.TIME).setUnlocalizedName("Time Pickaxe"); TimeShovel = new assassinhero.parallelworlds.common.items.TimeShovel(15002, EnumToolMaterial.TIME).setUnlocalizedName("Time Shovel"); TimeAxe = new TimeAxe(15003, EnumToolMaterial.TIME).setUnlocalizedName("TimeAxe"); TimeHoe = new TimeHoe(15004, EnumToolMaterial.TIME).setUnlocalizedName("Time Hoe"); } @Init public void Init(FMLInitializationEvent event){ proxy.registerBlocks(); proxy.registerItems(); NetworkRegistry.instance().registerGuiHandler(this, proxy); craftingRecipes(); smeltingRecipes(); BlockHarvestLevel(); MinecraftForge(); EnumToolMaterial(); ChestGenHook(); EntityRegistry(); } public void craftingRecipes(){ GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.Nightium, 1), "XX", "XX", Character.valueOf('X'), ParallelWorldsMain.NightGem); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.Timinium, 1), "XX", "XX", Character.valueOf('X'), ParallelWorldsMain.TimeGem); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.Arcticite, 1), "XX", "XX", Character.valueOf('X'), Block.blockSnow); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.HellStone, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorldsMain.HellShard); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.SapphireBlock, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorldsMain.Sapphire); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.Ascarite, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorldsMain.PureSoul); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.TimePickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorldsMain.TimeGem, Character.valueOf('A'), Item.stick); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.TimeGem, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorldsMain.TimeShard); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.TimeShovel, 1), " X ", " A ", " A ", Character.valueOf('X'), ParallelWorldsMain.TimeGem, Character.valueOf('A'), Item.stick); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.TimeAxe, 1), "XX ", "XA ", " A ", Character.valueOf('X'), ParallelWorldsMain.TimeGem, Character.valueOf('A'), Item.stick); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.TimeHoe, 1), "XX ", " A ", " A ", Character.valueOf('X'), ParallelWorldsMain.TimeGem, Character.valueOf('A'), Item.stick); GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.IceGem, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorldsMain.IceShard); GameRegistry.addShapelessRecipe(new ItemStack(ParallelWorldsMain.PureSoul, 1), new Object[]{ParallelWorldsMain.HellSoul, ParallelWorldsMain.PurityGem}); } public void smeltingRecipes(){ GameRegistry.addSmelting(NightOre.blockID, new ItemStack(NightGem, 1), 0.5F); GameRegistry.addSmelting(TimeOre.blockID, new ItemStack(TimeShard, 1), 0.5F); } public void BlockHarvestLevel(){ MinecraftForge.setBlockHarvestLevel(Nightium, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(NightOre, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(TimeOre, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(Timinium, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(Arcticite, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(Hellite, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(Ascarite, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(SapphireBlock, "pickaxe", 2); } public void MinecraftForge(){ MinecraftForge.EVENT_BUS.register(new LivingDropsEvent(null, null, null, 0, false, 0)); } public void EnumToolMaterial(){ EnumToolMaterial toolTime = EnumHelper.addToolMaterial("Time", 2, 2000, 10.0F, 8, 15); EnumToolMaterial toolNight = EnumHelper.addToolMaterial("NIGHT", 2, 500, 9.0F, 20, 10); } public void ChestGenHook(){ ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ParallelWorldsMain.NightGem), 1, 5, 50)); } public void EntityRegistry(){ cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityPenguin.class, "Penguin", 1, this, 80, 3, true); cpw.mods.fml.common.registry.EntityRegistry.addSpawn(EntityPenguin.class, 10, 1, 3, EnumCreatureType.monster, BiomeGenBase.icePlains); LanguageRegistry.instance().addStringLocalization("entity.AssassinHero_ParallelWorlds.ParallelWorlds.name", "Penguin"); registerEntityEgg(EntityPenguin.class, 0x000000, 0xFFA500); } public static int getUniqueEntityId(){ do{ startEntityId++; } while(EntityList.getStringFromID(startEntityId)!= null); return startEntityId; } public static void registerEntityEgg(Class <? extends Entity> entity, int primaryColor, int secondaryColor){ int id = getUniqueEntityId(); EntityList.IDtoClassMapping.put(id, entity); EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor)); } }
  6. Hello, while I was making a tutorial on updating to forge 678 I encountered this issue. there were 2 changes 1) iconIndex changed to itemIcon (you already noticed this) 2) the method changed from updateIcons(IconRegister iconRegister){/*whatever*/} to registerIcons(IconRegister iconRegister){/*whatever*/}
×
×
  • Create New...

Important Information

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