Skip to content

Commit

Permalink
v1.16.5-1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MJaroslav committed Jan 22, 2022
1 parent b26f26d commit 1253650
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 24 deletions.
13 changes: 5 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'idea'
id 'fabric-loom' version '0.5-SNAPSHOT'
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'maven-publish'
}

Expand Down Expand Up @@ -30,16 +30,13 @@ dependencies {
minecraft "com.mojang:minecraft:${buildprop.game_version}"
mappings "net.fabricmc:yarn:${buildprop.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${buildprop.fabric_loader_version}"

modImplementation "net.fabricmc.fabric-api:fabric-api:${buildprop.fabric_version}"

modApi("me.shedaniel.cloth:cloth-config-fabric:${buildprop.cloth_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
modApi "me.shedaniel.cloth:cloth-config-fabric:${buildprop.cloth_version}"
include "me.shedaniel.cloth:cloth-config-fabric:${buildprop.cloth_version}"

modImplementation "com.terraformersmc:modmenu:${buildprop.menu_version}"

compile "org.jetbrains:annotations:${buildprop.jba_version}"
implementation "org.jetbrains:annotations:${buildprop.jba_version}"

compileOnly "org.projectlombok:lombok:${buildprop.lombok_version}"
annotationProcessor "org.projectlombok:lombok:${buildprop.lombok_version}"
Expand All @@ -64,7 +61,7 @@ tasks.withType(JavaCompile).configureEach {
}

java {
withSourcesJar()
//withSourcesJar()
}


Expand Down
2 changes: 0 additions & 2 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
run_dir=run
# Game mappings
yarn_mappings=1.16.5+build.10
# Fabric API
fabric_version=0.42.0+1.16
# Cloth Config
cloth_version=4.13.49
# Mod Menu
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 16 additions & 6 deletions src/main/java/com/github/mjaroslav/bookstealer/BookStealerMod.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.mjaroslav.bookstealer;

import com.github.mjaroslav.bookstealer.config.ModConfig;
import com.github.mjaroslav.bookstealer.util.ModUtils;
import com.github.mjaroslav.bookstealer.lib.ModInfo;
import lombok.Getter;
import me.shedaniel.autoconfig.AutoConfig;
Expand All @@ -11,20 +12,29 @@
import org.apache.logging.log4j.Logger;

public class BookStealerMod implements ClientModInitializer {
@Getter
private static ModConfig config;
@Getter
private static ConfigHolder<ModConfig> configHolder;

@Getter
private static Logger log;

public static ModConfig getConfig() {
return configHolder.getConfig();
}

@Override
public void onInitializeClient() {
log = LogManager.getLogger(ModInfo.NAME);
log.info("Sup, 2ch.hk!");
log = LogManager.getLogger();
info("Sup, 2ch.hk!");
AutoConfig.register(ModConfig.class, JanksonConfigSerializer::new);
configHolder = AutoConfig.getConfigHolder(ModConfig.class);
config = configHolder.getConfig();
ModUtils.overrideConfigValues();
}

public static void info(String message, Object... params) {
log.info(String.format("[%s] ", ModInfo.NAME) + message, params);
}

public static void warn(String message, Throwable e, Object... params) {
log.error(String.format("[%s] ", ModInfo.NAME) + message, e, params);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void onPress(ButtonWidget button) {
ModUtils.addChatMessage(message);
}
} catch (Exception e) {
BookStealerMod.getLog().warn("Can't save book!", e);
BookStealerMod.warn("Can't save book!", e);
val message = new TranslatableText("bookstealer.text.save.error");
val style = message.getStyle().withColor(Formatting.RED);
message.setStyle(style);
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/META-INF/MANIFEST.MF

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/META-INF/bookstealer_at.cfg

This file was deleted.

9 changes: 6 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
],
"depends": {
"fabricloader": ">=0.12.12",
"fabric": "*",
"minecraft": "1.16.x"
"minecraft": "1.16.x",
"cloth-config2": ">=4.13.49"
},
"suggests": {
"modmenu": ">=1.16.22"
}
}
}

0 comments on commit 1253650

Please sign in to comment.