added totems to antioverlay

This commit is contained in:
Dewy REDACTED 2020-04-20 14:39:51 +01:00
parent cc8eb34d4d
commit ce660d0b7a
No known key found for this signature in database
GPG Key ID: 0CAA84A783228505
1 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import me.zeroeightsix.kami.module.modules.misc.CameraClip;
import me.zeroeightsix.kami.module.modules.player.Freecam;
import me.zeroeightsix.kami.module.modules.player.NoEntityTrace;
import me.zeroeightsix.kami.module.modules.render.AntiFog;
import me.zeroeightsix.kami.module.modules.render.AntiOverlay;
import me.zeroeightsix.kami.module.modules.render.Brightness;
import me.zeroeightsix.kami.module.modules.render.NoHurtCam;
import net.minecraft.block.state.IBlockState;
@ -16,6 +17,7 @@ import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.RayTraceResult;
@ -48,6 +50,13 @@ public class MixinEntityRenderer {
return world.rayTraceBlocks(start, end);
}
@Inject(method = "displayItemActivation", at = @At(value = "HEAD"), cancellable = true)
public void displayItemActivation(ItemStack stack, CallbackInfo callbackInfo) {
if (MODULE_MANAGER.getModuleT(AntiOverlay.class).isEnabled() && MODULE_MANAGER.getModuleT(AntiOverlay.class).totems.getValue()) {
callbackInfo.cancel();
}
}
@Inject(method = "setupFog", at = @At(value = "HEAD"), cancellable = true)
public void setupFog(int startCoords, float partialTicks, CallbackInfo callbackInfo) {
if (AntiFog.enabled() && AntiFog.mode.getValue() == AntiFog.VisionMode.NOFOG)