Skip to content

Commit

Permalink
Merge branch '1.20.1/dev' into '1.20.1/fabric-dev.item-breaking'
Browse files Browse the repository at this point in the history
  • Loading branch information
naomieow committed Aug 9, 2024
2 parents 7b0d657 + b107804 commit c7f2812
Show file tree
Hide file tree
Showing 69 changed files with 1,308 additions and 1,029 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Build and Deploy
name: Deployment (J17)
on:
push:
branches-ignore:
- master
- "**/dev**"
- "**-dev"
- "**-dev**"
- dev


jobs:
build-and-deploy:
Expand Down Expand Up @@ -49,7 +54,7 @@ jobs:
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}'
id: minecraft_version
run: |
minecraft_version_val=$(grep "mod_version" gradle.properties | cut -d'+' -f2 | tr -d '\n')
minecraft_version_val=$(grep "mod_version" gradle.properties | cut -d'+' -f2 | cut -d'-' -f1 | tr -d '\n')
echo "minecraft_version=$minecraft_version_val" >> $GITHUB_OUTPUT
- name: deploy with mc-publish
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}'
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Fixes ⚒️
- Resolved spell power attribute addition to the proper percentage.
- Fixed some overlooked dependency issues with mc-publish.
- To use this, delete the previous (data-attributes) config folder (or change spell power based attribute addition in the functions from 0.0# to #.0)
## Changes 🌽
- Using the latest data-attributes with a supplied "stock" data-pack.
- You can clear your config if you wish to use stock, or keep your config with all the entries.
- Applied a patch for missing id's, which is an edge-case (will be labeled `unresolved:id`).
146 changes: 111 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,112 @@
![logo](https://cdn.modrinth.com/data/cached_images/f8dd730cf295dc3a449337df81cc47e010eddf3e.png)
[![GitHub license](https://img.shields.io/badge/MIT-MIT?style=for-the-badge&label=LICENCE&labelColor=582b11&color=a48350&link=https%3A%2F%2Fgithub.com%2FPlayerEXDirectorsCut%2Fplayerex%2Fblob%2F1.20.1%2Fmain%2FLICENSE)](https://github.com/PlayerEXDirectorsCut/playerex/blob/1.20.1/main/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/PlayerEXDirectorsCut/playerex?style=for-the-badge&logo=github&color=ffb046&link=https%3A%2F%2Fgithub.com%2FPlayerEXDirectorsCut%2Fplayerex%2Fstargazers
)](https://github.com/PlayerEXDirectorsCut/playerex/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/PlayerEXDirectorsCut/playerex?style=for-the-badge&logo=github&link=https%3A%2F%2Fgithub.com%2FPlayerEXDirectorsCut%2Fplayerex%2Fforks
)](https://github.com/PlayerEXDirectorsCut/playerex/forks)
[![GitHub issues](https://img.shields.io/github/issues/PlayerEXDirectorsCut/playerex?style=for-the-badge&logo=github&label=ISSUES&link=https%3A%2F%2Fgithub.com%2FPlayerEXDirectorsCut%2Fplayerex%2Fissues
)](https://github.com/PlayerEXDirectorsCut/playerex/issues)

[![docs](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/documentation/generic_vector.svg)](https://playerexdirectorscut.github.io/Bare-Minimum-Docs/)
![mkdocs](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/built-with/mkdocs_vector.svg)
![java17](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/built-with/java17_vector.svg)
[![curseforge](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/curseforge_vector.svg)](https://www.curseforge.com/minecraft/mc-mods/playerex-directors-cut)
[![modrinth](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg)](https://modrinth.com/mod/playerex-directors-cut)

### Preamble

PlayerEX:
Directors Cut is an entire rewrite of **[PlayerEx](https://www.curseforge.com/minecraft/mc-mods/playerex)**
(1.20.1+, though a ported version is available) and
a mod built using Fabric that adds RPG themed attributes to the game and the player.
It is available to download from [Curseforge](https://curseforge.com/minecraft/mc-mods/playerex-directors-cut) and [Modrinth](https://modrinth.com/mod/playerex-directors-cut).

Find the original mod [here!](https://modrinth.com/mod/playerex)

### Content

In addition to attributes powered by [Data Attributes: Directors Cut](https://www.curseforge.com/minecraft/mc-mods/data-attributes-directors-cut), PlayerEX: Directors Cut adds a levelling system and skill points to spend, enabled through a nonintrusive vanilla-styled gui accessible from the inventory or by hotkey. For further documentation, as well as how to use the PlayerEX:Directors Cut API in your own project, please see the [wiki](https://github.com/CleverNucleus/PlayerEx/wiki).

### Contributors (Former)
- [gyular](https://github.com/gyular) - Korean translation.
- [Hertz](https://github.com/elhertz) - Spanish translation.
- [MrTYZzik](https://github.com/MrTYZzik) - Russian translation.
- [Orygeunik](https://github.com/Orygeunik) - Russian translation improvements.
- [NianGuu](https://github.com/NianGuu) - Simplified Chinese
- [sky_bai](https://github.com/a1640727878) - Simplified Chinese (legacy release)

<p style="text-align: center"><b><i>Forge when?</i></b></p>

<br>

<p style="text-align: center">
<img src="https://img.shields.io/badge/MIT-MIT?style=for-the-badge&label=LICENCE&labelColor=582b11&color=a48350&link=https%3A%2F%2Fgithub.com%2FBareMinimumStudios%2Fplayerex%2Fblob%2F1.20.1%2Fmain%2FLICENSEe">
<img src="https://img.shields.io/github/stars/BareMinimumStudios/playerex?style=for-the-badge&logo=github&color=faa526&link=https%3A%2F%2Fgithub.com%2FBareMinimumStudios%2Fplayerex%2Fstargazers">
<img src="https://img.shields.io/github/forks/BareMinimumStudios/playerex?style=for-the-badge&logo=github&color=fa9256&link=https%3A%2F%2Fgithub.com%2FBareMinimumStudios%2Fplayerex%2Fforks">
<img src="https://img.shields.io/github/issues/BareMinimumStudios/playerex?style=for-the-badge&logo=github&label=ISSUES&link=https%3A%2F%2Fgithub.com%2FBareMinimumStudios%2Fplayerex%2Fissues">
</p>

<p style="text-align: center">
<img alt="fabric" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/supported/fabric_vector.svg">
<img alt="quilt" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/supported/quilt_vector.svg">
</p>

<p style="text-align: center">
<img alt="forge" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/supported/forge_vector.svg">
</p>
<p style="text-align: center">(though more assembly is required, see further below)</p>

<p style="text-align: center">
<a href="https://bareminimumstudios.github.io/Bare-Minimum-Docs/">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/documentation/generic_vector.svg">
</a>
<a href="https://github.com/BareMinimumStudios/playerex">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/github_vector.svg">
</a>
<img alt="java" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/built-with/java_vector.svg">
<img alt="gradle" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/built-with/gradle_vector.svg">
<a href="https://discord.gg/pcRw79hwey">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/social/discord-plural_vector.svg">
</a>
</p>

<br>

_________________

<br>

![PlayerEX Screen at Level 5](https://cdn.modrinth.com/data/cached_images/a1932f9482b132e06b75717be8e060149b275b94.png)

### Preamble 📝

PlayerEX is a fundamentally rewritten mod based on the work of **CleverNucleus's [PlayerEx](https://modrinth.com/mod/playerex)**. The mod provides RPG-themed attributes to the game and a configurable leveling system.

### Content 📦

With higher-level, highly configurable attribute modification provided by **[Data Attributes: Directors Cut](https://www.curseforge.com/minecraft/mc-mods/data-attributes-directors-cut)**, PlayerEX integrates skill and refundable points to spend through the non-intrusive, extendable, and modern screen, which can be activated by a hotkey (default is `-`).

### Extras 🎬

- **[EXHud](https://modrinth.com/mod/exhud-directors-cut)**, which provides an optional, opinionated and highly-configurable UI complimentary for PlayerEX, and has compatibility with other mods, such as [**Thermoo**](https://modrinth.com/mod/thermoo), and [**AppleSkin**](https://modrinth.com/mod/appleskin).

- **[RelicEX](https://modrinth.com/mod/relicex-directors-cut)**, which adds relics, tomes, different ways to obtain level, skill, and refund points.

- **[WizardEX](https://modrinth.com/mod/wizardex-directors-cut)**, which provides a layer between this mod and **[Wizards](https://modrinth.com/mod/wizards)** and other mods that use **[Spell Power Attributes](https://modrinth.com/mod/spell-power)**.

### Wiki 📑

To learn more about the mod, you can go **[here!](https://bareminimumstudios.github.io/Bare-Minimum-Docs/)**

### Developers 💻

Ah, my favorite people. You will get some more information on how to mod PlayerEX once the release is stable. For now, know that you will be getting:

- A way to implement attribute modification (and target any attribute you want and apply functions to them) into a registry.
- Override **any** registered attribute.
- Apply **any** attribute to **any** `LivingEntity` (primarily for the player).
- Attach to a screen using `owo-lib`.
- And much more...

### For Forge Users 🪨

Howdy, I know you have all been **dying** for a forge release. This will come in due time. For now, the mod has been rewritten for fabric, but due to its compatible and improved nature, there is a way you can play it!

*Refer to the **Usage Guide** on [**Sinytra Connector**](https://modrinth.com/mod/connector) to get started.*

> There is no guarantee that it will work for Forge completely, and support **can not** be provided until an actual release of a forge mod is created.
### Contributors 🆘

### The People Who Made This A Reality

- The studio
- The wispforest team 💖
- One guy's modpack
- Literally **YOU**
- And most importantly, **CleverNucleus**

### Translators (legacy, `<=3.*`)

- [gyular](https://github.com/gyular) - Korean translation.
- [Hertz](https://github.com/elhertz) - Spanish translation.
- [MrTYZzik](https://github.com/MrTYZzik) - Russian translation.
- [Orygeunik](https://github.com/Orygeunik) - Russian translation improvements.
- [NianGuu](https://github.com/NianGuu) - Simplified Chinese
- [sky_bai](https://github.com/a1640727878) - Simplified Chinese (older releases)

### A Thanks To Our Sponsor

---

</br>

<p><img src="https://i.imgur.com/V38aMzY.png" alt="Sponsor Banner"/></p>
<p style="text-align: center">
<i><b>Use code &quot;BAREMINIMUM&quot; to get 15% off your first month!</b></i>
</p>
16 changes: 15 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ repositories {
maven {
url = "https://maven.kosmx.dev/"
}
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org'
}
maven {
name = 'Quilt'
url = "https://maven.quiltmc.org/repository/release/"
}
}

loom {
Expand All @@ -51,7 +59,11 @@ loom {
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"

mappings("net.fabricmc:yarn:${project.yarn_mappings}:v2")
mappings loom.layered() {
mappings("org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings_version}:intermediary-v2")
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${project.parchment_version}@zip")
}

modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

Expand Down Expand Up @@ -86,6 +98,8 @@ dependencies {
modImplementation include("eu.pb4:placeholder-api:${project.placeholder_api_version}")

implementation include("net.objecthunter:exp4j:${project.exp4j_version}")

include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:${project.mixinextras_version}")))
}

processResources {
Expand Down
16 changes: 10 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ loader=fabric

# Fabric Properties
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.15.11
fabric_kotlin_version=1.11.0+kotlin.2.0.0
fabric_kotlin_version=1.12.0+kotlin.2.0.10
loom_version=1.7-SNAPSHOT

# Mappings
parchment_version=1.20.1:2023.09.03
quilt_mappings_version=23

# Mod Properties
mod_version=4.0.0-alpha.4+1.20.1
mod_version=4.0.0+1.20.1-alpha.14
maven_group=com.bibireden.playerex
archives_base_name=playerex-directors-cut

Expand All @@ -28,8 +30,8 @@ placeholder_api_version=2.1.1+1.20
ranged_weapon_api_version=1.1.2+1.20.1

# in-house
opc_version=1.0.0+1.20.1-fabric
data_attributes_version=2.0.0-beta.7+1.20.1-fabric
opc_version=2.0.0+1.20.1-beta.4-fabric
data_attributes_version=2.0.0+1.20.1-beta.10-fabric

# owo
owo_version=0.11.2+1.20
Expand All @@ -39,4 +41,6 @@ endec_version=0.1.7
endec_gson_version=0.1.4
endec_netty_version=0.1.3

exp4j_version=0.4.8
exp4j_version=0.4.8

mixinextras_version=0.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import com.bibireden.playerex.PlayerEX;
import com.bibireden.playerex.api.attribute.PlayerEXAttributes;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.client.render.entity.EntityRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -20,12 +20,12 @@ abstract class EntityRendererMixin<T extends Entity> {
@Unique
private boolean playerex$shouldRenderLevel() { return PlayerEX.CONFIG.getShowLevelOnNameplates(); }

@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/EntityRenderer;renderLabelIfPresent(Lnet/minecraft/entity/Entity;Lnet/minecraft/text/Text;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V"), index = 1)
private Text playerex$renderLabelIfPresent(Text text, @Local(argsOnly = true) Entity entity) {
if (playerex$shouldRenderLevel() && entity instanceof PlayerEntity livingEntity) {
@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/entity/EntityRenderer;renderNameTag(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/network/chat/Component;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;I)V"), index = 1)
private Component playerex$renderLabelIfPresent(Component text, @Local(argsOnly = true) Entity entity) {
if (playerex$shouldRenderLevel() && entity instanceof Player livingEntity) {
Optional<Double> maybeLevel = DataAttributesAPI.getValue(PlayerEXAttributes.LEVEL, livingEntity);
if (maybeLevel.isPresent()) {
text = text.copy().append(" ").append(Text.translatable("playerex.ui.nameplate.level", maybeLevel.get().intValue()).styled((style) -> style.withColor(0xFFAA00)));
text = text.copy().append(" ").append(Component.translatable("playerex.ui.nameplate.level", maybeLevel.get().intValue()).withStyle((style) -> style.withColor(0xFFAA00)));
}
}
return text;
Expand Down
Loading

0 comments on commit c7f2812

Please sign in to comment.