mirror of https://github.com/kami-blue/client
Merge branch 'master' into master
This commit is contained in:
commit
b471a9de3b
|
@ -1,4 +1,6 @@
|
||||||
# KAMI
|
# KAMI
|
||||||
|
[![Discord](https://img.shields.io/badge/chat-on%20discord-brightgreen.svg)](http://discord.gg/gmBRk2s)
|
||||||
|
|
||||||
|
|
||||||
A minecraft 'hacked' client in the form of a forge mod.
|
A minecraft 'hacked' client in the form of a forge mod.
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
package me.zeroeightsix.kami.event.events;
|
|
||||||
|
|
||||||
import me.zeroeightsix.kami.event.KamiEvent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by 086 on 18/11/2017.
|
|
||||||
*/
|
|
||||||
public class UpdateEvent extends KamiEvent {
|
|
||||||
}
|
|
|
@ -2,6 +2,8 @@ package me.zeroeightsix.kami.mixin.client;
|
||||||
|
|
||||||
import me.zeroeightsix.kami.KamiMod;
|
import me.zeroeightsix.kami.KamiMod;
|
||||||
import me.zeroeightsix.kami.event.events.GuiScreenEvent;
|
import me.zeroeightsix.kami.event.events.GuiScreenEvent;
|
||||||
|
import me.zeroeightsix.kami.module.Module;
|
||||||
|
import me.zeroeightsix.kami.module.ModuleManager;
|
||||||
import me.zeroeightsix.kami.setting.SettingsPool;
|
import me.zeroeightsix.kami.setting.SettingsPool;
|
||||||
import me.zeroeightsix.kami.util.Wrapper;
|
import me.zeroeightsix.kami.util.Wrapper;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -113,6 +115,7 @@ public class MixinMinecraft {
|
||||||
if (!f.exists())
|
if (!f.exists())
|
||||||
f.createNewFile();
|
f.createNewFile();
|
||||||
SettingsPool.save(f);
|
SettingsPool.save(f);
|
||||||
|
ModuleManager.getModules().forEach(Module::destroy);
|
||||||
}catch (IOException e) {
|
}catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,16 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
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.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.Redirect;
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
|
@ -151,4 +151,10 @@ public class Module extends SettingsClass {
|
||||||
if (alwaysListening) KamiMod.EVENT_BUS.subscribe(this);
|
if (alwaysListening) KamiMod.EVENT_BUS.subscribe(this);
|
||||||
if (!alwaysListening && isDisabled()) KamiMod.EVENT_BUS.unsubscribe(this);
|
if (!alwaysListening && isDisabled()) KamiMod.EVENT_BUS.unsubscribe(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cleanup method in case this module wants to do something when the client closes down
|
||||||
|
*/
|
||||||
|
public void destroy(){};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,40 +10,24 @@ import me.zeroeightsix.kami.setting.Setting;
|
||||||
public class Brightness extends Module {
|
public class Brightness extends Module {
|
||||||
|
|
||||||
@Setting(name = "Brightness")
|
@Setting(name = "Brightness")
|
||||||
public float brightness = 8;
|
public float brightness = 16;
|
||||||
|
|
||||||
@Setting(name = "prev_brightness", hidden = true)
|
@Setting(name = "prev_brightness", hidden = true)
|
||||||
public float prevBrightness = 1;
|
public float prevBrightness = 1;
|
||||||
boolean goingDown = false;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onEnable() {
|
protected void onEnable() {
|
||||||
if (goingDown) {
|
|
||||||
mc.gameSettings.gammaSetting = prevBrightness;
|
|
||||||
alwaysListening = false;
|
|
||||||
goingDown = false;
|
|
||||||
}
|
|
||||||
prevBrightness = mc.gameSettings.gammaSetting;
|
prevBrightness = mc.gameSettings.gammaSetting;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate() {
|
public void onUpdate() {
|
||||||
if (goingDown) {
|
mc.gameSettings.gammaSetting = brightness;
|
||||||
float diff = (prevBrightness - mc.gameSettings.gammaSetting);
|
|
||||||
mc.gameSettings.gammaSetting += diff * 0.1f;
|
|
||||||
if (Math.abs(diff) <= .05f) {
|
|
||||||
mc.gameSettings.gammaSetting = prevBrightness;
|
|
||||||
setAlwaysListening(false);
|
|
||||||
goingDown = false;
|
|
||||||
}
|
|
||||||
}else
|
|
||||||
mc.gameSettings.gammaSetting += (brightness - mc.gameSettings.gammaSetting) * 0.1f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDisable() {
|
protected void onDisable() {
|
||||||
goingDown = true;
|
mc.gameSettings.gammaSetting = prevBrightness;
|
||||||
setAlwaysListening(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,4 +86,8 @@ public class ChunkFinder extends Module {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private Listener<net.minecraftforge.event.world.ChunkEvent.Unload> unloadListener = new Listener<>(event -> dirty = chunks.remove(event.getChunk()));
|
private Listener<net.minecraftforge.event.world.ChunkEvent.Unload> unloadListener = new Listener<>(event -> dirty = chunks.remove(event.getChunk()));
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
GL11.glDeleteLists(1, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
package me.zeroeightsix.kami.module.modules.render;
|
|
||||||
|
|
||||||
import me.zeroeightsix.kami.module.Module;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by 086 on 12/12/2017.
|
|
||||||
*/
|
|
||||||
@Module.Info(name = "Xray", description = "See blocks through walls", category = Module.Category.RENDER)
|
|
||||||
public class Xray extends Module {
|
|
||||||
|
|
||||||
public static Xray INSTANCE;
|
|
||||||
|
|
||||||
public Xray() {
|
|
||||||
Xray.INSTANCE = this;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue