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