Posted March 17, 20214 yr So I am creating an entity that functions like an ender pearl, and I have created the entity and registered a renderer, but I cannot find anywhere to register the model. Here is my code: https://github.com/AyliasTheCoder/TheSecretsOfRetexturedMC
March 17, 20214 yr You don't need ro register your model at all..but if you want your entity model to be rendered on the screen you need to call that model render method somewhere, and the place to do that is your entity renderer: I suggest you take a look at how vanilla uses models inside entity renderers Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
March 17, 20214 yr Author 1 hour ago, Beethoven92 said: but if you want your entity model to be rendered on the screen you need to call that model render method somewhere I added this to my code, but it is still appearing untextured: final CorruptPearlModel model = new CorruptPearlModel(); @Override public void render(CorruptPearlEntity entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) { model.render(matrixStackIn, bufferIn.getBuffer(RenderType.getEntityTranslucent(getEntityTexture(entityIn))), packedLightIn, 0, 0, 0, 0, 1); } 1 hour ago, Beethoven92 said: I suggest you take a look at how vanilla uses models inside entity renderers I cannot seem to find an entity renderer or model for ender pearls
March 18, 20214 yr Author On 3/16/2021 at 8:47 PM, NullDev said: I added this to my code, but it is still appearing untextured: I also tried this, because vanilla seems to use matrixStackIn.push() but still nothing: final CorruptPearlModel model = new CorruptPearlModel(); @Override public void render(CorruptPearlEntity entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) { matrixStackIn.push() model.render(matrixStackIn, bufferIn.getBuffer(RenderType.getEntityTranslucent(getEntityTexture(entityIn))), packedLightIn, 0, 0, 0, 0, 1); }
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.