Commit Graph

351 Commits

Author SHA1 Message Date
Spottedleaf
a33ac1dc01 Implement PlatformHooks#addTicketForEnderPearls
Allows implementing Paper's legacy ender pearl behavior config
option.
2025-06-20 20:24:15 -07:00
Spottedleaf
da21aeca85 Set version to 0.4.0-SNAPSHOT 2025-06-20 19:21:54 -07:00
Spottedleaf
694dab69c0 Set version to 0.4.0-beta.2 v0.4.0-beta.2 2025-06-20 18:55:15 -07:00
Spottedleaf
0764327cba Do not allow ticket level decreases to be processed asynchronously
Note: This cannot happen on the Fabric/NeoForge versions since
async ticket level processing is not allowed, but can happen on
Paper. This change is made here so that Paper can
remain in sync.

Ticket level decreases may be handled asynchronously when the
off-thread invokes processTicketUpdates() when the main thread
is running ChunkHolderManager#tick(). This is because the ticket
update is queued during tick(), but not executed (invoking
processTicketUpdates) until after releasing the ticket lock.
This creates a small window for an off-thread to invoke
processTicketUpdates() and steal the update.

When the update is stolen, the full chunk status update (if any)
will be eventually queued to execute via the chunk task queue.
If the chunk queue is processed during the server tick at any
point other than the ChunkHolderManager tick, then any ticket
level decrease will violate an important invariant in the
Moonrise chunk system: ticket level decreases only occur during
ChunkHolderManager tick. This invariant exists to make interfacing
with the chunk system easier, especially working with off-thread
contexts.

This change is specifically made to work towards fixing
https://github.com/PaperMC/Folia/issues/363
2025-06-20 18:53:29 -07:00
Spottedleaf
724b8ef20a Fix incompatibility with "Fast IP Ping"
Inject in a different place to prevent the mixin from failing to
apply. It looks like we do essentially the same logic anyways.
2025-06-20 18:52:50 -07:00
Spottedleaf
0ea5e4dcf5 Add chunk unload delay config option
The default config option is no unload delay, so that
it maintains parity with Vanilla.

Fixes https://github.com/Tuinity/Moonrise/issues/115
2025-06-20 14:03:28 -07:00
Spottedleaf
1f8e863c4b Fix MC-297591
Vanilla does not increment ticket timeouts if the chunk is
progressing in generation. They made this change in 1.21.6
so that the ender pearl ticket does not expire if the chunk
fails to generate before the timeout expires. Rather than
blindly adjusting the entire system behavior to fix this
small issue, we instead add non-expirable tickets to keep
ender pearls ticking.
2025-06-20 13:00:53 -07:00
Spottedleaf
9d58071cf5 Set version to 0.4.0-SNAPSHOT 2025-06-18 11:12:12 -07:00
Spottedleaf
303d763167 Set version to 0.4.0-beta.1 v0.4.0-beta.1 2025-06-18 11:08:41 -07:00
Spottedleaf
9e3a55f7bc Update cloth config api, re-enable GUI 2025-06-18 10:31:09 -07:00
Spottedleaf
aef2b81d6e Implement WaypointTransmitter#isChunkVisible
The Vanilla chunk tracker on Moonrise always returns false. We need
to redirect to Moonrise's chunk loader.
2025-06-17 17:42:53 -07:00
Spottedleaf
0451444abf Update to 1.21.6
We are awaiting cloth config for a release.

We also need to make a fix for MC-297591, as we revert Mojang's solution.
Mojang's solution makes the rest of the chunk system's timing with
tickets unpredictable, which is almost certainly too large of a change
on its own. Surely, the ender pearl code could be modified to fix
this properly.
2025-06-17 09:33:11 -07:00
Spottedleaf
9a4078966d Fix infinite loop in RegionFile IO
If an exception is thrown during decompress then the read process
would be started again, which of course would eventually throw in
the decompress process.
2025-06-09 02:28:34 -07:00
Jason Penilla
b2a7a92c74 - Uncomment neoforge config screen, it doesn't crash unless you try to use it
- Don't register gui source set when gui is disabled
2025-06-03 13:50:58 -07:00
Jason Penilla
30b011246c Allow starting fabric mod without ModMenu/Cloth working 2025-06-03 13:41:33 -07:00
Jason Penilla
91455be558 Downgrade MDG
Something broke with ATs
2025-06-03 13:35:20 -07:00
Jason Penilla
41ccbb2611 Update Gradle & plugins, use NeoForge PR repo 2025-06-03 13:12:39 -07:00
Spottedleaf
b312be2921 Preliminary work to update to 1.16.2-pre1
I don't see many changes to areas we affect. Waiting on
modmenu/cloth to update as well for more testing.

HappyGhast is a new hard colliding entity.
2025-06-03 11:54:35 -07:00
Spottedleaf
b15e8398e7 Set version to 0.3.0-SNAPSHOT 2025-05-07 17:03:51 -07:00
Spottedleaf
b6410354e5 Set version to 0.3.0-beta.1 v0.3.0-beta.1 2025-05-07 17:01:31 -07:00
Spottedleaf
85ca21eb28 Update dependencies, fix fabric mixins 2025-05-07 17:00:02 -07:00
Spottedleaf
bda7cfaad9 Update fabric-loom 2025-04-01 19:35:53 -07:00
Spottedleaf
fece86b279 Copy fixes from Paper update
1. Use the provided ticket's identifier when routing to the new
   chunk system. Not needed in Moonrise but Paper may set the
   identifier.
2. Mark TicketStorage as dirty after ticking it
2025-04-01 18:49:06 -07:00
Spottedleaf
27759719e9 Update to 1.21.5 2025-04-01 15:39:19 -07:00
Spottedleaf
13948cdf26 Set version to 0.2.0-SNAPSHOT 2025-02-24 21:09:35 -08:00
Spottedleaf
ac0c7deb43 Set version to 0.2.0-beta.9 v0.2.0-beta.9 2025-02-24 21:06:48 -08:00
Jason Penilla
16c8398d8a Clear lastSection on game event listener removal (fixes #87) (#99) 2025-02-24 17:39:07 -07:00
Spottedleaf
661ef813bb Add further information to thread check errors
The entity data is more complete, which will help debug problems
on Folia.
2025-01-28 13:34:32 -08:00
Spottedleaf
cf1d26a73c Set version to 0.2.0-SNAPSHOT 2025-01-27 13:59:26 -08:00
Spottedleaf
0cbff02a1c Set version to 0.2.0-beta.8 v0.2.0-beta.8 2025-01-27 13:57:16 -08:00
Spottedleaf
ce4ee767fe Correctly retrun true for empty input shapes in EntityGetter#isUnobstructed
Vanilla will return true for empty shapes, so we should as well.
2025-01-27 07:51:49 -08:00
Jason Penilla
d31b15122f build: Sort AT output instead of copying and modifying AT classes 2025-01-17 19:38:38 -07:00
Jason Penilla
ca931e842b build: Enable config cache, replace deprecated space assignment use (#92) 2025-01-17 19:24:18 -07:00
Spottedleaf
c2cf985899 Update to ConcurrentUtil 0.0.3 2025-01-11 06:26:19 -08:00
Spottedleaf
d270cf06d9 Log thread check parameters when the thread check fails
This provides additional debug information that may be useful.
2025-01-11 04:52:21 -08:00
Spottedleaf
09735958c0 Set version to 0.2.0-SNAPSHOT 2024-12-23 00:06:18 -08:00
Spottedleaf
6ec14ff755 Set version to 0.2.0-beta.7 v0.2.0-beta.7 2024-12-23 00:04:55 -08:00
Jason Penilla
18e872ad12 Compile against latest NeoForge and misc build updates 2024-12-20 19:12:51 -08:00
Spottedleaf
13c6499854 Set version to 0.2.0-SNAPSHOT 2024-12-20 11:33:39 -08:00
Spottedleaf
b70443edd5 Set version to 0.2.0-beta.6 v0.2.0-beta.6 2024-12-20 11:33:26 -08:00
Spottedleaf
38bab21ddf Update cloth config version for 1.21.4 2024-12-20 11:31:41 -08:00
Spottedleaf
f7d98327e0 Move ChunkSystem class to PlatformHooks
This is required for Paper's hard fork, as the Moonrise patch
needs to replace the base implementation of the chunk system
hooks.
2024-12-16 10:09:43 -08:00
Jason Penilla
271a58d2af Exclude transitive deps provided by Minecraft 2024-12-04 10:17:10 -07:00
Spottedleaf
a4f5ef1abd Add ConcurrentUtil and YamlConfig to .gitignore 2024-12-04 02:21:25 -08:00
Spottedleaf
d87df61412 Apply coordinate offset only to VoxelShape
VoxelShape coordiantes generally are an integer + a sum of powers of
two between [-1, -3]. Most offsets are generally an integer. As
a result, applying an offset to the coordinates generally results
in an error of 0. However, coordinate inputs do not follow such
trends. Thus, when applying an offset to the coordinate input,
there may be some floating point error.

By applying the offset to the VoxelShape coordinates, we can
eliminate additional floating point error.

This change also fixes the inconsistency when using
the single AABB, as input coordinates were not offset
when using the single AABB as the single AABB is already
offset.

Fixes https://github.com/Tuinity/Moonrise/issues/81
This specific issue is caused by floating point error resulting
in the falling anvil's y position becoming around -8E-17 when it
should be 0.
While this is still very comfortably in the collision
epsilon (1.0E-7), this results in the falling anvil's y block
position to become -1 (as the block position is simply
the floor of the coordinate).
2024-12-04 02:20:48 -08:00
Jason Penilla
e917272d3a Use libraries from Paper repo (#82)
* Use YamlConfig from Paper repo

* Add comment to settings

* Use ConcurrentUtil from Paper repo and use release of YamlConfig

* Use ConcurrentUtil release
2024-12-03 20:19:06 -07:00
Jason Penilla
bff8caea54 Update modmenu and use fabric api bom
Fixes fabric runs for 1.21.4
2024-12-03 17:08:09 -07:00
Jason Penilla
97a865c532 update lithium versions for 1.21.4 2024-12-03 12:37:32 -07:00
Spottedleaf
f6541b0d91 Fix AcquirePoiMixin
Just needed to update the method targets
2024-12-03 11:28:23 -08:00
Jason Penilla
6b4139a5ab add neoforge test 2024-12-03 11:58:07 -07:00