Рендер отверстия от пули

Версия Minecraft
1.7.10
222
5
28
Кратно. Есть оружие. Оружие стреляет пулями. Пуля -
Java:
SimpleBulletClass extends EntityThrowable implements IEntityAdditionalSpawnData
Сервер спавнит её, далее в этом классе вызывается метод protected void onImpact(MovingObjectPosition pos) при столкновении с объектом.

В нём происходит определение куда именно попала пуля, если в игрока - то наносим урон и т.д., а если в блок... А если в блок, то на клиентской стороне вызываем следующий код:
Java:
EffectManager.getInstance().spawnBulletHole(this.worldObj, pos.hitVec.xCoord, pos.hitVec.yCoord, pos.hitVec.zCoord, pos.sideHit);

Java:
public final class EffectManager {

    private static EffectManager instance = new EffectManager();

    private EffectManager() {
    }

    public static EffectManager getInstance() {
        return instance;
    }
   
    //...

    public void spawnBulletHole(World world, double x, double y, double z, int side) {
        Minecraft.getMinecraft().effectRenderer.addEffect(new BulletHoleFX(world, x, y, z, side));
    }

}

Где new BulletHoleFX(world, x, y, z, side) это есть:

Java:
public class BulletHoleFX extends EntityFX {

    private static final ResourceLocation textureBulletHole = new ResourceLocation(Reference.MODID, "textures/bullet_hole.png");
    private final int side;

    BulletHoleFX(World world, double x, double y, double z, int side) {
        super(world, x, y, z);
        this.motionX = this.motionY = this.motionZ = 0.0D;
        this.side = side;
        this.particleMaxAge = 600;
    }

    @Override
    public void renderParticle(Tessellator tessellator, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_) {
        float f6 = ((float) this.particleAge + p_70539_2_) / (float) this.particleMaxAge;
        f6 *= f6;
        float f7 = 2.0F - f6 * 2.0F;

        if (f7 > 1.0F) {
            f7 = 1.0F;
        }

        Entity player = Minecraft.getMinecraft().thePlayer;
        interpPosX = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double) p_70539_2_;
        interpPosY = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double) p_70539_2_;
        interpPosZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double) p_70539_2_;
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_LIGHTING);
        float f8 = 0.125F;
        float f9 = (float) (this.posX - interpPosX);
        float f10 = (float) (this.posY - interpPosY);
        float f11 = (float) (this.posZ - interpPosZ);
        float f12 = this.worldObj.getLightBrightness(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));

        if (particleAge % 50 == 0) {
            System.out.println("f12: " + f12);
        }

        Minecraft.getMinecraft().getTextureManager().bindTexture(textureBulletHole);
        GL11.glEnable(GL11.GL_BLEND);
        tessellator.startDrawingQuads();
        switch (this.side) {
            case 0:
                tessellator.addVertexWithUV((double) (f9 - f8), (double) f10 - 0.009999999776482582D, (double) (f11 - f8), 0.0D, f7);
                tessellator.addVertexWithUV((double) (f9 + f8), (double) f10 - 0.009999999776482582D, (double) (f11 - f8), f7, f7);
                tessellator.addVertexWithUV((double) (f9 + f8), (double) f10 - 0.009999999776482582D, (double) (f11 + f8), f7, 0.0D);
                tessellator.addVertexWithUV((double) (f9 - f8), (double) f10 - 0.009999999776482582D, (double) (f11 + f8), 0.0D, 0.0D);
                break;
            case 1:
                tessellator.addVertexWithUV((double) (f9 - f8), (double) f10 + 0.009999999776482582D, (double) (f11 + f8), 0.0D, 0.0D);
                tessellator.addVertexWithUV((double) (f9 + f8), (double) f10 + 0.009999999776482582D, (double) (f11 + f8), f7, 0.0D);
                tessellator.addVertexWithUV((double) (f9 + f8), (double) f10 + 0.009999999776482582D, (double) (f11 - f8), f7, f7);
                tessellator.addVertexWithUV((double) (f9 - f8), (double) f10 + 0.009999999776482582D, (double) (f11 - f8), 0.0D, f7);
                break;
            case 2:
                tessellator.addVertexWithUV((double) (f9 - f8), (double) (f10 + f8), (double) (f11 - 0.01F), 0.0D, f7);
                tessellator.addVertexWithUV((double) (f9 + f8), (double) (f10 + f8), (double) (f11 - 0.01F), f7, f7);
                tessellator.addVertexWithUV((double) (f9 + f8), (double) (f10 - f8), (double) (f11 - 0.01F), f7, 0.0D);
                tessellator.addVertexWithUV((double) (f9 - f8), (double) (f10 - f8), (double) (f11 - 0.01F), 0.0D, 0.0D);
                break;
            case 3:
                tessellator.addVertexWithUV((double) (f9 - f8), (double) (f10 - f8), (double) (f11 + 0.01F), 0.0D, 0.0D);
                tessellator.addVertexWithUV((double) (f9 + f8), (double) (f10 - f8), (double) (f11 + 0.01F), f7, 0.0D);
                tessellator.addVertexWithUV((double) (f9 + f8), (double) (f10 + f8), (double) (f11 + 0.01F), f7, f7);
                tessellator.addVertexWithUV((double) (f9 - f8), (double) (f10 + f8), (double) (f11 + 0.01F), 0.0D, f7);
                break;
            case 4:
                tessellator.addVertexWithUV((double) (f9 - 0.01F), (double) (f10 + f8), (double) (f11 + f8), f7, f7);
                tessellator.addVertexWithUV((double) (f9 - 0.01F), (double) (f10 + f8), (double) (f11 - f8), f7, 0.0D);
                tessellator.addVertexWithUV((double) (f9 - 0.01F), (double) (f10 - f8), (double) (f11 - f8), 0.0D, 0.0D);
                tessellator.addVertexWithUV((double) (f9 - 0.01F), (double) (f10 - f8), (double) (f11 + f8), 0.0D, f7);
                break;
            case 5:
                tessellator.addVertexWithUV((double) (f9 + 0.01F), (double) (f10 - f8), (double) (f11 + f8), 0.0D, f7);
                tessellator.addVertexWithUV((double) (f9 + 0.01F), (double) (f10 - f8), (double) (f11 - f8), 0.0D, 0.0D);
                tessellator.addVertexWithUV((double) (f9 + 0.01F), (double) (f10 + f8), (double) (f11 - f8), f7, 0.0D);
                tessellator.addVertexWithUV((double) (f9 + 0.01F), (double) (f10 + f8), (double) (f11 + f8), f7, f7);
        }

        tessellator.draw();
        GL11.glDisable(GL11.GL_BLEND);
        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glPopMatrix();
    }

    @Override
    public void onUpdate() {
        if (this.particleAge++ >= this.particleMaxAge) {
            this.setDead();
        }
    }

    @Override
    public int getFXLayer() {
        return 3;
    }

}

Видео с демонстрацией моей криворукости в копипасте:


P.S. В рендере не силён, код кое где взял, просто деобфусцировал и декомпельнул. Не могу понять, почему не работает. Есть подозрения, что кривая декомпеляция, ибо одна из переменных, а точнее f12 не используется в коде нигде после её вычисления, так же было и с f7, но я нашёл куда её пристроить.

Вопрос в том, как пофиксить, чтобы рисовало дырки там, куда действительно направлен прицел.

Исходный код от куда брал:

Создание эффекта: Minecraft.getMinecraft().effectRenderer.addEffect(new BulletHoleFX(world, mopblock.hitVec.xCoord, mopblock.hitVec.yCoord, mopblock.hitVec.zCoord, mopblock.sideHit)); mopblock - MovingObjectPosition
[Java] import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - Pastebin.com
 
Сверху