Posted May 20, 20205 yr Hey, My entity mimics the block below it: Spoiler @OnlyIn(Dist.CLIENT) public class BugRenderer extends EntityRenderer<BugEntity> { public static final ResourceLocation BUG_TEXTURE = new ResourceLocation(BinaryMod.MOD_ID, "textures/entity/bug.png"); public BugRenderer(EntityRendererManager renderManagerIn) { super(renderManagerIn); } @Override public void render(BugEntity entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) { super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); renderBlockState(entityIn.mimic, matrixStackIn, bufferIn, packedLightIn); } private void renderBlockState(BlockState stateIn, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) { Minecraft.getInstance().getBlockRendererDispatcher().renderBlock(stateIn, matrixStackIn, bufferIn, packedLightIn, OverlayTexture.NO_OVERLAY, WHAT SHOULD I PUT HERE); } @Override public ResourceLocation getEntityTexture(BugEntity entity) { return BUG_TEXTURE; } } BlockRender#renderBlock is deprecated, I have to add an IModelData. What should I put for a basic block ? Thanks in advance. Edited May 20, 20205 yr by QuantumSoul
May 21, 20205 yr Author I change my entity in its goals but the render function is always called with the old value. I guess I should send a packet but Im not sure
May 21, 20205 yr Author 1 hour ago, diesieben07 said: If it's your own entity you can look into EntityDataManager, it's vanilla's system to keep client entities up to date. Thank you :)
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.