problems with transparent entity texture

Started by Heroi4k on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Jan 2023
Points:
367

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
problems with transparent entity texture

Hi all!
I have a problem with the transparent entity texture.
I made one part of the texture transparent, but in the game it is not transparent at all...
can you tell me how to fix this?

Active 1 week ago
Joined Jan 2024
Points:
154

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
  public class…
Fri, 01/12/2024 - 01:07

 



public class PlaceholderRenderer extends MobRenderer<PlaceholderEntity, ModelPlaceholder<PlaceholderEntity>> {
    public PlaceholderRenderer(EntityRendererProvider.Context context) {
        super(context, new ModelPlaceholder(context.bakeLayer(ModelPlaceholder.LAYER_LOCATION)), 0.5f);
        this.addLayer(new RenderLayer<PlaceholderEntity, ModelPlaceholder<PlaceholderEntity>>(this) {
            final ResourceLocation LAYER_TEXTURE = new ResourceLocation("modname:textures/entities/entitytexture.png");

            @Override
            public void render(PoseStack poseStack, MultiBufferSource bufferSource, int light, PlaceholderEntity entity, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) {
                VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.entityTranslucent(LAYER_TEXTURE));
                this.getParentModel().renderToBuffer(poseStack, vertexConsumer, light, LivingEntityRenderer.getOverlayCoords(entity, 0), 1, 1, 1, 1);
            }
        });
    }

    @Override
    public ResourceLocation getTextureLocation(PlaceholderEntity entity) {
        return new ResourceLocation("modname:textures/entities/entitytexture.png");
    }
}
Active 1 week ago
Joined Jan 2024
Points:
154

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
Cool it wasnt letting me…
Fri, 01/12/2024 - 01:09

Cool it wasnt letting me post so heres the explanation. I was having trouble with the default generated entity renderer code not allowing translucency. I eventually ended up with this and it works. So just lock your renderer code. Put this in there. And make all the placeholder names your entity.

Active 5 months ago
Joined May 2025
Points:
23

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
Where do i put the code tho  
Sat, 05/24/2025 - 23:24

Where do i put the code tho