Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9c06e83
Set version to 21.1.2
Sep 17, 2024
a49e9a3
build: Add upper limit to Kuma version
BlayTheNinth Oct 30, 2024
27cdcd9
fix: Fix Totem of Undying resulting in instant death #141
BlayTheNinth Oct 30, 2024
7932723
feat: Add support for Inventory Totem #123
BlayTheNinth Oct 30, 2024
3499dbb
fix(1.21.1): Backport cherry-pick
BlayTheNinth Oct 30, 2024
f2b823a
fix: Stop using capability because they're no longer persistent on Ne…
BlayTheNinth Oct 30, 2024
07ed4b6
chore: Update changelog
BlayTheNinth Oct 30, 2024
0689c97
Set version to 21.1.3
Oct 30, 2024
b6a3730
fix: Fix compile error on Fabric
BlayTheNinth Oct 30, 2024
6e54261
fix: Fix compile error on Forge
BlayTheNinth Oct 30, 2024
31c9071
fix: Fix compile error on Forge
BlayTheNinth Oct 30, 2024
fd7af22
Set version to 21.1.4
Oct 30, 2024
1434879
fix: Fix crash on revival #144
BlayTheNinth Nov 4, 2024
1ff136f
chore: Update changelog
BlayTheNinth Nov 4, 2024
90dac6b
Set version to 21.1.5
Nov 4, 2024
f6ae349
feat: Add support for Totem of Undying in Trinkets #156
BlayTheNinth Jan 28, 2025
a62de96
feat: Add support for Totem of Undying in Curios #156
BlayTheNinth Feb 1, 2025
073c15c
chore: Update changelog
BlayTheNinth Feb 1, 2025
5cfb920
ci: Update Gradle Wrapper Validation
BlayTheNinth Feb 1, 2025
b403063
Set version to 21.1.6
Feb 1, 2025
20d505b
build: Merge CurseForge projects
BlayTheNinth Feb 3, 2025
ed28a0a
Merge branch '1.21.1' of github.com:blay09/HardcoreRevival into 1.21.1
BlayTheNinth Feb 3, 2025
913518f
fix: Fix continueTimerWhileOffline always insta-killing upon login #160
BlayTheNinth Apr 11, 2025
5d3500a
chore: Update changelog
BlayTheNinth Apr 11, 2025
2bb2b4e
chore: Update changelog
BlayTheNinth Apr 11, 2025
f98c737
build: Update Balm and Loom
BlayTheNinth Apr 11, 2025
0105abc
Set version to 21.1.7
Apr 11, 2025
36ce296
feat: Add allow_*_while_knocked_out tags for attack, use, toss (item)…
BlayTheNinth Jul 25, 2025
10e0137
refactor: Rewrite item toss restriction to be more stable
BlayTheNinth Jul 25, 2025
5d31e7f
chore: Update changelog
BlayTheNinth Jul 25, 2025
94c1934
fix: Fix compile error
BlayTheNinth Jul 25, 2025
cb3ad90
Set version to 21.1.8
Jul 25, 2025
baa7e75
fix: Remove 1.21 from versions marked compatible
BlayTheNinth Sep 19, 2025
c5c0c2d
Merge branch '1.21.1' of github.com:TwelveIterationMods/HardcoreReviv…
BlayTheNinth Sep 19, 2025
df1aab9
fix: Fix config i18n keys #168
BlayTheNinth Oct 31, 2025
27845f0
fix: Fix config i18n keys in other languages #168
BlayTheNinth Oct 31, 2025
dab04ac
feat: Add instantDeathEntityTypes option
BlayTheNinth Nov 1, 2025
fb72ee0
chore: Update changelog
BlayTheNinth Nov 1, 2025
188b54b
feat: Add `hardcorerevival:passthrough_death_when_held` tag as workar…
BlayTheNinth Nov 1, 2025
be3c6b4
Set version to 21.1.9
Nov 1, 2025
29cbad3
feat: Added stats for timesRescued and playersRevived (#175)
Ryvu1 Dec 3, 2025
d23ec06
chore: Update changelog
BlayTheNinth Dec 10, 2025
3ad8fd0
Set version to 21.1.10
Dec 10, 2025
f31a98d
ci: Update release workflow
BlayTheNinth Dec 10, 2025
a842b1a
Merge remote-tracking branch 'origin/1.21.1' into 1.21.1
BlayTheNinth Dec 10, 2025
4b128e2
Set version to 21.1.11
Dec 10, 2025
6c08b3d
fix: i18n keys 1.21.1 for fabric
Ryvu1 Dec 16, 2025
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
30 changes: 0 additions & 30 deletions .github/workflows/build.yml.disabled

This file was deleted.

160 changes: 134 additions & 26 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,42 @@ name: publish-release
on:
workflow_dispatch:
inputs:
bump:
description: 'The bump in version for this release'
forge:
description: 'Forge'
required: true
type: choice
default: patch
options:
- major
- minor
- patch
type: boolean
default: true
fabric:
description: 'Fabric'
required: true
type: boolean
default: true
neoforge:
description: 'NeoForge'
required: true
type: boolean
default: true

jobs:
create-release:
runs-on: ubuntu-latest
outputs:
ref: v${{ steps.bump-version.outputs.version }}
version: ${{ steps.bump-version.outputs.version }}
build-matrix: ${{ steps.set-build-matrix.outputs.result }}
publish-matrix: ${{ steps.set-publish-matrix.outputs.result }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Extracting version from properties
shell: bash
run: echo "version=$(cat gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT
run: echo "version=$(cat gradle.properties | grep -w "\bversion\s*=" | cut -d= -f2)" >> $GITHUB_OUTPUT
id: extract-version
- name: Bumping version
uses: TwelveIterationMods/bump-version@v1
with:
version: ${{ steps.extract-version.outputs.version }}
bump: ${{ inputs.bump }}
bump: patch
id: bump-version
- name: Updating version properties
run: |
Expand All @@ -43,36 +51,136 @@ jobs:
shell: bash
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
- name: Preparing build matrix
id: set-build-matrix
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const settingsGradle = fs.readFileSync('settings.gradle', 'utf8');
const includePattern = /^(?!\s*\/\/)\s*include\s*\(\s*(['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])*\s*)\)/gm;
const includes = [...settingsGradle.matchAll(includePattern)].flatMap(match => match[0].match(/['"]([^'"]+)['"]/g).map(item => item.replace(/['"]/g, '')));
const includeFabric = includes.includes('fabric') && ${{inputs.fabric}};
const includeForge = includes.includes('forge') && ${{inputs.forge}};
const includeNeoForge = includes.includes('neoforge') && ${{inputs.neoforge}};
return {
loader: [includeFabric ? 'fabric' : false, includeForge ? 'forge' : false, includeNeoForge ? 'neoforge' : false].filter(Boolean),
}
- name: Preparing publish matrix
id: set-publish-matrix
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const settingsGradle = fs.readFileSync('settings.gradle', 'utf8');
const includePattern = /^(?!\s*\/\/)\s*include\s*\(\s*(['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])*\s*)\)/gm;
const includes = [...settingsGradle.matchAll(includePattern)].flatMap(match => match[0].match(/['"]([^'"]+)['"]/g).map(item => item.replace(/['"]/g, '')));
const includeFabric = includes.includes('fabric') && ${{inputs.fabric}};
const includeForge = includes.includes('forge') && ${{inputs.forge}};
const includeNeoForge = includes.includes('neoforge') && ${{inputs.neoforge}};
const gradleProperties = fs.readFileSync('gradle.properties', 'utf8');
const curseForgeProjectId = gradleProperties.match(/^(?!#)curseforge_project_id\s*=\s*(.+)/m);
const modrinthProjectId = gradleProperties.match(/^(?!#)modrinth_project_id\s*=\s*(.+)/m);
const mavenReleases = gradleProperties.match(/^(?!#)maven_releases\s*=\s*(.+)/m);
return {
loader: ['common', includeFabric ? 'fabric' : false, includeForge ? 'forge' : false, includeNeoForge ? 'neoforge' : false].filter(Boolean),
site: [curseForgeProjectId ? 'curseforge' : '', modrinthProjectId ? 'modrinth' : '', mavenReleases ? 'publish' : ''].filter(Boolean),
exclude: [
{loader: 'common', site: 'curseforge'},
{loader: 'common', site: 'modrinth'}
]
}
build-common:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.ref }}
- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: 'gradle'
- name: Make gradle wrapper executable
run: chmod +x ./gradlew
- name: Build common artifact
run: ./gradlew :common:build '-Pversion=${{needs.create-release.outputs.version}}'
- name: Upload common artifact
uses: actions/upload-artifact@v4
with:
name: common-artifact
path: common/build
needs: create-release
build-release:
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.create-release.outputs.build-matrix)}}
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.ref }}
- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: 'gradle'
- name: Make gradle wrapper executable
run: chmod +x ./gradlew
- name: Download common artifact
uses: actions/download-artifact@v4
with:
name: common-artifact
path: common/build
- name: Build ${{ matrix.loader }} artifact
run: ./gradlew :${{ matrix.loader }}:build '-Pversion=${{needs.create-release.outputs.version}}'
- name: Upload ${{ matrix.loader }} artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.loader }}-artifact
path: ${{ matrix.loader }}/build
needs:
- create-release
- build-common
publish-release:
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
matrix:
loader: [ common, fabric, forge, neoforge ]
site: [ curseforge, modrinth, publish ]
exclude:
- loader: common
site: curseforge
- loader: common
site: modrinth
matrix: ${{fromJson(needs.create-release.outputs.publish-matrix)}}
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.ref }}
- name: Download ${{ matrix.loader }} artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.loader }}-artifact
path: ${{ matrix.loader }}/build
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: 'gradle'
- name: Make gradle wrapper executable
run: chmod +x ./gradlew
- name: Publish
run: ./gradlew :${{ matrix.loader }}:${{ matrix.site }} '-Pversion=${{needs.create-release.outputs.version}}' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}'
run: ./gradlew :${{ matrix.loader }}:${{ matrix.site }} '-Pversion=${{needs.create-release.outputs.version}}' '-PmavenUsername=${{ secrets.MAVEN_USER }}' '-PmavenPassword=${{ secrets.MAVEN_PASSWORD }}'
env:
CURSEFORGE_TOKEN: ${{secrets.CURSEFORGE_TOKEN}}
MODRINTH_TOKEN: ${{secrets.MODRINTH_TOKEN}}
needs: create-release
needs:
- create-release
- build-common
- build-release
2 changes: 1 addition & 1 deletion .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
Expand Down
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
- Reduced default rescueDistance to 3 instead of 5
- Require Line of Sight for rescuing to initiate
- Require the player to be looking towards the downed player for rescuing to initiate
- Added stats for Players Revived and Times Revived
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT' apply(false)
id 'fabric-loom' version '1.9-SNAPSHOT' apply(false)
id 'net.neoforged.moddev' version '0.1.110' apply(false)
id 'net.darkhax.curseforgegradle' version '1.1.18' apply(false)
id "com.modrinth.minotaur" version "2.+" apply(false)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:totem_of_undying"
]
}
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
package net.blay09.mods.hardcorerevival;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.proxy.SidedProxy;
import net.blay09.mods.hardcorerevival.capability.HardcoreRevivalData;
import net.blay09.mods.hardcorerevival.capability.HardcoreRevivalDataImpl;
import net.blay09.mods.hardcorerevival.capability.InvalidHardcoreRevivalData;
import net.blay09.mods.balm.common.config.ConfigLocalization;
import net.blay09.mods.hardcorerevival.command.ReviveCommand;
import net.blay09.mods.hardcorerevival.compat.Compat;
import net.blay09.mods.hardcorerevival.config.HardcoreRevivalConfig;
import net.blay09.mods.hardcorerevival.handler.*;
import net.blay09.mods.hardcorerevival.network.ModNetworking;
import net.blay09.mods.hardcorerevival.stats.ModStats;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class HardcoreRevival {
public static final String MOD_ID = "hardcorerevival";

private static final SidedProxy<HardcoreRevivalManager> manager = Balm.sidedProxy("net.blay09.mods.hardcorerevival.HardcoreRevivalManager", "net.blay09.mods.hardcorerevival.client.HardcoreRevivalClientManager");
private static final HardcoreRevivalData clientRevivalData = new HardcoreRevivalDataImpl();

public static final Logger logger = LogManager.getLogger();

public static void initialize() {
ConfigLocalization.enableModernTranslationKeys(MOD_ID);
HardcoreRevivalConfig.initialize();

ModNetworking.initialize(Balm.getNetworking());
Expand All @@ -39,18 +32,7 @@ public static void initialize() {
RescueHandler.initialize();

Balm.initializeIfLoaded(Compat.MR_CRAYFISHS_GUN_MOD, "net.blay09.mods.hardcorerevival.compat.MrCrayfishsGunModAddon");
}

public static HardcoreRevivalManager getManager() {
return manager.get();
}

public static HardcoreRevivalData getRevivalData(Entity entity) {
return entity instanceof Player player ? getManager().getRevivalData(player) : InvalidHardcoreRevivalData.INSTANCE;
}

public static HardcoreRevivalData getClientRevivalData() {
return clientRevivalData;
Balm.initializeIfLoaded(Compat.INVENTORY_TOTEM, "new.blay09.mods.hardcorerevival.compat.InventoryTotemAddon");
}

}
Loading
Loading