Commit Graph

177 Commits

Author SHA1 Message Date
Jason Penilla
44f8058b09 0.1.0-beta.2 v0.1.0-beta.2 2024-09-07 17:53:22 -07:00
Jason Penilla
d1f8e81913 Update gradle plugins and dependencies 2024-09-07 10:26:08 -07:00
Jason Penilla
dcef1320b2 Switch version back to 0.1.0-SNAPSHOT
We are still in the 0.1.0 beta cycle, bumping to 0.1.1-SNAPSHOT previously was an error
2024-09-07 10:25:17 -07:00
Jason Penilla
179b45cac5 Update lithium config overrides
`mixin.alloc.entity_tracker` does the same thing as useBetterIdentitySet, nothing more or less

closes #17
2024-09-07 10:06:10 -07:00
Jason Penilla
89e9cd52e4 fix(build): mark incompatibility with correct version of starlight 2024-09-03 12:04:19 -07:00
Jason Penilla
38c3f5fd80 0.1.1-SNAPSHOT 2024-09-03 11:58:01 -07:00
Jason Penilla
98e8a08e85 0.1.0-beta.1
this time maybe publishing will work
v0.1.0-beta.1
2024-09-03 11:50:08 -07:00
Jason Penilla
caf2960b6b fix(actions): populate release tag 2024-09-03 11:49:36 -07:00
Spottedleaf
a507c4c6a2 Set version to 0.1.0-beta.0 v0.1.0-beta.0 2024-09-03 11:40:04 -07:00
Jason Penilla
cfc73390d8 Setup automated publishing to CF and Modrinth (#15)
* Configure mod-publish-plugin

* Configure actions to run mod-publish-plugin

To publish a release:
- Set the mod version to x.x.x(-beta.x) in gradle.properties and commit
- Create a git tag named vx.x.x(-beta.x) (note the v prefix)
- Push commit, push tag
- Manually create a (pre-)release for the tag on GitHub web ui. The release notes will be reused for modrinth and CF.

The release creation will trigger the workflow and publish to modrinth and CF.

The build script will check for when the version contains `-beta.` and mark it as a beta on modrinth and CF.

After publishing a release, it's good practice to bump the version and add -SNAPSHOT, i.e. after releasing 0.0.1, push a commit changing the version to 0.0.2-SNAPSHOT. This ensures people downloading action artifacts have correct version numbers.

This commit also updates gradle/actions/setup-gradle which removes the need for a separate wrapper validation action (it is included in setup-gradle v4)

* Set project IDs
2024-09-03 11:37:56 -07:00
Spottedleaf
9066101f5d Update README.md 2024-09-03 10:13:11 -07:00
Spottedleaf
ae12fd4f7b Do not send chunk radius packet from PlayerList#setViewDistance
The underlying player chunk loader will do this for us. This fixes
sending possibly the wrong view distance.
2024-09-02 16:42:45 -07:00
Spottedleaf
901a417179 Only tick entity tracker if players are tracking or if at entity ticking
Vanilla will only tick if the entity moves or is at entity ticking
level. For Paper, I am concerned that using exact Vanilla behavior
may cause problems with plugins - so we will settle on ticking the
tracker as well if players are tracking the entity.

This should reduce ticking for larger VD settings.
2024-09-02 16:42:45 -07:00
Spottedleaf
1f1a0a5f6c Do not track entity unloads for tracker
ChunkMap#removeEntity is invoked for each entity remove, which
means that the TrackedEntity instance will always be cleared -
making our logic do nothing.
2024-09-02 16:42:29 -07:00
Jason Penilla
55e62621e6 Initial lithium compatibility on Fabric (#9)
* Initial lithium compatibility on Fabric

* Update readme

* Add lithium test run

* Revert editorconfig change
2024-09-02 13:43:07 -07:00
Spottedleaf
9c92ec48cd Disable MC-224294 by default
This is to adhere to Vanilla behavior...
2024-08-31 10:41:02 -07:00
Spottedleaf
37ca0e7b0d Config option to fix end island generation at far distances
See https://bugs.mojang.com/browse/MC-159283
2024-08-31 10:41:02 -07:00
Jason Penilla
bc3743cc43 Reuse a single ThreadingDetector instance for all PalettedContainers (#14)
We make all instance methods on ThreadingDetector no-op already, so no point in keeping multiple instances around. This saves around 100mb in my ATM10 SP world.
2024-08-30 17:14:59 -07:00
Spottedleaf
80aa5f80b8 Add explicit config init hooks
Last commit moved the config to ConfigHolder, which is no longer
referenced during init by any code. As a result, we need an explicit
init hook to initialise the class and the config.
2024-08-29 15:55:43 -07:00
Spottedleaf
920a7e8722 Move all config access to PlatformHooks
This will make porting these changes back to Paper much easier,
as we will just provide a PlatformHooks implementation.
2024-08-29 15:24:56 -07:00
Jason Penilla
25c0bd37c5 NeoForge: Call ChunkEvent.Unload on shutdown (#13)
This brings behavior in line with vanilla NeoForge.
2024-08-29 15:21:08 -07:00
Spottedleaf
007551903b Properly check empty context-sensitive collision shape
The emptyCollisionShape() function only checks whether the
cached collision shape (not the context-sensitive collision shape)
is empty. In places where we use the context-sensitive
collision, we need to check the context-sensitive shape instead.
2024-08-29 07:47:08 -07:00
Spottedleaf
92e5f2c81e Fall back to regular sync load if not on tick thread for syncLoadNonFull
Some mods are erroneously asynchronously performing
nearby structure lookups (which is not safe in Vanilla due to
the StructureCheck usage). However, syncLoadNonFull should
be thread-safe to invoke off-main as Vanilla's equivalent is.

This makes asynchronous structure lookups safe in Moonrise, but
mods should still perform these on-main as Vanilla does not safely
support asynchronous calls.
2024-08-28 21:17:45 -07:00
embeddedt
d7bed57111 Replace StateHolder.values with custom map (#10)
* Replace StateHolder.values with custom map

* Code style

* remove newline

* Address review

* qualify `this` and add final
2024-08-28 21:15:44 -07:00
Jason Penilla
f376944ddd Specify import order and final locals/params in editorconfig 2024-08-27 15:00:59 -07:00
Jason Penilla
bbdd8e1c4d Remove ModernFix config recommendation
This was a non-crucial adjustment, and ModernFix will apply it automatically when detecting Moonrise in the next version.
2024-08-24 13:39:20 -07:00
Jason Penilla
2e0f0abb11 Fix level loading screen showing 0% until in-game (#7)
* Fix level loading screen showing 0% until in-game

* Schedule loading screen updates

* null check progress listener

* move out of loop
2024-08-23 20:30:14 -07:00
Jason Penilla
b8f281aa79 Reduce cache size for non-existent region file coordinates
Also use the default initial size
2024-08-23 19:35:10 -07:00
Jason Penilla
dff8c59d51 Remove note on light suppression
light suppression is fixed in vanilla
2024-08-23 13:56:53 -07:00
Jason Penilla
03a3f72752 Add note to readme about vanilla behavior 2024-08-23 13:45:46 -07:00
Spottedleaf
5269b0bcb0 Set version to 0.1.0-SNAPSHOT 2024-08-23 11:52:29 -07:00
Spottedleaf
0266b87e0f Change ChunkMapMixin#read to asynchronously load data
There's no reason to sync read the data, as the return value
is a CompletableFuture - and Vanilla performs this function
asynchronously as well.
2024-08-22 16:01:57 -07:00
Jason Penilla
1b189fc0c1 Implement dummy IO worker for compat with mods that directly call loadAsync (#5)
This change is targeting Distant Horizons compatibility, however further changes are needed on their side to read starlight data.
2024-08-22 15:57:34 -07:00
Jason Penilla
3f80f358d1 Make currently loading chunk available during entity loading (#4)
Fixes deadlock when mods attempt to retrieve the current chunk while loading entities (from screenEntity or otherwise)
2024-08-22 10:12:46 -07:00
Spottedleaf
5788bb64aa Do not always fail hard for null Property values in StateHolder
Some mods pass null to methods in this class that would not NPE
on Vanilla, so we need to preserve that behaviour.
2024-08-20 19:46:20 -07:00
Jason Penilla
c9fe98b213 Document and improve mod compatibility (#3) 2024-08-19 11:28:27 -07:00
Jason Penilla
58a51d914b Update compatible versions and build against 1.21.1 2024-08-18 20:42:56 -07:00
Spottedleaf
a83025a52f Optimise BiomeManager#getFiddle
The floorMod and subtraction by 0.5 can be done before converting
to double, and the division by 1024 may be converted to a simple
multiplication. At this point, the result is exactly the same.

However, to remove the extra multiplication by 0.9, it can be
moved into the multiplication by 1/1024. This may affect
the result to one ULP, but I do not forsee that causing any problems.
2024-08-14 17:56:25 -07:00
Spottedleaf
0391e7beff Use custom random in block random ticking
The CAS performed by the regular random appears expensive.
These changes drop my server tick time locally @ tickSpeed = 10,000
from 53ms to 37ms.
2024-08-14 14:48:01 -07:00
Spottedleaf
48504e990e Start README 2024-08-14 13:06:16 -07:00
Spottedleaf
5385e6f2cb Fix ViewDistanceHolder#setSendViewDistance updating tick distance
It should update the send view distance.
2024-08-14 12:22:33 -07:00
Spottedleaf
763fb751cb Add TickThread check to ServerChunkCache#getChunkNow
We shouldn't be using the currently loading chunk unless
we are on the main thread.
2024-08-14 12:17:46 -07:00
Spottedleaf
fc9d35c4b0 Store ticking blocks in chunk sections as positions only
Since we no longer use the state stored directly in the
IBlockDataList, it makes no sense to use IBlockDataList
at all.
2024-08-13 23:53:27 -07:00
Spottedleaf
a749c7282b Cache x coordinate multiplier for CollisionUtil#sliceShapeOptimised
This is consistent with how the rest of the collision patch iterates
the voxel bitset.
2024-08-12 16:56:26 -07:00
Spottedleaf
e68d381fc5 Avoid creating SliceShape when retrieving Voxelshape faces
SliceShape is not always the ideal shape, as sometimes the
face result is empty or full cube - but is represented as
SliceShape. Additionally, sometimes SliceShape should be
empty but isEmpty() is false.
2024-08-11 22:11:59 -07:00
Spottedleaf
c0a2e488fc Fix client command registration for Fabric
The dispatcher is not actually available during mod init. So,
use the event callback.
2024-08-10 20:29:29 -07:00
Spottedleaf
c5778192f6 Add overwrite for StateHolder#trySetValue
Now that we do not initialise the Vanilla table field,
we need to overwrite this method as well with our own
implementation.
2024-08-10 16:16:11 -07:00
Spottedleaf
65481aee6d Fix init in FlowingFluidMixin
The fluid state may have additional properties, so it is
inappropriate to iterate over all of the states and assume
that there will be no duplicate values with the same falling
and level property values.
2024-08-10 14:59:06 -07:00
Spottedleaf
edad8be41f Drastically reduce memory footprint of ZeroCollidingReferenceStateTable
We can linearize the table lookup by generating an index per
state using the property values.
2024-08-10 14:33:54 -07:00
Jason Penilla
cbdcab7267 Get BooleanProperty equals injection working using @WrapOperation on the instanceof check 2024-08-09 10:15:23 -07:00