Upload files to "src/openonyx/features/combat"
This commit is contained in:
1 parent
f0f8a88f49
commit
0bd1c5dfc4
2 files changed
+477
No files matched your search
@@ -0,0 +1,101 @@
|
|||||||
|
package openonyx.features.combat;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Set;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.item.EntityArmorStand;
|
||||||
|
import net.minecraft.entity.passive.EntityAnimal;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import openonyx.core.MinecraftAccess;
|
||||||
|
import openonyx.events.EntityRelationUtils;
|
||||||
|
import openonyx.events.GeometryUtils;
|
||||||
|
|
||||||
|
public enum TargetScanner implements MinecraftAccess {
|
||||||
|
ANIMALS,
|
||||||
|
TEAMMATES,
|
||||||
|
PLAYERS,
|
||||||
|
MOBS;
|
||||||
|
|
||||||
|
private static boolean L(Entity entity, float f) {
|
||||||
|
if (f >= 360.0F) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
double d = entity.posX - mc.thePlayer.posX;
|
||||||
|
double e = entity.posZ - mc.thePlayer.posZ;
|
||||||
|
return Math.abs(MathHelper.wrapAngleTo180_float((float)Math.toDegrees(Math.atan2(-d, e)) - mc.thePlayer.rotationYaw)) <= f / 2.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean L(double d, float f, Set<TargetScanner> set) {
|
||||||
|
float g = f;
|
||||||
|
if (mc.thePlayer != null && mc.theWorld != null) {
|
||||||
|
double e = d * d;
|
||||||
|
Iterator iterator = mc.theWorld.loadedEntityList.iterator();
|
||||||
|
|
||||||
|
label49:
|
||||||
|
while (true) {
|
||||||
|
Iterator iterator1 = iterator;
|
||||||
|
|
||||||
|
while (iterator1.hasNext()) {
|
||||||
|
Entity entity;
|
||||||
|
if (!((entity = (Entity)iterator.next()) instanceof EntityLivingBase)) {
|
||||||
|
continue label49;
|
||||||
|
}
|
||||||
|
|
||||||
|
EntityLivingBase entityLivingBase;
|
||||||
|
if ((entityLivingBase = (EntityLivingBase)entity) == mc.thePlayer) {
|
||||||
|
iterator1 = iterator;
|
||||||
|
} else if (!entityLivingBase.isEntityAlive()) {
|
||||||
|
iterator1 = iterator;
|
||||||
|
} else if (entityLivingBase instanceof EntityArmorStand) {
|
||||||
|
iterator1 = iterator;
|
||||||
|
} else if (entityLivingBase instanceof EntityPlayer && ((EntityPlayer)entityLivingBase).isSpectator()) {
|
||||||
|
iterator1 = iterator;
|
||||||
|
} else if (!L(entityLivingBase, set)) {
|
||||||
|
iterator1 = iterator;
|
||||||
|
} else if (GeometryUtils.L(entityLivingBase) > e) {
|
||||||
|
iterator1 = iterator;
|
||||||
|
} else {
|
||||||
|
if (L(entityLivingBase, g)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator1 = iterator;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static TargetScanner[] L() {
|
||||||
|
TargetScanner[] targetScanners = new TargetScanner[4];
|
||||||
|
boolean bl = true;
|
||||||
|
targetScanners[0] = PLAYERS;
|
||||||
|
targetScanners[1] = TEAMMATES;
|
||||||
|
targetScanners[2] = MOBS;
|
||||||
|
targetScanners[3] = ANIMALS;
|
||||||
|
return targetScanners;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean L(EntityLivingBase entityLivingBase, Set<TargetScanner> set) {
|
||||||
|
if (entityLivingBase instanceof EntityPlayer) {
|
||||||
|
EntityPlayer entityPlayer;
|
||||||
|
if (AntiBot.L(entityPlayer = (EntityPlayer)entityLivingBase)) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return EntityRelationUtils.L(mc.thePlayer, entityPlayer) ? set.contains(TEAMMATES) : set.contains(PLAYERS);
|
||||||
|
}
|
||||||
|
} else if (entityLivingBase instanceof EntityAnimal) {
|
||||||
|
return set.contains(ANIMALS);
|
||||||
|
} else {
|
||||||
|
return entityLivingBase instanceof EntityLiving ? set.contains(MOBS) : false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,376 @@
|
|||||||
|
package openonyx.features.combat;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
import meteordevelopment.orbit.EventHandler;
|
||||||
|
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.network.Packet;
|
||||||
|
import net.minecraft.network.ThreadQuickExitException;
|
||||||
|
import net.minecraft.network.play.client.C02PacketUseEntity;
|
||||||
|
import net.minecraft.network.play.client.C02PacketUseEntity.Action;
|
||||||
|
import net.minecraft.network.play.server.S00PacketKeepAlive;
|
||||||
|
import net.minecraft.network.play.server.S01PacketJoinGame;
|
||||||
|
import net.minecraft.network.play.server.S07PacketRespawn;
|
||||||
|
import net.minecraft.network.play.server.S12PacketEntityVelocity;
|
||||||
|
import net.minecraft.network.play.server.S19PacketEntityStatus;
|
||||||
|
import net.minecraft.network.play.server.S27PacketExplosion;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import openonyx.configuration.internal.PacketDirection;
|
||||||
|
import openonyx.configuration.internal.PacketEvent;
|
||||||
|
import openonyx.configuration.internal.RunTickEvent;
|
||||||
|
import openonyx.configuration.internal.TickEvent;
|
||||||
|
import openonyx.configuration.internal.VelocityEvent;
|
||||||
|
import openonyx.configuration.internal.WorldChangeEvent;
|
||||||
|
import openonyx.features.Module;
|
||||||
|
import openonyx.features.ModuleCategory;
|
||||||
|
import openonyx.features.combat.internal.CombatMode;
|
||||||
|
import openonyx.history.ModeOption;
|
||||||
|
import openonyx.history.ModeSetting;
|
||||||
|
import openonyx.history.Setting;
|
||||||
|
import openonyx.history.internal.BooleanSetting;
|
||||||
|
import openonyx.history.internal.MultiSelectSetting;
|
||||||
|
import openonyx.history.internal.NumberSetting;
|
||||||
|
import openonyx.history.internal.RangeSetting;
|
||||||
|
import openonyx.utilities.MovementInputState;
|
||||||
|
|
||||||
|
public class Velocity extends Module {
|
||||||
|
public MultiSelectSetting<TargetScanner> targets;
|
||||||
|
public BooleanSetting pauseWhileBackpedaling;
|
||||||
|
public BooleanSetting releaseOnGround;
|
||||||
|
private volatile int A;
|
||||||
|
public BooleanSetting reduceKnockback;
|
||||||
|
public BooleanSetting releaseAfterReduce;
|
||||||
|
public NumberSetting reduceWindow;
|
||||||
|
public ModeSetting<ModeOption> modeSetting = L();
|
||||||
|
private boolean D;
|
||||||
|
private boolean c;
|
||||||
|
public BooleanSetting delayKnockback = new BooleanSetting("Delay knockback", true)
|
||||||
|
.describe("Holds the knockback after a melee hit so it lands a moment late")
|
||||||
|
.visibleWhen(Setting.BOOLEAN_SUPPLIER);
|
||||||
|
private volatile boolean k;
|
||||||
|
public RangeSetting t = RangeSetting.ofInt("Delay ticks", 3, 3, 1, 20)
|
||||||
|
.withSuffix("t")
|
||||||
|
.describe("How long the knockback is held before it is applied")
|
||||||
|
.visibleWhen(this.delayKnockback::isEnabled);
|
||||||
|
public NumberSetting chance;
|
||||||
|
private volatile boolean L;
|
||||||
|
private final List<Packet> packets;
|
||||||
|
private int m;
|
||||||
|
private static final double h = 10.0;
|
||||||
|
private boolean l;
|
||||||
|
private volatile boolean I;
|
||||||
|
private volatile boolean d;
|
||||||
|
private int i;
|
||||||
|
private static final double f = 3.0;
|
||||||
|
public BooleanSetting onlyWhileMoving;
|
||||||
|
public NumberSetting fov;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onEnable() {
|
||||||
|
this.m = this.L();
|
||||||
|
}
|
||||||
|
|
||||||
|
private EntityPlayer L(double d) {
|
||||||
|
Vec3 vec31 = mc.thePlayer.getPositionEyes(1.0F);
|
||||||
|
Vec3 vec3 = mc.thePlayer.getLook(1.0F);
|
||||||
|
vec3 = vec31.addVector(vec3.xCoord * dx, vec3.yCoord * dx, vec3.zCoord * dx);
|
||||||
|
EntityPlayer entityPlayer = null;
|
||||||
|
dx = Double.MAX_VALUE;
|
||||||
|
Iterator iterator = mc.theWorld.playerEntities.iterator();
|
||||||
|
|
||||||
|
label37:
|
||||||
|
while (true) {
|
||||||
|
Iterator iterator1 = iterator;
|
||||||
|
|
||||||
|
while (iterator1.hasNext()) {
|
||||||
|
EntityPlayer entityPlayer1;
|
||||||
|
if ((entityPlayer1 = (EntityPlayer)iterator.next()) == mc.thePlayer) {
|
||||||
|
iterator1 = iterator;
|
||||||
|
} else {
|
||||||
|
if (!entityPlayer1.isEntityAlive()) {
|
||||||
|
continue label37;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!entityPlayer1.isSpectator()) {
|
||||||
|
float fx = entityPlayer1.getCollisionBorderSize();
|
||||||
|
AxisAlignedBB axisAlignedBB = entityPlayer1.getEntityBoundingBox().expand(fx, fx, fx);
|
||||||
|
MovingObjectPosition movingObjectPosition = axisAlignedBB.calculateIntercept(vec31, vec3);
|
||||||
|
double e;
|
||||||
|
double g;
|
||||||
|
if (axisAlignedBB.isVecInside(vec31)) {
|
||||||
|
g = e = 0.0;
|
||||||
|
} else {
|
||||||
|
if (movingObjectPosition == null) {
|
||||||
|
continue label37;
|
||||||
|
}
|
||||||
|
|
||||||
|
g = e = vec31.distanceTo(movingObjectPosition.hitVec);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g < dx) {
|
||||||
|
entityPlayer = entityPlayer1;
|
||||||
|
dx = e;
|
||||||
|
}
|
||||||
|
continue label37;
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator1 = iterator;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return entityPlayer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ModeSetting<ModeOption> L() {
|
||||||
|
CombatMode combatMode = new CombatMode();
|
||||||
|
ModeOption[] modeOptions = new ModeOption[1];
|
||||||
|
boolean bl = true;
|
||||||
|
modeOptions[0] = combatMode;
|
||||||
|
return new ModeSetting<>("Mode", combatMode, modeOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean L(Packet<?> packet, PacketEvent packetEvent) {
|
||||||
|
if (packet instanceof S00PacketKeepAlive) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(packet instanceof S01PacketJoinGame) && !(packet instanceof S07PacketRespawn)) {
|
||||||
|
if (packet instanceof S19PacketEntityStatus s19PacketEntityStatus) {
|
||||||
|
boolean bl = mc.thePlayer != null && s19PacketEntityStatus.getEntityId() == mc.thePlayer.getEntityId() && s19PacketEntityStatus.getOpCode() == 2;
|
||||||
|
if (!bl) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.packets.add(packet);
|
||||||
|
packetEvent.cancel();
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
this.F();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void F() {
|
||||||
|
Velocity velocity1 = this;
|
||||||
|
velocity1.d = false;
|
||||||
|
if (!velocity1.packets.isEmpty()) {
|
||||||
|
ArrayList arrayList = new ArrayList<>(velocity1.packets);
|
||||||
|
velocity1.packets.clear();
|
||||||
|
NetHandlerPlayClient netHandlerPlayClient;
|
||||||
|
if ((netHandlerPlayClient = mc.getNetHandler()) != null) {
|
||||||
|
for (Packet packet : arrayList) {
|
||||||
|
try {
|
||||||
|
packet.processPacket(netHandlerPlayClient);
|
||||||
|
} catch (ThreadQuickExitException threadQuickExitException) {
|
||||||
|
} catch (Throwable throwable) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
private void onPacket(PacketEvent packetEvent) {
|
||||||
|
if (packetEvent.getPacketDirection() == PacketDirection.INCOMING) {
|
||||||
|
if (!packetEvent.isCancelled()) {
|
||||||
|
Packet packet = packetEvent.getPacket();
|
||||||
|
if (!this.d || !this.L(packet, packetEvent)) {
|
||||||
|
if (packet instanceof S12PacketEntityVelocity s12PacketEntityVelocity) {
|
||||||
|
if (mc.thePlayer != null && s12PacketEntityVelocity.getEntityID() == mc.thePlayer.getEntityId()) {
|
||||||
|
if (this.delayKnockback.isEnabled()) {
|
||||||
|
if (!JumpReset.I() || !mc.thePlayer.onGround) {
|
||||||
|
if (this.k) {
|
||||||
|
if (this.L) {
|
||||||
|
this.L = false;
|
||||||
|
} else {
|
||||||
|
this.packets.add(s12PacketEntityVelocity);
|
||||||
|
this.A = 0;
|
||||||
|
this.d = true;
|
||||||
|
packetEvent.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (packet instanceof S19PacketEntityStatus) {
|
||||||
|
S19PacketEntityStatus s19PacketEntityStatus;
|
||||||
|
if ((s19PacketEntityStatus = (S19PacketEntityStatus)packet).getOpCode() == 2
|
||||||
|
&& mc.thePlayer != null
|
||||||
|
&& s19PacketEntityStatus.getEntityId() == mc.thePlayer.getEntityId()) {
|
||||||
|
this.k = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
S27PacketExplosion s27PacketExplosion;
|
||||||
|
if (packet instanceof S27PacketExplosion
|
||||||
|
&& (
|
||||||
|
(s27PacketExplosion = (S27PacketExplosion)packet).func_149149_c() != 0.0F
|
||||||
|
|| s27PacketExplosion.func_149144_d() != 0.0F
|
||||||
|
|| s27PacketExplosion.func_149147_e() != 0.0F
|
||||||
|
)) {
|
||||||
|
this.L = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean I() {
|
||||||
|
if (ThreadLocalRandom.current().nextDouble(100.0) >= this.chance.getValue()) {
|
||||||
|
return false;
|
||||||
|
} else if (this.pauseWhileBackpedaling.isEnabled() && mc.gameSettings.keyBindBack.isKeyDown()) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return !this.I ? false : !this.onlyWhileMoving.isEnabled() || new MovementInputState(mc.thePlayer.movementInput).i();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDisable() {
|
||||||
|
this.l();
|
||||||
|
this.l = false;
|
||||||
|
this.c = false;
|
||||||
|
this.i = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void l() {
|
||||||
|
this.m = this.L();
|
||||||
|
if (this.d) {
|
||||||
|
this.F();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.k = (boolean)(this.A = 0);
|
||||||
|
this.L = false;
|
||||||
|
this.D = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
private void onWorldChange(WorldChangeEvent worldChangeEvent) {
|
||||||
|
this.h();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void h() {
|
||||||
|
this.packets.clear();
|
||||||
|
this.d = false;
|
||||||
|
this.A = 0;
|
||||||
|
this.k = false;
|
||||||
|
this.L = false;
|
||||||
|
this.l = false;
|
||||||
|
this.i = 0;
|
||||||
|
this.c = false;
|
||||||
|
this.D = false;
|
||||||
|
this.I = false;
|
||||||
|
this.m = this.L();
|
||||||
|
}
|
||||||
|
|
||||||
|
private int L() {
|
||||||
|
return this.t.randomInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Velocity() {
|
||||||
|
super("Velocity", "Delays and counter-hit reduces the velocity received", ModuleCategory.COMBAT);
|
||||||
|
this.releaseOnGround = new BooleanSetting("Release on ground", true)
|
||||||
|
.describe("Stops holding the moment you touch the ground")
|
||||||
|
.visibleWhen(Setting.BOOLEAN_SUPPLIER);
|
||||||
|
this.releaseAfterReduce = new BooleanSetting("Release after reduce", false)
|
||||||
|
.describe("Stops holding once a counter-hit has reduced the knockback")
|
||||||
|
.visibleWhen(Setting.BOOLEAN_SUPPLIER);
|
||||||
|
this.reduceKnockback = new BooleanSetting("Reduce knockback", true)
|
||||||
|
.describe("Counter-hits the attacker in your crosshair to cut the knockback you take")
|
||||||
|
.visibleWhen(Setting.BOOLEAN_SUPPLIER);
|
||||||
|
this.reduceWindow = new NumberSetting("Reduce window", 5.0, 0.0, 20.0, 1.0)
|
||||||
|
.withSuffix("t")
|
||||||
|
.describe("How long after knockback the counter-hit may still fire")
|
||||||
|
.visibleWhen(this.reduceKnockback::isEnabled);
|
||||||
|
this.chance = new NumberSetting("Chance", 100.0, 0.0, 100.0, 1.0).withSuffix("%").describe("Chance to reduce each incoming knockback");
|
||||||
|
this.fov = new NumberSetting("FOV", 360.0, 0.0, 360.0, 1.0).withSuffix("°").visibleWhen(Setting.BOOLEAN_SUPPLIER);
|
||||||
|
this.pauseWhileBackpedaling = new BooleanSetting("Pause while backpedaling", false).visibleWhen(Setting.BOOLEAN_SUPPLIER);
|
||||||
|
this.onlyWhileMoving = new BooleanSetting("Only while moving", false).visibleWhen(Setting.BOOLEAN_SUPPLIER);
|
||||||
|
TargetScanner[] targetScanners = new TargetScanner[2];
|
||||||
|
boolean bl = true;
|
||||||
|
targetScanners[0] = TargetScanner.PLAYERS;
|
||||||
|
targetScanners[1] = TargetScanner.TEAMMATES;
|
||||||
|
this.targets = new MultiSelectSetting<>("Targets", TargetScanner.class, targetScanners);
|
||||||
|
this.packets = new CopyOnWriteArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
private void onVelocity(VelocityEvent velocityEvent) {
|
||||||
|
if (this.L) {
|
||||||
|
this.L = false;
|
||||||
|
} else {
|
||||||
|
this.l = true;
|
||||||
|
this.c = this.reduceKnockback.isEnabled();
|
||||||
|
this.i = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
private void onRunTick(RunTickEvent runTickEvent) {
|
||||||
|
if (mc.thePlayer != null && mc.theWorld != null) {
|
||||||
|
this.I = TargetScanner.L(10.0, this.fov.getFloat(), this.targets.getValue());
|
||||||
|
if (this.l && ++this.i >= this.reduceWindow.getInt()) {
|
||||||
|
this.c = this.l = false;
|
||||||
|
this.i = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.pauseWhileBackpedaling.isEnabled() && mc.gameSettings.keyBindBack.isKeyDown()) {
|
||||||
|
this.l();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.I) {
|
||||||
|
this.l();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.d) {
|
||||||
|
this.A++;
|
||||||
|
if (this.A >= this.m
|
||||||
|
|| this.releaseOnGround.isEnabled() && mc.thePlayer.onGround
|
||||||
|
|| this.releaseAfterReduce.isEnabled() && this.D
|
||||||
|
|| mc.thePlayer.isInWater()
|
||||||
|
|| mc.thePlayer.isInLava()) {
|
||||||
|
this.l();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.h();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
private void onTick(TickEvent tickEvent) {
|
||||||
|
if (this.c && this.l) {
|
||||||
|
if (mc.thePlayer != null && mc.theWorld != null) {
|
||||||
|
EntityPlayer entityPlayer;
|
||||||
|
if ((entityPlayer = this.L(3.0)) != null) {
|
||||||
|
if (this.I()) {
|
||||||
|
if (mc.thePlayer.isSprinting()) {
|
||||||
|
if (!mc.thePlayer.isInWeb) {
|
||||||
|
if (KillAura.isAttackReady()) {
|
||||||
|
mc.thePlayer.swingItem();
|
||||||
|
mc.getNetHandler().addToSendQueue(new C02PacketUseEntity(entityPlayer, Action.ATTACK));
|
||||||
|
mc.thePlayer.motionX *= 0.6;
|
||||||
|
mc.thePlayer.motionZ *= 0.6;
|
||||||
|
mc.thePlayer.setSprinting(false);
|
||||||
|
this.D = true;
|
||||||
|
this.c = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user