Skip to content

Commit

Permalink
multiplaycheck, fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Sep 18, 2023
1 parent 8c829c6 commit 5cd9ccc
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 92 deletions.
22 changes: 15 additions & 7 deletions NightX.iws
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
<component name="ChangeListManager">
<list default="true" id="af093b99-5942-419c-869b-8b2d7cb4dd2a" name="変更" comment="">
<change beforePath="$PROJECT_DIR$/NightX.iws" beforeDir="false" afterPath="$PROJECT_DIR$/NightX.iws" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/item/MixinItemRenderer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/item/MixinItemRenderer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/event/Events.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/event/Events.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/combat/KillAura.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/combat/KillAura.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/Speed.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/Speed.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/aac/AACHop3313.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/block/MixinBlockLadder.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/block/MixinBlockLadder.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/block/MixinBlockLilyPad.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/block/MixinBlockLilyPad.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/entity/MixinEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/entity/MixinEntity.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/entity/MixinEntityLivingBase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/entity/MixinEntityLivingBase.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/item/MixinItemBlock.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/item/MixinItemBlock.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
Expand Down Expand Up @@ -174,7 +182,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStart" />
<option name="VM_PARAMETERS" value="-Dfml.coreMods.load=net.aspw.client.injection.forge.TransformerLoader -Ddev-mode" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down Expand Up @@ -249,7 +257,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStart" />
<option name="VM_PARAMETERS" value="-Dfml.coreMods.load=net.aspw.client.injection.forge.TransformerLoader -Ddev-mode" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down Expand Up @@ -291,7 +299,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -306,7 +314,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down Expand Up @@ -351,7 +359,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -366,7 +374,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aspw/client/event/Events.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class UpdateModelEvent(val player: EntityPlayer, val model: ModelPlayer) : Event
*
* @param motion jump motion (y motion)
*/
class JumpEvent(var motion: Float) : CancellableEvent()
class JumpEvent(var motion: Float, var yaw: Float) : CancellableEvent()

/**
* Called when user press a key once
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ class KillAura : Module() {
markEntity = entity

// Attack target
if (Protocol.versionSlider.sliderVersion.getName() != "1.8.x")
if (!mc.isIntegratedServerRunning && Protocol.versionSlider.sliderVersion.getName() != "1.8.x")
mc.netHandler.addToSendQueue(C02PacketUseEntity(entity, C02PacketUseEntity.Action.ATTACK))

when (swingValue.get().lowercase(Locale.getDefault())) {
Expand All @@ -816,7 +816,7 @@ class KillAura : Module() {
"packet" -> mc.netHandler.addToSendQueue(C0APacketAnimation())
}

if (Protocol.versionSlider.sliderVersion.getName() == "1.8.x")
if (!mc.isIntegratedServerRunning && Protocol.versionSlider.sliderVersion.getName() == "1.8.x")
mc.netHandler.addToSendQueue(C02PacketUseEntity(entity, C02PacketUseEntity.Action.ATTACK))

if (checkSprintValue.get())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class Speed : Module() {
AACGround(),
AACGround2(),
AACHop350(),
AACHop3313(),
AACHop438(),
AACYPort(),
AACYPort2(),
Expand Down Expand Up @@ -204,7 +203,6 @@ class Speed : Module() {
"Ground",
"Ground2",
"Hop3.5.0",
"Hop3.3.13",
"Hop4.3.8",
"YPort",
"YPort2"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.aspw.client.injection.forge.mixins.block;

import net.aspw.client.protocol.Protocol;
import net.aspw.client.util.MinecraftInstance;
import net.minecraft.block.BlockLadder;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
Expand All @@ -14,7 +15,7 @@ public abstract class MixinBlockLadder extends MixinBlock {

@ModifyConstant(method = "setBlockBoundsBasedOnState", constant = @Constant(floatValue = 0.125F))
private float ViaVersion_LadderBB(float constant) {
if (!Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x"))
if (!MinecraftInstance.mc.isIntegratedServerRunning() && !Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x"))
return 0.1875F;
return 0.125F;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.aspw.client.injection.forge.mixins.block;

import net.aspw.client.protocol.Protocol;
import net.aspw.client.util.MinecraftInstance;
import net.minecraft.block.BlockBush;
import net.minecraft.block.BlockLilyPad;
import net.minecraft.block.state.IBlockState;
Expand All @@ -22,7 +23,7 @@ public abstract class MixinBlockLilyPad extends BlockBush {
*/
@Overwrite
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) {
if (!Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x"))
if (!MinecraftInstance.mc.isIntegratedServerRunning() && !Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x"))
return new AxisAlignedBB((double) pos.getX() + 0.0625D, (double) pos.getY() + 0.0D, (double) pos.getZ() + 0.0625D, (double) pos.getX() + 0.9375D, (double) pos.getY() + 0.09375D, (double) pos.getZ() + 0.9375D);
return new AxisAlignedBB((double) pos.getX() + 0.0D, (double) pos.getY() + 0.0D, (double) pos.getZ() + 0.0D, (double) pos.getX() + 1.0D, (double) pos.getY() + 0.015625D, (double) pos.getZ() + 1.0D);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,12 @@ private void getCollisionBorderSize(final CallbackInfoReturnable<Float> callback
final HitBox hitBoxes = Objects.requireNonNull(Client.moduleManager.getModule(HitBox.class));

if (hitBoxes.getState() && EntityUtils.isSelected(((Entity) ((Object) this)), true)) {
if (!Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x")) {
if (!MinecraftInstance.mc.isIntegratedServerRunning() && !Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x")) {
callbackInfoReturnable.setReturnValue(hitBoxes.getSizeValue().get());
} else {
callbackInfoReturnable.setReturnValue(0.1F + hitBoxes.getSizeValue().get());
}
} else if (!Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x")) {
} else if (!MinecraftInstance.mc.isIntegratedServerRunning() && !Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x")) {
callbackInfoReturnable.setReturnValue(0.0F);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.aspw.client.features.module.impl.visual.AntiBlind;
import net.aspw.client.features.module.impl.visual.SilentView;
import net.aspw.client.protocol.Protocol;
import net.aspw.client.util.MinecraftInstance;
import net.aspw.client.util.MovementUtils;
import net.aspw.client.util.RotationUtils;
import net.minecraft.block.Block;
Expand Down Expand Up @@ -215,7 +216,7 @@ protected float updateDistance(float p_1101461, float p_1101462) {
*/
@Overwrite
protected void jump() {
final JumpEvent jumpEvent = new JumpEvent(this.getJumpUpwardsMotion());
final JumpEvent jumpEvent = new JumpEvent(this.getJumpUpwardsMotion(), this.rotationYaw);
Client.eventManager.callEvent(jumpEvent);
if (jumpEvent.isCancelled())
return;
Expand All @@ -228,12 +229,12 @@ protected void jump() {
if (this.isSprinting()) {
final KillAura killAura = Objects.requireNonNull(Client.moduleManager.getModule(KillAura.class));
final Sprint sprint = Objects.requireNonNull(Client.moduleManager.getModule(Sprint.class));
float yaw = this.rotationYaw;
if (killAura.getState() && killAura.getMovementFix().get() && killAura.getTarget() != null)
yaw = RotationUtils.targetRotation != null ? RotationUtils.targetRotation.getYaw() : (RotationUtils.serverRotation != null ? RotationUtils.serverRotation.getYaw() : yaw);
else if (sprint.getState() && sprint.getAllDirectionsValue().get())
yaw = MovementUtils.getRawDirection();
float f = yaw * 0.017453292F;
if (killAura.getState() && killAura.getMovementFix().get() && killAura.getTarget() != null) {
jumpEvent.cancelEvent();
jumpEvent.setYaw(RotationUtils.targetRotation != null ? RotationUtils.targetRotation.getYaw() : (RotationUtils.serverRotation != null ? RotationUtils.serverRotation.getYaw() : this.rotationYaw));
} else if (sprint.getState() && sprint.getAllDirectionsValue().get())
jumpEvent.setYaw(MovementUtils.getRawDirection());
float f = jumpEvent.getYaw() * ((float) Math.PI / 180F);
this.motionX -= MathHelper.sin(f) * 0.2F;
this.motionZ += MathHelper.cos(f) * 0.2F;
}
Expand Down Expand Up @@ -268,7 +269,7 @@ private void isPotionActive(Potion p_isPotionActive_1_, final CallbackInfoReturn

@ModifyConstant(method = "onLivingUpdate", constant = @Constant(doubleValue = 0.005D))
private double ViaVersion_MovementThreshold(double constant) {
if (!Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x"))
if (!MinecraftInstance.mc.isIntegratedServerRunning() && !Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x"))
return 0.003D;
return 0.005D;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn,
this.block.onBlockPlacedBy(worldIn, pos, iblockstate1, playerIn, stack);
}

if (!Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x")) {
if (!MinecraftInstance.mc.isIntegratedServerRunning() && !Protocol.versionSlider.getSliderVersion().getName().equals("1.8.x")) {
MinecraftInstance.mc.theWorld.playSoundAtPos(pos.add(0.5, 0.5, 0.5), this.block.stepSound.getPlaceSound(), (this.block.stepSound.getVolume() + 1.0F) / 2.0F, this.block.stepSound.getFrequency() * 0.8F, false);
} else {
worldIn.playSoundEffect((float) pos.getX() + 0.5F, (float) pos.getY() + 0.5F, (float) pos.getZ() + 0.5F, this.block.stepSound.getPlaceSound(), (this.block.stepSound.getVolume() + 1.0F) / 2.0F, this.block.stepSound.getFrequency() * 0.8F);
Expand Down

0 comments on commit 5cd9ccc

Please sign in to comment.