Skip to content

Modernize 1.7.10 branch #495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 94 commits into
base: forge-1.7.10
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
f2c8ea7
Update Fabric/Forge to Minecraft 1.20
lucko Jun 8, 2023
54bbf61
Update gradle wrapper version
lucko Jun 8, 2023
7bcd193
Update Forge/Fabric to 1.20.1
lucko Jun 14, 2023
891914f
Add GitHub Action CI workflow
lucko Jun 25, 2023
066b404
Fixed typo in Configuration.getInteger (#353)
MoritzR200 Aug 18, 2023
9b62498
Include pufferfish config in viewer (#342)
TheRealRyGuy Aug 18, 2023
fef648d
Add support for Paper Plugins (#347)
scrayos Aug 18, 2023
3d0d481
Remove minestom
lucko Aug 26, 2023
ca65bac
Give minestom console full permissions (#350)
davidmayr Aug 27, 2023
3c0c141
Fix parsing null async profiler segments (#354)
semenishchev Aug 27, 2023
fac7ec9
Use a different websocket library
lucko Aug 28, 2023
b443924
Clarify command timeout warning msg
lucko Aug 28, 2023
4729100
Add issue templates
lucko Aug 28, 2023
8c253ae
Don't try to send statistics to a closed socket (#357)
lucko Aug 28, 2023
74a7011
Update Forge/Fabric to 1.20.2
lucko Sep 22, 2023
50996ed
Bump adventure versions
lucko Oct 2, 2023
fbb861f
Update gradle version
lucko Dec 6, 2023
cbff1ae
Update Fabric to 1.20.3
lucko Dec 6, 2023
87512b5
Update Fabric/Forge to Minecraft 1.20.4
lucko Dec 11, 2023
7fe6531
Add rcon ip to hidden config paths (#362)
powercasgamer Jan 6, 2024
aafc582
Fix background profiler failing to start on Sponge API 8+ (#369)
avaruus1 Feb 28, 2024
a553f51
NeoForge Support (#390)
KenRouKoro Apr 7, 2024
c763017
Update Fabric dependencies
lucko Apr 17, 2024
0f4c52e
Update gradle wrapper version
lucko Apr 17, 2024
8af5bc5
Update spark-fabric to MC 1.20.5 (#391)
DrexHD Apr 23, 2024
660c10e
Update Fabric/NeoForge to MC 1.20.6
lucko Apr 29, 2024
8b6c266
Update Forge to MC 1.20.6
lucko May 6, 2024
3ac58fd
Bump adventure-platform to 4.3.3
lucko Jun 2, 2024
c3aa0cd
Add note to /spark profiler open about expiry time
lucko Jun 9, 2024
49bc094
Fix ForgeGradle issue building on macOS
lucko Jun 9, 2024
26b83dd
Bump common dependency versions
lucko Jun 9, 2024
e70616b
Tweak formatting of /spark profiler open note
lucko Jun 9, 2024
1e9a237
Update Fabric to MC 1.21 (#412)
DrexHD Jun 16, 2024
dface59
Update Forge/NeoForge to MC 1.21
lucko Jun 16, 2024
c94eba9
Include server brand in viewer payloads
lucko Jul 7, 2024
45ce159
Add caveat to warning msg about Java agents
lucko Jul 14, 2024
d909d19
Ignore trailing sleeping samples for duration estimation (#413)
SirYwell Jul 14, 2024
1b75abc
Use WeakReference for command senders (#417)
lucko Jul 14, 2024
ed8eac5
Refactor ClassFinder into interface
lucko Jul 18, 2024
8379f2b
Add spark-paper module (#422)
lucko Jul 18, 2024
3907534
Add JVM information to viewer metadata
lucko Jul 18, 2024
fdbea08
Set version correctly for spark-paper
lucko Jul 18, 2024
487cd0c
Remove spark service registration in spark-paper
lucko Jul 20, 2024
c0ffb19
Redact username from vm args (#423)
lucko Jul 20, 2024
635800a
Add placeholder resolver API
lucko Jul 20, 2024
b78afab
Include gamerule settings in metadata (#425)
lucko Jul 21, 2024
4c0149b
Fix gamerule read on older Bukkit versions (#428)
lucko Jul 23, 2024
60d54cc
Add some unit tests
lucko Jul 29, 2024
9262175
Update GH actions step versions
lucko Jul 29, 2024
7076811
Check for async command completion before sleeping (#431)
SirYwell Jul 29, 2024
6e7cc88
Cleanup spark tmp dir on startup
lucko Jul 29, 2024
1fb00b1
Add more automated tests
lucko Jul 29, 2024
dcf16e3
Add missing license headers
lucko Jul 29, 2024
ac0ac93
Relocate net.kyori.option package (#432)
lucko Jul 30, 2024
613f702
Add command visibility check for Velocity and BungeeCord (#437)
RealBauHD Aug 6, 2024
8017dbd
Add uploadable health report (#436)
lucko Aug 6, 2024
0eeba9e
Allow mod/plugin author field to be null (#442)
lucko Aug 12, 2024
46704df
Update to Minecraft 1.21.1
lucko Aug 12, 2024
7eff995
Fix entity counts & chunk info with Moonrise on Fabric and NeoForge (…
jpenilla Aug 24, 2024
0cd9b01
Switch from neogradle to moddevgradle (#446)
jpenilla Aug 24, 2024
55b3839
Add methods for spark-paper to check permissions (#444)
lucko Sep 2, 2024
35b557a
Improve unit tests
lucko Sep 2, 2024
684cc5e
Refactor sampler node export process
lucko Sep 3, 2024
ed33fd5
Include engine type in sampler proto
lucko Sep 3, 2024
8986c71
Include datapacks info in sampler proto
lucko Sep 5, 2024
f06de57
Include memory stats in ws updates
lucko Sep 8, 2024
dfe500e
Use Forge's new simplified DisplayTest API (#456)
PaintNinja Sep 22, 2024
7f32289
Fix Forge platform crash on launch (#455)
PaintNinja Sep 22, 2024
72880dd
Fix activity log unit test
lucko Sep 25, 2024
dce652c
Use Paper's Datapack API in spark-paper (#459)
granny Sep 25, 2024
6effd0d
Merge service files to fix unrelocated adventure module name leaking …
jpenilla Oct 1, 2024
4face76
Move some platform implementations to new repo
lucko Oct 20, 2024
aa667a5
Update Fabric to MC 1.21.2 (#462)
DrexHD Oct 22, 2024
e6930ec
Update NeoForge to MC 1.21.2
lucko Oct 22, 2024
6856fca
Fix NPE on NeoForge when starting profiler (#465)
lucko Oct 23, 2024
c58ddcf
Update to MC 1.21.3
lucko Oct 26, 2024
ef507b1
Improve error logging in various places
lucko Oct 26, 2024
41a1117
Tidy up NeoForge/Forge mod init
lucko Nov 2, 2024
ddb0097
Support --ignore-sleeping with async-profiler (#467)
SirYwell Nov 2, 2024
368ba2f
Upgrade async-profiler to v3 (#386)
SirYwell Nov 21, 2024
cab9336
Update to MC 1.21.4
lucko Dec 4, 2024
4cd34dc
Update Forge to MC 1.21.4
lucko Dec 7, 2024
336102f
Upgrade spark-sponge to API 12
lucko Jan 5, 2025
273f9bc
Implement standalone profiling agent (#480)
lucko Jan 12, 2025
509aa7a
Fix standalone attach on Windows (#484)
lucko Jan 15, 2025
d885e27
Fix NPE on Sponge from null sender unique id (#481)
lucko Feb 23, 2025
cccd483
Add extra package relocations for standlone agent (#488)
lucko Feb 23, 2025
66ec3e8
Update GitHub actions versions
lucko Mar 1, 2025
ece9fd4
Update to Minecraft 1.21.5
lucko Mar 26, 2025
7222735
MC 1.21.5 for Forge
lucko Mar 27, 2025
a9f5e78
Merge branch 'master' into forge-1.7.10
embeddedt Mar 28, 2025
43a8298
Align plugin impl with newer versions slightly
embeddedt Mar 28, 2025
8d9d466
Fix issues with reobfuscated version
embeddedt Mar 29, 2025
051f3a9
Fix errors sending game rules
embeddedt Mar 29, 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
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
91 changes: 91 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: 🐛 ​ Bug report
description: Report an issue or problem.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Hello! Thanks for reporting a bug to the spark team.

Before going any further, please check to see if your bug has already been:

* fixed (check the [changelog](https://spark.lucko.me/changelog))
* reported by someone else (check the [open issues](https://github.com/lucko/spark/issues))

Please also consider raising the issue in our [Discord](https://discord.gg/PAGT2fu) before reporting it here. (more often you can get help faster there!)

Thanks! :)
- type: textarea
id: description
attributes:
label: Description
description: Please provide a short description of the issue in the space below.
placeholder: Description goes here!
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: Reproduction Steps
description: Please provide a clear list of steps we should follow in order to reproduce your issue in the space below.
placeholder: List reproduction steps here, please!
validations:
required: true
- type: textarea
id: expected-behaviour
attributes:
label: Expected Behaviour
description: Please provide a description of what you expected to happen.
placeholder: Describe what you expected to happen here.
validations:
required: true
- type: textarea
id: platform-version
attributes:
label: Platform Information
description: |
Please provide details about the platform that spark is running on.

This *must* include the versions of all relevant components.

* Minecraft Version - e.g. "Minecraft 1.19.4"
* Platform Type - e.g. "server", "client" or "proxy"
* Platform Brand - e.g. "Forge", "Fabric", "Paper"
* Platform Version - e.g. "Forge 47.1.44", "Paper git-Paper-124"
value: |
* Minecraft Version:
* Platform Type:
* Platform Brand:
* Platform Version:
validations:
required: true
- type: input
id: spark-version
attributes:
label: Spark Version
description: Please provide the exact version number of spark you are using.
placeholder: v1.10.50
validations:
required: true
- type: textarea
id: logs
attributes:
label: Logs and Configs
description: If you think it would be helpful, please also include a pastebin of any relevant config files or log output. You should use https://gist.github.com/ to upload, then include the link below.
placeholder: https://gist.github.com/HelpfulBugReporter/ThisIsAVeryUsefulLogOutput
validations:
required: false
- type: textarea
id: extra-info
attributes:
label: Extra Details
description: Please include any other relevant details in the space below.
placeholder: I was able to reproduce this only at the end of a rainbow.
validations:
required: false
- type: markdown
attributes:
value: |
Please fill in the fields above with as much detail as possible before submitting. :)

Thanks!
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💬 ​ Ask a question
url: https://discord.gg/PAGT2fu
about: We use Discord to provide support for the project. If you have a question, need help, or aren't sure if you've found a bug or not, please come and talk to us there!
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/suggestion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 💡 ​ Suggestion
description: Suggest an idea for an improvement or change.
labels: ["suggestion"]
body:
- type: markdown
attributes:
value: |
Before going any further, please check to see if your suggestion has already been:

* implemented (check the [docs](https://spark.lucko.me/docs))
* proposed by someone else (check the [open issues](https://github.com/lucko/spark/issues))

Thanks!
- type: textarea
id: description
attributes:
label: Description
description: Please provide a short description of your suggestion in the space below.
placeholder: Hello, perhaps you should...
validations:
required: true
- type: textarea
id: proposed-behaviour
attributes:
label: Proposed Behaviour
description: Please provide a short explanation of how the feature should work / be changed, and how this will affect the project.
placeholder: It would...
validations:
required: true
- type: textarea
id: extra-info
attributes:
label: Extra Details
description: Please include any other relevant details in the space below.
placeholder: I think this should only function at the end of a rainbow.
validations:
required: false
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build Gradle

on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
branches:
- 'master'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-gradle:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Run build and tests with Gradle wrapper
run: ./gradlew test build

- name: Upload all artifacts
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: jars
path: |
**/build/libs/spark-1.*-*.jar
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ It is:
It works by sampling statistical data about the systems activity, and constructing a call graph based on this data. The call graph is then displayed in an online viewer for further analysis by the user.

There are two different profiler engines:
* Native `AsyncGetCallTrace` + `perf_events` - uses [async-profiler](https://github.com/jvm-profiling-tools/async-profiler) (*only available on Linux x86_64 systems*)
* Built-in Java `ThreadMXBean` - an improved version of the popular [WarmRoast profiler](https://github.com/sk89q/WarmRoast) by sk89q.
* Native/Async - uses the [async-profiler](https://github.com/async-profiler/async-profiler) library (*only available on Linux & macOS systems*)
* Java - uses `ThreadMXBean`, an improved version of the popular [WarmRoast profiler](https://github.com/sk89q/WarmRoast) by sk89q.

### :zap: Memory Inspection

Expand Down
52 changes: 44 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ plugins {
id 'org.cadixdev.licenser' version '0.6.1' apply false
}

import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

allprojects {
group = 'me.lucko'
version = '1.10-SNAPSHOT'

configurations {
compileClasspath // Fabric-loom needs this for remap jar for some reason
}
}

subprojects {
Expand All @@ -22,12 +21,39 @@ subprojects {
patchVersion = determinePatchVersion()
pluginVersion = baseVersion + '.' + patchVersion
pluginDescription = 'spark is a performance profiling plugin/mod for Minecraft clients, servers and proxies.'

applyExcludes = { Jar jarTask ->
jarTask.exclude 'module-info.class'
jarTask.exclude 'META-INF/maven/**'
jarTask.exclude 'META-INF/proguard/**'
jarTask.exclude 'META-INF/LICENSE'
jarTask.exclude 'META-INF/NOTICE'
// protobuf
jarTask.exclude '**/*.proto'
jarTask.exclude '**/*.proto.bin'
// async-profiler
jarTask.exclude 'linux-arm64/**'
jarTask.exclude 'linux-x64/**'
jarTask.exclude 'macos/**'
}
}

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
options.release = 8
if(it.name != "spark-forge1710") {
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
options.release = 8
}
}
}

tasks.withType(Test).configureEach {
testLogging {
events = [TestLogEvent.PASSED, TestLogEvent.FAILED, TestLogEvent.SKIPPED]
exceptionFormat = TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
}

Expand All @@ -41,6 +67,16 @@ subprojects {
}

repositories {
// Fix issue with lwjgl-freetype not being found on macOS / ForgeGradle issue
//
// Could not resolve all files for configuration ':_compileJava_1'.
// Could not find lwjgl-freetype-3.3.3-natives-macos-patch.jar (org.lwjgl:lwjgl-freetype:3.3.3).
maven {
url "https://libraries.minecraft.net"
content {
includeModule("org.lwjgl", "lwjgl-freetype")
}
}
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://repo.lucko.me/" }
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=false

rfg.disableDependencyDeobfuscation=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading