Posted March 24, 20169 yr hey all, I'm back with an entity that will spawn in game with an egg, however, it's not registering the rendering of the textures i think,and I'm not sure where that would be. i made the model in Techne. Render package com.drmdgg.beesmod.entities; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; public class RenderBeeHive extends RenderLiving { public RenderBeeHive(RenderManager rendermanagerIn, ModelBase modelbaseIn, float shadowsizeIn) { super(rendermanagerIn, modelbaseIn, shadowsizeIn); setEntityTexture(); } private void setEntityTexture() { BeeHiveTextures = new ResourceLocation("beemod:textures/entity/BeeHivee.png"); } private static ResourceLocation BeeHiveTextures = new ResourceLocation("beemod:textures/entity/BeeHivee.png"); @Override protected ResourceLocation getEntityTexture(Entity entity) { return BeeHiveTextures; } } Model // Date: 3/22/2016 9:19:02 PM // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX package com.drmdgg.beesmod.entities; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelBeeHive extends ModelBase { //fields ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; ModelRenderer Shape4; ModelRenderer Shape5; ModelRenderer Shape6; ModelRenderer Shape7; ModelRenderer Shape8; ModelRenderer Shape9; public ModelBeeHive() { textureWidth = 64; textureHeight = 64; Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(0F, 0F, 0F, 6, 3, 6); Shape1.setRotationPoint(-3F, 22F, -3F); Shape1.setTextureSize(64, 64); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 0, 0); Shape2.addBox(0F, 0F, 0F, 8, 3, ; Shape2.setRotationPoint(-4F, 19F, -4F); Shape2.setTextureSize(64, 64); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 0, 0); Shape2.addBox(0F, 0F, 0F, 8, 3, ; Shape2.setRotationPoint(-4F, 16F, -4F); Shape2.setTextureSize(64, 64); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(0F, 0F, 0F, 6, 3, 6); Shape1.setRotationPoint(-3F, 13F, -3F); Shape1.setTextureSize(64, 64); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 0, 0); Shape3.addBox(0F, 0F, 0F, 1, 1, 1); Shape3.setRotationPoint(-5F, 9F, -1F); Shape3.setTextureSize(64, 64); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 0, 0); Shape4.addBox(0F, 0F, 0F, 1, 1, 1); Shape4.setRotationPoint(4F, 12F, 0F); Shape4.setTextureSize(64, 64); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 0, 0); Shape5.addBox(0F, 0F, 0F, 1, 1, 1); Shape5.setRotationPoint(-4F, 3F, -6F); Shape5.setTextureSize(64, 64); Shape5.mirror = true; setRotation(Shape5, 0F, 0F, 0F); Shape6 = new ModelRenderer(this, 0, 0); Shape6.addBox(0F, 0F, 0F, 1, 1, 1); Shape6.setRotationPoint(0F, 0F, 0F); Shape6.setTextureSize(64, 64); Shape6.mirror = true; setRotation(Shape6, 0F, 0F, 0F); Shape7 = new ModelRenderer(this, 0, 0); Shape7.addBox(0F, 0F, 0F, 1, 1, 1); Shape7.setRotationPoint(2F, 11F, -5F); Shape7.setTextureSize(64, 64); Shape7.mirror = true; setRotation(Shape7, 0F, 0F, 0F); Shape8 = new ModelRenderer(this, 0, 0); Shape8.addBox(0F, 0F, 0F, 1, 1, 1); Shape8.setRotationPoint(3F, 6F, 0F); Shape8.setTextureSize(64, 64); Shape8.mirror = true; setRotation(Shape8, 0F, 0F, 0F); Shape9 = new ModelRenderer(this, 0, 0); Shape9.addBox(0F, 0F, 0F, 1, 1, 1); Shape9.setRotationPoint(-8F, 8F, 0F); Shape9.setTextureSize(64, 64); Shape9.mirror = true; setRotation(Shape9, 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(f5, f, f1, f2, f3, f4, entity); Shape1.render(f5); Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); Shape5.render(f5); Shape6.render(f5); Shape7.render(f5); Shape8.render(f5); Shape9.render(f5); } 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); } } Registry for entity package com.drmdgg.beesmod.entities; import net.minecraft.entity.EntityList; import net.minecraft.entity.EnumCreatureType; import net.minecraftforge.fml.common.registry.EntityRegistry; public class entreg { public static void BeesMod(){ registerEntity(); } public static void registerEntity(){ createEntity(BeeHive.class, "BeeHive", 0x9C6000, 0xFFDBA1); } public static void createEntity(Class entityClass, String entityName, int solidColour, int spotColour){ int randomID = EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomID); EntityRegistry.registerModEntity(entityClass, entityName, randomID, com.drmdgg.beesmod.BeesMod.instance, 64, 1, true); EntityRegistry.addSpawn(BeeHive.class, 50, 5, 20, EnumCreatureType.MONSTER); createEgg(randomID, solidColour, spotColour); } private static void createEgg(int randomID, int solidColour, int spotColour) { EntityList.entityEggs.put(Integer.valueOf(randomID), new EntityList.EntityEggInfo(randomID, solidColour, spotColour)); } } EntityFile package com.drmdgg.beesmod.entities; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.world.World; public class BeeHive extends EntityMob { World world = null; public BeeHive(World var1) { super(var1); world = var1; experienceValue = 5; this.isImmuneToFire = false; setNoAI(!false); this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false)); } protected void applyEntityAttributes(){ super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.0D); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(10D); if(this.getEntityAttribute(SharedMonsterAttributes.attackDamage)!=null)this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3D); } protected void dropRareDrop(int par1){ this.dropItem(Items.bone, 1); } @Override protected Item getDropItem() { return new ItemStack(Items.slime_ball).getItem(); } @Override protected String getLivingSound() { return ""; } @Override protected String getHurtSound() { return "game.neutral.hurt"; } @Override protected String getDeathSound() { return "game.neutral.die"; } @Override public void onStruckByLightning(EntityLightningBolt entityLightningBolt){ super.onStruckByLightning(entityLightningBolt); int i = (int)this.posX; int j = (int)this.posY; int k = (int)this.posZ; Entity entity = this; if(true){ world.getBlockState(new BlockPos(i, j, k)).getBlock().dropBlockAsItem(world, new BlockPos(i, j, k), world.getBlockState(new BlockPos(i, j, k)), 1); world.setBlockToAir(new BlockPos(i, j, k)); } } @Override public void fall(float l, float d){ super.fall(l,d); int i = (int)this.posX; int j = (int)this.posY; int k = (int)this.posZ; super.fall(l,d); Entity entity = this; } @Override public void onDeath(DamageSource source){ super.onDeath(source); int i = (int)this.posX; int j = (int)this.posY; int k = (int)this.posZ; Entity entity = this; if(true){ world.getBlockState(new BlockPos(i, j, k)).getBlock().dropBlockAsItem(world, new BlockPos(i, j, k), world.getBlockState(new BlockPos(i, j, k)), 1); world.setBlockToAir(new BlockPos(i, j, k)); } if(true){ entity.attackEntityFrom(DamageSource.generic, 6); } } @Override public boolean interact(EntityPlayer entity){ super.interact(entity); int i = (int)this.posX; int j = (int)this.posY; int k = (int)this.posZ; return true; } @Override protected float getSoundVolume() { return 1.0F; } } this is in the Main Registry @EventHandler public void Init(FMLInitializationEvent e) { entreg.registerEntity(); this is in CommonProxy public void init(FMLInitializationEvent e) { entreg.registerEntity(); thanks for the help in advance. and by all means, tear my coding apart.
March 24, 20169 yr why are you registering it twice? Current Project: Armerger Planned mods: Light Drafter | Ore Swords Looking for help getting a mod off the ground? Coding | Textures
March 24, 20169 yr Both in a sense. You should have something like this: public class ModClass{ @SidedProxy(...) CommonProxy proxy; @EventHandler public void init (FMLInitializationEvent event){ proxy.init(event); } } public class ClientProxy extends CommonProxy{ public void init(FMLInitializationEvent event) { super.init(); //client side things } } public class CommonProxy{ public void init(FMLInitializationEvent event) { entReg.registerEntity(); } } Current Project: Armerger Planned mods: Light Drafter | Ore Swords Looking for help getting a mod off the ground? Coding | Textures
March 24, 20169 yr did that, but there's nothing new. still just spawning (unbreakable) white rectangles of varying size
March 24, 20169 yr EntityRegistry.registerModEntity is ALL you need as far as registering the entity itself; as of 1.8, you can even tack on 2 additional integer parameters for the spawn egg and have one made for you. Get rid of the global entity ID and everything related to it - just start at 0 and increment for your entity IDs, as they are unique to your mod. Where are you registering your entity renderer? http://i.imgur.com/NdrFdld.png[/img]
March 24, 20169 yr public class CommonProxy { public void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(BeesMod.class, new RenderBeeHive(new ModelBeeHive(),0.5F)); } public void preInit(FMLPreInitializationEvent e) { } public void init(FMLInitializationEvent e) { entreg.registerEntity(); } public void postInit(FMLPostInitializationEvent e) { } } in common, but the registerentityrenderinghandler is causing me problems (that line isnt complete
March 24, 20169 yr Well, without registering a renderer, your entity won't render correctly. You need to register renderers via the ClientProxy, though - your CommonProxy#registerRenders method should do nothing at all. http://i.imgur.com/NdrFdld.png[/img]
March 24, 20169 yr could you show me an example by chance?\ it's just the way i learn and on another note, how this look? public class RenderBeeHive extends RenderLiving { public RenderBeeHive(ModelBeeHive par1ModelBase, float par2) { super(null, par1ModelBase, par2); } public void renderTutorialMob(BeeHive par1BeeHive, double par2, double par4, double par6, float par8, float par9) { super.doRender(par1BeeHive, par2, par4, par6, par8, par9); } public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9) { this.doRender((BeeHive)par1EntityLiving, par2, par4, par6, par8, par9); } public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { this.doRender((BeeHive)par1Entity, par2, par4, par6, par8, par9); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return ; } } i should be returning the textures(renders) here right? or the resource location
March 24, 20169 yr okay, dropped that last one. i have this now. public class RenderBeeHive extends RenderLiving { protected ResourceLocation BeeHiveTexture; public RenderBeeHive(ModelBase par1ModelBase, float parShadowSize) { super(par1ModelBase, parShadowSize); setEntityTexture(); } @Override protected void preRenderCallback(EntityLivingBase entity, float f) { preRenderCallbackBeeHive((BeeHive) entity, f); } protected void preRenderCallbackBeeHive(BeeHive entity, float f) { } protected void setEntityTexture() { BeeHiveTexture = new ResourceLocation(Reference.MOD_ID+":textures/entity/BeeHivee.png"); } @Override protected ResourceLocation getEntityTexture(Entity par1Entity) { return BeeHiveTexture; } } the super is having an error telling me to add agrument RenderLiving() but that just causes more errors. and this is in my clientProxy public void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(BeeHive.class, new RenderBeeHive(new ModelBeeHive(), 0.5F)); }
March 24, 20169 yr What version of Minecraft are you using? In 1.8, at least, you need an instance of RenderManager to pass to the super constructor. 1.8.9 this has all been changed so you would create a render factory to instantiate your render class, and you need an instance of that factory when registering your renderer. http://i.imgur.com/NdrFdld.png[/img]
March 24, 20169 yr as i said, could you add an example by chance? i just dont learn by reading words, i need to see it. please and thank you
March 24, 20169 yr Well, the example would be different depending on which version of Minecraft you are using, so as I asked, which is it? http://i.imgur.com/NdrFdld.png[/img]
March 24, 20169 yr Then I'm afraid I can't personally give you an example, as I don't have access to a computer with an IDE / 1.8.9 source code. But, if you search for IRenderFactory, I'm sure you will be able to find something (such as this or this). http://i.imgur.com/NdrFdld.png[/img]
March 25, 20169 yr werll what you have me helped a lot, i am going to keep trying here, but i have gotten this crash report. and its all the entity thats screwing up. ---- Minecraft Crash Report ---- // Oops. Time: 3/24/16 7:59 PM Description: Rendering entity in world java.lang.NullPointerException: Rendering entity in world at net.minecraft.client.renderer.entity.RendererLivingEntity.canRenderName(RendererLivingEntity.java:589) at net.minecraft.client.renderer.entity.RenderLiving.canRenderName(RenderLiving.java:26) at net.minecraft.client.renderer.entity.RenderLiving.canRenderName(RenderLiving.java:16) at net.minecraft.client.renderer.entity.RendererLivingEntity.renderName(RendererLivingEntity.java:508) at net.minecraft.client.renderer.entity.RendererLivingEntity.renderName(RendererLivingEntity.java:31) at net.minecraft.client.renderer.entity.Render.doRender(Render.java:59) at net.minecraft.client.renderer.entity.RendererLivingEntity.doRender(RendererLivingEntity.java:207) at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:54) at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:16) at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:380) at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:337) at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:304) at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:672) at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1368) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1110) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107) at net.minecraft.client.Minecraft.run(Minecraft.java:380) at net.minecraft.client.main.Main.main(Main.java:116) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 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 net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.client.renderer.entity.RendererLivingEntity.canRenderName(RendererLivingEntity.java:589) at net.minecraft.client.renderer.entity.RenderLiving.canRenderName(RenderLiving.java:26) at net.minecraft.client.renderer.entity.RenderLiving.canRenderName(RenderLiving.java:16) at net.minecraft.client.renderer.entity.RendererLivingEntity.renderName(RendererLivingEntity.java:508) at net.minecraft.client.renderer.entity.RendererLivingEntity.renderName(RendererLivingEntity.java:31) at net.minecraft.client.renderer.entity.Render.doRender(Render.java:59) at net.minecraft.client.renderer.entity.RendererLivingEntity.doRender(RendererLivingEntity.java:207) at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:54) at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:16) -- Entity being rendered -- Details: Entity Type: BeeHive (com.drmdgg.beesmod.entities.BeeHive) Entity ID: 173 Entity Name: entity.BeeHive.name Entity's Exact location: 127.50, 66.00, 228.50 Entity's Block location: 127.00,66.00,228.00 - World: (127,66,228), Chunk: (at 15,4,4 in 7,14; contains blocks 112,0,224 to 127,255,239), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Entity's Momentum: 0.00, 0.00, -0.72 Entity's Rider: ~~ERROR~~ NullPointerException: null Entity's Vehicle: ~~ERROR~~ NullPointerException: null -- Renderer details -- Details: Assigned renderer: com.drmdgg.beesmod.entities.RenderBeeHive@912756d Location: 0.99,-1.00,1.25 - World: (0,-1,1), Chunk: (at 0,-1,1 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Rotation: -99.84375 Delta: 0.20712757 Stacktrace: at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:380) at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:337) at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:304) at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:672) at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1368) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player421'/351, l='MpServer', x=126.51, y=67.00, z=227.25]] Chunk stats: MultiplayerChunkCache: 320, 320 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: 108.00,64.00,210.00 - World: (108,64,210), Chunk: (at 12,4,2 in 6,13; contains blocks 96,0,208 to 111,255,223), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 6761 game time, 6761 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 102 total; [EntityCow['Cow'/87, l='MpServer', x=48.91, y=71.00, z=166.00], EntityCow['Cow'/88, l='MpServer', x=62.91, y=71.00, z=166.97], EntityCow['Cow'/89, l='MpServer', x=49.19, y=72.00, z=180.31], EntityCow['Cow'/90, l='MpServer', x=60.13, y=74.00, z=176.91], EntitySkeleton['Skeleton'/91, l='MpServer', x=50.41, y=14.00, z=211.84], EntityZombie['Zombie'/92, l='MpServer', x=49.50, y=17.00, z=209.50], EntitySkeleton['Skeleton'/93, l='MpServer', x=51.47, y=24.00, z=215.88], EntitySkeleton['Skeleton'/94, l='MpServer', x=57.59, y=20.00, z=233.06], EntityZombie['Zombie'/95, l='MpServer', x=61.50, y=38.00, z=230.50], EntityBat['Bat'/96, l='MpServer', x=51.81, y=16.00, z=260.94], EntitySkeleton['Skeleton'/97, l='MpServer', x=59.63, y=33.75, z=265.88], EntityCreeper['Creeper'/98, l='MpServer', x=63.09, y=62.00, z=268.75], EntitySpider['Spider'/99, l='MpServer', x=62.28, y=18.22, z=272.69], EntityCreeper['Creeper'/100, l='MpServer', x=52.97, y=34.00, z=285.56], EntityZombie['Zombie'/101, l='MpServer', x=54.50, y=34.00, z=284.94], EntityBat['Bat'/102, l='MpServer', x=57.25, y=59.10, z=281.47], EntityCow['Cow'/103, l='MpServer', x=60.53, y=67.00, z=280.41], EntitySkeleton['Skeleton'/104, l='MpServer', x=63.91, y=49.00, z=290.50], EntityZombie['Zombie'/105, l='MpServer', x=62.94, y=49.00, z=290.50], EntityCow['Cow'/106, l='MpServer', x=62.69, y=66.00, z=290.69], EntityCreeper['Creeper'/107, l='MpServer', x=53.63, y=18.00, z=304.94], EntityBat['Bat'/109, l='MpServer', x=59.09, y=26.10, z=306.47], EntityRabbit['Rabbit'/120, l='MpServer', x=79.53, y=68.00, z=148.47], EntityCreeper['Creeper'/122, l='MpServer', x=78.50, y=13.00, z=174.50], EntityCow['Cow'/123, l='MpServer', x=67.53, y=75.00, z=172.19], EntityCow['Cow'/124, l='MpServer', x=67.53, y=76.00, z=173.53], EntitySkeleton['Skeleton'/125, l='MpServer', x=74.53, y=13.00, z=177.59], EntityZombie['Zombie'/126, l='MpServer', x=78.50, y=22.00, z=204.50], EntityWitch['Witch'/127, l='MpServer', x=75.41, y=16.00, z=223.13], EntitySkeleton['Skeleton'/128, l='MpServer', x=76.81, y=18.00, z=270.25], EntityBat['Bat'/129, l='MpServer', x=67.19, y=52.03, z=269.25], EntityCow['Cow'/130, l='MpServer', x=70.53, y=70.00, z=261.13], EntitySkeleton['Skeleton'/131, l='MpServer', x=69.19, y=60.00, z=283.63], EntityCow['Cow'/132, l='MpServer', x=71.97, y=68.00, z=282.97], EntityPlayerSP['Player421'/351, l='MpServer', x=126.51, y=67.00, z=227.25], EntityCow['Cow'/152, l='MpServer', x=88.28, y=71.00, z=149.53], EntityZombie['Zombie'/153, l='MpServer', x=82.06, y=54.00, z=223.53], EntityCow['Cow'/154, l='MpServer', x=95.22, y=64.00, z=288.19], EntityCow['Cow'/155, l='MpServer', x=85.69, y=67.00, z=287.38], EntityCow['Cow'/156, l='MpServer', x=93.47, y=64.00, z=297.81], EntityCow['Cow'/157, l='MpServer', x=88.69, y=66.00, z=296.59], EntityCow['Cow'/158, l='MpServer', x=95.44, y=64.00, z=290.75], EntityCow['Cow'/159, l='MpServer', x=90.50, y=64.00, z=304.50], EntityCow['Cow'/163, l='MpServer', x=102.13, y=65.00, z=148.00], EntityCow['Cow'/164, l='MpServer', x=100.66, y=66.00, z=158.25], EntitySkeleton['Skeleton'/165, l='MpServer', x=105.31, y=33.00, z=235.22], EntityZombie['Zombie'/166, l='MpServer', x=109.19, y=74.00, z=258.22], EntityCow['Cow'/167, l='MpServer', x=97.06, y=64.00, z=297.13], EntityCow['Cow'/169, l='MpServer', x=118.00, y=66.00, z=151.75], EntitySpider['Spider'/170, l='MpServer', x=125.94, y=30.00, z=162.69], EntityCow['Cow'/171, l='MpServer', x=114.16, y=65.00, z=160.13], EntitySkeleton['Skeleton'/172, l='MpServer', x=120.84, y=33.00, z=228.56], BeeHive['entity.BeeHive.name'/173, l='MpServer', x=127.50, y=66.00, z=228.50], BeeHive['entity.BeeHive.name'/174, l='MpServer', x=127.50, y=66.00, z=228.50], BeeHive['entity.BeeHive.name'/175, l='MpServer', x=126.50, y=66.00, z=225.50], BeeHive['entity.BeeHive.name'/176, l='MpServer', x=127.50, y=68.00, z=227.50], BeeHive['entity.BeeHive.name'/177, l='MpServer', x=125.50, y=66.00, z=226.50], BeeHive['entity.BeeHive.name'/178, l='MpServer', x=125.50, y=66.00, z=225.50], BeeHive['entity.BeeHive.name'/179, l='MpServer', x=126.50, y=66.00, z=226.50], EntitySkeleton['Skeleton'/180, l='MpServer', x=127.56, y=70.00, z=255.50], EntityZombie['Zombie'/181, l='MpServer', x=123.47, y=76.00, z=254.63], EntitySkeleton['Skeleton'/182, l='MpServer', x=120.09, y=74.00, z=258.47], EntityCreeper['Creeper'/185, l='MpServer', x=142.50, y=37.00, z=183.50], EntityZombie['Zombie'/186, l='MpServer', x=142.63, y=25.00, z=233.09], EntityCreeper['Creeper'/187, l='MpServer', x=135.03, y=29.00, z=226.59], BeeHive['entity.BeeHive.name'/188, l='MpServer', x=128.50, y=67.00, z=225.50], BeeHive['entity.BeeHive.name'/189, l='MpServer', x=129.50, y=66.00, z=224.50], BeeHive['entity.BeeHive.name'/190, l='MpServer', x=129.50, y=68.00, z=226.50], EntitySkeleton['Skeleton'/191, l='MpServer', x=132.84, y=70.16, z=246.28], EntityCreeper['Creeper'/198, l='MpServer', x=146.25, y=32.00, z=170.63], EntitySkeleton['Skeleton'/199, l='MpServer', x=147.50, y=33.00, z=179.50], EntityWitch['Witch'/200, l='MpServer', x=154.28, y=72.00, z=253.47], EntitySheep['Sheep'/201, l='MpServer', x=146.88, y=89.00, z=245.91], EntitySheep['Sheep'/202, l='MpServer', x=151.03, y=91.00, z=252.03], EntitySheep['Sheep'/203, l='MpServer', x=148.44, y=90.00, z=244.19], EntitySheep['Sheep'/204, l='MpServer', x=146.94, y=89.00, z=248.00], EntitySheep['Sheep'/205, l='MpServer', x=144.75, y=91.00, z=253.16], EntitySheep['Sheep'/206, l='MpServer', x=148.75, y=94.00, z=256.88], EntitySkeleton['Skeleton'/217, l='MpServer', x=163.50, y=25.00, z=168.50], EntityPig['Pig'/218, l='MpServer', x=164.28, y=94.00, z=191.97], EntityPig['Pig'/219, l='MpServer', x=165.41, y=104.00, z=194.84], EntityPig['Pig'/220, l='MpServer', x=164.22, y=105.00, z=197.06], EntityPig['Pig'/221, l='MpServer', x=167.53, y=105.75, z=193.34], EntitySheep['Sheep'/222, l='MpServer', x=167.06, y=98.00, z=252.53], EntitySheep['Sheep'/223, l='MpServer', x=167.88, y=98.00, z=251.44], EntitySheep['Sheep'/224, l='MpServer', x=166.50, y=102.00, z=277.63], EntityBat['Bat'/229, l='MpServer', x=177.63, y=24.75, z=177.53], EntitySheep['Sheep'/230, l='MpServer', x=179.47, y=104.00, z=245.31], EntitySheep['Sheep'/231, l='MpServer', x=185.00, y=101.00, z=249.63], EntitySheep['Sheep'/232, l='MpServer', x=178.50, y=97.00, z=252.31], EntitySheep['Sheep'/233, l='MpServer', x=190.31, y=95.00, z=258.06], EntitySheep['Sheep'/234, l='MpServer', x=183.88, y=94.00, z=257.84], EntitySheep['Sheep'/235, l='MpServer', x=183.59, y=94.00, z=256.63], EntitySheep['Sheep'/242, l='MpServer', x=198.47, y=115.00, z=220.44], EntitySheep['Sheep'/243, l='MpServer', x=199.97, y=116.00, z=219.50], EntitySheep['Sheep'/244, l='MpServer', x=193.41, y=121.00, z=213.31], EntitySheep['Sheep'/245, l='MpServer', x=196.72, y=118.00, z=223.53], EntitySheep['Sheep'/246, l='MpServer', x=198.19, y=116.00, z=229.78], EntitySheep['Sheep'/247, l='MpServer', x=193.38, y=117.00, z=225.44], EntitySheep['Sheep'/248, l='MpServer', x=192.16, y=117.00, z=226.41], EntitySheep['Sheep'/249, l='MpServer', x=192.66, y=97.00, z=258.53], EntityZombie['Zombie'/250, l='MpServer', x=202.50, y=32.00, z=307.50]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:383) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2645) at net.minecraft.client.Minecraft.run(Minecraft.java:401) at net.minecraft.client.main.Main.main(Main.java:116) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 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 net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) -- System Details -- Details: Minecraft Version: 1.8.9 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_74, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 750702472 bytes (715 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP 9.19 Powered by Forge 11.15.1.1722 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.9-11.15.1.1722.jar) UCHIJAAAA Forge{11.15.1.1722} [Minecraft Forge] (forgeSrc-1.8.9-11.15.1.1722.jar) UCHIJAAAA beemod{1.0} [beesMod] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.3.0' Renderer: 'Quadro FX 2700M/PCIe/SSE2' Launched Version: 1.8.9 LWJGL: 2.9.4 OpenGL: Quadro FX 2700M/PCIe/SSE2 GL version 3.3.0, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (US) Profiler Position: N/A (disabled) CPU: 2x Intel® Core2 Duo CPU T9600 @ 2.80GHz this is the section im working on now. it is still the SUPER thats causing problems. i at least got that from the crash report package com.drmdgg.beesmod.entities; import com.drmdgg.beesmod.BeesMod; import com.drmdgg.beesmod.Reference; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.ResourceLocation; public class RenderBeeHive extends RenderLiving { protected ResourceLocation BeeHiveTexture; public RenderBeeHive(ModelBase par1ModelBase, float parShadowSize) { super(null, par1ModelBase, parShadowSize); setEntityTexture(); } @Override protected void preRenderCallback(EntityLivingBase entity, float f) { preRenderCallbackBeeHive((BeeHive) entity, f); } protected void preRenderCallbackBeeHive(BeeHive entity, float f) { } protected void setEntityTexture() { BeeHiveTexture = new ResourceLocation(Reference.MOD_ID+":textures/entity/BeeHivee.png"); } @Override protected ResourceLocation getEntityTexture(Entity par1Entity) { return BeeHiveTexture; } } as always, thanks in advance
March 25, 20169 yr super(null, par1ModelBase, parShadowSize); NEVER pass null in a constructor or method expecting a valid value. It never works out the way you expect... um, wait, what DID you expect? Of course it crashes. Please look at the examples in the posts I linked. Did you make an IRenderFactory? Why isn't that passing the RenderManager instance to your Render class constructor? Why doesn't your Render class constructor have a RenderManager parameter? You know, like: public RenderGenericLiving(RenderManager renderManager, ModelBase model, float shadowSize) { Btw, that's a 1.8 example - 1.8.9+ introduces generics, so your constructor call may be different, and certainly your class declaration needs to include the type specifier, e.g. extends RenderLiving<YourEntityClass> http://i.imgur.com/NdrFdld.png[/img]
March 26, 20169 yr what the hell.....nothing is ever this confusing to me. i always get it....this modding and coding is nuts, but i think im getting it. at least starting too. someone wanna show me the line for here? public class ClientProxy extends CommonProxy { public void registerRenders() { //i know its not this. RenderingRegistry.registerEntityRenderingHandler(BeeHive.class, new RenderBeeHive(new BeeHive(), 0.5F)); } public void preInit(FMLPreInitializationEvent e) { super.preInit(e); } public void init(FMLInitializationEvent e) { super.init(e); } public void postInit(FMLPostInitializationEvent e) { super.postInit(e); } } this has gotta be pretty much the end.
March 26, 20169 yr got it. RenderingRegistry.registerEntityRenderingHandler(com.drmdgg.beesmod.entities.BeeHive.class, new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new ModelBeeHive(), 0){protected ResourceLocation getEntityTexture(Entity par1Entity){return new ResourceLocation("beemod:textures/entity/BeeHivee.png");}}) in main class under Init did it.
March 27, 20169 yr got it. RenderingRegistry.registerEntityRenderingHandler(com.drmdgg.beesmod.entities.BeeHive.class, new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new ModelBeeHive(), 0){protected ResourceLocation getEntityTexture(Entity par1Entity){return new ResourceLocation("beemod:textures/entity/BeeHivee.png");}}) in main class under Init did it. That will crash your game - the main class also runs on the server, and Minecraft + Render classes are all CLIENT-side only. You need to put that code in your ClientProxy and call proxy.preInit(), proxy.init(), etc. from your main class. Also, 1.8.9 introduced the IRenderFactory so that you can register renderers during pre-init (why that's important, I still don't know, but it is the way forward now). Here is an example which you could have found by reading the links I posted earlier. http://i.imgur.com/NdrFdld.png[/img]
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.