Initial Commit with Torches. Missing LangKeys and Recipes
This commit is contained in:
95
Fabric/build.gradle
Normal file
95
Fabric/build.gradle
Normal file
@@ -0,0 +1,95 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.12-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id 'idea'
|
||||
}
|
||||
|
||||
archivesBaseName = "${mod_name}-fabric-${minecraft_version}"
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${minecraft_version}"
|
||||
mappings loom.officialMojangMappings()
|
||||
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
|
||||
implementation project(":Common")
|
||||
|
||||
modApi("me.hypherionmc.craterlib:CraterLib-fabric-1.19.1:${craterlib_version}") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
}
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project(":Common").file("src/main/resources/hyperlighting.aw")
|
||||
runs {
|
||||
client {
|
||||
client()
|
||||
setConfigName("Fabric Client")
|
||||
ideConfigGenerated(true)
|
||||
runDir("run")
|
||||
}
|
||||
server {
|
||||
server()
|
||||
setConfigName("Fabric Server")
|
||||
ideConfigGenerated(true)
|
||||
runDir("run")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
processResources {
|
||||
from project(":Common").sourceSets.main.resources
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version
|
||||
}
|
||||
|
||||
filesMatching('*.mixins.json') {
|
||||
expand "refmap_target": "${archivesBaseName}-"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
source(project(":Common").sourceSets.main.allSource)
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${mod_name}" }
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId project.group
|
||||
artifactId project.archivesBaseName
|
||||
version project.version
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url "file://" + System.getenv("local_maven")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task delDevJar {
|
||||
doLast {
|
||||
def tree = fileTree('build/libs')
|
||||
tree.include '**/*-dev.jar'
|
||||
tree.each { it.delete() }
|
||||
}
|
||||
}
|
||||
build.finalizedBy delDevJar
|
||||
|
||||
task copyAllArtifacts(type: Copy) {
|
||||
from "$buildDir/libs"
|
||||
into "$rootDir/artifacts"
|
||||
include("*.jar")
|
||||
}
|
||||
|
||||
build.finalizedBy(copyAllArtifacts);
|
@@ -0,0 +1,12 @@
|
||||
package me.hypherionmc.hyperlighting;
|
||||
|
||||
import me.hypherionmc.hyperlighting.common.init.CommonRegistration;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
public class HyperLightingFabric implements ModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
CommonRegistration.registerAll();
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
package me.hypherionmc.hyperlighting.client;
|
||||
|
||||
import me.hypherionmc.hyperlighting.client.init.ClientRegistration;
|
||||
import me.hypherionmc.hyperlighting.client.particles.ParticleRegistryHandler;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
|
||||
import net.minecraft.client.particle.ParticleEngine;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import net.minecraft.core.particles.ParticleType;
|
||||
|
||||
public class HyperLightingFabricClient implements ClientModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
new ClientRegistration().registerAll();
|
||||
// TODO: Move to CraterLib as an Event
|
||||
ParticleRegistryHandler.registerParticles(new ParticleRegistryHandler.ParticleStrategy() {
|
||||
@Override
|
||||
public <T extends ParticleOptions> void register(ParticleType<T> particle, ParticleEngine.SpriteParticleRegistration<T> provider) {
|
||||
ParticleFactoryRegistry.getInstance().register(particle, provider::create);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
41
Fabric/src/main/resources/fabric.mod.json
Normal file
41
Fabric/src/main/resources/fabric.mod.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "hyperlighting",
|
||||
"version": "${version}",
|
||||
|
||||
"name": "Hyper Lighting 2",
|
||||
"description": "Not your average Lighting & Decoration Mod",
|
||||
"authors": [
|
||||
"HypherionSA"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "",
|
||||
"sources": ""
|
||||
},
|
||||
|
||||
"license": "MIT",
|
||||
"icon": "assets/hyperlighting/icon.png",
|
||||
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"me.hypherionmc.hyperlighting.HyperLightingFabric"
|
||||
],
|
||||
"client": [
|
||||
"me.hypherionmc.hyperlighting.client.HyperLightingFabricClient"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"hyperlighting.mixins.json",
|
||||
"hyperlighting.fabric.mixins.json"
|
||||
],
|
||||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.19.1",
|
||||
"java": ">=17",
|
||||
"craterlib": "*"
|
||||
},
|
||||
"accessWidener": "hyperlighting.aw"
|
||||
}
|
15
Fabric/src/main/resources/hyperlighting.fabric.mixins.json
Normal file
15
Fabric/src/main/resources/hyperlighting.fabric.mixins.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "me.hypherionmc.hyperlighting.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
],
|
||||
"server": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user