fix legal mishaps

This commit is contained in:
Bella 2020-03-29 13:19:24 -04:00
parent f8d1f68164
commit aeaf989f5f
No known key found for this signature in database
GPG Key ID: 815562EA23BFE344
3 changed files with 11 additions and 35 deletions

View File

@ -93,9 +93,17 @@ public class MixinGuiScreen {
}
}
/**
* @author cookiedragon234
* see https://github.com/S-B99/kamiblue/pull/293 for discussion
* authors words:
* Also @S-B99 you should be more careful with merging commits, especially from people who are new to coding. Stuff like this is obviously stolen, and can get your repository DMCA'd.
*
* as shown be the rest of his discussion, he was fine with it
*/
@Inject(method = "Lnet/minecraft/client/gui/GuiScreen;drawWorldBackground(I)V", at = @At("HEAD"), cancellable = true)
private void drawWorldBackgroundWrapper(final int tint, final CallbackInfo ci) {
if (this.mc.world != null && ModuleManager.isModuleEnabled("CleanGUI") && (((CleanGUI) ModuleManager.getModuleByName("CleanGUI")).inventoryGlobal.getValue())) {
if (mc.world != null && ModuleManager.isModuleEnabled("CleanGUI") && (((CleanGUI) ModuleManager.getModuleByName("CleanGUI")).inventoryGlobal.getValue())) {
ci.cancel();
}
}

View File

@ -1,32 +0,0 @@
package me.zeroeightsix.kami.module.modules.combat;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import me.zeroeightsix.kami.module.Module;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.CPacketPlayer;
import net.minecraftforge.event.entity.player.AttackEntityEvent;
import java.util.function.Predicate;
/**
* @author S-B99
*/
@Module.Info(name = "Criticals", category = Module.Category.COMBAT, description = "Always do critical attacks")
public class Criticals extends Module {
@EventHandler
private Listener<AttackEntityEvent> attackEntityEventListener = new Listener<>(event -> {
if (!mc.player.isInWater() && !mc.player.isInLava()) {
if (mc.player.onGround) {
mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, mc.player.posY + 0.1625, mc.player.posZ, false));
mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, mc.player.posY, mc.player.posZ, false));
mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, mc.player.posY + 4.0E-6, mc.player.posZ, false));
mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, mc.player.posY, mc.player.posZ, false));
mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, mc.player.posY + 1.0E-6, mc.player.posZ, false));
mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, mc.player.posY, mc.player.posZ, false));
mc.player.connection.sendPacket(new CPacketPlayer());
mc.player.onCriticalHit(event.getTarget());
}
}
});
}

View File

@ -10,8 +10,8 @@ import me.zeroeightsix.kami.setting.Settings;
*/
@Module.Info(name = "CleanGUI", category = Module.Category.GUI, showOnArray = Module.ShowOnArray.OFF, description = "Modifies parts of the GUI to be transparent")
public class CleanGUI extends Module {
public Setting<Boolean> inventoryGlobal = register(Settings.b("Inventory", false));
public static Setting<Boolean> chatGlobal = Settings.b("Chat", true);
public Setting<Boolean> inventoryGlobal = register(Settings.b("Inventory", true));
public static Setting<Boolean> chatGlobal = Settings.b("Chat", false);
private static CleanGUI INSTANCE = new CleanGUI();