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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • ChemsXpress (https://chemsxpress.com): ChemsXpress is a platform specializing in the distribution of research chemicals and related products. It offers a wide range of substances for scientific and laboratory use, catering to researchers and professionals. BubatzLand (https://bubatzland.com): BubatzLand focuses on providing high-quality cannabis products. The site offers a variety of strains, edibles, and related accessories, aiming to serve the needs of cannabis enthusiasts and medicinal users. HalluShroom (https://hallushroom.com): HalluShroom specializes in the sale of psychedelic mushrooms and related products. It caters to individuals interested in exploring the benefits and experiences associated with psilocybin and other psychedelic substances. HighAsch (https://highasch.com): HighAsch offers a diverse range of cannabis products, including flowers, concentrates, and edibles. The site aims to provide premium-quality products to both recreational and medicinal users. KetaminHaus (https://ketaminhaus.com): KetaminHaus provides ketamine and related products for research and therapeutic use. The platform focuses on ensuring the availability of high-quality, safe, and effective ketamine for various applications. KokainLabor (https://kokainlabor.com): KokainLabor offers cocaine and other related substances. The site targets individuals seeking high-purity products for personal or research purposes, emphasizing quality and safety. MDPHPWelt (https://mdphpwelt.com): MDPHPWelt specializes in the distribution of MDPHP and other similar research chemicals. It aims to supply researchers with high-quality substances for scientific and experimental use. NembutaLabor (https://nembutalabor.com): NembutaLabor provides Nembutal (pentobarbital) and related products. The site focuses on supplying these substances for research and veterinary purposes, ensuring high standards of quality and safety. NembutalQuelle (https://nembutalquelle.com): NembutalQuelle is dedicated to offering Nembutal and similar barbiturates. It caters to researchers and professionals who require these substances for scientific, medical, or veterinary applications. JBSaves Ltda Brazil (https://jbsavesltdabrazil.com): JBSaves Ltda Brazil is involved in the food and agricultural industry, providing a variety of products and services related to food processing, distribution, and agricultural practices. Bello Alimentos Ltda (https://belloalimentosltda.com): Bello Alimentos Ltda offers a wide range of food products. The site focuses on high-quality, nutritious, and safe food items, catering to consumers and businesses in the food industry. São Salvador Alimentos (https://saosalvadoralimentoss.com): São Salvador Alimentos specializes in the production and distribution of food products. The site provides a variety of options aimed at meeting the dietary needs and preferences of diverse consumers. WietWereld (https://wietwereld.com): WietWereld is a platform dedicated to the cannabis community. It offers information, products, and resources related to cannabis cultivation, consumption, and culture. 14. BeuhParadise (https://beuhparadis.com): BeuhParadise offers a range of cannabis products, including flowers, edibles, and concentrates. The site aims to provide high-quality cannabis products to recreational and medicinal users, emphasizing purity and potency. 15. WietWereld (https://wietwereld.com): WietWereld is a comprehensive resource for cannabis enthusiasts. It provides products, cultivation guides, and community forums for those interested in cannabis culture and cultivation. GrasOase (https://grasoase.com): GrasOase specializes in cannabis products and accessories. The site offers a variety of strains, seeds, and related items for cannabis users, focusing on quality and customer satisfaction. https://chemsxpress.com/ https://bubatzland.com/ https://hallushroom.com/ https://highasch.com/ https://ketaminhaus.com/ https://kokainlabor.com/ https://mdphpwelt.com/ https://nembutalabor.com/ https://nembutalquelle.com/ https://jbsavesltdabrazil.com/ https://belloalimentosltda.com/ https://saosalvadoralimentoss.com/ https://wietwereld.com https://beuhparadis.com https://wietwereld.com https://grasoase.com/
    • For Example I have an Main Mod that adds new Content to Minecraft. But I'm using custom Classes etc. and I want it so that is an api integrated in the Main Mod but can be download seperately like an Module. Is this possible? If you need more Information just comment what you need to know ^^
    • Delete the config of this mod (config folder) and test it again   If there is no change, try other builds  
    • Add the full crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here
  • Topics

×
×
  • Create New...

Important Information

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