Skip to content

Commit

Permalink
Add
Browse files Browse the repository at this point in the history
  • Loading branch information
M0nkeyPr0grammer committed Oct 29, 2023
1 parent 53e2648 commit eb6334d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
23 changes: 16 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.4-SNAPSHOT'
id 'fabric-loom' version '1.4.4'
id 'maven-publish'
}

Expand Down Expand Up @@ -44,6 +44,13 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

// Manual Dependency
implementation fileTree(dir: 'libs', include: ['*.jar'])

// Specific Fabric API modules
modImplementation "net.fabricmc.fabric-api:fabric-api-client-event-lifecycle-v1:0.90.4+1.20.1"
modImplementation "net.fabricmc.fabric-api:fabric-api-client-keybinding-v1:0.90.4+1.20.1"

// Uncomment the following line to enable the deprecated Fabric API modules.
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.

Expand Down Expand Up @@ -88,14 +95,16 @@ publishing {

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
mavenCentral()
maven {
name = "Fabric"
url = "https://maven.fabricmc.net/"
}
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/"
url = "https://maven.terraformersmc.com/releases/"
}
}
// Add other repositories if needed
}

}
5 changes: 1 addition & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@ maven_group=m0nkeypr0grammer.emi.grouping
archives_base_name=emi_grouping

# Dependencies
fabric_version=0.90.4+1.20.1
emi_version=1.0.23+1.20.1
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api-client:${project.fabric_version}"
fabric_version=0.90.4+1.20.1
Binary file added libs/emi-fabric-1.0.23+1.20.1-api.jar
Binary file not shown.
Binary file added libs/emi-fabric-1.0.23+1.20.1.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/m0nkeypr0grammer/CollapsibleEMIMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void onInitialize() {

// Register a client tick event to check for the key press
ClientTickEvents.END_CLIENT_TICK.register(client -> {
while (keyBinding.wasPressed()) {
if (keyBinding.wasPressed()) {
openCollapsibleEMIGUI();
}
});
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/m0nkeypr0grammer/keypresslistener.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ public class keypresslistener {

public keypresslistener() {
ClientTickEvents.END_CLIENT_TICK.register(client -> {
while (keyBinding.wasPressed()) {
if (keyBinding.isPressed() && GLFW.glfwGetKey(client.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT_ALT) == GLFW.GLFW_PRESS) {
if (keyBinding.wasPressed()) {
if (GLFW.glfwGetKey(client.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT_ALT) == GLFW.GLFW_PRESS) {
// Open the GUI
openCollapsibleEMIGUI();
}
Expand All @@ -22,5 +22,6 @@ public keypresslistener() {
private void openCollapsibleEMIGUI() {
// Create and open the GUI
// Implement your GUI opening logic here
System.out.println("Key pressed with ALT! Implement GUI opening logic here.");
}
}

0 comments on commit eb6334d

Please sign in to comment.