Skip to content

Commit

Permalink
Updated everything to latest version (0.11.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCrayfish committed Feb 12, 2021
1 parent 56c03d6 commit 46771db
Show file tree
Hide file tree
Showing 89 changed files with 4,990 additions and 1,640 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ build
# other
eclipse
run
logs

# Files from Forge MDK
forge*changelog.txt
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Controllable Banner](https://i.imgur.com/ILkyAfn.png)

[![Download](https://img.shields.io/static/v1?label=&message=Download&color=2d2d2d&labelColor=dddddd&style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEQAACxEBf2RfkQAAAAd0SU1FB98BHA41LJJkRpIAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMvvhp8YAAAGGSURBVDhPjZK9SgNBFIVHBEUE8QeMhLAzdzdYBFL7CmnstEjjO4iFjWClFiGJm42VFpYSUptKRfABFBQE7UUI2AmGmPXM5k6cjFE8cJjZ3fPduTOzIiJarvl+bPmuLuWS+K/KmcwUoK4pEGoTnetvYTY7GUpZOCTa0sZi+QRyhQ83pkBShKjDUBvzGKNxr6rU8W4uN8FoX4CKEcB6EMR61OZOEtApEqNIndFvAbiNuAB30QeU+sDYBXSCdw3MrzHvlnx/kdFkC3kU6NkwF3iM0ukFnNM8R0UplZquKHWE85nhV0Kg4o4GrDMwre5x5G9h9aaBHL/VPI849rtqRFfwqALaIcd+F87gYnDy1ha0sY12VcoiR0cLq5/ae3e3gyLbHB2tMAgKQ1fXh+z5a1mpDXQyy8hPIdgyAEMDW8+fWOQJHbfgzXUhxhkXYh/3jcC9C7s2V43c+9DPpHXgeXMIXbqQbV7gAV5hbFixEGMVolUEmvjjXuBeRcoOnp/R/hm81hi0LsQX8OcRBvBjZ8YAAAAASUVORK5CYII=)](https://mrcrayfish.com/mods?id=controllable) ![Minecraft](https://img.shields.io/static/v1?label=&message=1.15%20|%201.14%20|%201.12&color=2d2d2d&labelColor=dddddd&style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMjCGJ1kDAAACoElEQVQ4T22SeU8aURTF/ULGtNRWWVQY9lXABWldIDPIMgVbNgEVtaa0damiqGBdipXaJcY2ofEf4ycbTt97pVAabzK5b27u+Z377kwXgK77QthRy7OfXbeJM+ttqKSXN8sdwbT/A0L7elmsYqrPHZmROLPh5YkV4oEBwaKuHj+yyJptLDoAhbq3O1V1XCVObY3FL24mfn5oRPrcwSCRfQOyNWcjVjZdCbtcdwcgXrXUspdOKbDN/XE9tiBJMhXHT60gUIT2dMhcDLMc3NVKQklz0QIkf5qlyEcO6Qs7yPhMJB4amDMFimQSmqNlE8SKAZFzDfxHfVILIIZ10sJ3OwIbcqSuiOjchkzNCboHev9o2YhgiUP8mxnLN24I6/3ghYdtQG5iUMpFBuCP9iKwLsfiLyeCp2rMnZgwX3NArGoxW1Ridl+BzLEVKa8KSxOqNmDdz0kFnxaLHhWEgAyZigWhHXL+pEDy2ozsDxv8vAzTnh7w5kcghqCaFmCT10of4iPIT2mRdPUh4HoCcVwBH/8Ac2kzUkEV5r3EfVSOvbAJa5NDyI0r2oDtWb1EClh+OoC3Pg7v/Bw7p939yI4rsRW2Y3lKh01eh7WpIRyKZqzyjjYgPdIvlaMWRqYuG7wWryYHsRM0sFolZiPvQ3jheIwSmSBPdkByG/B6Wi3RYiVmRX7GiAPiUCRisii8D+jZNKvPBrHCW1GY0bAz6WkDCtOaSyKQFsi4K5NqNiZtehN2Y5uAShETqolhBqJXpfdPuPsuWwAaRdHSkxdc11mPqkGnyY4pyKbpl1GyJ0Pel7yqBoFcF3zqno5f+d8ohYy9Sx7lzQpxo1eirluCDgt++00p6uxttrG4F/A39sJGZWZMfrcp6O6+5kaVzXJHAOj6DeSs8qw5o8oxAAAAAElFTkSuQmCC) ![Curseforge](http://cf.way2muchnoise.eu/full_controllable_downloads.svg?badge_style=for_the_badge)
[![Download](https://img.shields.io/static/v1?label=&message=Download&color=2d2d2d&labelColor=dddddd&style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEQAACxEBf2RfkQAAAAd0SU1FB98BHA41LJJkRpIAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMvvhp8YAAAGGSURBVDhPjZK9SgNBFIVHBEUE8QeMhLAzdzdYBFL7CmnstEjjO4iFjWClFiGJm42VFpYSUptKRfABFBQE7UUI2AmGmPXM5k6cjFE8cJjZ3fPduTOzIiJarvl+bPmuLuWS+K/KmcwUoK4pEGoTnetvYTY7GUpZOCTa0sZi+QRyhQ83pkBShKjDUBvzGKNxr6rU8W4uN8FoX4CKEcB6EMR61OZOEtApEqNIndFvAbiNuAB30QeU+sDYBXSCdw3MrzHvlnx/kdFkC3kU6NkwF3iM0ukFnNM8R0UplZquKHWE85nhV0Kg4o4GrDMwre5x5G9h9aaBHL/VPI849rtqRFfwqALaIcd+F87gYnDy1ha0sY12VcoiR0cLq5/ae3e3gyLbHB2tMAgKQ1fXh+z5a1mpDXQyy8hPIdgyAEMDW8+fWOQJHbfgzXUhxhkXYh/3jcC9C7s2V43c+9DPpHXgeXMIXbqQbV7gAV5hbFixEGMVolUEmvjjXuBeRcoOnp/R/hm81hi0LsQX8OcRBvBjZ8YAAAAASUVORK5CYII=)](https://mrcrayfish.com/mods?id=controllable) ![Minecraft](https://img.shields.io/static/v1?label=&message=1.16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irluCDgt++00p6uxttrG4F/A39sJGZWZMfrcp6O6+5kaVzXJHAOj6DeSs8qw5o8oxAAAAAElFTkSuQmCC) ![Curseforge](http://cf.way2muchnoise.eu/full_controllable_downloads.svg?badge_style=for_the_badge)

# Controllable

Expand Down
39 changes: 24 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.

version = "1.15.2-0.8.0"
version = "0.11.0-1.15.2"
group = "com.mrcrayfish" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "controllable"

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

mixin {
add sourceSets.main, "controllable.refmap.json"
}

minecraft {
mappings channel: 'snapshot', version: '20200122-1.15.1'

Expand All @@ -27,6 +34,7 @@ minecraft {
workingDirectory project.file('run')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
arg "-mixin.config=controllable.mixins.json"
mods {
controllable {
source sourceSets.main
Expand All @@ -38,6 +46,7 @@ minecraft {
workingDirectory project.file('run')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
arg "-mixin.config=controllable.mixins.json"
mods {
controllable {
source sourceSets.main
Expand All @@ -59,21 +68,23 @@ minecraft {
}
}

configurations {
libraries
compile.extendsFrom libraries
}

dependencies {
minecraft 'net.minecraftforge:forge:1.15.2-31.0.14'
}

repositories {
jcenter()
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
}

dependencies {
libraries "uk.co.electronstudio.sdl2gdx:sdl2gdx:1.0.+"
minecraft 'net.minecraftforge:forge:1.15.2-31.2.45'
compile fg.deobf("mezz.jei:jei-1.15.2:6.0.3.15")
}

jar {
Expand All @@ -86,12 +97,10 @@ jar {
"Implementation-Version": "${version}",
"Implementation-Vendor" :"MrCrayfish",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Signing-Fingerprint": project.hasProperty('fingerprint') ? project.property('fingerprint') : 'unsigned'
"Signing-Fingerprint": project.hasProperty('fingerprint') ? project.property('fingerprint') : 'unsigned',
"MixinConfigs" : "controllable.mixins.json"
])
}
from {
configurations.libraries.collect { it.isDirectory() ? it : zipTree(it) }
}
}

Properties keyStoreProperties = new Properties()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public boolean getState(int index)
return this.states[index];
}

void setState(int index, boolean state)
protected void setState(int index, boolean state)
{
if(index < 0 || index >= states.length)
return;
Expand Down
83 changes: 83 additions & 0 deletions src/main/java/com/mrcrayfish/controllable/Config.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
package com.mrcrayfish.controllable;

import com.mrcrayfish.controllable.client.ActionVisibility;
import com.mrcrayfish.controllable.client.ControllerIcons;
import com.mrcrayfish.controllable.client.CursorType;
import net.minecraftforge.common.ForgeConfigSpec;
import org.apache.commons.lang3.tuple.Pair;

/**
* Author: MrCrayfish
*/
public class Config
{
static final ForgeConfigSpec clientSpec;
public static final Config.Client CLIENT;

public static class Client
{
public final ForgeConfigSpec.LongValue controllerPollInterval;
public final Options options;

Client(ForgeConfigSpec.Builder builder)
{
builder.comment("Client configuration settings").push("client");
this.controllerPollInterval = builder
.comment("The time in milliseconds to wait before polling the controller. The lower the value the better the input latency but drains the controller battery faster.")
.translation("controllable.configgui.controllerPollInterval")
.defineInRange("controllerPollInterval", 8L, 1L, 128L);
this.options = new Options(builder);
builder.pop();
}

public static class Options
{
public final ForgeConfigSpec.BooleanValue forceFeedback;
public final ForgeConfigSpec.BooleanValue autoSelect;
public final ForgeConfigSpec.BooleanValue renderMiniPlayer;
public final ForgeConfigSpec.BooleanValue virtualMouse;
public final ForgeConfigSpec.BooleanValue consoleHotbar;
public final ForgeConfigSpec.EnumValue<CursorType> cursorType;
public final ForgeConfigSpec.EnumValue<ControllerIcons> controllerIcons;
public final ForgeConfigSpec.BooleanValue invertLook;
public final ForgeConfigSpec.DoubleValue deadZone;
public final ForgeConfigSpec.DoubleValue rotationSpeed;
public final ForgeConfigSpec.DoubleValue mouseSpeed;
public final ForgeConfigSpec.EnumValue<ActionVisibility> showActions;
public final ForgeConfigSpec.BooleanValue quickCraft;

public Options(ForgeConfigSpec.Builder builder)
{
builder.comment("In-game related options. These can be changed in game instead of config!").push("options");
{
this.forceFeedback = builder.comment("If enabled, some actions will cause the controller to vibrate").define("forceFeedback", true);
this.autoSelect = builder.comment("If enabled, controller will be automatically selected on start up or when plugged in").define("autoSelect", true);
this.renderMiniPlayer = builder.comment("If enabled, the player will render in the top left corner likes Bedrock Edition").define("renderMiniPlayer", true);
this.virtualMouse = builder.comment("If enabled, the game will use a virtual cursor instead of the real cursor. This must be turned on to be able to run multiple instances!").define("virtualMouse", true);
this.consoleHotbar = builder.comment("If enabled, hotbar will render closer to the center of the screen like on console.").define("consoleHotbar", false);
this.cursorType = builder.comment("The image to use for the cursor. This only applies if virtual mouse is enabled!").defineEnum("cursorType", CursorType.LIGHT);
this.controllerIcons = builder.comment("The controller icons to use in game to display actions").defineEnum("controllerIcons", ControllerIcons.DEFAULT);
this.invertLook = builder.comment("If enabled, inverts the controls on the Y axis for the camera").define("invertLook", false);
this.deadZone = builder.comment("The distance you have to move the thumbstick before it's input is registered. This fixes drifting as some thumbsticks don't center to zero.").defineInRange("deadZone", 0.15, 0.0, 1.0);
this.rotationSpeed = builder.comment("The speed which the camera turns in game").defineInRange("rotationSpeed", 25.0, 0.0, 50.0);
this.mouseSpeed = builder.comment("The speed which the cursor or virtual mouse moves around the screen").defineInRange("mouseSpeed", 15.0, 0.0, 50.0);
this.showActions = builder.comment("If enabled, shows common actions when displaying available on the screen").defineEnum("showActions", ActionVisibility.MINIMAL);
this.quickCraft = builder.comment("If enabled, allows you to craft quickly when clicking an item in the recipe book").define("quickCraft", true);
}
builder.pop();
}
}
}

static
{
final Pair<Client, ForgeConfigSpec> specPair = new ForgeConfigSpec.Builder().configure(Config.Client::new);
clientSpec = specPair.getRight();
CLIENT = specPair.getLeft();
}

public static void save()
{
clientSpec.save();
}
}
Loading

0 comments on commit 46771db

Please sign in to comment.