Jump to content

Recommended Posts

Posted

EDIT: I have just found out that it is loading the texture like that in Techne?!?!?!?!?!?!

 

Hello everyone,

First of all I want to say that I have already made a thread for this but because the info is scattered I am making this one.

 

The problem I am having is with my custom mob which is a penguin. I modeled the penguin in Techne and edited the texture map in Gimp.

Here is a picture of the texture glitch:

yTUTDoc.png

 

 

As you can see it looks like the texture hasn't fully rendered.

 

Let's get the code out of the way so here is all my code which is related to the penguin.

 

Main Class:

package assassinhero.parallelworlds;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityEggInfo;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraft.world.biome.BiomeGenBase;
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 assassinhero.parallelworlds.entitypenguin.EntityPenguin;
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;
import cpw.mods.fml.common.registry.LanguageRegistry;

@NetworkMod(clientSideRequired=true,serverSideRequired=true, 
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("Time Axe");
	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();
	EntityRegistryPenguin();


}

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(){
}

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));
	ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(ParallelWorldsMain.NightGem), 1, 5, 50));
	ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(ParallelWorldsMain.NightGem), 1, 1, 50));
	ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ParallelWorldsMain.NightGem), 1, 3, 50));
}

public void EntityRegistryPenguin(){
	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));
}


}

 

 

Client Proxy:

package assassinhero.parallelworlds.client;
import assassinhero.parallelworlds.common.CommonProxy;
import assassinhero.parallelworlds.entitypenguin.EntityPenguin;
import assassinhero.parallelworlds.entitypenguin.ModelPenguin;
import assassinhero.parallelworlds.entitypenguin.RenderPenguin;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class ClientProxy extends CommonProxy {
        
public void registerRenderInformation(){
RenderingRegistry.registerEntityRenderingHandler(EntityPenguin.class, new RenderPenguin(new ModelPenguin(), 5.0F));
}

}

 

Common Proxy:

package assassinhero.parallelworlds.common;

import assassinhero.parallelworlds.ParallelWorldsMain;
import assassinhero.parallelworlds.entitypenguin.EntityPenguin;
import assassinhero.parallelworlds.entitypenguin.ModelPenguin;
import assassinhero.parallelworlds.entitypenguin.RenderPenguin;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.network.IGuiHandler;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

public class CommonProxy implements IGuiHandler{ 
public void registerRenderInformation(){
}


@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { 
return null;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { 
return null;
}
public void registerTiles(){ 
}
public void registerBlocks(){
GameRegistry.registerBlock(ParallelWorldsMain.Nightium, "Nightium");
LanguageRegistry.addName(ParallelWorldsMain.Nightium, "Nightium");
GameRegistry.registerBlock(ParallelWorldsMain.NightOre, "Night Ore");
LanguageRegistry.addName(ParallelWorldsMain.NightOre, "Night Ore");
GameRegistry.registerBlock(ParallelWorldsMain.TimeOre, "Time Ore");
LanguageRegistry.addName(ParallelWorldsMain.TimeOre, "Time Ore");
GameRegistry.registerBlock(ParallelWorldsMain.Timinium, "Timinium");
LanguageRegistry.addName(ParallelWorldsMain.Timinium, "Timinium");
GameRegistry.registerBlock(ParallelWorldsMain.Arcticite, "Arcticite");
LanguageRegistry.addName(ParallelWorldsMain.Arcticite, "Arcticite");
GameRegistry.registerBlock(ParallelWorldsMain.Hellite, "Hellite");
LanguageRegistry.addName(ParallelWorldsMain.Hellite, "Hellite");
GameRegistry.registerBlock(ParallelWorldsMain.Ascarite, "Ascarite");
LanguageRegistry.addName(ParallelWorldsMain.Ascarite, "Ascarite");
GameRegistry.registerBlock(ParallelWorldsMain.SapphireBlock, "Sapphire Block");
LanguageRegistry.addName(ParallelWorldsMain.SapphireBlock, "Sapphire Block");
GameRegistry.registerBlock(ParallelWorldsMain.HellStone, "Hell Stone");
LanguageRegistry.addName(ParallelWorldsMain.HellStone, "Hell Stone");
}
public void registerItems(){
GameRegistry.registerItem(ParallelWorldsMain.NightGem, "Night Gem");
LanguageRegistry.addName(ParallelWorldsMain.NightGem, "Night Gem");
GameRegistry.registerItem(ParallelWorldsMain.TimeGem, "Time Gem");
LanguageRegistry.addName(ParallelWorldsMain.TimeGem, "Time Gem");
GameRegistry.registerItem(ParallelWorldsMain.HellShard, "Hell Shard");
LanguageRegistry.addName(ParallelWorldsMain.HellShard, "Hell Shard");
GameRegistry.registerItem(ParallelWorldsMain.HellSoul, "Hell Soul");
LanguageRegistry.addName(ParallelWorldsMain.HellSoul, "Hell Soul");
GameRegistry.registerItem(ParallelWorldsMain.PureSoul, "Pure Soul");
LanguageRegistry.addName(ParallelWorldsMain.PureSoul, "Pure Soul");
GameRegistry.registerItem(ParallelWorldsMain.PurityGem, "Purity Gem");
LanguageRegistry.addName(ParallelWorldsMain.PurityGem, "Purity Gem");
GameRegistry.registerItem(ParallelWorldsMain.RawLambChop, "Raw Lamb Chop");
LanguageRegistry.addName(ParallelWorldsMain.RawLambChop, "Raw Lamb Chop");
GameRegistry.registerItem(ParallelWorldsMain.Sapphire, "Sapphire");
LanguageRegistry.addName(ParallelWorldsMain.Sapphire, "Sapphire");
GameRegistry.registerItem(ParallelWorldsMain.IceGem, "Ice Gem");
LanguageRegistry.addName(ParallelWorldsMain.IceGem, "Ice Gem");
GameRegistry.registerItem(ParallelWorldsMain.TimePickaxe, "Time Pickaxe");
LanguageRegistry.addName(ParallelWorldsMain.TimePickaxe, "Time Pickaxe");
GameRegistry.registerItem(ParallelWorldsMain.TimeBlade, "Time Blade");
LanguageRegistry.addName(ParallelWorldsMain.TimeBlade, "Time Blade");
GameRegistry.registerItem(ParallelWorldsMain.TimeShard, "Time Shard");
LanguageRegistry.addName(ParallelWorldsMain.TimeShard, "Time Shard");
GameRegistry.registerItem(ParallelWorldsMain.CookedLambChop, "Cooked Lamb Chop");
LanguageRegistry.addName(ParallelWorldsMain.CookedLambChop, "Cooked Lamb Chop");
GameRegistry.registerItem(ParallelWorldsMain.TimeShovel, "Time Shovel");
LanguageRegistry.addName(ParallelWorldsMain.TimeShovel, "Time Shovel");
GameRegistry.registerItem(ParallelWorldsMain.TimeAxe, "Time Axe");
LanguageRegistry.addName(ParallelWorldsMain.TimeAxe, "TimeAxe");
GameRegistry.registerItem(ParallelWorldsMain.TimeHoe, "Time Hoe");
LanguageRegistry.addName(ParallelWorldsMain.TimeHoe, "Time Hoe");
GameRegistry.registerItem(ParallelWorldsMain.IceShard, "Ice Shard");
LanguageRegistry.addName(ParallelWorldsMain.IceShard, "Ice Shard");
}

}

 

EntityPenguin:

package assassinhero.parallelworlds.entitypenguin;

import assassinhero.parallelworlds.ParallelWorldsMain;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIEatGrass;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;

public class EntityPenguin extends EntityMob{

public EntityPenguin(World par1World) {
	super(par1World);
        this.texture = "/mods/ParallelWorlds/textures/mobs/Penguin.png";
	this.moveSpeed = 0.25F;
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
	this.tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
	this.tasks.addTask(4, new EntityAIWander(this, this.moveSpeed));
	this.tasks.addTask(5, new EntityAIEatGrass(this));
	this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
	this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
}

public int getTotalArmorValue(){
	return 3;
}

protected boolean isAIEnabled(){
	return true;
}

@Override
public int getMaxHealth() {
	return 100;
}

public int getAttackStrength(Entity par1Entity){
	return 6;
}

public EnumCreatureAttribute getCreatureAttribute(){
	return EnumCreatureAttribute.UNDEFINED;
}

protected String getLivingSound(){
	return null;
}

protected String getHurtSound(){
	return null;
}

protected String getDeathSound(){
	return null;
}

protected void playStepSound(int par1, int par2, int par3, int par4){
	this.worldObj.playSoundAtEntity(this, "mob.zombie.step", 0.15F, 1.0F);

}

protected int getDropItemId(){
	return ParallelWorldsMain.IceShard.itemID;
}


}

 

RenderPenguin:

package assassinhero.parallelworlds.entitypenguin;

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 ModelPenguin 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);
     }
     
    
}

 

ModelPenguin:

package assassinhero.parallelworlds.entitypenguin;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

public class ModelPenguin extends ModelBase
{
    ModelRenderer FootRight;
    ModelRenderer FootLeft;
    ModelRenderer LegRight;
    ModelRenderer LegLeft;
    ModelRenderer Torso;
    ModelRenderer ArmRight;
    ModelRenderer ArmLeft;
    ModelRenderer Head;
    ModelRenderer UpperBeak;
    ModelRenderer LowerBeak;
  
  public ModelPenguin()
  {
    textureWidth = 64;
    textureHeight = 32;
    
      FootRight = new ModelRenderer(this, 50, 23);
      FootRight.addBox(0F, 0F, 0F, 3, 1, 2);
      FootRight.setRotationPoint(0F, 23F, 2F);
      FootRight.setTextureSize(64, 32);
      FootRight.mirror = true;
      setRotation(FootRight, 0F, 0F, 0F);
      FootLeft = new ModelRenderer(this, 50, 18);
      FootLeft.addBox(0F, 0F, 0F, 3, 1, 2);
      FootLeft.setRotationPoint(0F, 23F, -4F);
      FootLeft.setTextureSize(64, 32);
      FootLeft.mirror = true;
      setRotation(FootLeft, 0F, 0F, 0F);
      LegRight = new ModelRenderer(this, 33, 24);
      LegRight.addBox(0F, 0F, 0F, 1, 4, 2);
      LegRight.setRotationPoint(0F, 19F, 2F);
      LegRight.setTextureSize(64, 32);
      LegRight.mirror = true;
      setRotation(LegRight, 0F, 0F, 0F);
      LegLeft = new ModelRenderer(this, 22, 24);
      LegLeft.addBox(0F, 0F, 0F, 1, 4, 2);
      LegLeft.setRotationPoint(0F, 19F, -4F);
      LegLeft.setTextureSize(64, 32);
      LegLeft.mirror = true;
      setRotation(LegLeft, 0F, 0F, 0F);
      Torso.mirror = false;
      Torso = new ModelRenderer(this, 28, 3);
      Torso.addBox(0F, 1F, 0F, 2, 9, ;
      Torso.setRotationPoint(0F, 9F, -4F);
      Torso.setTextureSize(64, 32);
      Torso.mirror = true;
      setRotation(Torso, 0F, 0F, 0F);
      Torso.mirror = false;
      ArmRight = new ModelRenderer(this, 52, 6);
      ArmRight.addBox(0F, 0F, 0F, 2, 5, 2);
      ArmRight.setRotationPoint(0F, 10F, 4F);
      ArmRight.setTextureSize(64, 32);
      ArmRight.mirror = true;
      setRotation(ArmRight, 0F, 0F, 0F);
      ArmLeft = new ModelRenderer(this, 19, 7);
      ArmLeft.addBox(0F, 0F, 0F, 2, 5, 2);
      ArmLeft.setRotationPoint(0F, 10F, -6F);
      ArmLeft.setTextureSize(64, 32);
      ArmLeft.mirror = true;
      setRotation(ArmLeft, 0F, 0F, 0F);
      Head = new ModelRenderer(this, 1, 1);
      Head.addBox(0F, 0F, 0F, 2, 5, 6);
      Head.setRotationPoint(0F, 5F, -3F);
      Head.setTextureSize(64, 32);
      Head.mirror = true;
      setRotation(Head, 0F, 0F, 0F);
      UpperBeak = new ModelRenderer(this, 5, 17);
      UpperBeak.addBox(0F, 0F, 0F, 2, 1, 4);
      UpperBeak.setRotationPoint(2F, 7F, -2F);
      UpperBeak.setTextureSize(64, 32);
      UpperBeak.mirror = true;
      setRotation(UpperBeak, 0F, 0F, 0F);
      LowerBeak = new ModelRenderer(this, 5, 25);
      LowerBeak.addBox(0F, 0F, 0F, 1, 1, 4);
      LowerBeak.setRotationPoint(2F, 8F, -2F);
      LowerBeak.setTextureSize(64, 32);
      LowerBeak.mirror = true;
      setRotation(LowerBeak, 0F, 0F, 0F);
  }
  
  public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
  {
    super.render(par1Entity, par2, par3, par4, par5, par6, par7);
    setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
    FootRight.render(par7);
    FootLeft.render(par7);
    LegRight.render(par7);
    LegLeft.render(par7);
    Torso.render(par7);
    ArmRight.render(par7);
    ArmLeft.render(par7);
    Head.render(par7);
    UpperBeak.render(par7);
    LowerBeak.render(par7);
  }
  
  private void setRotation(ModelRenderer model, float x, float y, float z)
  {
    model.rotateAngleX = x;
    model.rotateAngleY = y;
    model.rotateAngleZ = z;
  }
  
  public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)
  {
    super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity);
  }

}

 

I have been told to add to my Init method:

proxy.registerRenderInformation();/code]

When I do that it crashes and here is the error report:
[code]-15 16:44:28 [sEVERE] [ForgeModLoader] The following problems were captured during this phase
2013-05-15 16:44:28 [sEVERE] [ForgeModLoader] Caught exception from AssassinHero_ParallelWorlds
java.lang.NullPointerException
at assassinhero.parallelworlds.entitypenguin.ModelPenguin.<init>(ModelPenguin.java:49)
at assassinhero.parallelworlds.client.ClientProxy.registerRenderInformation(ClientProxy.java:10)
at assassinhero.parallelworlds.ParallelWorldsMain.Init(ParallelWorldsMain.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:447)
at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] java.lang.NullPointerException
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at assassinhero.parallelworlds.entitypenguin.ModelPenguin.<init>(ModelPenguin.java:49)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at assassinhero.parallelworlds.client.ClientProxy.registerRenderInformation(ClientProxy.java:10)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at assassinhero.parallelworlds.ParallelWorldsMain.Init(ParallelWorldsMain.java:145)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.startGame(Minecraft.java:447)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.run(Minecraft.java:732)
2013-05-15 16:44:28 [iNFO] [sTDERR] 	at java.lang.Thread.run(Unknown Source)

 

 

This stops when I remove that code....

 

 

I hope you guys have all the info needed

 

Thanks for any help in advance :)

 

 

STOP CRUCIFYING NEW MODDERS!!!!

Posted

So.

 

You started a new thread.

 

You still have the same problem.

 

And it's already been pointed out to you.

 

Torso.mirror = false;
Torso = new ModelRenderer(this, 28, 3);

 

There is something wrong with this picture.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

So.

 

You started a new thread.

 

You still have the same problem.

 

And it's already been pointed out to you.

 

Torso.mirror = false;
Torso = new ModelRenderer(this, 28, 3);

 

There is something wrong with this picture.

 

 

It would be nice if you told me what was wrong with it, that way I could see

STOP CRUCIFYING NEW MODDERS!!!!

Posted

a = 5;
int a;

 

What is the value of a?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I have the model sorted out now, The texture is still missing in areas even when I changed  the value to 5

 

Have you updated the code in OP?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I have the model sorted out now, The texture is still missing in areas even when I changed  the value to 5

 

Have you updated the code in OP?

 

 

What's 'Op'?

STOP CRUCIFYING NEW MODDERS!!!!

Posted

What's 'Op'?

 

Original

Post

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.