Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'fabric-loom' version '1.10-SNAPSHOT'
id 'maven-publish'
}

Expand All @@ -9,6 +9,7 @@ targetCompatibility = JavaVersion.VERSION_21
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
String minecraftVersion = project.minecraft_version

repositories {
// Add repositories to retrieve artifacts from in here.
Expand Down Expand Up @@ -36,10 +37,12 @@ dependencies {
}

processResources {
inputs.property "version", project.version
inputs.properties "modVersion": project.version,
"mcVersion": minecraftVersion

filesMatching("fabric.mod.json") {
expand "version": project.version
expand "modVersion": project.version,
"mcVersion": minecraftVersion
}
}

Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.3
yarn_mappings=1.21.3+build.2
loader_version=0.16.9
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.8
loader_version=0.16.10
# Mod Properties
mod_version = 1.21.3-0
mod_version = 1.21.4-0
maven_group = com.daniking.backtools
archives_base_name = backtools
# Dependencies
fabric_version=0.107.0+1.21.3
cloth_config_version=15.0.127
fabric_version=0.118.0+1.21.4
cloth_config_version=17.0.144
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
6 changes: 4 additions & 2 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public class BackToolFeatureRenderer <M extends PlayerEntityModel> extends Playe
public ItemStack offStack = ItemStack.EMPTY;
public Arm mainArm = Arm.RIGHT;

public BackToolFeatureRenderer(FeatureRendererContext<PlayerEntityRenderState, M> context, ItemRenderer heldItemRenderer) {
super(context, heldItemRenderer);
public BackToolFeatureRenderer(FeatureRendererContext<PlayerEntityRenderState, M> context) {
super(context);
}

@Override
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/com/daniking/backtools/BackTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import net.fabricmc.api.EnvType;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.Version;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -11,12 +13,13 @@
public class BackTools implements ModInitializer {
public static final Logger LOGGER = LoggerFactory.getLogger(BackTools.class);

public static final String VERSION = "1.21.3-0";

@Override
public void onInitialize() {
BackTools.run(EnvType.SERVER, () -> () -> LOGGER.info("You are loading " + this.getClass().getName() + " on a server." + this.getClass().getName() + " is a client side-only mod!"));
BackTools.run(EnvType.CLIENT, () -> () -> LOGGER.info("BackTools V{} Initialized", VERSION));
final @NotNull String modName = this.getClass().getSimpleName();
final @NotNull Version version = FabricLoader.getInstance().getModContainer(modName.toLowerCase()).orElseThrow().getMetadata().getVersion();

BackTools.run(EnvType.SERVER, () -> () -> LOGGER.info("You are loading " + modName + " on a server." + modName + " is a client side-only mod!"));
BackTools.run(EnvType.CLIENT, () -> () -> LOGGER.info("{} V{} Initialized", modName, version.getFriendlyString()));
}

public static void run(final EnvType type, final Supplier<Runnable> supplier) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public PlayerEntityRendererMixin(EntityRendererFactory.Context ctx, M model, flo

@Inject(method = "<init>", at = @At("TAIL"), locals = LocalCapture.CAPTURE_FAILSOFT)
private void addRender(EntityRendererFactory.Context ctx, boolean slim, CallbackInfo ci) {
this.addFeature(new BackToolFeatureRenderer(this, ctx.getItemRenderer()));
this.addFeature(new BackToolFeatureRenderer(this));
}
}
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "backtools",
"version": "${version}",
"version": "${modVersion}",
"name": "BackTools",
"description": "Shows the last used tool on the player's back. Purely aesthetic.",
"authors": [
Expand Down Expand Up @@ -29,7 +29,7 @@
"depends": {
"fabricloader": "*",
"fabric": "*",
"minecraft": ">=1.21.3",
"minecraft": "=${mcVersion}",
"cloth-config2": "*"
}
}
Loading