First Push, yay

This commit is contained in:
2026-07-05 19:26:33 +02:00
parent f46a0d60bc
commit eaeb467db9
12 changed files with 262 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# IntelliJ
.idea/
*.iml
out/
# Gradle
.gradle/
build/
# Minecraft run folder (VERY important)
run/
runs/
runClient/
runServer/
# Logs / caches
*.log
logs/
+2
View File
@@ -0,0 +1,2 @@
Copyright (c) 2026
All rights reserved.
+86
View File
@@ -0,0 +1,86 @@
plugins {
id 'net.fabricmc.fabric-loom' version '1.15.5'
id 'maven-publish'
}
version = project.mod_version
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
maven { url 'https://maven.wispforest.io/releases/' }
maven { url 'https://jitpack.io' } // required since owo 0.13.0, for a transitive dependency
}
dependencies {
minecraft "com.mojang:minecraft:26.1.2"
implementation "net.fabricmc:fabric-loader:0.18.4"
implementation "net.fabricmc.fabric-api:fabric-api:0.154.0+26.1.2"
implementation "io.wispforest:owo-lib:0.13.0+26.1"
include "io.wispforest:owo-sentinel:0.13.0+26.1"
}
processResources {
inputs.property "version", project.version
inputs.property "minecraft_version", project.minecraft_version
inputs.property "loader_version", project.loader_version
filteringCharset "UTF-8"
filesMatching("fabric.mod.json") {
expand "version": project.version,
"minecraft_version": project.minecraft_version,
"loader_version": project.loader_version
}
}
def targetJavaVersion = 25
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)
}
// 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.archives_base_name}" }
}
}
// configure the maven publication
publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
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.
}
}
+14
View File
@@ -0,0 +1,14 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx2G
# Fabric Properties
minecraft_version=26.1.2
loader_version=0.18.4
# Mod Properties
mod_version=1.0-SNAPSHOT
maven_group=de.fullrisk
archives_base_name=citrus-dev
# Dependencies
fabric_version=0.154.0+26.1.2
+1
View File
@@ -0,0 +1 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
+9
View File
@@ -0,0 +1,9 @@
pluginManagement {
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
gradlePluginPortal()
}
}
@@ -0,0 +1,10 @@
package de.fullrisk.citrusDev;
import net.fabricmc.api.ModInitializer;
public class CitrusDev implements ModInitializer {
@Override
public void onInitialize() {
}
}
@@ -0,0 +1,42 @@
package de.fullrisk.citrusDev;
import io.wispforest.owo.ui.component.LabelComponent;
import io.wispforest.owo.ui.core.AnimatableProperty;
import io.wispforest.owo.ui.core.OwoUIGraphics;
import net.minecraft.network.chat.Component;
public class ScalableLabel extends LabelComponent {
protected final AnimatableProperty<ScaleValue> scale = AnimatableProperty.of(new ScaleValue(0f));
public ScalableLabel(Component text) {
super(text);
}
public AnimatableProperty<ScaleValue> scale() {
return this.scale;
}
@Override
public void update(float delta, int mouseX, int mouseY) {
super.update(delta, mouseX, mouseY);
this.scale.update(delta);
}
@Override
public void draw(OwoUIGraphics graphics, int mouseX, int mouseY, float partialTicks, float delta) {
float s = this.scale.get().value();
float centerX = this.x() + this.width() / 2f;
float centerY = this.y() + this.height() / 2f;
graphics.pose().pushMatrix();
graphics.pose().translate(centerX, centerY);
graphics.pose().scale(s, s);
graphics.pose().translate(-centerX, -centerY);
super.draw(graphics, mouseX, mouseY, partialTicks, delta);
graphics.pose().popMatrix();
}
}
@@ -0,0 +1,32 @@
package de.fullrisk.citrusDev.client;
import de.fullrisk.citrusDev.MyScreen;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keymapping.v1.KeyMappingHelper;
import net.minecraft.client.KeyMapping;
import net.minecraft.resources.Identifier;
import org.lwjgl.glfw.GLFW;
public class CitrusDevClient implements ClientModInitializer {
private static KeyMapping openScreenKey;
@Override
public void onInitializeClient() {
KeyMapping.Category category = KeyMapping.Category.register(
Identifier.fromNamespaceAndPath("citrus-dev", "general"));
openScreenKey = KeyMappingHelper.registerKeyMapping(new KeyMapping(
"key.citrus-dev.open_screen",
GLFW.GLFW_KEY_G,
category
));
ClientTickEvents.END_CLIENT_TICK.register(client -> {
while (openScreenKey.consumeClick()) {
client.setScreen(new MyScreen());
}
});
}
}
+16
View File
@@ -0,0 +1,16 @@
{
"required": true,
"minVersion": "0.8",
"package": "de.fullrisk.citrusDev.mixin",
"compatibilityLevel": "JAVA_25",
"mixins": [
],
"client": [
],
"injectors": {
"defaultRequire": 1
},
"overwrites": {
"requireAnnotations": true
}
}
+4
View File
@@ -0,0 +1,4 @@
{
"category.citrus-dev.main": "My Mod Keybinds",
"key.citrus-dev.action_name": "Do Action"
}
+28
View File
@@ -0,0 +1,28 @@
{
"schemaVersion": 1,
"id": "citrus-dev",
"version": "${version}",
"name": "citrus-dev",
"description": "",
"authors": [],
"contact": {},
"license": "All-Rights-Reserved",
"icon": "assets/citrus-dev/icon.png",
"environment": "client",
"entrypoints": {
"client": [
"de.fullrisk.citrusDev.client.CitrusDevClient"
],
"main": [
"de.fullrisk.citrusDev.CitrusDev"
]
},
"mixins": [
"citrus-dev.mixins.json"
],
"depends": {
"fabricloader": ">=${loader_version}",
"fabric-api": "*",
"minecraft": "${minecraft_version}"
}
}