This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
generated from MeteorDevelopment/meteor-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
154 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/java/nekiplay/meteorplus/features/modules/combat/criticals/CriticalsModes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package nekiplay.meteorplus.features.modules.combat.criticals; | ||
|
||
public enum CriticalsModes { | ||
Smart, | ||
} |
60 changes: 60 additions & 0 deletions
60
src/main/java/nekiplay/meteorplus/features/modules/combat/criticals/CriticalsPlus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package nekiplay.meteorplus.features.modules.combat.criticals; | ||
|
||
import meteordevelopment.meteorclient.systems.modules.Categories; | ||
import meteordevelopment.meteorclient.systems.modules.Module; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
|
||
/* | ||
Not done | ||
*/ | ||
|
||
public class CriticalsPlus extends Module { | ||
public CriticalsPlus() { | ||
super(Categories.Combat, "Criticals+", "Better criticals module"); | ||
} | ||
|
||
public boolean shouldWaitForCrit(Entity target, boolean ignoreState) { | ||
if (!isActive() && !ignoreState) { | ||
return false; | ||
} | ||
|
||
if (!canCrit(false) || mc.player.getVelocity().y < -0.08) { | ||
return false; | ||
} | ||
|
||
float nextPossibleCrit = | ||
calculateTicksUntilNextCrit(); | ||
|
||
double gravity = 0.08; | ||
|
||
double ticksTillFall = (mc.player.getVelocity().y / gravity); | ||
|
||
double ticksTillCrit = Math.min(nextPossibleCrit, ticksTillFall); | ||
|
||
float hitProbability = 0.75f; | ||
|
||
float damageOnCrit = 0.5f * hitProbability; | ||
|
||
float damageLostWaiting = getCooldownDamageFactor(mc.player, (float)ticksTillCrit); | ||
|
||
return false; | ||
} | ||
|
||
public boolean canCrit(boolean ignoreOnGround) { | ||
return mc.player.isOnGround() && !ignoreOnGround; | ||
} | ||
|
||
private float calculateTicksUntilNextCrit() { | ||
float durationToWait = mc.player.getAttackCooldownProgressPerTick() * 0.9F - 0.5F; | ||
float waitedDuration = mc.player.getLastAttackedTime(); | ||
|
||
return Math.min((durationToWait - waitedDuration), 0f); | ||
} | ||
|
||
private float getCooldownDamageFactor(PlayerEntity player, float tickDelta) { | ||
float base = ((tickDelta + 0.5f) / player.getAttackCooldownProgressPerTick()); | ||
|
||
return Math.min((0.2f + base * base * 0.8f), 1.0f); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../modules/movement/speed/modes/Vulcan.java → ...s/movement/speed/modes/vulcan/Vulcan.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...n/java/nekiplay/meteorplus/features/modules/movement/speed/modes/vulcan/Vulcan_2_8_6.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package nekiplay.meteorplus.features.modules.movement.speed.modes.vulcan; | ||
|
||
import meteordevelopment.meteorclient.events.entity.player.JumpVelocityMultiplierEvent; | ||
import meteordevelopment.meteorclient.events.world.TickEvent; | ||
import meteordevelopment.meteorclient.utils.player.PlayerUtils; | ||
import nekiplay.meteorplus.features.modules.movement.speed.SpeedMode; | ||
import nekiplay.meteorplus.features.modules.movement.speed.SpeedModes; | ||
import nekiplay.meteorplus.utils.MovementUtils; | ||
import net.minecraft.entity.effect.StatusEffect; | ||
import net.minecraft.entity.effect.StatusEffects; | ||
import net.minecraft.util.math.Vec3d; | ||
|
||
public class Vulcan_2_8_6 extends SpeedMode { | ||
public Vulcan_2_8_6() { | ||
super(SpeedModes.Vulcan_2dot8dot6); | ||
} | ||
|
||
private int ticks = 0; | ||
private int speedLevel = 0; | ||
private boolean jumped = false; | ||
|
||
@Override | ||
public void onJump(JumpVelocityMultiplierEvent event) { | ||
ticks = 0; | ||
speedLevel = 0; | ||
jumped = true; | ||
if (mc.player.hasStatusEffect(StatusEffects.SPEED)) { | ||
speedLevel = mc.player.getStatusEffect(StatusEffects.SPEED).getAmplifier(); | ||
} | ||
} | ||
|
||
@Override | ||
public void onTickEventPre(TickEvent.Pre event) { | ||
if (jumped) { | ||
ticks++; | ||
if (ticks == 1) { | ||
MovementUtils.strafe(0.3355 * (1 + speedLevel * 0.3819)); | ||
} | ||
if (ticks == 2) { | ||
if (mc.player.isSprinting()) { | ||
MovementUtils.strafe(0.3284 * (1 + speedLevel * 0.355)); | ||
} | ||
} | ||
if (ticks == 4) { | ||
Vec3d vel = mc.player.getPos(); | ||
mc.player.setPos(vel.x, vel.y - 0.376, vel.z); | ||
} | ||
|
||
if (ticks == 6) { | ||
if (mc.player.speed > 0.298) { | ||
MovementUtils.strafe(0.298); | ||
} | ||
jumped = false; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters