Jump to content

[1.7.2][Unsolved]Not Rendering Properly


Jetfan16ladd

Recommended Posts

I am trying to render 2 different entitys however I keep getting the same texture on both entitys.

Here is the Client Proxy Class:

package com.mineturnedmod.mineturned;
import net.minecraft.client.renderer.entity.RenderSnowball;
import cpw.mods.fml.client.registry.RenderingRegistry;public class ArrowClient extends ArrowCommon
{
@Override
public void registerRenderThings()
{
RenderingRegistry.registerEntityRenderingHandler(EntityRpg.class, new RenderSnowball(Mineturnedmain.RpgAmmo));
RenderingRegistry.registerEntityRenderingHandler(EntityExplosiveArrow.class, new RenderSnowball(Mineturnedmain.EAT));
}

@Override
public void registerSounds() {}
}

 

Here is the the main class:

	package com.mineturnedmod.mineturned;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import cpw.mods.fml.common.FMLCommonHandler;
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.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = Mineturnedmain.MODID, name = Mineturnedmain.NAME, version = Mineturnedmain.VERSION)
public class Mineturnedmain {

@SidedProxy(clientSide = "com.mineturnedmod.mineturned.ArrowClient", serverSide = "com.mineturnedmod.mineturned.proxies.ArrowCommon")
public static ArrowCommon proxy;

public static final String MODID = "realisticcrafting";
public static final String NAME = "More Crafting";
public static final String VERSION = "1.0";

public static CreativeTabs MoreCraftingTab = new CreativeTabs("MoreCraftingTab"){
	public Item getTabIconItem(){
		return Rpg;
	}
};
//Blocks
public static Block BlockOfTin = new BlockOfTinClass(3000, Material.iron).setBlockName("BlockOfTin")
		.setBlockTextureName(Mineturnedmain.MODID + ":BlockOfTin");
public static Block BlockOfCopper = new BlockOfCopperClass(3000, Material.iron).setBlockName("BlockOfCopper")
		.setBlockTextureName(Mineturnedmain.MODID + ":BlockOfCopper");
public static Block TinOre = new TinOreClass(3001, Material.rock).setBlockName("TinOre");
public static Block CopperOre = new CopperOreClass(3001, Material.rock).setBlockName("CopperOre");

//Items
public static Item TinIngot = new TinIngotClass(3002).setUnlocalizedName("TinIngot");
public static Item Spear = new SpearClass().setUnlocalizedName("Spear").setCreativeTab(MoreCraftingTab);
public static Item PocketKnife = new PocketKnifeClass(3004, Item.ToolMaterial.IRON).setUnlocalizedName("PocketKnife").setCreativeTab(MoreCraftingTab);
public static Item CopperIngot = new CopperIngotClass(3003).setUnlocalizedName("CopperIngot");
public static Item sledgehammer = new sledgehammerClass(3005, Item.ToolMaterial.EMERALD).setUnlocalizedName("sledgehammer").setCreativeTab(MoreCraftingTab);
public static Item Rpg = new RpgClass().setUnlocalizedName("Rpg").setCreativeTab(MoreCraftingTab);
public static Item EAT = new EATClass(3009).setUnlocalizedName("EAT");
public static Item GreenBow = new GreenBowClass().setUnlocalizedName("GreenBow").setCreativeTab(MoreCraftingTab);
public static Item GreenBow2 = new GreenBow2Class().setUnlocalizedName("GreenBow2").setCreativeTab(MoreCraftingTab);
public static Item RpgAmmo = new RpgAmmoClass(3006).setUnlocalizedName("RpgAmmo").setCreativeTab(MoreCraftingTab);
public static Item Mirakuru = new MirakuruClass(4, 0.75f, false).setUnlocalizedName("Mirakuru").setCreativeTab(MoreCraftingTab).setMaxStackSize(1);
public static Item Cure = new CureClass().setUnlocalizedName("Cure").setCreativeTab(MoreCraftingTab).setMaxStackSize(1);

public Mineturnedmain(){
	GameRegistry.registerBlock(BlockOfTin,"BlockOfTin");
	GameRegistry.registerBlock(TinOre, "TinOre");
	GameRegistry.registerBlock(CopperOre, "CopperOre");
	GameRegistry.registerItem(TinIngot, "TinIngot");
	GameRegistry.registerItem(CopperIngot, "CopperIngot");
	GameRegistry.registerItem(Rpg, "Rpg");
	GameRegistry.registerItem(Cure, "Cure");
	GameRegistry.registerItem(EAT, "EAT");
	GameRegistry.registerItem(Mirakuru, "Mirakuru");
	GameRegistry.registerItem(RpgAmmo, "RpgAmmo");
	GameRegistry.registerItem(GreenBow, "GreenBow");
	GameRegistry.registerItem(GreenBow2, "GreenBow2");
	GameRegistry.registerBlock(BlockOfCopper,"BlockOfCopper");


	//Crafting and Smelting
	GameRegistry.addSmelting(Mineturnedmain.TinOre,
			new ItemStack(Mineturnedmain.TinIngot), 0.5f);

	GameRegistry.addSmelting(Mineturnedmain.CopperOre, 
			new ItemStack(Mineturnedmain.CopperIngot), 0.5f);

	GameRegistry.addShapedRecipe(new ItemStack(Mineturnedmain.BlockOfCopper),
			new Object[]{"xxx","xxx","xxx",'x', Mineturnedmain.CopperIngot});

	GameRegistry.addShapedRecipe(new ItemStack(Mineturnedmain.BlockOfTin),
			new Object[]{"xxx","xxx","xxx",'x', Mineturnedmain.TinIngot});

	GameRegistry.addShapedRecipe(new ItemStack(Mineturnedmain.CopperIngot, 9),
			new Object[]{"x",'x', Mineturnedmain.BlockOfCopper});

	GameRegistry.addShapedRecipe(new ItemStack(Mineturnedmain.TinIngot, 9),
			new Object[]{"x",'x', Mineturnedmain.BlockOfTin});

}

@EventHandler
public void preinit(FMLPreInitializationEvent event){
	GameRegistry.registerWorldGenerator(new WorldGeneratorAvatar(), 1);
}



@EventHandler 
public void init(FMLInitializationEvent event){
	EntityRegistry.registerModEntity(EntityRpg.class, "Rpg", 4, this, 80, 3, true);
	EntityRegistry.registerModEntity(EntityExplosiveArrow.class, "EAT", 4, this, 80, 3, true);

	proxy.registerRenderThings();
	proxy.registerSounds();

	}

	}

Link to comment
Share on other sites

Diesieben, could you expand what you said, I at least claim to not to be a java novice and am not sure what you meant. Also, if I am understanding your lack of spelling, you really should not be insulting diesieben's attempt to help. He knows more about forge modding than anyone except maybe for people like Lex himself! Let's all just try to figure out what the problem is, ok? Could you give us all the related classes (entities, etc...) as well as a log in case it says anything? I'm not seeing anywhere that you register a texture for the snowball renderer. How does that work exactly? Correct me if I'm wrong, but it seems like you are registering an entity renderer for an item. Finally, your indenting and class definition next to an import make it hard to read and understand, could you clean it up?

 

Note, I'm not at a workspace so I apologize for any stupid mistakes I made :).

Link to comment
Share on other sites

*cracks hands* Well, let's see what's wrong, shall we?

 

1. You're registering your items in YOUR CONSTRUCTOR! -_-

2. You need to be constructing your items in the pre-init.

3. You need to register your items in the pre-init.

 

Well, that might not fix your issue, but that would be correct by a mod stand-point.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Link to comment
Share on other sites

No I am still getting the same errors. But I will post my code for both of the entitys.

EntityRpg:

package com.mineturnedmod.mineturned;

import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;

public class EntityRpg extends EntityThrowable {
private double explosionRadius = 3.0F;

/**
 * @param par1World where the entity will spawn
 */
public EntityRpg(World par1World) {
	super(par1World);
}
/**
 * @param par1World
 * @param arg1Double
 * @param arg2Double
 * @param arg3Double
 */
public EntityRpg(World par1World, double arg1Double, double arg2Double, double arg3Double) {
	super(par1World, arg1Double, arg2Double, arg3Double);
}
/**
 * @param par1World
 * @param arg1EntityLivingBase
 */
public EntityRpg(World par1World, EntityLivingBase arg1EntityLivingBase) {
	super(par1World, arg1EntityLivingBase);
}
@Override
protected float getGravityVelocity() 
{ return 0;
}



/**
 * @see net.minecraft.entity.projectile.EntityThrowable#onImpact(net.minecraft.util.MovingObjectPosition)
 */
@Override
protected void onImpact(MovingObjectPosition par1MovingObjectPosition) {
	this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)this.explosionRadius, true);
	this.setDead();
}

}

EntityExplosiveArrow:

package com.mineturnedmod.mineturned;

import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;

public class EntityExplosiveArrow extends EntityThrowable {
private double explosionRadius = 3.0F;

/**
 * @param par1World where the entity will spawn
 */
public EntityExplosiveArrow(World par1World) {
	super(par1World);
}
/**
 * @param par1World
 * @param arg1Double
 * @param arg2Double
 * @param arg3Double
 */
public EntityExplosiveArrow(World par1World, double arg1Double, double arg2Double, double arg3Double) {
	super(par1World, arg1Double, arg2Double, arg3Double);
}
/**
 * @param par1World
 * @param arg1EntityLivingBase
 */
public EntityExplosiveArrow(World par1World, EntityLivingBase arg1EntityLivingBase) {
	super(par1World, arg1EntityLivingBase);
}
/**
 * @see net.minecraft.entity.projectile.EntityThrowable#onImpact(net.minecraft.util.MovingObjectPosition)
 */
@Override
protected void onImpact(MovingObjectPosition par1MovingObjectPosition) {
	this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)this.explosionRadius, true);
	this.setDead();
}

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
  • Topics

×
×
  • Create New...

Important Information

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