Szymeon Posted October 10, 2018 Share Posted October 10, 2018 (edited) I made entity from this tutorial: https://www.youtube.com/watch?v=p6FFl3yN18M But i made model in blockbench bcs tabula has lags. In BlockBench i had to download plugin for export .java file, so i did it and its here: package com.Szymeon.knightsmod.entity.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelOrk extends ModelBase { //fields ModelRenderer e0; ModelRenderer e1; ModelRenderer e2; ModelRenderer e3; ModelRenderer e4; ModelRenderer e5; ModelRenderer e6; ModelRenderer e7; ModelRenderer e8; ModelRenderer e9; ModelRenderer e10; public ModelOrk() { this.textureWidth = 128; this.textureHeight = 128; this.e0 = new ModelRenderer(this, 0, 0); this.e0.addBox(-9F, 22F, -6F, 18, 12, 12, 1.0F); this.e1 = new ModelRenderer(this, 0, 0); this.e1.addBox(-6.5F, 17F, -5F, 13, 5, 9, 1.0F); this.e2 = new ModelRenderer(this, 0, 0); this.e2.addBox(-5F, 34F, -7.5F, 9, 11, 11, 1.0F); this.e3 = new ModelRenderer(this, 0, 0); this.e3.addBox(-12F, 16F, -3F, 3, 11, 4, 1.0F); this.e4 = new ModelRenderer(this, 0, 0); this.e4.addBox(-12F, 14F, -4F, 3, 2, 5, 1.0F); this.e5 = new ModelRenderer(this, 0, 0); this.e5.addBox(-13F, 26F, -4F, 5, 8, 6, 1.0F); this.e6 = new ModelRenderer(this, 0, 0); this.e6.addBox(8F, 26F, -4F, 5, 8, 6, 1.0F); this.e7 = new ModelRenderer(this, 0, 0); this.e7.addBox(9F, 14F, -4F, 3, 2, 5, 1.0F); this.e8 = new ModelRenderer(this, 0, 0); this.e8.addBox(9F, 16F, -3F, 3, 11, 4, 1.0F); this.e9 = new ModelRenderer(this, 0, 0); this.e9.addBox(1.5F, 0F, -3F, 6, 17, 5, 1.0F); this.e10 = new ModelRenderer(this, 0, 0); this.e10.addBox(-7.5F, 0F, -3F, 6, 17, 5, 1.0F); } @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { this.e0.render(f5); this.e1.render(f5); this.e2.render(f5); this.e3.render(f5); this.e4.render(f5); this.e5.render(f5); this.e6.render(f5); this.e7.render(f5); this.e8.render(f5); this.e9.render(f5); this.e10.render(f5); } public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.rotateAngleX = x; modelRenderer.rotateAngleY = y; modelRenderer.rotateAngleZ = z; } } But my entity looks like this: Should looks like this: Anyone know what's wrong? Edited October 14, 2018 by Szymeon Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted October 13, 2018 Share Posted October 13, 2018 Show your rendering code please Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
Szymeon Posted October 13, 2018 Author Share Posted October 13, 2018 package com.Szymeon.knightsmod.entity.render; import com.Szymeon.knightsmod.Main; import com.Szymeon.knightsmod.entity.EntityOrk; import com.Szymeon.knightsmod.entity.model.ModelOrk; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.util.ResourceLocation; public class RenderOrk extends RenderLiving<EntityOrk> { public static final ResourceLocation TEXTURES = new ResourceLocation(Main.MOD_ID + ":textures/entity/ork.png"); public RenderOrk(RenderManager manager) { super(manager, new ModelOrk(), 0.5F); } @Override protected ResourceLocation getEntityTexture(EntityOrk entity) { return TEXTURES; } @Override protected void applyRotations(EntityOrk entityLiving, float p_77043_2_, float rotationYaw, float partialTicks) { super.applyRotations(entityLiving, p_77043_2_, rotationYaw, partialTicks); } } Quote Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted October 13, 2018 Share Posted October 13, 2018 To me this looks like the entity is upside down. Maybe something is wrong with your modelling software and the way it exported the model? In any case you can rotate the entity by 180 degrees around the z axis to fix this. 1 Quote Link to comment Share on other sites More sharing options...
Szymeon Posted October 13, 2018 Author Share Posted October 13, 2018 i thought about it, but i didnt find that option in blockbench. And i dont understand how it's possible that the entity is rotated xd? Quote Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted October 13, 2018 Share Posted October 13, 2018 54 minutes ago, Szymeon said: but i didnt find that option in blockbench I mean rotate it in your mod, in your renderer. GlStateManager#rotate 1 Quote Link to comment Share on other sites More sharing options...
Szymeon Posted October 13, 2018 Author Share Posted October 13, 2018 Aaaaa, ok, thanks. btw. maybe u know how to place entity in a custom structure? I placed entity to structure and save .nbt file by mcedit. Sometimes he is in spawned structure but sometimes he isnt. do u know what i mean? Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted October 14, 2018 Share Posted October 14, 2018 Most models are created upside down because of how texture coordinates work. It’s easier for humans to create them upside down and then rotate them in the rendering. This is because texture coordinates (UV) have the V axis going down when pretty much every axis ever goes up. Here are a couple diagrams to illustrate this 1 Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
Szymeon Posted October 14, 2018 Author Share Posted October 14, 2018 Ok, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.