mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
fix bad code
This commit is contained in:
parent
7396c2cfc0
commit
e7a339e552
63 changed files with 198 additions and 380 deletions
|
@ -2,7 +2,7 @@ org.gradle.jvmargs = -Xmx1G
|
|||
|
||||
#Fabric properties
|
||||
minecraft_version = 1.18.2
|
||||
yarn_mappings = 1.18.2+build.1
|
||||
yarn_mappings = 1.18.2+build.2
|
||||
loader_version = 0.13.3
|
||||
|
||||
#Mod properties
|
||||
|
|
|
@ -60,6 +60,10 @@ public class AddonManager {
|
|||
Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
new AddonManager();
|
||||
}
|
||||
|
||||
@EventListener(type = EventType.GAME_EXIT)
|
||||
@SuppressWarnings("unused")
|
||||
void saveConfig(Event event) {
|
||||
|
@ -91,10 +95,6 @@ public class AddonManager {
|
|||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
new AddonManager();
|
||||
}
|
||||
|
||||
public List<Addon> getLoadedAddons() {
|
||||
return loadedAddons.stream().map(addonEntry -> addonEntry.registeredAddon).toList();
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class Find extends Command {
|
|||
Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
@EventListener(type=EventType.PACKET_RECEIVE)
|
||||
@EventListener(type = EventType.PACKET_RECEIVE)
|
||||
void pRecv(PacketEvent pe) {
|
||||
if (!pendingBook) {
|
||||
return;
|
||||
|
@ -50,7 +50,7 @@ public class Find extends Command {
|
|||
handlePacket(pe);
|
||||
}
|
||||
|
||||
@EventListener(type=EventType.NOCLIP_QUERY)
|
||||
@EventListener(type = EventType.NOCLIP_QUERY)
|
||||
void tick(Event e) {
|
||||
if (pendingBook && bookSlot != -1) {
|
||||
assert ShadowMain.client.player != null;
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ForceOP extends Command {
|
|||
public void onExecute(String[] args) throws CommandException {
|
||||
validateArgumentsLength(args, 1);
|
||||
HitResult view = ShadowMain.client.crosshairTarget;
|
||||
String command = String.join(" ",args);
|
||||
String command = String.join(" ", args);
|
||||
if (view == null || view.getType() == HitResult.Type.MISS) {
|
||||
error("Look at a command block or command block minecart");
|
||||
} else if (view instanceof EntityHitResult ehr) {
|
||||
|
|
|
@ -316,7 +316,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
add.render(stack, mouseX, mouseY);
|
||||
exit.render(stack, mouseX, mouseY);
|
||||
|
||||
ClipStack.globalInstance.addWindow(stack, new Rectangle(getPadding()-5, getHeaderHeight(), getPadding() + (width - (getPadding() + leftWidth + getPadding() * 2))+5, height));
|
||||
ClipStack.globalInstance.addWindow(stack, new Rectangle(getPadding() - 5, getHeaderHeight(), getPadding() + (width - (getPadding() + leftWidth + getPadding() * 2)) + 5, height));
|
||||
//Renderer.R2D.beginScissor(stack, getPadding(), getHeaderHeight(), getPadding() + (width - (getPadding() + leftWidth + getPadding() * 2)), height);
|
||||
stack.push();
|
||||
stack.translate(0, -scrollSmooth, 0);
|
||||
|
@ -1066,7 +1066,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
|
|||
Renderer.R2D.renderLoadingSpinner(stack, 1f, originX + width - fromTop, originY + fromTop, 10, 1, 10);
|
||||
}
|
||||
double xOff = 0;
|
||||
for (String s : (storage.tags.isEmpty()?"No tags":storage.tags).split(",")) {
|
||||
for (String s : (storage.tags.isEmpty() ? "No tags" : storage.tags).split(",")) {
|
||||
String v = s.trim();
|
||||
if (v.isEmpty()) {
|
||||
continue;
|
||||
|
|
|
@ -116,17 +116,17 @@ public class HomeScreen extends ClientScreen {
|
|||
double rowHeight = 30;
|
||||
double padding = 5;
|
||||
int entriesPerRow = 2;
|
||||
double rootX = width/2d;
|
||||
double rootY = height/2d;
|
||||
double rootX = width / 2d;
|
||||
double rootY = height / 2d;
|
||||
List<List<Map.Entry<String, Runnable>>> part = Lists.partition(buttonsMap, entriesPerRow);
|
||||
for (int ii = 0; ii < part.size(); ii++) {
|
||||
double currentY = ii*(rowHeight+padding);
|
||||
double currentY = ii * (rowHeight + padding);
|
||||
List<Map.Entry<String, Runnable>> entries = part.get(ii);
|
||||
double oneButtonWidth = (rowWidth-padding)/entries.size();
|
||||
double oneButtonWidth = (rowWidth - padding) / entries.size();
|
||||
for (int i = 0; i < entries.size(); i++) {
|
||||
Map.Entry<String, Runnable> e = entries.get(i);
|
||||
double currentX = i*oneButtonWidth+i*padding;
|
||||
RoundButton btn = new RoundButton(RoundButton.STANDARD,rootX-rowWidth/2d+currentX,rootY+currentY,oneButtonWidth,rowHeight,e.getKey(),e.getValue());
|
||||
double currentX = i * oneButtonWidth + i * padding;
|
||||
RoundButton btn = new RoundButton(RoundButton.STANDARD, rootX - rowWidth / 2d + currentX, rootY + currentY, oneButtonWidth, rowHeight, e.getKey(), e.getValue());
|
||||
addDrawableChild(btn);
|
||||
}
|
||||
}
|
||||
|
@ -201,10 +201,10 @@ public class HomeScreen extends ClientScreen {
|
|||
double originalWidth = 2888;
|
||||
double originalHeight = 1000;
|
||||
double newWidth = 150;
|
||||
double per = newWidth/originalWidth;
|
||||
double newHeight = originalHeight*per;
|
||||
double per = newWidth / originalWidth;
|
||||
double newHeight = originalHeight * per;
|
||||
RenderSystem.setShaderTexture(0, GameTexture.TEXTURE_LOGO.getWhere());
|
||||
Renderer.R2D.renderTexture(stack, width/2d-newWidth/2d, height/2d-newHeight-padding, newWidth, newHeight, 0, 0, newWidth,newHeight,newWidth,newHeight);
|
||||
Renderer.R2D.renderTexture(stack, width / 2d - newWidth / 2d, height / 2d - newHeight - padding, newWidth, newHeight, 0, 0, newWidth, newHeight, newWidth, newHeight);
|
||||
super.renderInternal(stack, mouseX, mouseY, delta); // render bottom row widgets
|
||||
|
||||
double texDim = 20;
|
||||
|
@ -214,20 +214,20 @@ public class HomeScreen extends ClientScreen {
|
|||
RenderSystem.clear(GL40C.GL_COLOR_BUFFER_BIT, false);
|
||||
RenderSystem.colorMask(true, true, true, true);
|
||||
RenderSystem.setShader(GameRenderer::getPositionColorShader);
|
||||
Renderer.R2D.renderRoundedQuadInternal(stack.peek().getPositionMatrix(), 0, 0, 0, 1, width-padding-texDim, padding, width-padding, padding+texDim, 3, 10);
|
||||
Renderer.R2D.renderRoundedQuadInternal(stack.peek().getPositionMatrix(), 0, 0, 0, 1, width - padding - texDim, padding, width - padding, padding + texDim, 3, 10);
|
||||
|
||||
RenderSystem.blendFunc(GL40C.GL_DST_ALPHA, GL40C.GL_ONE_MINUS_DST_ALPHA);
|
||||
RenderSystem.setShaderTexture(0, currentAccountTextureLoaded ? currentAccountTexture : DefaultSkinHelper.getTexture());
|
||||
if (currentAccountTextureLoaded) {
|
||||
Renderer.R2D.renderTexture(stack, width-padding-texDim, padding, texDim, texDim, 0, 0, 64, 64, 64, 64);
|
||||
Renderer.R2D.renderTexture(stack, width - padding - texDim, padding, texDim, texDim, 0, 0, 64, 64, 64, 64);
|
||||
} else {
|
||||
Renderer.R2D.renderTexture(stack, width-padding-texDim, padding, texDim, texDim, 8, 8, 8, 8, 64, 64);
|
||||
Renderer.R2D.renderTexture(stack, width - padding - texDim, padding, texDim, texDim, 8, 8, 8, 8, 64, 64);
|
||||
}
|
||||
FontAdapter fa = FontRenderers.getRenderer();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
String uname = ShadowMain.client.getSession().getUsername();
|
||||
double unameWidth = fa.getStringWidth(uname);
|
||||
fa.drawString(stack,uname,width-padding-texDim-padding-unameWidth,padding+texDim/2d-fa.getFontHeight()/2d,0xFFFFFF);
|
||||
fa.drawString(stack, uname, width - padding - texDim - padding - unameWidth, padding + texDim / 2d - fa.getFontHeight() / 2d, 0xFFFFFF);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public class LoadingScreen extends ClientScreen implements FastTickable {
|
|||
}
|
||||
}
|
||||
stack.push();
|
||||
stack.translate(0,0,5);
|
||||
stack.translate(0, 0, 5);
|
||||
Renderer.R2D.renderQuad(stack, new Color(0, 0, 0, (float) opacity), 0, 0, width, height);
|
||||
String shadow = "Loading Shadow...";
|
||||
double pad = 5;
|
||||
|
|
|
@ -20,12 +20,12 @@ import java.util.Objects;
|
|||
public class StatsScreen extends ClientScreen implements FastTickable {
|
||||
static List<Float> packetIn = Util.make(() -> {
|
||||
List<Float> f = new ArrayList<>();
|
||||
for(int i = 0;i<100;i++) f.add(0f);
|
||||
for (int i = 0; i < 100; i++) f.add(0f);
|
||||
return f;
|
||||
});
|
||||
static List<Float> packetOut = Util.make(() -> {
|
||||
List<Float> f = new ArrayList<>();
|
||||
for(int i = 0;i<100;i++) f.add(0f);
|
||||
for (int i = 0; i < 100; i++) f.add(0f);
|
||||
return f;
|
||||
});
|
||||
Timer packetUpdater = new Timer();
|
||||
|
@ -38,10 +38,10 @@ public class StatsScreen extends ClientScreen implements FastTickable {
|
|||
packetIn.add(in);
|
||||
float out = ShadowMain.client.getNetworkHandler().getConnection().getAveragePacketsSent();
|
||||
packetOut.add(out);
|
||||
while(packetIn.size() > 100) {
|
||||
while (packetIn.size() > 100) {
|
||||
packetIn.remove(0);
|
||||
}
|
||||
while(packetOut.size() > 100) packetOut.remove(0);
|
||||
while (packetOut.size() > 100) packetOut.remove(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,24 +57,24 @@ public class StatsScreen extends ClientScreen implements FastTickable {
|
|||
float highest = Math.max(pIn.stream().max(Comparator.comparingDouble(value -> (double) value)).orElse(0f),
|
||||
pOut.stream().max(Comparator.comparingDouble(value -> (double) value)).orElse(0f));
|
||||
double maxHeight = 300;
|
||||
float scaleFactor = (float) Math.min(1,maxHeight/highest);
|
||||
float scaleFactor = (float) Math.min(1, maxHeight / highest);
|
||||
for (int i = 0; i < pIn.size(); i++) {
|
||||
double prog = (i)/(double)(pIn.size()-3);
|
||||
float x = (float) (prog*contentWidth-((System.currentTimeMillis()-packetUpdater.getLastReset())/500f*(1f/(pIn.size()-1)*contentWidth)));
|
||||
float y = (float) height-pIn.get(i)*scaleFactor;
|
||||
Vec2f a = new Vec2f(x,y);
|
||||
double prog = (i) / (double) (pIn.size() - 3);
|
||||
float x = (float) (prog * contentWidth - ((System.currentTimeMillis() - packetUpdater.getLastReset()) / 500f * (1f / (pIn.size() - 1) * contentWidth)));
|
||||
float y = (float) height - pIn.get(i) * scaleFactor;
|
||||
Vec2f a = new Vec2f(x, y);
|
||||
bezPositions.add(a);
|
||||
}
|
||||
Renderer.R2D.renderBezierCurve(stack,bezPositions.toArray(new Vec2f[0]), 1f,1f,0f,1f,0.01f);
|
||||
Renderer.R2D.renderBezierCurve(stack, bezPositions.toArray(new Vec2f[0]), 1f, 1f, 0f, 1f, 0.01f);
|
||||
bezPositions.clear();
|
||||
for (int i = 0; i < pOut.size(); i++) {
|
||||
double prog = (i)/(double)(pOut.size()-3);
|
||||
float x = (float) (prog*contentWidth-((System.currentTimeMillis()-packetUpdater.getLastReset())/500f*(1f/(pOut.size()-1)*contentWidth)));
|
||||
float y = (float) height-pOut.get(i)*scaleFactor;
|
||||
Vec2f a = new Vec2f(x,y);
|
||||
double prog = (i) / (double) (pOut.size() - 3);
|
||||
float x = (float) (prog * contentWidth - ((System.currentTimeMillis() - packetUpdater.getLastReset()) / 500f * (1f / (pOut.size() - 1) * contentWidth)));
|
||||
float y = (float) height - pOut.get(i) * scaleFactor;
|
||||
Vec2f a = new Vec2f(x, y);
|
||||
bezPositions.add(a);
|
||||
}
|
||||
Renderer.R2D.renderBezierCurve(stack,bezPositions.toArray(new Vec2f[0]), 0f,1f,1f,1f,0.01f);
|
||||
Renderer.R2D.renderBezierCurve(stack, bezPositions.toArray(new Vec2f[0]), 0f, 1f, 1f, 1f, 0.01f);
|
||||
|
||||
super.renderInternal(stack, mouseX, mouseY, delta);
|
||||
}
|
||||
|
|
|
@ -33,9 +33,9 @@ public class TestScreen extends ClientScreen implements FastTickable {
|
|||
|
||||
@Override
|
||||
public void renderInternal(MatrixStack stack, int mouseX, int mouseY, float delta) {
|
||||
Renderer.R2D.renderQuad(stack,Color.WHITE,0,0,width,height);
|
||||
Renderer.R2D.renderRoundedQuad(stack,new Color(200,200,200),50,50,150,150,10,20);
|
||||
Renderer.R2D.renderRoundedShadow(stack,new Color(0,0,0,100),50,50,150,150,10,20,-5);
|
||||
Renderer.R2D.renderQuad(stack, Color.WHITE, 0, 0, width, height);
|
||||
Renderer.R2D.renderRoundedQuad(stack, new Color(200, 200, 200), 50, 50, 150, 150, 10, 20);
|
||||
Renderer.R2D.renderRoundedShadow(stack, new Color(0, 0, 0, 100), 50, 50, 150, 150, 10, 20, -5);
|
||||
|
||||
|
||||
super.renderInternal(stack, mouseX, mouseY, delta);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
package net.shadow.client.feature.module;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
|
||||
public class Template extends Module {
|
||||
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
package net.shadow.client.feature.module.impl.combat;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
@ -13,20 +18,15 @@ import net.shadow.client.helper.event.EventType;
|
|||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.PacketEvent;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
public class Fling extends Module {
|
||||
|
||||
final DoubleSetting delay = this.config.create(new DoubleSetting.Builder(250).min(1).max(500).name("Delay").description("the delay before going back down").get());
|
||||
final DoubleSetting updist = this.config.create(new DoubleSetting.Builder(3).min(1).max(3).name("Power").description("power of the fling").get());
|
||||
final DoubleSetting delay = this.config.create(new DoubleSetting.Builder(250).min(1).max(500).precision(0).name("Delay").description("The delay before going back down").get());
|
||||
final DoubleSetting updist = this.config.create(new DoubleSetting.Builder(3).min(1).max(3).precision(2).name("Power").description("The power of the fling").get());
|
||||
|
||||
|
||||
public Fling() {
|
||||
super("Fling", "fling players", ModuleType.COMBAT);
|
||||
super("Fling", "Fling players in the air", ModuleType.COMBAT);
|
||||
Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
|
@ -58,8 +58,9 @@ public class Fling extends Module {
|
|||
|
||||
}
|
||||
|
||||
@EventListener(type=EventType.PACKET_SEND)
|
||||
void sendPacket(PacketEvent event){
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void sendPacket(PacketEvent event) {
|
||||
if (!this.isEnabled()) return;
|
||||
if (event.getPacket() instanceof PlayerInteractItemC2SPacket) {
|
||||
if (client.player.getInventory().getMainHandStack().getItem() == Items.FISHING_ROD && (client.player.fishHook != null || !client.player.fishHook.isRemoved())) {
|
||||
client.player.setVelocity(Vec3d.ZERO);
|
||||
|
|
|
@ -10,8 +10,9 @@ import net.shadow.client.feature.module.Module;
|
|||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
||||
public class Reach extends Module {
|
||||
// TODO: 10.04.22 finish this
|
||||
|
||||
final DoubleSetting reachDist = this.config.create(new DoubleSetting.Builder(0).min(3).max(10).name("Distance").description("how far to reach").get());
|
||||
final DoubleSetting reachDist = this.config.create(new DoubleSetting.Builder(3).min(3).max(10).precision(1).name("Distance").description("How far to reach").get());
|
||||
|
||||
public Reach() {
|
||||
super("Reach", "reach stuff", ModuleType.COMBAT);
|
||||
|
@ -45,7 +46,7 @@ public class Reach extends Module {
|
|||
|
||||
}
|
||||
|
||||
public double getReachDistance(){
|
||||
public double getReachDistance() {
|
||||
return reachDist.getValue();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,23 +5,26 @@
|
|||
package net.shadow.client.feature.module.impl.combat;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.helper.event.EventListener;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.PacketEvent;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ReverseKnockback extends Module {
|
||||
|
||||
List<PlayerMoveC2SPacket> dontRepeat = new ArrayList<>();
|
||||
|
||||
public ReverseKnockback() {
|
||||
super("ReverseKnockback", "reverse the knockback you deal", ModuleType.MISC);
|
||||
super("ReverseKnockback", "Reverse the knockback you deal", ModuleType.MISC);
|
||||
Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
|
@ -53,26 +56,29 @@ public class ReverseKnockback extends Module {
|
|||
|
||||
}
|
||||
|
||||
@EventListener(type=EventType.PACKET_SEND)
|
||||
void packetSend(PacketEvent event){
|
||||
@EventListener(type = EventType.PACKET_SEND)
|
||||
void packetSend(PacketEvent event) {
|
||||
if (!this.isEnabled()) return;
|
||||
if (event.getPacket() instanceof PlayerMoveC2SPacket packet) {
|
||||
if (!(packet instanceof PlayerMoveC2SPacket.LookAndOnGround || packet instanceof PlayerMoveC2SPacket.Full))
|
||||
if (dontRepeat.contains(packet)) {
|
||||
dontRepeat.remove(packet);
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
double x = packet.getX(0);
|
||||
double y = packet.getY(0);
|
||||
double z = packet.getZ(0);
|
||||
|
||||
Packet<?> newPacket;
|
||||
PlayerMoveC2SPacket newPacket;
|
||||
if (packet instanceof PlayerMoveC2SPacket.Full) {
|
||||
newPacket = new PlayerMoveC2SPacket.Full(x, y, z, MathHelper.wrapDegrees(client.player.getYaw() + 180), 0, packet.isOnGround());
|
||||
} else {
|
||||
newPacket = new PlayerMoveC2SPacket.LookAndOnGround(MathHelper.wrapDegrees(client.player.getYaw() + 180), 0, packet.isOnGround());
|
||||
}
|
||||
|
||||
dontRepeat.add(newPacket);
|
||||
client.player.networkHandler.getConnection().send(newPacket);
|
||||
}
|
||||
if(event.getPacket() instanceof PlayerInteractEntityC2SPacket){
|
||||
if (event.getPacket() instanceof PlayerInteractEntityC2SPacket) {
|
||||
client.player.networkHandler.sendPacket(new ClientCommandC2SPacket(client.player, ClientCommandC2SPacket.Mode.START_SPRINTING));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,13 +5,6 @@
|
|||
package net.shadow.client.feature.module.impl.crash;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.helper.event.EventListener;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.PacketEvent;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
|
@ -19,12 +12,18 @@ import net.minecraft.nbt.NbtInt;
|
|||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
||||
import net.minecraft.world.World;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.PacketEvent;
|
||||
|
||||
public class ArmorStandCrash extends Module {
|
||||
static World w;
|
||||
final DoubleSetting slider = this.config.create(new DoubleSetting.Builder(1).min(1).max(20).name("Power").description("Power of the crash").get());
|
||||
int ticks = 0;
|
||||
int aaaa = 0;
|
||||
final DoubleSetting slider = this.config.create(new DoubleSetting.Builder(1).min(1).max(20).name("Power").description("Power of the crash").get());
|
||||
private int xChunk;
|
||||
private int zChunk;
|
||||
|
||||
|
@ -32,9 +31,9 @@ public class ArmorStandCrash extends Module {
|
|||
super("ArmorStand", "Crash servers with armor stands in creative (really fast)", ModuleType.CRASH);
|
||||
Events.registerEventHandler(EventType.PACKET_SEND, pevent -> {
|
||||
PacketEvent event = (PacketEvent) pevent;
|
||||
if(!this.isEnabled()) return;
|
||||
if (!this.isEnabled()) return;
|
||||
if (event.getPacket() instanceof PlayerInteractBlockC2SPacket packet) {
|
||||
for(int i = 0; i < slider.getValue(); i++){
|
||||
for (int i = 0; i < slider.getValue(); i++) {
|
||||
ItemStack load = new ItemStack(Items.ARMOR_STAND, 1);
|
||||
NbtCompound comp = new NbtCompound();
|
||||
NbtCompound betag = new NbtCompound();
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
package net.shadow.client.feature.module.impl.crash;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.BannerItem;
|
||||
|
@ -18,9 +13,7 @@ import net.minecraft.network.packet.c2s.play.ButtonClickC2SPacket;
|
|||
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
|
||||
import net.minecraft.screen.LoomScreenHandler;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.screen.slot.SlotActionType;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.shadow.client.feature.gui.notifications.Notification;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
@ -35,18 +28,18 @@ public class LoominaCrash extends Module {
|
|||
|
||||
@Override
|
||||
public void tick() {
|
||||
if(client.player.currentScreenHandler instanceof LoomScreenHandler handler){
|
||||
if(expl == null){
|
||||
if (client.player.currentScreenHandler instanceof LoomScreenHandler handler) {
|
||||
if (expl == null) {
|
||||
expl = Notification.create(-1, "", true, Notification.Type.INFO, "Exploiting...");
|
||||
}
|
||||
for(int i = 0; i < 2; i++){
|
||||
for (int i = 0; i < 2; i++) {
|
||||
simplePacketMove(3);
|
||||
simplePacketMove(0);
|
||||
client.player.networkHandler.sendPacket(new ButtonClickC2SPacket(client.player.currentScreenHandler.syncId, 5));
|
||||
}
|
||||
if(!(client.player.currentScreenHandler.getSlot(1).getStack().getItem() instanceof DyeItem) && (client.player.currentScreenHandler.getSlot(0).getStack().getItem() instanceof BannerItem)){ //WHY IS THIS A THING LMAOOO TY THO MOJANG
|
||||
for(int i = 5; i < 39; i++){
|
||||
if(client.player.currentScreenHandler.getSlot(i).getStack().getItem() instanceof DyeItem){
|
||||
if (!(client.player.currentScreenHandler.getSlot(1).getStack().getItem() instanceof DyeItem) && (client.player.currentScreenHandler.getSlot(0).getStack().getItem() instanceof BannerItem)) { //WHY IS THIS A THING LMAOOO TY THO MOJANG
|
||||
for (int i = 5; i < 39; i++) {
|
||||
if (client.player.currentScreenHandler.getSlot(i).getStack().getItem() instanceof DyeItem) {
|
||||
simplePacketMove(i);
|
||||
simplePacketMove(1);
|
||||
return;
|
||||
|
@ -55,8 +48,8 @@ public class LoominaCrash extends Module {
|
|||
client.player.closeHandledScreen();
|
||||
Notification.create(1000, "Loomina", Notification.Type.ERROR, "out of dye!");
|
||||
}
|
||||
}else{
|
||||
if(this.expl != null) expl.duration = 0;
|
||||
} else {
|
||||
if (this.expl != null) expl.duration = 0;
|
||||
expl = null;
|
||||
}
|
||||
}
|
||||
|
@ -85,8 +78,7 @@ public class LoominaCrash extends Module {
|
|||
}
|
||||
|
||||
|
||||
|
||||
void simplePacketMove(int slotId){
|
||||
void simplePacketMove(int slotId) {
|
||||
//System.out.println(client.player.currentScreenHandler.getSlot(slotId).getStack().getName().getString());
|
||||
ScreenHandler screenHandler = client.player.currentScreenHandler;
|
||||
Int2ObjectOpenHashMap<ItemStack> int2ObjectMap = new Int2ObjectOpenHashMap<ItemStack>();
|
||||
|
|
|
@ -24,13 +24,13 @@ public class MinehutCrash extends Module {
|
|||
}
|
||||
|
||||
@EventListener(type = EventType.PACKET_RECEIVE)
|
||||
void blockBounces(PacketEvent event){
|
||||
if(this.isEnabled() && this.bb.getValue()) event.setCancelled(true);
|
||||
void blockBounces(PacketEvent event) {
|
||||
if (this.isEnabled() && this.bb.getValue()) event.setCancelled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
for(int i = 0; i < ds.getValue(); i++){
|
||||
for (int i = 0; i < ds.getValue(); i++) {
|
||||
client.player.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.attack(client.player, false)); //bungee blaster!!!
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,8 +14,6 @@ import net.minecraft.util.math.Vec3d;
|
|||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.helper.font.FontRenderers;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
package net.shadow.client.feature.module.impl.exploit;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.shadow.client.feature.config.StringSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
|
||||
public class BeaconSpoofer extends Module {
|
||||
|
||||
|
@ -19,39 +19,6 @@ public class BeaconSpoofer extends Module {
|
|||
super("BeaconSpoofer", "spoofs beacon effects", ModuleType.EXPLOIT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
public String getStringValue(){
|
||||
StatusEffect i1 = getEffectFromName(effect.getValue());
|
||||
int ii1 = StatusEffect.getRawId(i1);
|
||||
return ii1 + "";
|
||||
}
|
||||
|
||||
private static StatusEffect getEffectFromName(String partial) {
|
||||
return switch (partial.toUpperCase()) {
|
||||
case "ABSORPTION" -> StatusEffects.ABSORPTION;
|
||||
|
@ -89,4 +56,37 @@ public class BeaconSpoofer extends Module {
|
|||
default -> StatusEffects.SPEED;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
public String getStringValue() {
|
||||
StatusEffect i1 = getEffectFromName(effect.getValue());
|
||||
int ii1 = StatusEffect.getRawId(i1);
|
||||
return ii1 + "";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
package net.shadow.client.feature.module.impl.misc;
|
||||
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.StringNbtReader;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket;
|
||||
|
@ -15,23 +16,23 @@ import net.minecraft.util.Identifier;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
public class SuperCrossbow extends Module {
|
||||
|
||||
public static final String inbt = "{Enchantments:[{id:\"minecraft:quick_charge\",lvl:5s}],ChargedProjectiles:[{},{id:\"minecraft:arrow\",Count:1b},{}],Charged:1b}";
|
||||
private static ItemStack stack;
|
||||
private static final ItemStack stack = Utils.generateItemStackWithMeta(inbt, Items.CROSSBOW);
|
||||
ItemStack before = new ItemStack(Registry.ITEM.get(new Identifier("air")), 1);
|
||||
|
||||
public SuperCrossbow() {
|
||||
super("SuperCrossbow", "shoot arrows really quickly (press middle mouse)", ModuleType.MISC);
|
||||
super("SuperCrossbow", "Shoot arrows really quickly (Press your middle mouse key)", ModuleType.MISC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
if (!getItemNameFromStack(client.player.getMainHandStack()).equals(getItemNameFromStack(stack))) {
|
||||
if (client.player.getMainHandStack().getItem() != stack.getItem()) {
|
||||
before = client.player.getMainHandStack();
|
||||
}
|
||||
if (client.options.pickItemKey.isPressed()) {
|
||||
|
@ -44,20 +45,8 @@ public class SuperCrossbow extends Module {
|
|||
|
||||
@Override
|
||||
public void enable() {
|
||||
if (stack == null) {
|
||||
stack = new ItemStack(Registry.ITEM.get(new Identifier("crossbow")), 1);
|
||||
try {
|
||||
stack.setNbt(StringNbtReader.parse(inbt));
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
private String getItemNameFromStack(ItemStack hstack) {
|
||||
String hs = hstack.getItem().getTranslationKey();
|
||||
hs = hs.replace("minecraft.", "").replace("block.", "").replace("item.", "");
|
||||
return hs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
|
|
|
@ -15,7 +15,6 @@ import net.shadow.client.helper.event.EventListener;
|
|||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.BlockRenderingEvent;
|
||||
import net.shadow.client.helper.event.events.PacketEvent;
|
||||
import net.shadow.client.helper.render.Renderer;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.misc;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.gui.notifications.Notification;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
||||
public class Unload extends Module {
|
||||
public static boolean loaded = true;
|
||||
|
||||
public Unload() {
|
||||
super("Unload", "unload the client for the most part", ModuleType.MISC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
loaded = false;
|
||||
for(Module m : ModuleRegistry.getModules()){
|
||||
m.setEnabled(false);
|
||||
}
|
||||
Notification.create(1000, "Unload", Notification.Type.SUCCESS, "Client Unloaded!");
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
package net.shadow.client.feature.module.impl.movement;
|
||||
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.attribute.EntityAttributes;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
|
@ -16,18 +15,17 @@ public class Speed extends Module {
|
|||
static float fovEffectScal = 0;
|
||||
static int ticksonground = 0;
|
||||
static int ticksjustsneaking = 0;
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<Mode>(Mode.OnGround).name("Mode").description("the way to apply speed").get());
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<Mode>(Mode.OnGround).name("Mode").description("How to apply the speed").get());
|
||||
final DoubleSetting speed = this.config.create(new DoubleSetting.Builder(20).min(5).max(50).name("Speed").description("How fast to go").get());
|
||||
|
||||
public Speed() {
|
||||
super("Speed", "gotta go fast", ModuleType.MOVEMENT);
|
||||
super("Speed", "Nyooom", ModuleType.MOVEMENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
fovEffectScal = client.options.fovEffectScale;
|
||||
if (client.player == null) return;
|
||||
ClientPlayerEntity player = client.player;
|
||||
switch (mode.getValue()) {
|
||||
case OnGround:
|
||||
client.player.setSprinting(true);
|
||||
|
|
|
@ -11,13 +11,13 @@ import net.shadow.client.feature.module.ModuleType;
|
|||
|
||||
public class AutoSign extends Module {
|
||||
|
||||
final StringSetting ss1 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 1").description("the text for line 1").get());
|
||||
final StringSetting ss2 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 2").description("the text for line 2").get());
|
||||
final StringSetting ss3 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 3").description("the text for line 3").get());
|
||||
final StringSetting ss4 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 4").description("the text for line 4").get());
|
||||
final StringSetting ss1 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 1").description("The text for line 1").get());
|
||||
final StringSetting ss2 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 2").description("The text for line 2").get());
|
||||
final StringSetting ss3 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 3").description("The text for line 3").get());
|
||||
final StringSetting ss4 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 4").description("The text for line 4").get());
|
||||
|
||||
public AutoSign() {
|
||||
super("AutoSign", "automatically write signs", ModuleType.WORLD);
|
||||
super("AutoSign", "Automatically write signs when looking at them", ModuleType.WORLD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,7 +48,7 @@ public class AutoSign extends Module {
|
|||
|
||||
}
|
||||
|
||||
public String[] getText(){
|
||||
public String[] getText() {
|
||||
return new String[]{ss1.getValue(), ss2.getValue(), ss3.getValue(), ss4.getValue()};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,14 @@ package net.shadow.client.feature.module.impl.world;
|
|||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket.Action;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.config.EnumSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
|
@ -17,13 +23,6 @@ import net.shadow.client.helper.event.EventType;
|
|||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.PacketEvent;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket.Action;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -32,8 +31,7 @@ import java.util.Random;
|
|||
|
||||
public class MassUse extends Module {
|
||||
final List<Packet<?>> dontRepeat = new ArrayList<>();
|
||||
// SliderValue uses = (SliderValue) this.config.create("Uses", 3, 1, 100, 0).description("How many times to use the item");
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Interact).name("Mode").description("How to mass use").get());
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Interact).name("Mode").description("How to use the item").get());
|
||||
final DoubleSetting uses = this.config.create(new DoubleSetting.Builder(3).name("Uses").description("How many times to use the item").min(1).max(100).precision(0).get());
|
||||
|
||||
public MassUse() {
|
||||
|
@ -47,7 +45,7 @@ public class MassUse extends Module {
|
|||
dontRepeat.remove(pe.getPacket());
|
||||
return;
|
||||
}
|
||||
switch(mode.getValue()){
|
||||
switch (mode.getValue()) {
|
||||
case Interact -> {
|
||||
if (pe.getPacket() instanceof PlayerInteractBlockC2SPacket p1) {
|
||||
PlayerInteractBlockC2SPacket pp = new PlayerInteractBlockC2SPacket(p1.getHand(), p1.getBlockHitResult());
|
||||
|
@ -64,10 +62,10 @@ public class MassUse extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
case Block -> {
|
||||
case MassPlace -> {
|
||||
BlockHitResult r = (BlockHitResult) client.crosshairTarget;
|
||||
BlockPos p = r.getBlockPos();
|
||||
if (pe.getPacket() instanceof PlayerInteractBlockC2SPacket p1) {
|
||||
if (pe.getPacket() instanceof PlayerInteractBlockC2SPacket) {
|
||||
for (int i = 0; i < uses.getValue(); i++) {
|
||||
PlayerInteractBlockC2SPacket pp = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, r);
|
||||
dontRepeat.add(pp);
|
||||
|
@ -78,8 +76,8 @@ public class MassUse extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
case Random -> {
|
||||
if (pe.getPacket() instanceof PlayerInteractBlockC2SPacket p1) {
|
||||
case RandomPlace -> {
|
||||
if (pe.getPacket() instanceof PlayerInteractBlockC2SPacket) {
|
||||
Random random = new Random();
|
||||
|
||||
for (int i = 0; i < uses.getValue(); i++) {
|
||||
|
@ -126,10 +124,10 @@ public class MassUse extends Module {
|
|||
|
||||
}
|
||||
|
||||
enum Mode {
|
||||
public enum Mode {
|
||||
Interact,
|
||||
Block,
|
||||
Random
|
||||
MassPlace,
|
||||
RandomPlace
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,17 +11,13 @@ import org.apache.logging.log4j.Level;
|
|||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class Events {
|
||||
record ListenerEntry(int id, EventType type, Consumer<? extends Event> eventListener) {}
|
||||
static final List<ListenerEntry> entries = new CopyOnWriteArrayList<>();
|
||||
|
||||
public static ListenerEntry registerEventHandler(int uniqueId, EventType event, Consumer<? extends Event> handler) {
|
||||
|
@ -30,15 +26,17 @@ public class Events {
|
|||
entries.add(le);
|
||||
return le;
|
||||
} else {
|
||||
ShadowMain.log(Level.WARN, uniqueId+" tried to register "+event.name()+" multiple times");
|
||||
ShadowMain.log(Level.WARN, uniqueId + " tried to register " + event.name() + " multiple times");
|
||||
return entries.stream().filter(listenerEntry -> listenerEntry.id == uniqueId).findFirst().orElseThrow();
|
||||
}
|
||||
}
|
||||
|
||||
public static void unregister(int id) {
|
||||
entries.removeIf(listenerEntry -> listenerEntry.id == id);
|
||||
}
|
||||
|
||||
public static ListenerEntry registerEventHandler(EventType event, Consumer<? extends Event> handler) {
|
||||
return registerEventHandler((int) Math.floor(Math.random()*0xFFFFFF),event,handler);
|
||||
return registerEventHandler((int) Math.floor(Math.random() * 0xFFFFFF), event, handler);
|
||||
}
|
||||
|
||||
public static void registerEventHandlerClass(Object instance) {
|
||||
|
@ -52,14 +50,14 @@ public class Events {
|
|||
} else {
|
||||
declaredMethod.setAccessible(true);
|
||||
|
||||
ListenerEntry l = registerEventHandler((instance.getClass().getName()+declaredMethod.getName()).hashCode(), ev.type(), event -> {
|
||||
ListenerEntry l = registerEventHandler((instance.getClass().getName() + declaredMethod.getName()).hashCode(), ev.type(), event -> {
|
||||
try {
|
||||
declaredMethod.invoke(instance, event);
|
||||
} catch (IllegalAccessException | InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
ShadowMain.log(Level.INFO, "Registered event handler "+declaredMethod.toString()+" with id "+l.id);
|
||||
ShadowMain.log(Level.INFO, "Registered event handler " + declaredMethod + " with id " + l.id);
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,4 +75,7 @@ public class Events {
|
|||
}
|
||||
return argument.isCancelled();
|
||||
}
|
||||
|
||||
record ListenerEntry(int id, EventType type, Consumer<? extends Event> eventListener) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
package net.shadow.client.helper.render;
|
||||
|
||||
import com.google.common.collect.Queues;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
|
@ -16,9 +15,6 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
public class MSAAFramebuffer extends Framebuffer {
|
||||
public static final int MIN_SAMPLES = 2;
|
||||
|
@ -26,7 +22,6 @@ public class MSAAFramebuffer extends Framebuffer {
|
|||
|
||||
private static final Map<Integer, MSAAFramebuffer> INSTANCES = new HashMap<>();
|
||||
private static final List<MSAAFramebuffer> ACTIVE_INSTANCES = new ArrayList<>();
|
||||
private static final ConcurrentMap<Integer, ConcurrentLinkedQueue<Runnable>> RENDER_CALLS = new ConcurrentHashMap<>();
|
||||
|
||||
private final int samples;
|
||||
private int rboColor;
|
||||
|
@ -77,38 +72,6 @@ public class MSAAFramebuffer extends Framebuffer {
|
|||
|
||||
msaaBuffer.clear(true);
|
||||
mainBuffer.beginWrite(false);
|
||||
|
||||
executeDelayedRenderCalls(samples);
|
||||
}
|
||||
|
||||
public static void renderAfterUsage(int samples, Runnable renderCall) {
|
||||
if (getInstance(samples).isInUse() || !RenderSystem.isOnRenderThreadOrInit()) {
|
||||
RENDER_CALLS.computeIfAbsent(samples, x -> Queues.newConcurrentLinkedQueue()).add(renderCall);
|
||||
return;
|
||||
}
|
||||
|
||||
renderCall.run();
|
||||
}
|
||||
|
||||
public static void renderAfterUsage(Runnable renderCall) {
|
||||
if (!RenderSystem.isOnRenderThreadOrInit()) {
|
||||
RenderSystem.recordRenderCall(() -> renderAfterUsage(renderCall));
|
||||
}
|
||||
|
||||
if (ACTIVE_INSTANCES.size() != 0) {
|
||||
RENDER_CALLS.computeIfAbsent(ACTIVE_INSTANCES.get(0).samples, x -> Queues.newConcurrentLinkedQueue()).add(renderCall);
|
||||
return;
|
||||
}
|
||||
|
||||
renderCall.run();
|
||||
}
|
||||
|
||||
private static void executeDelayedRenderCalls(int samples) {
|
||||
RenderSystem.assertOnRenderThreadOrInit();
|
||||
ConcurrentLinkedQueue<Runnable> queue = RENDER_CALLS.getOrDefault(samples, Queues.newConcurrentLinkedQueue());
|
||||
while (!queue.isEmpty()) {
|
||||
queue.poll().run();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -192,10 +155,6 @@ public class MSAAFramebuffer extends Framebuffer {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isInUse() {
|
||||
return this.inUse;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endWrite() {
|
||||
super.endWrite();
|
||||
|
|
|
@ -518,23 +518,26 @@ public class Renderer {
|
|||
renderTexturedQuad(matrices.peek()
|
||||
.getPositionMatrix(), x0, x1, y0, y1, z, (u + 0.0F) / (float) textureWidth, (u + (float) regionWidth) / (float) textureWidth, (v + 0.0F) / (float) textureHeight, (v + (float) regionHeight) / (float) textureHeight);
|
||||
}
|
||||
|
||||
static Vec2f lerp(Vec2f p1, Vec2f p2, float delta) {
|
||||
float x = MathHelper.lerp(delta,p1.x,p2.x);
|
||||
float y = MathHelper.lerp(delta,p1.y,p2.y);
|
||||
return new Vec2f(x,y);
|
||||
float x = MathHelper.lerp(delta, p1.x, p2.x);
|
||||
float y = MathHelper.lerp(delta, p1.y, p2.y);
|
||||
return new Vec2f(x, y);
|
||||
}
|
||||
|
||||
static Vec2f getMultiBezPoint(Vec2f[] vertecies, float delta) {
|
||||
List<Vec2f> verts = new ArrayList<>(List.of(vertecies));
|
||||
while(verts.size() > 1) {
|
||||
for(int i = 0;i<verts.size()-1;i++) {
|
||||
while (verts.size() > 1) {
|
||||
for (int i = 0; i < verts.size() - 1; i++) {
|
||||
Vec2f current = verts.get(i);
|
||||
Vec2f next = verts.get(i+1);
|
||||
Vec2f next = verts.get(i + 1);
|
||||
verts.set(i, lerp(current, next, delta));
|
||||
}
|
||||
verts.remove(verts.size()-1);
|
||||
verts.remove(verts.size() - 1);
|
||||
}
|
||||
return verts.get(0);
|
||||
}
|
||||
|
||||
public static void renderRoundedShadowInternal(Matrix4f matrix, float cr, float cg, float cb, float ca, double fromX, double fromY, double toX, double toY, double rad, double samples, double wid) {
|
||||
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
||||
bufferBuilder.begin(VertexFormat.DrawMode.TRIANGLE_STRIP, VertexFormats.POSITION_COLOR);
|
||||
|
@ -551,8 +554,8 @@ public class Renderer {
|
|||
float sin = (float) (Math.sin(rad1) * rad);
|
||||
float cos = (float) (Math.cos(rad1) * rad);
|
||||
bufferBuilder.vertex(matrix, (float) current[0] + sin, (float) current[1] + cos, 0.0F).color(cr, cg, cb, ca).next();
|
||||
float sin1 = (float) (sin + Math.sin(rad1)*wid);
|
||||
float cos1 = (float) (cos + Math.cos(rad1)*wid);
|
||||
float sin1 = (float) (sin + Math.sin(rad1) * wid);
|
||||
float cos1 = (float) (cos + Math.cos(rad1) * wid);
|
||||
bufferBuilder.vertex(matrix, (float) current[0] + sin1, (float) current[1] + cos1, 0.0F).color(cr, cg, cb, 0f).next();
|
||||
}
|
||||
}
|
||||
|
@ -562,8 +565,8 @@ public class Renderer {
|
|||
float sin = (float) (Math.sin(rad1) * rad);
|
||||
float cos = (float) (Math.cos(rad1) * rad);
|
||||
bufferBuilder.vertex(matrix, (float) current[0] + sin, (float) current[1] + cos, 0.0F).color(cr, cg, cb, ca).next();
|
||||
float sin1 = (float) (sin + Math.sin(rad1)*wid);
|
||||
float cos1 = (float) (cos + Math.cos(rad1)*wid);
|
||||
float sin1 = (float) (sin + Math.sin(rad1) * wid);
|
||||
float cos1 = (float) (cos + Math.cos(rad1) * wid);
|
||||
bufferBuilder.vertex(matrix, (float) current[0] + sin1, (float) current[1] + cos1, 0.0F).color(cr, cg, cb, 0f).next();
|
||||
}
|
||||
bufferBuilder.end();
|
||||
|
@ -584,18 +587,19 @@ public class Renderer {
|
|||
|
||||
renderRoundedShadowInternal(matrix, g, h, k, f, fromX, fromY, toX, toY, rad, samples, shadowWidth);
|
||||
}
|
||||
|
||||
public static void renderBezierCurve(MatrixStack stack, Vec2f[] points, float r, float g, float b, float a, float laziness) {
|
||||
if (points.length < 2) return;
|
||||
float minIncr = 0.0001f;
|
||||
laziness = MathHelper.clamp(laziness,minIncr,1);
|
||||
laziness = MathHelper.clamp(laziness, minIncr, 1);
|
||||
Vec2f prev = null;
|
||||
for(float d = 0;d<=1;d+=Math.min(laziness,Math.max(minIncr,1-d))) {
|
||||
Vec2f pos = getMultiBezPoint(points,d);
|
||||
for (float d = 0; d <= 1; d += Math.min(laziness, Math.max(minIncr, 1 - d))) {
|
||||
Vec2f pos = getMultiBezPoint(points, d);
|
||||
if (prev == null) {
|
||||
prev = pos;
|
||||
continue;
|
||||
}
|
||||
renderLine(stack,new Color(r,g,b,a),prev.x,prev.y,pos.x,pos.y);
|
||||
renderLine(stack, new Color(r, g, b, a), prev.x, prev.y, pos.x, pos.y);
|
||||
prev = pos;
|
||||
}
|
||||
|
||||
|
@ -784,9 +788,8 @@ public class Renderer {
|
|||
bufferBuilder.end();
|
||||
BufferRenderer.draw(bufferBuilder);
|
||||
}
|
||||
public static void renderRoundedQuadWithShadow(MatrixStack matrices, Color c, double fromX, double fromY, double toX, double toY, double rad, double samples) {
|
||||
// RenderSystem.defaultBlendFunc();
|
||||
|
||||
public static void renderRoundedQuadWithShadow(MatrixStack matrices, Color c, double fromX, double fromY, double toX, double toY, double rad, double samples) {
|
||||
int color = c.getRGB();
|
||||
Matrix4f matrix = matrices.peek().getPositionMatrix();
|
||||
float f = (float) (color >> 24 & 255) / 255.0F;
|
||||
|
@ -798,11 +801,10 @@ public class Renderer {
|
|||
|
||||
renderRoundedQuadInternal(matrix, g, h, k, f, fromX, fromY, toX, toY, rad, samples);
|
||||
|
||||
renderRoundedShadow(matrices, new Color(10,10,10,100),fromX,fromY,toX,toY,rad,samples,3);
|
||||
renderRoundedShadow(matrices, new Color(10, 10, 10, 100), fromX, fromY, toX, toY, rad, samples, 3);
|
||||
}
|
||||
public static void renderRoundedQuad(MatrixStack matrices, Color c, double fromX, double fromY, double toX, double toY, double rad, double samples) {
|
||||
// RenderSystem.defaultBlendFunc();
|
||||
|
||||
public static void renderRoundedQuad(MatrixStack matrices, Color c, double fromX, double fromY, double toX, double toY, double rad, double samples) {
|
||||
int color = c.getRGB();
|
||||
Matrix4f matrix = matrices.peek().getPositionMatrix();
|
||||
float f = (float) (color >> 24 & 255) / 255.0F;
|
||||
|
|
|
@ -248,9 +248,9 @@ public class Utils {
|
|||
}
|
||||
|
||||
//---DO NOT REMOVE THIS---
|
||||
public static class Packets{
|
||||
public static class Packets {
|
||||
|
||||
public static PlayerInteractBlockC2SPacket generatePlace(BlockPos pos){
|
||||
public static PlayerInteractBlockC2SPacket generatePlace(BlockPos pos) {
|
||||
return new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(new Vec3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, false));
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ public class AChatScreenMixin extends Screen {
|
|||
|
||||
@Redirect(method = "keyPressed", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/ChatScreen;sendMessage(Ljava/lang/String;)V"))
|
||||
void shadow_interceptChatMessage(ChatScreen instance, String s) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
String p = getPrefix();
|
||||
if (s.startsWith(p)) { // filter all messages starting with .
|
||||
ShadowMain.client.inGameHud.getChatHud().addToMessageHistory(s);
|
||||
|
@ -150,7 +149,6 @@ public class AChatScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "render", at = @At("RETURN"))
|
||||
void shadow_renderText(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
String p = getPrefix();
|
||||
String t = chatField.getText();
|
||||
if (t.startsWith(p)) {
|
||||
|
@ -163,7 +161,6 @@ public class AChatScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "keyPressed", at = @At("HEAD"), cancellable = true)
|
||||
void shadow_injectKeyPressed(int keyCode, int scanCode, int modifiers, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
String p = getPrefix();
|
||||
if (keyCode == GLFW.GLFW_KEY_TAB && chatField.getText().startsWith(p)) {
|
||||
autocomplete();
|
||||
|
@ -173,7 +170,6 @@ public class AChatScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = {"init()V"}, at = @At("TAIL"))
|
||||
public void onInit(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
chatField.setMaxLength((ModuleRegistry.getByClass(InfChatLength.class).isEnabled()) ? Integer.MAX_VALUE : 256);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ public abstract class AEntityRendererMixin<T extends Entity> {
|
|||
|
||||
@Inject(method = "renderLabelIfPresent", at = @At("HEAD"), cancellable = true)
|
||||
public void renderEntityLabel(T entity, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (entity.getCustomName() != null && entity.getCustomName().equals(Text.of("DoNotRenderThisUsernamePlease"))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ public abstract class AGenericContainerScreenMixin {
|
|||
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
public void preTick(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (!ModuleRegistry.getByClass(InventoryWalk.class).isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public abstract class AInGameHudMixin extends DrawableHelper {
|
||||
@Inject(method = "render", at = @At("RETURN"))
|
||||
public void postRender(MatrixStack matrices, float tickDelta, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
AccurateFrameRateCounter.globalInstance.recordFrame();
|
||||
MSAAFramebuffer.use(MSAAFramebuffer.MAX_SAMPLES, () -> {
|
||||
for (Module module : ModuleRegistry.getModules()) {
|
||||
|
|
|
@ -19,7 +19,6 @@ public class AbstractBlockStateMixin {
|
|||
|
||||
@Inject(method = "getLuminance", at = @At("HEAD"), cancellable = true)
|
||||
public void shadow_luminateBlock(CallbackInfoReturnable<Integer> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(XRAY.class)).isEnabled()) {
|
||||
cir.setReturnValue(15);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
|||
public class AreaEffectCloudEntityMixin {
|
||||
@ModifyVariable(method = "tick", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/util/math/MathHelper;ceil(F)I"), index = 4)
|
||||
int re(int value) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return value;
|
||||
AntiCrash ac = AntiCrash.instance();
|
||||
if (ac.isEnabled() && ac.getCapParticles().getValue()) {
|
||||
int partTotal = ((ParticleManagerDuck) ShadowMain.client.particleManager).getTotalParticles();
|
||||
|
|
|
@ -28,7 +28,6 @@ public abstract class BeaconScreenMixin extends HandledScreen<BeaconScreenHandle
|
|||
@Inject(method = "init", at = @At("TAIL"))
|
||||
protected void init(CallbackInfo ci) {
|
||||
if (ModuleRegistry.getByClass(BeaconSpoofer.class).isEnabled()) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
this.addDrawableChild(new ButtonWidget(1,
|
||||
1, 100, 20, new LiteralText("Apply Custom"),
|
||||
b -> {
|
||||
|
|
|
@ -22,7 +22,6 @@ public class BlockEntityRenderDispatcherMixin {
|
|||
@Inject(method = "render(Lnet/minecraft/block/entity/BlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;)V", at = @At("HEAD"),
|
||||
cancellable = true)
|
||||
public <E extends BlockEntity> void preRender(E blockEntity, float tickDelta, MatrixStack matrix, VertexConsumerProvider vertexConsumerProvider, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Events.fireEvent(EventType.BLOCK_ENTITY_RENDER, new BlockEntityRenderEvent(matrix, blockEntity))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ public class BlockMixin {
|
|||
|
||||
@Inject(method = "shouldDrawSide", at = @At("HEAD"), cancellable = true)
|
||||
private static void overwriteShouldDrawSide(BlockState state, BlockView world, BlockPos pos, Direction side, BlockPos blockPos, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(XRAY.class)).isEnabled()) {
|
||||
cir.setReturnValue(XRAY.blocks.contains(state.getBlock()));
|
||||
}
|
||||
|
@ -31,7 +30,6 @@ public class BlockMixin {
|
|||
|
||||
@Inject(method = "isTranslucent", at = @At("HEAD"), cancellable = true)
|
||||
public void overwriteIsTranslucent(BlockState state, BlockView world, BlockPos pos, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(XRAY.class)).isEnabled()) {
|
||||
cir.setReturnValue(!XRAY.blocks.contains(state.getBlock()));
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
public class CameraMixin {
|
||||
@Inject(method = "getSubmersionType", at = @At("RETURN"), cancellable = true)
|
||||
void pretendEverythingsFine(CallbackInfoReturnable<CameraSubmersionType> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (NoLiquidFog.INSTANCE != null && NoLiquidFog.INSTANCE.isEnabled() && (cir.getReturnValue() == CameraSubmersionType.WATER || cir.getReturnValue() == CameraSubmersionType.LAVA)) {
|
||||
cir.setReturnValue(CameraSubmersionType.NONE);
|
||||
}
|
||||
|
|
|
@ -110,7 +110,6 @@ public abstract class ClickableWidgetMixin implements DoesMSAA, FastTickable {
|
|||
|
||||
@Inject(method = "renderButton", at = @At("HEAD"), cancellable = true)
|
||||
void p(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (((Object) this) instanceof TextFieldWidget) return;
|
||||
ci.cancel();
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ public class ClientConnection1Mixin {
|
|||
|
||||
@Inject(method = "initChannel(Lio/netty/channel/Channel;)V", at = @At("HEAD"))
|
||||
public void applyProxy(Channel channel, CallbackInfo ci) {
|
||||
//skipped this one as you probably don't want your proxy falling out
|
||||
ProxyManagerScreen.Proxy currentProxy = ProxyManagerScreen.currentProxy;
|
||||
if (currentProxy != null) {
|
||||
if (currentProxy.socks4()) {
|
||||
|
|
|
@ -23,7 +23,6 @@ public class ClientConnectionMixin {
|
|||
|
||||
@Inject(method = "handlePacket", at = @At("HEAD"), cancellable = true)
|
||||
private static <T extends PacketListener> void dispatchPacketGet(Packet<T> packet, PacketListener listener, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Events.fireEvent(EventType.PACKET_RECEIVE, new PacketEvent(packet))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
@ -31,7 +30,6 @@ public class ClientConnectionMixin {
|
|||
|
||||
@Inject(method = "exceptionCaught", at = @At("HEAD"), cancellable = true)
|
||||
public void catchException(ChannelHandlerContext context, Throwable ex, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ModuleRegistry.getByClass(AntiPacketKick.class).isEnabled()) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
@ -39,7 +37,6 @@ public class ClientConnectionMixin {
|
|||
|
||||
@Inject(method = "send(Lnet/minecraft/network/Packet;)V", cancellable = true, at = @At("HEAD"))
|
||||
public void dispatchPacketSend(Packet<?> packet, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Events.fireEvent(EventType.PACKET_SEND, new PacketEvent(packet))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import java.util.Objects;
|
|||
public class ClientPlayerEntityMixin {
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
public void preTick(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
Utils.TickManager.tick();
|
||||
if (!ConfigManager.enabled) {
|
||||
ConfigManager.enableModules();
|
||||
|
@ -40,13 +39,11 @@ public class ClientPlayerEntityMixin {
|
|||
|
||||
@Redirect(method = "updateNausea", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;shouldPause()Z"))
|
||||
public boolean overwriteIsPauseScreen(Screen screen) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return screen.shouldPause();
|
||||
return Objects.requireNonNull(ModuleRegistry.getByClass(PortalGUI.class)).isEnabled() || screen.shouldPause();
|
||||
}
|
||||
|
||||
@Inject(method = "pushOutOfBlocks", at = @At("HEAD"), cancellable = true)
|
||||
public void preventPushOutFromBlocks(double x, double z, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(Freecam.class)).isEnabled() || Objects.requireNonNull(ModuleRegistry.getByClass(NoPush.class))
|
||||
.isEnabled() || Objects.requireNonNull(ModuleRegistry.getByClass(Phase.class)).isEnabled()) {
|
||||
ci.cancel();
|
||||
|
|
|
@ -6,15 +6,12 @@ package net.shadow.client.mixin;
|
|||
|
||||
import net.minecraft.client.network.ClientPlayerInteractionManager;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.impl.combat.Reach;
|
||||
import net.shadow.client.feature.module.impl.world.NoBreakDelay;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
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.CallbackInfoReturnable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
@ -29,18 +26,4 @@ public class ClientPlayerInteractionManagerMixin {
|
|||
int cd = this.blockBreakingCooldown;
|
||||
return Objects.requireNonNull(ModuleRegistry.getByClass(NoBreakDelay.class)).isEnabled() ? 0 : cd;
|
||||
}
|
||||
|
||||
@Inject(method = {"getReachDistance()F"}, at = {@At("HEAD")}, cancellable = true)
|
||||
private void onReachDistance(CallbackInfoReturnable<Float> cir) {
|
||||
if (ModuleRegistry.getByClass(Reach.class).isEnabled()) {
|
||||
cir.setReturnValue((float)ModuleRegistry.getByClass(Reach.class).getReachDistance());
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = {"hasExtendedReach()Z"}, at = {@At("HEAD")}, cancellable = true)
|
||||
private void onExtendedReach(CallbackInfoReturnable<Boolean> cir) {
|
||||
if (ModuleRegistry.getByClass(Reach.class).isEnabled()) {
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ public class CreativeInventoryScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
void postInit(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
RoundButton nbtEdit = new RoundButton(RoundButton.STANDARD, 5, 5, 64, 20, "NBT editor", () -> {
|
||||
if (ShadowMain.client.player.getInventory().getMainHandStack().isEmpty()) {
|
||||
Utils.Logging.error("You need to hold an item!");
|
||||
|
|
|
@ -19,7 +19,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public class EntityModelMixin {
|
||||
@Inject(method = "render", at = @At("HEAD"))
|
||||
void preRender(MatrixStack matrices, VertexConsumer vertices, int light, int overlay, float red, float green, float blue, float alpha, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
// shut up retard
|
||||
//noinspection ConstantConditions
|
||||
ModuleRegistry.getByClass(ESP.class).recording = ModuleRegistry.getByClass(ESP.class)
|
||||
|
@ -29,7 +28,6 @@ public class EntityModelMixin {
|
|||
|
||||
@Inject(method = "render", at = @At("TAIL"))
|
||||
void postRender(MatrixStack matrices, VertexConsumer vertices, int light, int overlay, float red, float green, float blue, float alpha, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
ModuleRegistry.getByClass(ESP.class).recording = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ public class EntityRenderDispatcherMixin {
|
|||
|
||||
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
|
||||
public <E extends Entity> void dispatchEntityRender(E entity, double x, double y, double z, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Events.fireEvent(EventType.ENTITY_RENDER, new EntityRenderEvent(matrices, entity))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.client.gui.screen.GameMenuScreen;
|
|||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.text.Text;
|
||||
import net.shadow.client.feature.gui.screen.AddonManagerScreen;
|
||||
import net.shadow.client.feature.gui.screen.StatsScreen;
|
||||
import net.shadow.client.feature.gui.widget.RoundButton;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -23,7 +22,6 @@ public class GameMenuMixin extends Screen {
|
|||
|
||||
@Inject(method = "initWidgets", at = @At("RETURN"))
|
||||
void addAddons(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
addDrawableChild(new RoundButton(RoundButton.STANDARD, 5, 5, 60, 20, "Addons", () -> {
|
||||
assert client != null;
|
||||
client.setScreen(new AddonManagerScreen());
|
||||
|
|
|
@ -40,7 +40,6 @@ public class GameRendererMixin {
|
|||
|
||||
@Inject(at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/GameRenderer;renderHand:Z", opcode = Opcodes.GETFIELD, ordinal = 0), method = "renderWorld")
|
||||
void dispatchWorldRender(float tickDelta, long limitTime, MatrixStack matrix, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (vb) {
|
||||
ShadowMain.client.options.bobView = true;
|
||||
vb = false;
|
||||
|
|
|
@ -29,7 +29,6 @@ public class KeyboardMixin {
|
|||
|
||||
@Inject(method = "onKey", at = @At("RETURN"))
|
||||
void postKeyPressed(long window, int key, int scancode, int action, int modifiers, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (window == this.client.getWindow()
|
||||
.getHandle() && ShadowMain.client.currentScreen == null && System.currentTimeMillis() - ShadowMain.lastScreenChange > 10) { // make sure we are in game and the screen has been there for at least 10 ms
|
||||
if (ShadowMain.client.player == null || ShadowMain.client.world == null) {
|
||||
|
@ -42,7 +41,6 @@ public class KeyboardMixin {
|
|||
|
||||
@Inject(method = "setRepeatEvents", at = @At("HEAD"), cancellable = true)
|
||||
void repeatEvents(boolean repeatEvents, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
this.repeatEvents = true;
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -29,9 +29,7 @@ import java.util.Objects;
|
|||
public class LivingEntityMixin {
|
||||
@Inject(method = "onAttacking", at = @At("HEAD"))
|
||||
public void atomic_setLastAttacked(Entity target, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (this.equals(ShadowMain.client.player) && target instanceof LivingEntity entity) {
|
||||
|
||||
AttackManager.registerLastAttacked(entity);
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +40,6 @@ public class LivingEntityMixin {
|
|||
// }
|
||||
@Inject(method = "canWalkOnFluid", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_overwriteCanWalkOnFluid(FluidState fluidState, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ShadowMain.client.player == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -57,7 +54,6 @@ public class LivingEntityMixin {
|
|||
|
||||
@Redirect(method = "travel", at = @At(value = "INVOKE", target = "net/minecraft/entity/LivingEntity.hasStatusEffect(Lnet/minecraft/entity/effect/StatusEffect;)Z"), require = 0)
|
||||
boolean atomic_stopLevitationEffect(LivingEntity instance, StatusEffect effect) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) instance.hasStatusEffect(effect);
|
||||
if (instance.equals(ShadowMain.client.player) && ModuleRegistry.getByClass(NoLevitation.class).isEnabled() && effect == StatusEffects.LEVITATION) {
|
||||
return false;
|
||||
} else {
|
||||
|
@ -67,7 +63,6 @@ public class LivingEntityMixin {
|
|||
|
||||
@Inject(method = "pushAwayFrom", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_cancelPush(Entity entity, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (this.equals(ShadowMain.client.player)) {
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(NoPush.class)).isEnabled()) {
|
||||
ci.cancel();
|
||||
|
@ -77,7 +72,6 @@ public class LivingEntityMixin {
|
|||
|
||||
@Redirect(method = "jump", at = @At(value = "INVOKE", target = "net/minecraft/entity/LivingEntity.getYaw()F"))
|
||||
private float atomic_overwriteFreelookYaw(LivingEntity instance) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return instance.getYaw();
|
||||
if (instance.equals(ShadowMain.client.player) && ModuleRegistry.getByClass(FreeLook.class).isEnabled()) {
|
||||
return ModuleRegistry.getByClass(FreeLook.class).newyaw;
|
||||
}
|
||||
|
|
|
@ -31,26 +31,22 @@ public class MinecraftClientMixin {
|
|||
|
||||
@Inject(method = "stop", at = @At("HEAD"))
|
||||
void real(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
ConfigManager.saveState();
|
||||
Events.fireEvent(EventType.GAME_EXIT, new NonCancellableEvent());
|
||||
}
|
||||
|
||||
@Inject(method = "<init>", at = @At("TAIL"))
|
||||
void postInit(RunArgs args, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
ShadowMain.INSTANCE.postWindowInit();
|
||||
}
|
||||
|
||||
@Inject(method = "setScreen", at = @At("HEAD"))
|
||||
void preSetScreen(Screen screen, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
ShadowMain.lastScreenChange = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Redirect(method = "handleInputEvents", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/MinecraftClient;itemUseCooldown:I"))
|
||||
public int replaceItemUseCooldown(MinecraftClient minecraftClient) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return this.itemUseCooldown;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(FastUse.class)).isEnabled()) {
|
||||
return 0;
|
||||
} else {
|
||||
|
|
|
@ -16,7 +16,6 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
|||
public class ModelPartCuboidMixin {
|
||||
@Redirect(method = "renderCuboid", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/VertexConsumer;vertex(FFFFFFFFFIIFFF)V"))
|
||||
void bruh(VertexConsumer instance, float x, float y, float z, float red, float green, float blue, float alpha, float u, float v, int overlay, int light, float normalX, float normalY, float normalZ) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
instance.vertex(x, y, z, red, green, blue, alpha, u, v, overlay, light, normalX, normalY, normalZ);
|
||||
if (ModuleRegistry.getByClass(ESP.class).recording) {
|
||||
ModuleRegistry.getByClass(ESP.class).vertexDumps.add(new double[]{x, y, z});
|
||||
|
|
|
@ -18,7 +18,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public class ModelPartMixin {
|
||||
@Inject(method = "renderCuboids", at = @At("HEAD"))
|
||||
void renderCub(MatrixStack.Entry entry, VertexConsumer vertexConsumer, int light, int overlay, float red, float green, float blue, float alpha, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ModuleRegistry.getByClass(ESP.class).recording) {
|
||||
ModuleRegistry.getByClass(ESP.class).vertexDumps.add(new double[0]);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ public class MouseMixin {
|
|||
|
||||
@Inject(method = "onMouseButton", at = @At("HEAD"), cancellable = true)
|
||||
public void dispatchMouseEvent(long window, int button, int action, int mods, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (window == ShadowMain.client.getWindow().getHandle()) {
|
||||
if (Events.fireEvent(EventType.MOUSE_EVENT, new MouseEvent(button, action))) {
|
||||
ci.cancel();
|
||||
|
|
|
@ -25,7 +25,6 @@ public class MultiplayerScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
void init(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
double sourceY = 32 / 2d - 20 / 2d;
|
||||
RoundButton proxies = new RoundButton(new Color(40, 40, 40), 5, sourceY, 60, 20, "Proxies", () -> ShadowMain.client.setScreen(new ProxyManagerScreen(this)));
|
||||
addDrawableChild(proxies);
|
||||
|
|
|
@ -32,7 +32,6 @@ public class ParticleManagerMixin implements ParticleManagerDuck {
|
|||
|
||||
@Inject(method = "addParticle(Lnet/minecraft/client/particle/Particle;)V", at = @At("HEAD"), cancellable = true)
|
||||
void tick(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
AntiCrash ac = AntiCrash.instance();
|
||||
if (ac.isEnabled()) {
|
||||
if (ac.getCapParticles().getValue()) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
public class PlayerEntityMixin {
|
||||
@Redirect(method = "tick", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/player/PlayerEntity;noClip:Z", opcode = Opcodes.PUTFIELD))
|
||||
void tickNoClip(PlayerEntity playerEntity, boolean value) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
PlayerNoClipQueryEvent q = new PlayerNoClipQueryEvent(playerEntity);
|
||||
Events.fireEvent(EventType.NOCLIP_QUERY, q);
|
||||
playerEntity.noClip = q.getNoClip();
|
||||
|
@ -32,7 +31,6 @@ public class PlayerEntityMixin {
|
|||
|
||||
@Inject(method = "getMovementSpeed", at = @At("RETURN"), cancellable = true)
|
||||
void a(CallbackInfoReturnable<Float> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
Hyperspeed hs = ModuleRegistry.getByClass(Hyperspeed.class);
|
||||
if (!hs.isEnabled() || !equals(ShadowMain.client.player)) {
|
||||
return;
|
||||
|
@ -42,7 +40,6 @@ public class PlayerEntityMixin {
|
|||
|
||||
@Inject(method = "jump", at = @At("RETURN"))
|
||||
void applyLongJump(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (!this.equals(ShadowMain.client.player)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ public class PlayerEntityRendererMixin {
|
|||
@Inject(method = "renderLabelIfPresent(Lnet/minecraft/client/network/AbstractClientPlayerEntity;Lnet/minecraft/text/Text;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V",
|
||||
at = @At("HEAD"), cancellable = true)
|
||||
void real(AbstractClientPlayerEntity abstractClientPlayerEntity, Text text, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
NameTags nt = ModuleRegistry.getByClass(NameTags.class);
|
||||
if (nt.isEnabled()) {
|
||||
nt.render(matrixStack, abstractClientPlayerEntity, text);
|
||||
|
|
|
@ -30,7 +30,6 @@ public class ScreenMixin {
|
|||
|
||||
@Inject(method = "renderBackgroundTexture", at = @At("HEAD"), cancellable = true)
|
||||
void real(int vOffset, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
float r = c.getRed() / 255f;
|
||||
float g = c.getGreen() / 255f;
|
||||
float b = c.getBlue() / 255f;
|
||||
|
|
|
@ -20,7 +20,6 @@ public class SelectWorldScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "render", at = @At("HEAD"))
|
||||
void a(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
renderBackground(matrices);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ public class SharedConstantsMixin {
|
|||
|
||||
@Inject(method = "isValidChar", at = @At("HEAD"), cancellable = true)
|
||||
private static void replaceValidChar(char chr, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ModuleRegistry.getByClass(AllowFormatCodes.class).isEnabled() && chr == '§') {
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@ import net.minecraft.client.gui.screen.ingame.SignEditScreen;
|
|||
import net.minecraft.text.Text;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.impl.world.AutoSign;
|
||||
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
|
@ -16,6 +16,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
@Mixin(SignEditScreen.class)
|
||||
public class SignEditScreenMixin extends Screen {
|
||||
|
||||
@Mutable
|
||||
@Shadow
|
||||
@Final
|
||||
private String[] text;
|
||||
|
@ -26,7 +27,6 @@ public class SignEditScreenMixin extends Screen {
|
|||
|
||||
@Inject(at = {@At("HEAD")}, method = {"init()V"})
|
||||
private void onInit(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ModuleRegistry.getByClass(AutoSign.class).isEnabled()) {
|
||||
text = ModuleRegistry.getByClass(AutoSign.class).getText();
|
||||
finishEditing();
|
||||
|
|
|
@ -23,7 +23,6 @@ public class TitleScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
void real(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
Objects.requireNonNull(client).setScreen(LoadingScreen.instance());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue