Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
![banner](https://raw.githubusercontent.com/KassuK1/BlackOut/main/src/main/resources/assets/blackout/logo.png)

![Lines of code](https://img.shields.io/tokei/lines/github/KassuK1/BlackOut?color=blue&label=lines%20of%20code&style=for-the-badge)
[![Discord](https://img.shields.io/discord/1020709439742947380?color=blue&label=Discord&logo=Discord&style=for-the-badge)](https://discord.gg/mmWz9Dz4Y9)
[![Downloads](https://img.shields.io/github/downloads/KassuK1/BlackOut/total?color=blueviolet&style=for-the-badge)](https://github.com/KassuK1/BlackOut/releases)

Expand All @@ -12,20 +11,24 @@ such as a new and improved CrystalAura, BedAura and PacketFly and a lot more of
The development of the addon might not be super active due to us having our own lives contrary to the popular belief.

### How to use Blackout:
- Install Fabric 1.21.1.
- Install Fabric 1.21.4.
- Download Meteor Client and put it in your mod's folder.
- Put Blackout in your "mods" folder with Meteor.
- Run Fabric.
- Enjoy the addon.
- Join the discord if you have any issues with it.

#### Latest build: https://github.com/KassuK1/BlackOut/releases/download/latest/blackout-1.0.2.jar
#### Latest build: https://github.com/KassuK1/BlackOut/releases/latest

#### Credits
Doogie13 for helping with the block mining calculations and step offsets.

RickyTheRaccoon for his InvSwitch.

H1ggsK for updating to 1.21.4.

Zipdox for actually sending a PR.

#### Official youtube channel https://www.youtube.com/channel/UCq_NxTxgS-Xk0TsSmhqXoyg

### Once you go black you never go back
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Meteor
modImplementation "meteordevelopment:meteor-client:${project.meteor_version}"
modImplementation "meteordevelopment:meteor-client:${project.meteor_version}-SNAPSHOT"
modImplementation "meteordevelopment:baritone:${project.minecraft_version}-SNAPSHOT"
}

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
org.gradle.jvmargs=-Xmx2G

# Fabric Properties (https://fabricmc.net/versions.html)
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.5
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.8
loader_version=0.16.9

# Mod Properties
mod_version=1.0.2
mod_version=1.1.0
maven_group=kassuk.addon
archives_base_name=blackout

# Dependencies

# Meteor (https://maven.meteordev.org/)
meteor_version=0.5.8-SNAPSHOT
meteor_version=0.6.0
6 changes: 3 additions & 3 deletions src/main/java/kassuk/addon/blackout/BlackOut.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class BlackOut extends MeteorAddon {
public static final Category SETTINGS = new Category("Settings", Items.OBSIDIAN.getDefaultStack());
public static final HudGroup HUD_BLACKOUT = new HudGroup("BlackOut");
public static final String BLACKOUT_NAME = "BlackOut";
public static final String BLACKOUT_VERSION = "1.0.1";
public static final String BLACKOUT_VERSION = "1.1.0";
public static final String COLOR = "Color is the visual perception of different wavelengths of light as hue, saturation, and brightness";

@Override
Expand Down Expand Up @@ -58,15 +58,15 @@ private void initializeModules(Modules modules) {
modules.add(new AutoPearl());
initializeAutoPVP(modules);
modules.add(new AutoTrapPlus());
modules.add(new BedAuraPlus());
//modules.add(new BedAuraPlus());
modules.add(new Blocker());
modules.add(new BurrowPlus());
modules.add(new CustomFOV());
modules.add(new ElytraFlyPlus());
modules.add(new FastXP());
modules.add(new FeetESP());
modules.add(new FlightPlus());
modules.add(new Fog());
// SORRY GUYS I'LL TRY T FIX IT // modules.add(new Fog());
modules.add(new ForceSneak());
modules.add(new HoleFillPlus());
modules.add(new HoleFillRewrite());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ public double placeRangeTo(BlockPos pos, Vec3d from) {
Vec3d pPos = mc.player.getPos();
switch (placeRangeFrom.get()) {
case Middle ->
((IVec3d) from).set((pBB.minX + pBB.maxX) / 2, (pBB.minY + pBB.maxY) / 2, (pBB.minZ + pBB.maxZ) / 2);
case Feet -> ((IVec3d) from).set(pPos.x, pPos.y, pPos.z);
((IVec3d) from).meteor$set((pBB.minX + pBB.maxX) / 2, (pBB.minY + pBB.maxY) / 2, (pBB.minZ + pBB.maxZ) / 2);
case Feet -> ((IVec3d) from).meteor$set(pPos.x, pPos.y, pPos.z);
}
}

Expand Down Expand Up @@ -295,7 +295,7 @@ public double attackRangeTo(Box bb, Vec3d feet, Vec3d from, boolean countReduce)
from = mc.player.getEyePos();
switch (attackRangeFrom.get()) {
case Middle ->
((IVec3d) from).set((pBB.minX + pBB.maxX) / 2, (pBB.minY + pBB.maxY) / 2, (pBB.minZ + pBB.maxZ) / 2);
((IVec3d) from).meteor$set((pBB.minX + pBB.maxX) / 2, (pBB.minY + pBB.maxY) / 2, (pBB.minZ + pBB.maxZ) / 2);
case Feet -> from = mc.player.getPos();
}
} else {
Expand Down Expand Up @@ -344,12 +344,12 @@ public double getDistFromCenter(Box bb, Vec3d feet, Vec3d from) {
}

if (dist.getZ() > 0.0) {
((IVec3d) rangePos).setXZ(rangePos.x, rangePos.z + halfWidth);
((IVec3d) rangePos).meteor$setXZ(rangePos.x, rangePos.z + halfWidth);
} else if (dist.getZ() < 0.0) {
((IVec3d) rangePos).setXZ(rangePos.x, rangePos.z - halfWidth);
((IVec3d) rangePos).meteor$setXZ(rangePos.x, rangePos.z - halfWidth);
} else if (dist.getX() > 0.0) {
((IVec3d) rangePos).setXZ(rangePos.x + halfWidth, rangePos.z);
} else ((IVec3d) rangePos).setXZ(rangePos.x - halfWidth, rangePos.z);
((IVec3d) rangePos).meteor$setXZ(rangePos.x + halfWidth, rangePos.z);
} else ((IVec3d) rangePos).meteor$setXZ(rangePos.x - halfWidth, rangePos.z);


Vec3d vec2 = rangePos.subtract(startPos);
Expand Down Expand Up @@ -404,8 +404,8 @@ public double miningRangeTo(BlockPos pos, Vec3d from) {
from = mc.player.getEyePos();
switch (miningRangeFrom.get()) {
case Middle ->
((IVec3d) from).set((pBB.minX + pBB.maxX) / 2, (pBB.minY + pBB.maxY) / 2, (pBB.minX + pBB.maxX) / 2);
case Feet -> ((IVec3d) from).set(pPos.x, pPos.y, pPos.z);
((IVec3d) from).meteor$set((pBB.minX + pBB.maxX) / 2, (pBB.minY + pBB.maxY) / 2, (pBB.minX + pBB.maxX) / 2);
case Feet -> ((IVec3d) from).meteor$set(pPos.x, pPos.y, pPos.z);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public boolean placeTrace(BlockPos pos) {
return result.getBlockPos().equals(pos);
}
case Sides -> {
((IVec3d) vec).set(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5);
((IVec3d) vec).meteor$set(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5);
for (Direction dir : Direction.values()) {
((IRaycastContext) raycastContext).setEnd(vec.add(dir.getOffsetX() / 2f, dir.getOffsetY() / 2f, dir.getOffsetZ() / 2f));

Expand All @@ -179,7 +179,7 @@ public boolean placeTrace(BlockPos pos) {
}
}
case Exposure -> {
((IVec3d) vec).set(pos.getX(), pos.getY(), pos.getZ());
((IVec3d) vec).meteor$set(pos.getX(), pos.getY(), pos.getZ());

hit = 0;
for (int x = 0; x <= 2; x += 1) {
Expand All @@ -199,7 +199,7 @@ public boolean placeTrace(BlockPos pos) {
}
}
case Any -> {
((IVec3d) vec).set(pos.getX(), pos.getY(), pos.getZ());
((IVec3d) vec).meteor$set(pos.getX(), pos.getY(), pos.getZ());

hit = 0;
for (int x = 0; x <= 2; x += 1) {
Expand Down Expand Up @@ -228,21 +228,21 @@ public boolean attackTrace(Box box) {

switch (attackMode.get()) {
case SinglePoint -> {
((meteordevelopment.meteorclient.mixininterface.IRaycastContext) BODamageUtils.raycastContext).set(mc.player.getEyePos(), new Vec3d((box.minX + box.maxX) / 2f, box.minY + attackHeight.get(), (box.minZ + box.maxZ) / 2f), RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, mc.player);
((meteordevelopment.meteorclient.mixininterface.IRaycastContext) BODamageUtils.raycastContext).meteor$set(mc.player.getEyePos(), new Vec3d((box.minX + box.maxX) / 2f, box.minY + attackHeight.get(), (box.minZ + box.maxZ) / 2f), RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, mc.player);

return BODamageUtils.raycast(BODamageUtils.raycastContext).getType() != HitResult.Type.BLOCK;
}
case DoublePoint -> {
((meteordevelopment.meteorclient.mixininterface.IRaycastContext) BODamageUtils.raycastContext).set(mc.player.getEyePos(), new Vec3d((box.minX + box.maxX) / 2f, box.minY + attackHeight1.get(), (box.minZ + box.maxZ) / 2f), RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, mc.player);
((meteordevelopment.meteorclient.mixininterface.IRaycastContext) BODamageUtils.raycastContext).meteor$set(mc.player.getEyePos(), new Vec3d((box.minX + box.maxX) / 2f, box.minY + attackHeight1.get(), (box.minZ + box.maxZ) / 2f), RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, mc.player);
if (BODamageUtils.raycast(BODamageUtils.raycastContext).getType() != HitResult.Type.BLOCK) {
return true;
}

((meteordevelopment.meteorclient.mixininterface.IRaycastContext) BODamageUtils.raycastContext).set(mc.player.getEyePos(), new Vec3d((box.minX + box.maxX) / 2f, box.minY + attackHeight2.get(), (box.minZ + box.maxZ) / 2f), RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, mc.player);
((meteordevelopment.meteorclient.mixininterface.IRaycastContext) BODamageUtils.raycastContext).meteor$set(mc.player.getEyePos(), new Vec3d((box.minX + box.maxX) / 2f, box.minY + attackHeight2.get(), (box.minZ + box.maxZ) / 2f), RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, mc.player);
return BODamageUtils.raycast(BODamageUtils.raycastContext).getType() != HitResult.Type.BLOCK;
}
case Exposure -> {
((IVec3d) vec).set(box.minX, box.minY, box.minZ);
((IVec3d) vec).meteor$set(box.minX, box.minY, box.minZ);
double xw = box.maxX - box.minX;
double yh = box.maxY - box.minY;
double zw = box.maxZ - box.minZ;
Expand All @@ -265,7 +265,7 @@ public boolean attackTrace(Box box) {
}
}
case Any -> {
((IVec3d) vec).set(box.minX, box.minY, box.minZ);
((IVec3d) vec).meteor$set(box.minX, box.minY, box.minZ);
double xw = box.maxX - box.minX;
double yh = box.maxY - box.minY;
double zw = box.maxZ - box.minZ;
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/kassuk/addon/blackout/hud/TargetHud.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.minecraft.client.gui.PlayerSkinDrawer;
import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.client.network.PlayerListEntry;
import net.minecraft.client.util.SkinTextures;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
Expand Down Expand Up @@ -96,6 +97,7 @@ public TargetHud() {
private AbstractClientPlayerEntity target;
private String renderName = null;
private Identifier renderSkin = null;
private SkinTextures renderSkinTextures = null;
private float renderHealth;
private float renderPing;

Expand Down Expand Up @@ -349,7 +351,7 @@ private void drawFace(HudRenderer renderer, float scale, double x, double y, flo
drawStack.scale(scale, scale, 1);
drawStack.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(tilt));

PlayerSkinDrawer.draw(renderer.drawContext, renderSkin,20, 18, 32, false, false);
PlayerSkinDrawer.draw(renderer.drawContext, renderSkinTextures,20, 18,32, 0);

drawStack.pop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private void onMovePost(SendMovementPacketsEvent.Post event) {
updateNextRotation();

if (rotated) {
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(next[0], next[1], Managers.ON_GROUND.isOnGround()));
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(next[0], next[1], Managers.ON_GROUND.isOnGround(), false));
}
}
}
Expand Down Expand Up @@ -113,10 +113,10 @@ public PlayerMoveC2SPacket onFull(PlayerMoveC2SPacket.Full packet) {
updateNextRotation();

if (rotated) {
return new PlayerMoveC2SPacket.Full(packet.getX(0), packet.getY(0), packet.getZ(0), next[0], next[1], packet.isOnGround());
return new PlayerMoveC2SPacket.Full(packet.getX(0), packet.getY(0), packet.getZ(0), next[0], next[1], packet.isOnGround(), false);
}

return new PlayerMoveC2SPacket.PositionAndOnGround(packet.getX(0), packet.getY(0), packet.getZ(0), packet.isOnGround());
return new PlayerMoveC2SPacket.PositionAndOnGround(packet.getX(0), packet.getY(0), packet.getZ(0), packet.isOnGround(), false);
}

public PlayerMoveC2SPacket onPositionOnGround(PlayerMoveC2SPacket.PositionAndOnGround packet) {
Expand All @@ -130,7 +130,7 @@ public PlayerMoveC2SPacket onPositionOnGround(PlayerMoveC2SPacket.PositionAndOnG
updateNextRotation();

if (rotated) {
return new PlayerMoveC2SPacket.Full(packet.getX(0), packet.getY(0), packet.getZ(0), next[0], next[1], packet.isOnGround());
return new PlayerMoveC2SPacket.Full(packet.getX(0), packet.getY(0), packet.getZ(0), next[0], next[1], packet.isOnGround(), false);
}

return packet;
Expand All @@ -147,10 +147,10 @@ public PlayerMoveC2SPacket onLookAndOnGround(PlayerMoveC2SPacket.LookAndOnGround
updateNextRotation();

if (rotated) {
return new PlayerMoveC2SPacket.LookAndOnGround(next[0], next[1], packet.isOnGround());
return new PlayerMoveC2SPacket.LookAndOnGround(next[0], next[1], packet.isOnGround(), false);
}
if (packet.isOnGround() != Managers.ON_GROUND.isOnGround()) {
return new PlayerMoveC2SPacket.OnGroundOnly(packet.isOnGround());
return new PlayerMoveC2SPacket.OnGroundOnly(packet.isOnGround(), false);
}

return null;
Expand All @@ -167,7 +167,7 @@ public PlayerMoveC2SPacket onOnlyOnground(PlayerMoveC2SPacket.OnGroundOnly packe
updateNextRotation();

if (rotated) {
return new PlayerMoveC2SPacket.LookAndOnGround(next[0], next[1], packet.isOnGround());
return new PlayerMoveC2SPacket.LookAndOnGround(next[0], next[1], packet.isOnGround(), false);
}

return packet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(BackgroundRenderer.class)
/*@Mixin(BackgroundRenderer.class)
public class MixinBackground {
@Inject(method = "applyFog", at = @At("TAIL"))
private static void applyFog(Camera camera, BackgroundRenderer.FogType fogType, float viewDistance, boolean thickFog, float tickDelta, CallbackInfo info) {
Expand All @@ -18,4 +18,4 @@ private static void applyFog(Camera camera, BackgroundRenderer.FogType fogType,
fog.modifyFog();
}
}
}
}*/
28 changes: 20 additions & 8 deletions src/main/java/kassuk/addon/blackout/mixins/MixinExplosion.java
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
package kassuk.addon.blackout.mixins;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import kassuk.addon.blackout.modules.SoundModifier;
import meteordevelopment.meteorclient.systems.modules.Modules;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvent;
import net.minecraft.world.World;
import net.minecraft.world.explosion.Explosion;
import net.minecraft.world.explosion.ExplosionImpl;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;

@Mixin(Explosion.class)
@Mixin(ClientPlayNetworkHandler.class)
public class MixinExplosion {
@Redirect(method = "affectWorld", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;playSound(DDDLnet/minecraft/sound/SoundEvent;Lnet/minecraft/sound/SoundCategory;FFZ)V"))
private void redirect(World instance, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch, boolean useDistance) {
@WrapOperation(
method = "onExplosion",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/world/ClientWorld;playSound(DDD"
+ "Lnet/minecraft/sound/SoundEvent;"
+ "Lnet/minecraft/sound/SoundCategory;FFZ)V"
)
)
private void onExplosion(ClientWorld instance, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch, boolean useDistance, Operation<Void> original) {
SoundModifier m = Modules.get().get(SoundModifier.class);

if (m.isActive()) {
if (m.expSound.get()) {
instance.playSound(x, y, z, sound, category, (float) (volume * m.explosionVolume.get()), (float) (pitch * m.explosionPitch.get()), useDistance);
original.call(instance, x, y, z, sound, category, (float)(volume * m.explosionVolume.get()), (float)(pitch * m.explosionPitch.get()), useDistance);
}
return;
}
instance.playSound(x, y, z, sound, category, volume, pitch, useDistance);
}
}
4 changes: 2 additions & 2 deletions src/main/java/kassuk/addon/blackout/modules/AutoPearl.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private void onRender(Render3DEvent event) {


if (instaRot.get()) {
sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(getYaw(), pitch.get(), Managers.ON_GROUND.isOnGround()));
sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(getYaw(), pitch.get(), Managers.ON_GROUND.isOnGround(), false));
}

boolean switched = hand != null;
Expand Down Expand Up @@ -161,7 +161,7 @@ private boolean cc() {
if (!rotated) return false;

if (instaRot.get())
sendPacket(new PlayerMoveC2SPacket.LookAndOnGround((float) RotationUtils.getYaw(mc.player.getEyePos(), pos.toCenterPos()), (float) RotationUtils.getPitch(mc.player.getEyePos(), pos.toCenterPos()), Managers.ON_GROUND.isOnGround()));
sendPacket(new PlayerMoveC2SPacket.LookAndOnGround((float) RotationUtils.getYaw(mc.player.getEyePos(), pos.toCenterPos()), (float) RotationUtils.getPitch(mc.player.getEyePos(), pos.toCenterPos()), Managers.ON_GROUND.isOnGround(), false));

Hand hand = mc.player.getOffHandStack().getItem() instanceof BlockItem ? Hand.OFF_HAND :
Managers.HOLDING.getStack().getItem() instanceof BlockItem ? Hand.MAIN_HAND : null;
Expand Down
Loading