Use of a map for category->count is inefficient as the key
is an enum. We can use a simple int array, which reduces
the get() and compute() calls to an array access.
ChunkData is stored directly on chunk holders, entity slices,
and on entities. Currently, this allows access to
NearbyPlayers$TrackedChunk without performing a map lookup.
Use an inject instead of overwrite to avoid mixin conflicts - obviously this will still disregard any changes made by other
mixins, but at least it won't conflict immediately. This is useful because some library mods mixin here when only the content
mod actually needs the change.
Fixes incompatibility with CreativeCore but not LittleTiles
Some mods rely on data initialized in their fluid subclass constructor for the methods we call, which won't be available at the superclass constructor return.
Injecting into the registry add is a little ugly, but should be fine.
Fixes compat with Immersive Engineering.
Newer NeoForge has moved their coremods from JS to Java, which should slightly improve startup times (as the JS engine won't load without another mod that uses it), making this update relevant for development
Lithium replaces some of the height-related methods used by WorldUtil to return fields initialized in their constructor hook. We need to apply afterward to have them return valid data.
Given the application-order sensitive nature of the issue, it only presented in-dev.
* 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
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.
ChunkMap#removeEntity is invoked for each entity remove, which
means that the TrackedEntity instance will always be cleared -
making our logic do nothing.
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.
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.
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.
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.