Skip to content
This repository has been archived by the owner on Feb 9, 2025. It is now read-only.

Commit

Permalink
follow up with 1.20 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
LucunJi committed Jun 20, 2023
1 parent 81f454d commit f61971f
Show file tree
Hide file tree
Showing 22 changed files with 568 additions and 891 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/quick-fabric-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Quick Fabric Release
on:
push:
tags:
- '*-*'
env:
JAVA_VERSION: 17 # must be the same as the version used in build.gradle
jobs:
build-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Build
id: build
run: |
chmod +x ./gradlew
./gradlew clean build
- name: Release
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: 7q8r8AtY
modrinth-token: ${{ secrets.MODRINTH_AUTHORIZATION_TOKEN }}
curseforge-id: 372888
curseforge-token: ${{ secrets.CURSEFORGE_UPLOAD_TOKEN }}
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

java: ${{ env.JAVA_VERSION }}
version: ${{ steps.build.outputs.version }}
game-versions: ${{ steps.build.outputs.game_versions }}
files: ${{ steps.build.outputs.files }}
name: ${{ steps.build.outputs.release_name }}

github-tag: ${{ github.ref_name }}
827 changes: 159 additions & 668 deletions LICENSE

Large diffs are not rendered by default.

61 changes: 39 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,57 @@

![](logo.png)

Render a player entity on the bottom left corner of the screen.
[![Quick Fabric Release](https://github.com/LucunJi/ExtraPlayerRenderer/actions/workflows/quick-fabric-release.yml/badge.svg)](https://github.com/LucunJi/ExtraPlayerRenderer/actions/workflows/quick-fabric-release.yml)
![](https://img.shields.io/badge/dynamic/json?color=5da545&label=modrinth&prefix=downloads%20&query=hits.0.downloads&url=https://api.modrinth.com/v2/search?query=extraplayerrenderer&limit=1&index=relevance)
![](https://cf.way2muchnoise.eu/extraplayerrenderer.svg)
![](https://cf.way2muchnoise.eu/versions/extraplayerrenderer.svg)

在屏幕的角落渲染一个玩家实体。
*If you are looking for the same mod but for Forge, [click here](https://www.curseforge.com/minecraft/mc-mods/extra-player-render). It's not developed by me but still good to use.*

This mod is released under GPL-3.0 License.

这个模组遵循 GPL-3.0 证书发布。
In short, this mod renders a player model in the bottom left corner (by default, configurable) of the screen. Adaptable & configurable. That's it.

It is recommended **download this mod here**: https://www.curseforge.com/minecraft/mc-mods/extraplayerrenderer
![](images/img1.jpg)

推荐**在这里下载**https://www.curseforge.com/minecraft/mc-mods/extraplayerrenderer
## Features

~~This mod **requires malilib and Fabric API** (not Fabric loader, they are separate things), you should also install it.~~
(this line is deprecated since 1.3.0)
In spectator mode, the rendered model gets automatically changed into the entity that your view is attached to.

~~这个模组**需要 malilib 和 Fabric API**(不是 Fabric Loader,它们是两个不同的东西)~~
(这行字在 1.3.0 版本后失效)
![](images/spectator.jpg)

Since v1.3.0 (inclusive) this mod **only requires malilib**.
When the player's posture changes, the position of the rendered model changes smoothly.

在 1.3.0 版本之后(包括 1.3.0)这个模组**只需要 malilib**
![](images/transition.webp)

If you have any problem, please first try to update the dependencies (malilib and Fabric Loader),
then report the bug in CurseForge or GitHub Issues.
The riding entity can also be rendered, so you can show your favourite horse.

如果遇到任何问题,请先尝试更新依赖模组(malilib 和 Fabric Loader),
然后在 CourseForge 或 GitHub Issues 提交问题。
![](images/vehicle.jpg)

This mod is compatible with Gamepiaynmo's [CustomPlayerModel](https://github.com/Gamepiaynmo/CustomModel) mod, but the compatibility is not ensured if you use models smaller or larger than a normal player model.
## Fully Configurable

这个模组与 Gamepiaynmo 的 [CustomPlayerModel](https://github.com/Gamepiaynmo/CustomModel)(自定义玩家模型)模组兼容,
但不保证可以兼容使用不同于寻常玩家尺寸的模型。
By pressing F8 in game (by default, still configurable), the configuration screen will pop up.

## Configurations / 配置
Press `F8` in default
Explore the tabs and buttons, there are a lot for you to config: the scale, position and rotation of the figure, the head & body rotations, how to offset(transit) between postures and angle of light on the figure...

默认按下 `F8`
![](images/configs.jpg)

## Downloads & Dependencies

Downloading this mod from [CurseForge](https://www.curseforge.com/minecraft/mc-mods/extraplayerrenderer) or [Modrinth](https://modrinth.com/mod/extraplayerrenderer) is recommended, as this can help me gain some rewards.

You can also download from [GitHub](https://github.com/LucunJi/ExtraPlayerRenderer) or [mcmod](https://www.mcmod.cn/class/2374.html).

This mod in all versions, except Minecraft 1.20.0, requires masa's [malilib](https://www.curseforge.com/minecraft/mc-mods/malilib).
The alpha versions for Minecraft 1.20.0 requires [Kosmolot's unofficial port of malilib](https://kosma.pl/masamods-1.20/), as masa has not finished porting.

[Mod Menu](https://modrinth.com/mod/modmenu/) is an optional dependency for the latest versions.

Some earlier versions (now obsolete) requires [Fabric API](https://www.curseforge.com/minecraft/mc-mods/fabric-api).

## Issues
When facing any issue, please first try to update the dependencies (malilib and Fabric Loader),
and then report the bug in [GitHub Issues](https://github.com/LucunJi/ExtraPlayerRenderer/issues) if the issue persists (I rarely look into other places other than GitHub).

This mod is compatible *in theory* with other mods that modifies player's model.
But such compatibility comes from the structure of vanilla Minecraft code, and is *not intended*. Glitches can happen.
You may submit compatibility requests to GitHub Issues.
44 changes: 33 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import groovy.json.JsonSlurper

plugins {
id('fabric-loom').version('1.0-SNAPSHOT')
id('fabric-loom').version('1.2-SNAPSHOT')
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

// follow semantic versioning! https://semver.org/
archivesBaseName = project.mod_filename
version = project.mod_version
group = project.maven_group + "." + project.mod_id
def modJson = file(sourceSets.main.resources.srcDirs.first().path + '/fabric.mod.json')
def modSpec = new JsonSlurper().parseText(modJson.text)
archivesBaseName = modSpec.name
version = project.minecraft_version + "-" + modSpec.version
group = project.maven_group + "." + modSpec.id

repositories {
maven {
url 'https://masa.dy.fi/maven'
}
maven {
url 'https://api.modrinth.com/maven'
}
maven { url 'https://masa.dy.fi/maven' }
maven { url 'https://api.modrinth.com/maven' }
maven { url 'https://jitpack.io' }
}

dependencies {
Expand Down Expand Up @@ -48,6 +49,27 @@ java {

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

gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}

tasks.register('printToGitHubActions') {
onlyIf { System.getenv().GITHUB_OUTPUT }
doLast {
// same as those in mc-publish
FileWriter fw = new FileWriter(System.getenv().GITHUB_OUTPUT)
fw.write("version=${project.version}\n")
fw.write("game_versions=${project.minecraft_version}\n")
fw.write("files=${remapJar.archiveFile.get().getAsFile().absolutePath}\n")
fw.write("release_name=${modSpec.name} v${modSpec.version} for mc ${project.minecraft_version}\n")
fw.close()
}
}

tasks.build.finalizedBy(printToGitHubActions)
5 changes: 1 addition & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://fabricmc.net/use
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.10
loader_version=0.14.12
loader_version=0.14.21
# Mod Properties
mod_version=1.16.5-2.2.2
maven_group=github.io.lucunji
mod_id=explayerenderer
mod_filename=ExtraPlayerRenderer
# Dependencies
# Fabric api
fabric_version=0.42.0+1.16
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit f61971f

Please sign in to comment.