Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
Ignore only crits if player has levitation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekiplay committed Apr 23, 2024
1 parent 36b3023 commit 6aa4f3c
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@ jobs:
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: "1.20.4_1.0.8.3"
automatic_release_tag: "1.20.4_1.0.8.6"
prerelease: true
title: "1.20.4 | 1.0.8.5"
title: "1.20.4 | 1.0.8.6"
files: |
./build/libs/*.jar
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ yarn_mappings=1.20.4+build.2
loader_version=0.15.1

# Mod Properties
mod_version=1.0.8.5
mod_version=1.0.8.6
maven_group=nekiplay.meteorplus
archives_base_name=meteor-plus

Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
import nekiplay.meteorplus.features.modules.combat.criticals.CriticalsPlus;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity;
import nekiplay.meteorplus.features.modules.combat.AntiBotPlus;
import org.spongepowered.asm.mixin.Final;
@@ -59,6 +60,13 @@ public Entity getTarget() {
.build()
);

@Unique
private final Setting<Boolean> ignoreOnlyCritsOnLevitation = sgTiming.add(new BoolSetting.Builder()
.name("ignore-only-crits-on-levetation")
.defaultValue(true)
.build()
);

@Unique
private final Setting<Boolean> ignoreSmartDelayForShulkerBulletAndGhastCharge = sgTiming.add(new BoolSetting.Builder()
.name("ignore-delay-for-one-hit-entities")
@@ -106,7 +114,9 @@ public KillAuraMixin(Category category, String name, String description) {
@Inject(method = "delayCheck", at = @At("HEAD"), cancellable = true)
private void delayCheck(CallbackInfoReturnable<Boolean> cir) {
if (onlyCrits.get() && !CriticalsPlus.allowCrit()) {
cir.setReturnValue(false);
if (!ignoreOnlyCritsOnLevitation.get() && !mc.player.hasStatusEffect(StatusEffects.LEVITATION)) {
cir.setReturnValue(false);
}
}

float delay = (customDelay.get()) ? hitDelay.get() : 0.5f;

0 comments on commit 6aa4f3c

Please sign in to comment.