Jump to content

terraya

Members
  • Posts

    161
  • Joined

  • Last visited

Everything posted by terraya

  1. Hello Dear Forum, i´ve got a small problem, the game start etc ... but after i try to rightclick on the ground to spawn my new Entity, my whole minecraft screen goes blue and game crashes. any ideas? the Crash Report: ---- Minecraft Crash Report ---- // I blame Dinnerbone. Time: 11.09.16 18:50 Description: Rendering entity in world java.lang.NullPointerException: Rendering entity in world at net.minecraft.client.renderer.entity.RendererLivingEntity.canRenderName(RendererLivingEntity.java:590) 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:509) 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:208) 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:1369) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111) 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(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) 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(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) package ArturFarid.BlockUpdate.entity; import net.minecraft.entity.monster.EntityMob; import net.minecraft.world.World; public class EntityModelTest extends EntityMob{ public EntityModelTest(World worldIn) { super(worldIn); } } package ArturFarid.BlockUpdate.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelTest extends ModelBase { //fields ModelRenderer leg2; ModelRenderer leg1; ModelRenderer body; ModelRenderer head; public ModelTest() { textureWidth = 64; textureHeight = 32; leg2 = new ModelRenderer(this, 10, 14); leg2.addBox(-1F, 0F, -3F, 3, 15, 3); leg2.setRotationPoint(4F, 9F, 1F); leg2.setTextureSize(64, 32); leg2.mirror = true; setRotation(leg2, 0F, 0F, 0F); leg1 = new ModelRenderer(this, 52, 10); leg1.addBox(-2F, 0F, -3F, 3, 15, 3); leg1.setRotationPoint(-5F, 9F, 1F); leg1.setTextureSize(64, 32); leg1.mirror = true; setRotation(leg1, 0F, 0F, 0F); body = new ModelRenderer(this, 0, 0); body.addBox(0F, 0F, 0F, 17, 20, ; body.setRotationPoint(-9F, -11F, -5F); body.setTextureSize(64, 32); body.mirror = true; setRotation(body, 0F, 0F, 0F); head = new ModelRenderer(this, 41, 0); head.addBox(-4F, -5F, -2F, 8, 5, 4); head.setRotationPoint(-1F, -11F, -2F); head.setTextureSize(64, 32); head.mirror = true; setRotation(head, 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(f, f1, f2, f3, f4, f5, entity); leg2.render(f5); leg1.render(f5); body.render(f5); head.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); this.leg1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.leg2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; this.leg1.rotateAngleY = 0.0F; this.leg2.rotateAngleY = 0.0F; } } and the render package ArturFarid.BlockUpdate.Render; import ArturFarid.BlockUpdate.model.ModelTest; import net.minecraft.client.Minecraft; 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 RenderModelTest extends RenderLiving{ public RenderModelTest() { super(Minecraft.getMinecraft().getRenderManager(), new ModelTest(), 0); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return new ResourceLocation("blockupdate", "textures/entity/ModelTest.png"); } }
  2. well im into it, im not perfect, started to code since 2 weeks, and im everyday trying and trying, at the end, now its working, my sword has +104attack damage(ofc its only a test) now i want to try out with the armor, thank you for your help, if it wont work, i would like to keep the theard and not to open a new one, have a nice day !
  3. i got it, eclispe just didnt find it, i created now my own tool.material, but when i try to register my weapon it wont be able to find the tool material ... public static ToolMaterial Test = EnumHelper.addToolMaterial("Test", 3, 1000, 20.0F, 100, 20); then after Wooden_Swordlv1 = new BlockUpdateSwordClass("Wooden_Swordlv1", ToolMaterial.Test); the problem is here, that he cant find the "ToolMaterial.Test" btw. thank you very much for your help ...
  4. Also: i created a new Material: public static ToolMaterial Test = EnumHelper.addToolMaterial("Test", 3, 1000, 20.0F, 100, 20); but the problem is , it cant find the "class" EnumHelper, i addet this line to my main class where i have got all my items. any idea? EDIT:I got this , well now lets see if i can get it into my sword
  5. Hello, thank you for answering me the first question, well the second one is, im creating new Custom Weapons/Armors and i want to add , that if you wear them, you get + 100hp/+100 armor etc...
  6. hello dear comunity, i ask me, how can i add more damage/armor/hp for a custom weapon/armor part, ofc i know how to do the basic thing but when i choose like "Tool.Material"EMERALD" , the max damage which can be is on "7" .. how can i create a tool material which allow me to add the max damage to 10000? (for example) another thing is , how to add armor/hp(lifepoints) can someone give me any hint please?
×
×
  • Create New...

Important Information

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