you should add: killaura.target != null && autoblock.isEnabled()
but nothing works for me
is this right?
public void renderItemInFirstPerson(float partialTicks)
{
float f = 1.0F - (this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTicks);
AbstractClientPlayer abstractclientplayer = this.mc.thePlayer;
float f1 = abstractclientplayer.getSwingProgress(partialTicks);
float f2 = abstractclientplayer.prevRotationPitch + (abstractclientplayer.rotationPitch - abstractclientplayer.prevRotationPitch) * partialTicks;
float f3 = abstractclientplayer.prevRotationYaw + (abstractclientplayer.rotationYaw - abstractclientplayer.prevRotationYaw) * partialTicks;
this.func_178101_a(f2, f3);
this.func_178109_a(abstractclientplayer);
this.func_178110_a((EntityPlayerSP)abstractclientplayer, partialTicks);
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
if (this.itemToRender != null)
{
if (this.itemToRender.getItem() == Items.filled_map)
{
this.renderItemMap(abstractclientplayer, f2, f, f1);
}
else if (abstractclientplayer.getItemInUseCount() > 0)
{
EnumAction enumaction = this.itemToRender.getItemUseAction();
switch (enumaction)
{
case NONE:
this.transformFirstPersonItem(f, 0.0F);
break;
case EAT:
case DRINK:
this.func_178104_a(abstractclientplayer, partialTicks);
this.transformFirstPersonItem(f, 0.0F);
break;
case BLOCK:
if(KillAura.Enabled && BedwarsClient.instance.settingsManager.getSettingByName("Autoblock").getValBoolean()) {
this.transformFirstPersonItem(f, 0.0F);
this.func_178103_d();
}
if(BedwarsClient.instance.settingsManager.getSettingByName("Block Mode").getValString().equalsIgnoreCase("1.8")){
this.transformFirstPersonItem(f, 0.0F);
this.func_178103_d();
break;
}
if(BedwarsClient.instance.settingsManager.getSettingByName("Block Mode").getValString().equalsIgnoreCase("1.7")){
this.transformFirstPersonItem(0.2F, f1);
this.func_178103_d();
GlStateManager.translate(-0.5F, 0.0F, 0.0F);
break;
}
if(BedwarsClient.instance.settingsManager.getSettingByName("Block Mode").getValString().equalsIgnoreCase("Exhibition")){
float var15 = MathHelper.sin(MathHelper.sqrt_float(f1) * (float) Math.PI);
this.transformFirstPersonItem(f / 2.5f, 0.0f);
GL11.glTranslatef(0.1f, 0.3f, -0.1f);
GL11.glRotated(-var15 * 20.0f, var15 / 2.0f, 0.0, 9.0);
GL11.glRotated(-var15 * 50.0f, 0.8f, var15 / 2.0f, 0.0);
this.func_178103_d();
break;
}
if(BedwarsClient.instance.settingsManager.getSettingByName("Block Mode").getValString().equalsIgnoreCase("Swing")){
float swingProgress = 0;
final float convertedProgress = MathHelper.sin(MathHelper.sqrt_float(swingProgress) * (float) Math.PI);
this.transformFirstPersonItem(-0.25F, 1.0F + convertedProgress / 10.0F);
GL11.glRotated(-convertedProgress * 25.0F, 1.0F, 0.0F, 0.0F);
this.func_178103_d();
break;
}
case BOW:
this.transformFirstPersonItem(f, 0.0F);
this.func_178098_a(partialTicks, abstractclientplayer);
}
}
else
{
this.func_178105_d(f1);
this.transformFirstPersonItem(f, f1);
}
this.renderItem(abstractclientplayer, this.itemToRender, ItemCameraTransforms.TransformType.FIRST_PERSON);
}
else if (!abstractclientplayer.isInvisible())
{
this.func_178095_a(abstractclientplayer, f, f1);
}
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
RenderHelper.disableStandardItemLighting();
}