支持 Folia#1059
Conversation
Bumps me.clip:placeholderapi from 2.11.3 to 2.11.4. --- updated-dependencies: - dependency-name: me.clip:placeholderapi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [com.rudikershaw.gitbuildhook:git-build-hook-maven-plugin](https://github.com/rudikershaw/git-build-hook) from 3.1.0 to 3.4.1. - [Release notes](https://github.com/rudikershaw/git-build-hook/releases) - [Commits](rudikershaw/git-build-hook@3.1.0...3.4.1) --- updated-dependencies: - dependency-name: com.rudikershaw.gitbuildhook:git-build-hook-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [com.gmail.nossr50.mcMMO:mcMMO](https://github.com/mcMMO-Dev/mcMMO) from 2.1.223 to 2.1.225. - [Release notes](https://github.com/mcMMO-Dev/mcMMO/releases) - [Changelog](https://github.com/mcMMO-Dev/mcMMO/blob/master/Changelog.txt) - [Commits](https://github.com/mcMMO-Dev/mcMMO/commits) --- updated-dependencies: - dependency-name: com.gmail.nossr50.mcMMO:mcMMO dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps com.sk89q.worldedit:worldedit-core from 7.2.15 to 7.2.17. --- updated-dependencies: - dependency-name: com.sk89q.worldedit:worldedit-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [com.zaxxer:HikariCP](https://github.com/brettwooldridge/HikariCP) from 5.0.1 to 5.1.0. - [Changelog](https://github.com/brettwooldridge/HikariCP/blob/dev/CHANGES) - [Commits](brettwooldridge/HikariCP@HikariCP-5.0.1...HikariCP-5.1.0) --- updated-dependencies: - dependency-name: com.zaxxer:HikariCP dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps me.clip:placeholderapi from 2.11.4 to 2.11.5. --- updated-dependencies: - dependency-name: me.clip:placeholderapi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* e2e testing initial * Setup matrix * Download tester * Jeff's changes * capitalized Chosen * Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.1 * fix breaking sf block with not unlocked item duping contents (Slimefun#3976) * [CI skip] Update actions/setup-java action to v3.13.0 * [CI skip] Update dependency me.clip:placeholderapi to v2.11.4 * [CI skip] Update actions/checkout action to v4 * [CI skip] Update dependency com.github.LoneDev6:itemsadder-api to v3.5.0c-r5 * [CI skip] Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.6.0 * [CI skip] Update dependency org.sonarsource.scanner.maven:sonar-maven-plugin to v3.10.0.2594 * [CI skip] Update dependency com.sk89q.worldedit:worldedit-core to v7.2.16 * [CI skip] Update dependency com.sk89q.worldedit:worldedit-bukkit to v7.2.16 * [CI skip] Update dependency com.gmail.nossr50.mcMMO:mcMMO to v2.1.224 * [CI skip] Update dependency org.mockito:mockito-core to v5.6.0 * updated dough version (Slimefun#3991) * [CI skip] Update dependency com.github.LoneDev6:itemsadder-api to v3.6.1 * [CI skip] Update dependency com.sk89q.worldedit:worldedit-core to v7.2.17 * [CI skip] Update dependency com.sk89q.worldedit:worldedit-bukkit to v7.2.17 * [CI skip] Update dependency com.gmail.nossr50.mcMMO:mcMMO to v2.1.225 * [CI skip] Update dependency org.jacoco:jacoco-maven-plugin to v0.8.11 * [CI skip] Update actions/checkout action to v4.1.1 * [CI skip] Update thollander/actions-comment-pull-request action to v2.4.3 * [CI skip] Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.2.1 * [CI skip] Update dependency me.clip:placeholderapi to v2.11.5 * Update .github/workflows/e2e-testing.yml * Update .github/workflows/e2e-testing.yml * Update .github/workflows/e2e-testing.yml * Update .github/workflows/e2e-testing.yml * Add MultiBlockCraftEvent (Updated version of Slimefun#3439) (Slimefun#3928) * fix taking damage on head collision while wearing elytra cap (Slimefun#3760) * Remove Lore Check from Slimefun Guide (Slimefun#3969) * don't consume bookbinder inputs if the output is worse than the input (Slimefun#3925) Co-authored-by: Jeroen <j.teriele1@students.uu.nl> * Update .github/workflows/e2e-testing.yml * Update .github/workflows/e2e-testing.yml * fix heads showing as steve (Slimefun#4027) * fix: clean up issues after merging * chore(style): apply code style --------- Co-authored-by: Jeffrey <jeffrey@kosse.me> Co-authored-by: Daniel Walsh <walshydev@gmail.com> Co-authored-by: iTwins <teriele.jeroen@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jeroen <48769316+iTwins@users.noreply.github.com> Co-authored-by: TheBusyBiscuit <TheBusyBiscuit@users.noreply.github.com> Co-authored-by: J3fftw <44972470+J3fftw1@users.noreply.github.com> Co-authored-by: JustAHuman-xD <65748158+JustAHuman-xD@users.noreply.github.com> Co-authored-by: Jeroen <j.teriele1@students.uu.nl> Co-authored-by: Alessio Colombo <37039432+Sfiguz7@users.noreply.github.com>
* feat: use e2e test
Bumps [net.guizhanss:GuizhanLib-common](https://github.com/ybw0014/GuizhanLib) from 1.5.0 to 1.6.1. - [Release notes](https://github.com/ybw0014/GuizhanLib/releases) - [Changelog](https://github.com/ybw0014/GuizhanLib/blob/master/CHANGELOG.md) - [Commits](https://github.com/ybw0014/GuizhanLib/commits) --- updated-dependencies: - dependency-name: net.guizhanss:GuizhanLib-common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [net.guizhanss:GuizhanLib-updater](https://github.com/ybw0014/GuizhanLib) from 1.5.0 to 1.6.1. - [Release notes](https://github.com/ybw0014/GuizhanLib/releases) - [Changelog](https://github.com/ybw0014/GuizhanLib/blob/master/CHANGELOG.md) - [Commits](https://github.com/ybw0014/GuizhanLib/commits) --- updated-dependencies: - dependency-name: net.guizhanss:GuizhanLib-updater dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
@StarWishsama I've opened a new pull request, #1193, to work on those changes. Once the pull request is ready, I'll request review from you. |
…o prevent race condition Co-authored-by: StarWishsama <25561848+StarWishsama@users.noreply.github.com>
…-again Fix race condition in SoulboundListener Folia task scheduling
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 61 out of 61 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public void schedule(long delay) { | ||
| setID(Bukkit.getScheduler().scheduleSyncDelayedTask(Slimefun.instance(), this, delay)); | ||
| setTask(Slimefun.getPlatformScheduler().runLaterAsync(this, delay)); | ||
| } |
There was a problem hiding this comment.
schedule(...) uses runLaterAsync(this, delay), but implementations mutate Player state (inventory/velocity/effects). On Folia this can run off the entity thread and cause region/entity-thread violations. Use runAtEntityLater(p, ...) (and similarly an entity-bound repeating scheduler) for these tasks.
| () -> { | ||
| if (p.getHealth() > 0) { | ||
| returnSoulboundItems(p); | ||
|
|
||
| WrappedTask returnTask = returnTasks.remove(uuid); |
There was a problem hiding this comment.
This Folia fallback schedules only a single delayed check and only completes when p.getHealth() > 0. If the player respawns later than this delay, items may never be returned and the returnTasks entry is never removed (blocking future scheduling). Use a repeating entity-bound task that retries until the player is alive/valid, and always remove the map entry when the task finishes.
| throw new IllegalArgumentException( | ||
| "Location or entity must be provided when executing sync task on Folia!"); | ||
| } |
There was a problem hiding this comment.
On Folia, the no-context overload now throws if neither a Location nor Entity is provided. There are still call sites using runSyncMethod(Callable) without context (e.g. DebugFishListener), which will now crash at runtime. Consider keeping the no-context overload safe (run inline when already on a region thread, otherwise require callers to pass Location/Entity), and/or deprecate it and update remaining call sites.
| return; | ||
| } | ||
|
|
||
| try { | ||
| menu.lock(false); |
There was a problem hiding this comment.
This pattern is still vulnerable to a race: another thread can acquire the menu lock between menu.locked() and menu.lock(false), causing the ticker thread to block unexpectedly now that lock() is a blocking ReentrantLock. Prefer a tryLock-style API (return immediately when locked) or make lock(false) itself non-blocking.
| this.asyncTickerService = new SlimefunPoolExecutor( | ||
| "Slimefun-Ticker-Pool", | ||
| initSize - 1, | ||
| maxSize - 1, | ||
| 1, |
There was a problem hiding this comment.
The executor is created with initSize - 1 / maxSize - 1, but the config keys are named as thread counts (init-size, max-size). This off-by-one mapping is surprising for operators and easy to misconfigure. Either pass the config values directly, or rename/update the config docs/defaults to reflect the - 1 semantics.
# Conflicts: # README.md
# Conflicts: # .github/workflows/pr-checker.yml # pom.xml # src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/elevator/ElevatorPlate.java # src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/AutomatedPanningMachine.java # src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/MiningTask.java
This reverts commit 4da366a.
Optimize universal block detection to avoid expensive NBT lookups
# Conflicts: # src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/util/StorageCacheUtils.java
23a5b33d0be4982fba6bd03273547a09ce40b96e
sub region slimefun ticker(由于 Folia 没有显式获取所有 Region 的方法,故取消)*: BlockTicker#isConcurrentSafe() 用于标记当前机器 Ticker 是并发安全的,Slimefun 默认认为附属的机器是并发不安全的,并移至异步单线程处理这些机器。