Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
aa082c9
Init 1.21.5 update
connorslade May 29, 2025
a7c7222
Fix cloth config impl
connorslade May 29, 2025
8573262
Revert "Use ItemStack stream codec for sync packets"
connorslade May 30, 2025
e7180c8
Update Minecraft version in mod.json
connorslade May 30, 2025
defd248
Merge pull request #1 from connorslade/mc/1.21.5
cunhar May 30, 2025
4595e7c
Update paper settings to 1.21.5
cunhar May 30, 2025
e7409aa
Add crafter to container sync
cunhar May 30, 2025
3e96681
update paper to 1.21.6
cunhar Jun 28, 2025
7062cc8
update fabric to 1.21.6 - SNAPSHOT
cunhar Jun 28, 2025
5fc9745
fix player contstructor with new mappings
cunhar Jun 28, 2025
abae453
update mod.json
cunhar Jun 28, 2025
091b1c9
Update for Minecraft 1.21.6
connorslade Jun 28, 2025
6e677b7
Add run-paper plugin and update .gitignore
connorslade Jun 28, 2025
a5841e4
Merge pull request #2 from connorslade/mc/1.21.6
cunhar Jun 29, 2025
dcdd9ac
update reflection remapper
cunhar Jun 29, 2025
3c92f51
fix reflection util
cunhar Jun 30, 2025
26366cb
update parchment
cunhar Jun 30, 2025
5ba7d6f
fix xp bar
cunhar Jul 1, 2025
8d3b2ff
Never show waypoints
cunhar Jul 1, 2025
149f2d2
show xp bar even if 0 xp
cunhar Jul 1, 2025
74d501d
roll up
cunhar Jul 1, 2025
c3264f0
Add armour and effects to server custom packets
cunhar Jul 12, 2025
8bb65de
added amour and effects to the giu
cunhar Jul 12, 2025
4bb4fa7
fix
cunhar Oct 3, 2025
c8ae555
upgrade gradle and fabric versions
cunhar Nov 15, 2025
f079b14
fix camera entity and profile id
cunhar Nov 15, 2025
f711e49
fix keybinds
cunhar Nov 15, 2025
b197b34
more fixes to remapped classes
cunhar Nov 17, 2025
b893017
apply connors patch
cunhar Nov 19, 2025
94b4d1c
Fix cloth config config
cunhar Nov 19, 2025
afe5929
update cloth config version to 20.0.149 to fix crash bug while click …
RCUTANF Dec 11, 2025
51f7266
fix:Refactor CustomPacketCodecs to use OPTIONAL_STREAM_CODEC for Item…
RCUTANF Dec 11, 2025
0af75b7
feat: Implement effects synchronization for players in SpectatorPlus
RCUTANF Dec 11, 2025
b93d50f
fix: effect sync and render
RCUTANF Dec 12, 2025
3751651
fix: hand height calculations bug
RCUTANF Dec 13, 2025
d243f9c
fix: handle null viewingEntity in sync data reset, which case a clien…
RCUTANF Dec 14, 2025
532e1fc
fix: handle null ItemStack serialization in CustomPacketCodecs,which …
RCUTANF Dec 14, 2025
6db7fdf
fix: prevent incorrect arm orientation when spectating by skipping mu…
RCUTANF Dec 17, 2025
3116679
fix: update fabric-loom plugin version to 1.13-SNAPSHOT
RCUTANF Jan 2, 2026
8ae3bc6
update to 1.21.11
RCUTANF Jan 3, 2026
ff06b36
fix: replace ResourceLocation with Identifier for packet type definit…
RCUTANF Jan 4, 2026
a37be0f
beautiful code style
RCUTANF Jan 4, 2025
ccc204d
Migrate to 1.21.11
RCUTANF Jan 4, 2025
058dbba
migrate entityInteractionRange() form gameRendererMixin to new localP…
RCUTANF Jan 4, 2025
b326e00
fix: replace ResourceLocation with Identifier in effect handling
RCUTANF Jan 30, 2026
7506b4b
fix: renderItemInHand follow the update of source code
RCUTANF Jan 30, 2026
6d94a62
close shadowJar of paper build
RCUTANF Jan 30, 2026
e42b4a8
feat: configure run directories for client and server
RCUTANF Jan 30, 2026
0f095c0
fix: integrate server will be correctly use original effects data ins…
RCUTANF Jan 30, 2026
0aa0619
feat: implement inventory and cursor synchronization for spectators
RCUTANF Feb 3, 2026
792df45
fix: reorder screen sync packet sending for spectators to ensure inve…
RCUTANF Feb 3, 2026
c255adb
feat: add screen close synchronization for spectators and update inve…
RCUTANF Feb 3, 2026
eee5079
feat: enhance cursor synchronization by adding origin slot tracking f…
RCUTANF Feb 3, 2026
77f902e
feat: implement container synchronization for spectators
RCUTANF Feb 6, 2026
d76d20f
refactor: Refactor project structure to support multi-version build
RCUTANF Feb 6, 2026
d092eec
chore: update .gitignore
RCUTANF Feb 6, 2026
945b193
feat: add CI and release workflows for automated building and versioning
RCUTANF Feb 7, 2026
0bf357b
fix: remove incorrect branch restriction from release workflow
RCUTANF Feb 7, 2026
d9d99f0
fix: update artifact paths in build and release workflows
RCUTANF Feb 7, 2026
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
79 changes: 79 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI Build

on:
push:
branches:
- master
paths-ignore:
- '**.md'
- '.gitignore'
- 'LICENSE'
- 'img/**'
pull_request:
branches:
- master
paths-ignore:
- '**.md'
- '.gitignore'
- 'LICENSE'
- 'img/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build --no-daemon --stacktrace

- name: Test
run: ./gradlew test --no-daemon --stacktrace || true

- name: List build artifacts
run: |
echo "=== Fabric artifacts ==="
find fabric/fabric-*/build/libs -name "*.jar" 2>/dev/null || echo "No Fabric artifacts found"
echo ""
echo "=== Paper artifacts ==="
find paper/paper-*/build/libs -name "*.jar" 2>/dev/null || echo "No Paper artifacts found"

- name: Upload Fabric artifacts
uses: actions/upload-artifact@v4
if: success()
with:
name: fabric-builds
path: |
fabric/fabric-*/build/libs/*.jar
!fabric/fabric-*/build/libs/*-dev.jar
!fabric/fabric-*/build/libs/*-sources.jar
retention-days: 7

- name: Upload Paper artifacts
uses: actions/upload-artifact@v4
if: success()
with:
name: paper-builds
path: |
paper/paper-*/build/libs/*.jar
!paper/paper-*/build/libs/*-dev.jar
!paper/paper-*/build/libs/*-sources.jar
retention-days: 7

- name: Check build reports
if: failure()
run: |
echo "Build failed. Checking for error reports..."
find . -name "*.log" -type f 2>/dev/null | head -20
142 changes: 142 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Build and Release

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
version:
description: 'Version number (e.g., 1.2.3)'
required: false
type: string

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Extract version from tag or input
id: version
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ -n "${{ github.event.inputs.version }}" ]; then
VERSION="${{ github.event.inputs.version }}"
else
VERSION=${GITHUB_REF#refs/tags/v}
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "Building version: $VERSION"

- name: Update version in gradle.properties
run: |
sed -i "s/^version=.*/version=${{ steps.version.outputs.VERSION }}/" gradle.properties
cat gradle.properties

- name: Build with Gradle
run: ./gradlew build --no-daemon --stacktrace

- name: List build artifacts
run: |
echo "=== Fabric artifacts ==="
find fabric/fabric-*/build/libs -name "*.jar" 2>/dev/null || echo "No Fabric artifacts found"
echo ""
echo "=== Paper artifacts ==="
find paper/paper-*/build/libs -name "*.jar" 2>/dev/null || echo "No Paper artifacts found"

- name: Prepare release artifacts
id: artifacts
run: |
mkdir -p release-artifacts

# Copy Fabric builds from subprojects
find fabric/fabric-*/build/libs -type f -name "*.jar" -not -name "*-dev.jar" -not -name "*-sources.jar" 2>/dev/null | while read jar; do
cp "$jar" release-artifacts/
echo "Copied: $(basename $jar)"
done

# Copy Paper builds from subprojects
find paper/paper-*/build/libs -type f -name "*.jar" -not -name "*-dev.jar" -not -name "*-sources.jar" 2>/dev/null | while read jar; do
cp "$jar" release-artifacts/
echo "Copied: $(basename $jar)"
done

echo ""
echo "=== Release artifacts ==="
ls -lh release-artifacts/ || echo "No artifacts prepared!"

# Generate artifact list for release notes
echo "ARTIFACTS<<EOF" >> $GITHUB_OUTPUT
ls -1 release-artifacts/ 2>/dev/null >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Generate changelog
id: changelog
run: |
if [ -f "CHANGELOG.md" ]; then
# Extract changelog for current version
sed -n "/^## \[*${{ steps.version.outputs.VERSION }}\]/,/^## \[/p" CHANGELOG.md | sed '$d' > current_changelog.txt
if [ -s current_changelog.txt ]; then
echo "CHANGELOG_CONTENT<<EOF" >> $GITHUB_OUTPUT
cat current_changelog.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
else
echo "CHANGELOG_CONTENT=No changelog available for this version." >> $GITHUB_OUTPUT
fi
else
echo "CHANGELOG_CONTENT=No changelog file found." >> $GITHUB_OUTPUT
fi

- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', steps.version.outputs.VERSION) || github.ref_name }}
name: SpectatorPlus v${{ steps.version.outputs.VERSION }}
body: |
# SpectatorPlus v${{ steps.version.outputs.VERSION }}

## What's Changed
${{ steps.changelog.outputs.CHANGELOG_CONTENT }}

## Downloads

### Fabric
- For Minecraft 1.21.10: `spectatorplus-fabric-${{ steps.version.outputs.VERSION }}-mc1.21.10.jar`
- For Minecraft 1.21.11: `spectatorplus-fabric-${{ steps.version.outputs.VERSION }}-mc1.21.11.jar`

### Paper
- For Paper servers: `spectatorplus-paper-${{ steps.version.outputs.VERSION }}.jar`

---

**Full Changelog**: https://github.com/${{ github.repository }}/commits/v${{ steps.version.outputs.VERSION }}
files: release-artifacts/*
draft: false
prerelease: false
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: build-artifacts-${{ steps.version.outputs.VERSION }}
path: |
fabric/build/libs/*.jar
paper/build/libs/*.jar
!**/*-dev.jar
!**/*-sources.jar
retention-days: 30
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
run

### IntelliJ IDEA ###
.idea/
Expand Down Expand Up @@ -34,3 +35,5 @@ bin/

### Mac OS ###
.DS_Store
/SpectatorPlus_Structure_old.md
/SpectatorPlus_Structure.md
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.3.0 - 2026-02-07

### Added
- Added support for Minecraft 1.21.11.
- GitHub Actions workflows for automated building and releasing
- CI build workflow for continuous integration
- Release workflow for automatic GitHub releases
- Potion effect synchronization, allowing spectators to view the target player's potion effects.
- Container synchronization in spectator mode, displaying the container currently opened by the target player (e.g., chests, furnace, etc.).
- Cursor synchronization in spectator mode, displaying the hotbar slot and item currently selected by the target player (requires server-side installation and the target player to have the mod installed).
- Player inventory synchronization in spectator mode, displaying the target player's full inventory (requires server-side installation).
- Inventory screen state synchronization in spectator mode, reflecting when the target player opens or closes their inventory GUI (requires server-side installation and the target player to have the mod installed).

### Fixed
- Fixed an issue with view rotate calculations in spectator mode that caused incorrect arm positioning.
- Fixed an issue where spectators would not correctly receive hotbar item updates from the target player.

### Changed
- Upgraded the project structure to a multi-module architecture to support building for multiple Minecraft versions.

### Chores
- Merged upstream changes regarding the update from 1.21.10 to 1.21.11.
70 changes: 9 additions & 61 deletions fabric/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,67 +1,15 @@
plugins {
id("fabric-loom") version "1.9-SNAPSHOT"
id("spectatorplus.platform")
id("fabric-loom") version "1.14-SNAPSHOT" apply false
id("spectatorplus.platform") apply false
}

description = "A Fabric mod that improves spectator mode by showing the hotbar, health, and held item of the spectated player"
subprojects {
apply(plugin = "java")

repositories {
maven("https://maven.parchmentmc.org")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://maven.shedaniel.me/")
maven("https://maven.terraformersmc.com/releases/")
}

loom {
splitEnvironmentSourceSets()

mods {
register("spectatorplus") {
sourceSet(sourceSets.getByName("main"))
sourceSet(sourceSets.getByName("client"))
}
}

accessWidenerPath = file("src/main/resources/spectatorplus.accesswidener")
}

dependencies {
minecraft("com.mojang:minecraft:${property("minecraft_version")}")
modImplementation("net.fabricmc:fabric-loader:${property("loader_version")}")
mappings(loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${property("parchment_minecraft_version")}:${property("parchment_version")}@zip")
})

modImplementation("net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}")

include(modImplementation("me.lucko:fabric-permissions-api:${property("fabric_permissions_api_version")}")!!)

modImplementation("me.shedaniel.cloth:cloth-config-fabric:${property("cloth_config_version")}") {
exclude("net.fabricmc.fabric-api")
}

modImplementation("com.terraformersmc:modmenu:${property("modmenu_version")}")
}

tasks {
processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand(
mapOf(
"version" to project.version,
"description" to project.description,
)
)
}
}

jar {
from("../LICENSE")
}

remapJar {
archiveVersion = getByName<Jar>("jar").archiveVersion
repositories {
maven("https://maven.parchmentmc.org")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://maven.shedaniel.me/")
maven("https://maven.terraformersmc.com/releases/")
}
}
16 changes: 16 additions & 0 deletions fabric/fabric-1.21.10/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
id("fabric-loom")
id("spectatorplus.platform")
}

dependencies {
minecraft("com.mojang:minecraft:${property("minecraft_version")}")
mappings(loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${property("parchment_minecraft_version")}:${property("parchment_version")}@zip")
})
modImplementation("net.fabricmc:fabric-loader:${property("loader_version")}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}")

implementation(project(":fabric:fabric-core"))
}
13 changes: 13 additions & 0 deletions fabric/fabric-1.21.10/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
minecraft_version=1.21.10
yarn_mappings=1.21.10+build.1
loader_version=0.17.2

# Fabric API
fabric_version=0.138.3+1.21.10

parchment_minecraft_version=1.21.10
parchment_version=2025.10.12

fabric_permissions_api_version=0.4.0
cloth_config_version=20.0.149
modmenu_version=16.0.0-rc.1
16 changes: 16 additions & 0 deletions fabric/fabric-1.21.11/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
id("fabric-loom")
id("spectatorplus.platform")
}

dependencies {
minecraft("com.mojang:minecraft:${property("minecraft_version")}")
mappings(loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${property("parchment_minecraft_version")}:${property("parchment_version")}@zip")
})
modImplementation("net.fabricmc:fabric-loader:${property("loader_version")}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}")

implementation(project(":fabric:fabric-core"))
}
Loading