Skip to content

Commit

Permalink
Initial Commit - start producing items and blocks for Solaris.
Browse files Browse the repository at this point in the history
  • Loading branch information
AluTheCrow committed Jan 18, 2024
1 parent 61de7af commit fd9935f
Show file tree
Hide file tree
Showing 12 changed files with 270 additions and 0 deletions.
134 changes: 134 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
plugins {
id 'fabric-loom' version '1.5.+'
id 'idea'
id 'maven-publish'
id 'com.modrinth.minotaur' version '2.+'
id 'io.freefair.lombok' version '8.+'
id 'com.github.johnrengelman.shadow' version '8.1.+'
id 'nebula.release' version '19.0.+'
}

group = project.maven_group

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.terraformersmc.com/releases/" }
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org'
}
maven {
name "Modrinth"; url "https://api.modrinth.com/maven"
content { includeGroup "maven.modrinth" }
}
maven {
name "Modmaven"
url "https://modmaven.dev/"
// For Gradle 5.1 and above, limit it to just AE2
content {
includeGroup 'appeng'
}
}
maven {
name = "Jitpack"
url = uri("https://jitpack.io/")
}
}
dependencies {
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.20.1:${project.parchment_version}@zip")
}
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}+${project.minecraft_version}"

modImplementation ("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_version}"){
exclude(group: "net.fabricmc.fabric-api")
}
modImplementation ("com.terraformersmc:modmenu:${project.modmenu_version}"){
exclude(group: "net.fabricmc.fabric-api")
}
modImplementation("appeng:appliedenergistics2-fabric:${project.ae2_version}:api"){
exclude(group: "net.fabricmc.fabric-api")
}
modImplementation("maven.modrinth:modern-industrialization:${project.mi_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
include modApi("teamreborn:energy:${project.energy_version}") {
exclude(group: "net.fabricmc.fabric-api")
exclude group: "net.fabricmc", module: "fabric-loader"
}
implementation 'org.apache.commons:commons-text:1.11.0'
}

def version = project.version.toString()

processResources {
inputs.property "version", version
inputs.property "minecraft_version", project.minecraft_version
inputs.property "loader_version", project.loader_version
filteringCharset "UTF-8"

filesMatching("fabric.mod.json") {
expand "version": version,
"minecraft_version": project.minecraft_version,
"loader_version": project.loader_version
}
}

def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release.set(targetJavaVersion)
}
}

java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = project.archives_base_name
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}

// 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.
}
}
21 changes: 21 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx3G
org.gradle.parallel=true
org.gradle.daemon=false

# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.1
loader_version=0.15.3
parchment_version=2023.09.03
# Mod Properties
maven_group = org.theomenden
archives_base_name = TheOmenDen.Solaris
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.91.0
modmenu_version=7.2.2
cloth_version=11.1.118
energy_version=3.0.0
ae2_version=15.0.20
mi_version=1.8.0
1 change: 1 addition & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
10 changes: 10 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pluginManagement {
repositories {
mavenCentral()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
gradlePluginPortal()
}
}
15 changes: 15 additions & 0 deletions src/main/java/org/theomenden/solaris/Solaris.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.theomenden.solaris;

import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Solaris implements ModInitializer {

public static String MODID = "solaris";
public static Logger LOGGER = LoggerFactory.getLogger(Solaris.class);
@Override
public void onInitialize() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.theomenden.solaris.client;

public class SolarisClient {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.theomenden.solaris.registry.blocks;

public final class BlockRegistry {
public static final
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.theomenden.solaris.registry.fluids;

import net.minecraft.world.level.Level;
import net.minecraft.world.level.material.FlowingFluid;
import net.minecraft.world.level.material.Fluid;
import org.jetbrains.annotations.NotNull;

public abstract class EutecticFluid extends FlowingFluid {
@Override
public boolean isSame(@NotNull Fluid fluid) {
return fluid == getSource() || fluid == getFlowing();
}

@Override
protected boolean canConvertToSource(Level level) {
return false;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.theomenden.solaris.registry.items;

import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.client.renderer.item.ItemProperties;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Rarity;
import org.intellij.lang.annotations.Identifier;

public final class ItemRegistry {
public static final Item SOLARPANEL_ITEM =;
public static final Item TRACKING_SOLARPANEL_ITEM =;
public static final Item VERTICAL_SOLARPANEL_ITEM =;

public static final Item MOLTEN_SILICON_VIAL_ITEM =;
public static final Item EUTECTIC_VIAL_ITEM =;
}
Binary file added src/main/resources/assets/solaris/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"schemaVersion": 1,
"id": "solaris",
"version": "${version}",
"name": "Solaris",
"description": "",
"authors": [],
"contact": {
"repo": "https://github.com/andre/TheOmenDen.Solaris"
},
"license": "LGPL-3.0",
"icon": "assets/solaris/icon.png",
"environment": "*",
"entrypoints": {
"client": [
"org.theomenden.solaris.client.SolarisClient"
],
"main": [
"org.theomenden.solaris.Solaris"
]
},
"mixins": [
"solaris.mixins.json"
],
"depends": {
"fabricloader": ">=${loader_version}",
"fabric": "*",
"minecraft": "${minecraft_version}"
}
}
13 changes: 13 additions & 0 deletions src/main/resources/solaris.mixins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"required": true,
"minVersion": "0.8",
"package": "org.theomenden.solaris.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [
],
"client": [
],
"injectors": {
"defaultRequire": 1
}
}

0 comments on commit fd9935f

Please sign in to comment.