Merge pull request #3 from wine/master

Bunch of small stuff
This commit is contained in:
Ridan Vandenbergh 2018-08-12 02:46:01 +02:00 committed by GitHub
commit af334705fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 291 additions and 19 deletions

270
.gitignore vendored Normal file
View File

@ -0,0 +1,270 @@
# Created by https://www.gitignore.io/api/linux,gradle,eclipse,windows,forgegradle,intellij+all,emacs,vim
### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools
.autotools
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Annotation Processing
.apt_generated/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
### Eclipse Patch ###
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Annotation Processing
.apt_generated
### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
### ForgeGradle ###
# Minecraft client/server files
run/
### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
### Intellij+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
.idea/
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
*.iml
modules.xml
.idea/misc.xml
*.ipr
### Linux ###
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
# Temporary
.netrwhist
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
### Gradle ###
.gradle
/build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
# End of https://www.gitignore.io/api/linux,gradle,eclipse,windows,forgegradle,intellij+all,emacs,vim

View File

@ -17,13 +17,14 @@ KAMI is a forge mod. Start by downloading the latest version of [forge](https://
* **Linux**: `~/.minecraft`
3. Navigate to the `mods` directory. If it doesn't exist, create it.
4. Obtain the KAMI `.jar` file.
* By **downloading** it: see [releases](https://github.com/zeroeightysix/KAMI/releases)
* By **building** it: see [Building](#building).
* By **downloading** it: see [releases](../../releases)
* By **building** it: see [building](#building).
5. Place the `.jar` file in your mods directory.
## Troubleshooting
Please reference the main troubleshooting page: [Troubleshooting](https://github.com/zeroeightysix/KAMI/blob/master/TROUBLESHOOTING.md)
If you experience an issue and it's not listed there, please [open a new issue](https://github.com/zeroeightysix/KAMI/issues/new) and a contributor will help you further.
Please reference the main [troubleshooting page](docs/TROUBLESHOOTING.md)
If you experience an issue and it's not listed there, please [open a new issue](../../issues/new) and a contributor will help you further.
## Contributing
@ -34,19 +35,19 @@ git clone https://github.com/zeroeightysix/KAMI/
cd KAMI
```
On linux, run `chmod +x gradlew` and for the following commands use `./gradlew` instead of `./gradlew.bat`
On linux, run `chmod +x gradlew` and for the following commands use `./gradlew` instead of `gradlew.bat`
```
./gradlew.bat setupDecompWorkspace
gradlew.bat setupDecompWorkspace
```
Import KAMI into your IDE of choice. If you use intelliJ, import from the `build.gradle` file and run `./gradlew.bat genIntellijRuns`
Import KAMI into your IDE of choice. If you use IntelliJ, import from the `build.gradle` file and run `gradlew.bat genIntellijRuns`
If you do not wish to run from an IDE, use `./gradlew.bat runClient` to run KAMI.
If you do not wish to run from an IDE, use `gradlew.bat runClient` to run KAMI.
### Building
```
./gradlew.bat build
gradlew.bat build
cd build/libs
```
In `build/libs` you will find a file `KAMI-<minecraftVersion>-<kamiVersion>-full.jar` which you can copy to the `mods` folder of a minecraft instance that has forge installed.

View File

@ -62,7 +62,7 @@ public class Flight extends Module {
}
}
public static enum FlightMode {
public enum FlightMode {
VANILLA, STATIC
}

View File

@ -16,7 +16,7 @@ public class Sprint extends Module {
mc.player.setSprinting(true);
else
mc.player.setSprinting(false);
} catch (Exception e) {}
} catch (Exception ignored) {}
}
}

View File

@ -7,6 +7,8 @@ import me.zeroeightsix.kami.module.Module;
import net.minecraft.network.play.client.CPacketPlayer;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
/**
* Created by 086 on 24/01/2018.
@ -14,7 +16,7 @@ import java.util.ArrayList;
@Module.Info(name = "Blink", category = Module.Category.PLAYER)
public class Blink extends Module {
ArrayList<CPacketPlayer> packets = new ArrayList<>();
Queue<CPacketPlayer> packets = new LinkedList<>();
@EventHandler
public Listener<PacketEvent.Send> listener = new Listener<>(event -> {
@ -26,9 +28,8 @@ public class Blink extends Module {
@Override
protected void onDisable() {
for (CPacketPlayer cPacketPlayer : packets)
mc.player.connection.sendPacket(cPacketPlayer);
packets.clear();
while (!packets.isEmpty())
mc.player.connection.sendPacket(packets.poll());
}
@Override

View File

@ -13,11 +13,11 @@ public class Brightness extends Module {
public float brightness = 16;
@Setting(name = "prev_brightness", hidden = true)
public float prevbrightness = 1;
public float prevBrightness = 1;
@Override
protected void onEnable() {
prevbrightness = mc.gameSettings.gammaSetting;
prevBrightness = mc.gameSettings.gammaSetting;
}
@Override
@ -27,7 +27,7 @@ public class Brightness extends Module {
@Override
protected void onDisable() {
mc.gameSettings.gammaSetting = prevbrightness;
mc.gameSettings.gammaSetting = prevBrightness;
}
}

View File

@ -67,7 +67,7 @@ public class Friends extends SettingsClass {
String username = split[0];
UUID uuid = UUID.fromString(split[1]);
friends.add(new Friend(getUsernameByUUID(uuid, username),uuid));
} catch (Exception e) {} // Empty line, wrong formatting or something, we don't care
} catch (Exception ignored) {} // Empty line, wrong formatting or something, we don't care
}
return friends;
}