L’image est couchée et continue de suivre le même chemin en fonction de la camera 😕
Problème résolu, je balance le code quand même si ça intéresse du monde 😉
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void playerRender(RenderPlayerEvent.Pre event) {
if (ClientProxy.CHATTING_PLAYERS_USERNAME.contains(event.entityPlayer.getDisplayName())) {
RenderManager renderManager = (RenderManager) ObfuscationReflectionHelper.getPrivateValue(Render.class,
event.renderer, 1);
float scaleFactor = 0.10F / 6.0F;
float yOffsetFactor = -0.05F;
GL11.glPushMatrix();
GL11.glTranslated(0, -1, 0);
GL11.glNormal3f(0.0F, 0.0F, 0.0F);
GL11.glRotatef(-renderManager.playerViewY, 0.0F, 0.1F, 0.0F);
GL11.glScalef(-scaleFactor, -scaleFactor, scaleFactor);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
Minecraft.getMinecraft().renderEngine
.bindTexture(new ResourceLocation("heimnormod", "textures/items/bulle.png"));
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(-16 + 0, -120 + 32, -10, 0.1F, 0.1F);
tessellator.addVertexWithUV(-16 + 32, -120 + 32, -10, 0.1F, 0.0F);
tessellator.addVertexWithUV(-16 + 32, -120 + 0, -10, 0.0F, 0.0F);
tessellator.addVertexWithUV(-16 + 0, -120 + 0, -10, 0.0F, 0.1F);
tessellator.draw();
GL11.glPopMatrix();
}
}
}