Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
CorruptionHades committed Jul 16, 2023
2 parents 3348b1c + f946384 commit de3b328
Show file tree
Hide file tree
Showing 75 changed files with 83 additions and 379 deletions.
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</p>

<p align="center">
<a href="#key-features">Key Features</a> •
<a href="#installation">Installation</a> •
<a href="#-key-features">Key Features</a> •
<a href="#%EF%B8%8F-installation">Installation</a> •
<a href="#usage">Usage</a> •
<a href="#contributing">Contributing</a> •
<a href="#license">License</a>
Expand Down Expand Up @@ -51,28 +51,22 @@
- Click the "Download Installer" button for the corresponding operating system (Windows, macOS, or Linux).
- Run the installer and follow the on-screen instructions to install the Fabric Loader.

2. **Install the Fabric API**:

- Download the Fabric API mod from [CurseForge](https://www.curseforge.com/minecraft/mc-mods/fabric-api) or [Modrinth](https://modrinth.com/mod/fabric-api).
- Make sure to choose the correct version of the API that matches Minecraft version 1.19.4
- Save the Fabric API `.jar` file to your computer.

3. **Download the Mod**:
2. **Download the Mod**:

- Find and download, the desired version of the Lumina Client From Here: [Releases](https://github.com/LuminaDevelopment/LuminaClient)
- Ensure the mod version you download is compatible with your Minecraft and Fabric Loader versions.
- Save the mod `.jar` file to your computer.

4. **Install the Fabric API and Lumina Client**:
3. **Install Lumina Client**:

- Locate your Minecraft installation folder:
- Windows: `%appdata%\.minecraft`
- macOS: `~/Library/Application Support/minecraft`
- Linux: `~/.minecraft`
- Create a new folder named `mods` inside your Minecraft installation folder if it doesn't already exist.
- Move the Fabric API `.jar` file and the mod `.jar` file you downloaded earlier into the `mods` folder.
- Move the Mod `.jar` file you downloaded earlier into the `mods` folder.

5. **Launch Minecraft with Fabric**:
4. **Launch Minecraft with Fabric**:

- Open the Minecraft Launcher.
- In the bottom-left corner, click the dropdown menu next to the "Play" button.
Expand Down
31 changes: 7 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
//finally updated that sht
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'maven-publish'
}

version = project.mod_version
Expand All @@ -16,19 +15,20 @@ repositories {
mavenCentral()
}

configurations {
modImplementation.extendsFrom(modInclude)
include.extendsFrom(modInclude)
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

// 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.

// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
modInclude fabricApi.module("fabric-resource-loader-v0", project.fabric_version)
modInclude fabricApi.module("fabric-key-binding-api-v1", project.fabric_version)
}

base {
Expand Down Expand Up @@ -63,20 +63,3 @@ jar {
rename { "${it}_${base.archivesName.get()}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// 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.
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ org.gradle.parallel=true

# Mod Properties
mod_version = 1.0.0
maven_group = com.example
maven_group = me.stormcph
archives_base_name = Lumina-Client-Alpha

# Dependencies
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/me/stormcph/lumina/Lumina.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import me.stormcph.lumina.module.impl.render.ClickguiModule;
import me.stormcph.lumina.ui.HudConfigScreen;
import me.stormcph.lumina.utils.misc.GithubRetriever;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.option.KeyBinding;
Expand All @@ -24,7 +24,7 @@

import javax.swing.*;

public class Lumina implements ModInitializer {
public class Lumina implements ClientModInitializer {

private static final Lumina INSTANCE = new Lumina();
private final Logger logger = LogManager.getLogger(Lumina.class);
Expand All @@ -35,7 +35,7 @@ public class Lumina implements ModInitializer {
private static final KeyBinding openHudConfigScreenKey = new KeyBinding("key.lumina.open_hud_config_screen", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_H, "category.lumina");

@Override
public void onInitialize() {
public void onInitializeClient() {
EventManager.register(this);
CapeManager.init();
new GithubRetriever().retrieve();
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/me/stormcph/lumina/client/LuminaClient.java

This file was deleted.

130 changes: 0 additions & 130 deletions src/main/java/me/stormcph/lumina/event/ArrayHelper.java

This file was deleted.

16 changes: 1 addition & 15 deletions src/main/java/me/stormcph/lumina/event/Data.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,5 @@
/**
* Created by Hexeption on 18/12/2016.
*/
public class Data {

public final Object source;

public final Method target;

public final byte priority;

Data(Object source, Method target, byte priority) {

this.source = source;
this.target = target;
this.priority = priority;
}

public record Data(Object source, Method target, byte priority) {
}
22 changes: 6 additions & 16 deletions src/main/java/me/stormcph/lumina/event/Event.java
Original file line number Diff line number Diff line change
@@ -1,41 +1,31 @@
package me.stormcph.lumina.event;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
* Created by Hexeption on 18/12/2016.
*/
public abstract class Event {
private boolean cancelled;

public enum State {
PRE("PRE", 0),
POST("POST", 1);

private State(final String string, final int number) {}
}
public boolean cancelled;

public Event call() {
this.cancelled = false;
call(this);
return this;
}

public boolean isCancelled() {
return cancelled;
}

public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
public void cancel() {
this.cancelled = true;
}

private static void call(final Event event) {
final ArrayHelper<Data> dataList = EventManager.get(event.getClass());
final List<Data> dataList = EventManager.get(event.getClass());

if (dataList != null) {
for (final Data data : dataList) {
try {
data.target.invoke(data.source, event);
data.target().invoke(data.source(), event);
}
catch (IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
Expand Down
Loading

0 comments on commit de3b328

Please sign in to comment.