Repository navigation
2.0.0 Pre-Release 7
Pre-release
Pre-release
·
63 commits
to master
since this release
This release brings support for 1.20.6, new SQL and Messenger modules, and greater stability.
- The mod now supports up to version 1.20.6. This includes an API for the new item component system.
- Server support for item components can be queried with the
GameVersionfeatureITEM_COMPONENTS. - On supported servers, components can be updated with
ItemStack::loadComponentand removed withItemStack::removeComponent - For unsupported server versions, the functions for interacting with item NBT now refer to "custom data" rather than "tags" (For example:
ItemStack::getTag()is nowItemStack::getCustomData()- Calling these functions on versions which support components will instead use the
minecraft:custom_datatag.
- Calling these functions on versions which support components will instead use the
- Built-in
ItemStackabstractions, such asItemStack::getName,ItemStack::getLorewill automatically change their behavior based on the version of the server.
- Server support for item components can be queried with the
- Added a
PagedInventoryGUIclass. This class can hold an arbitrary number of item entries.- The size of each page is determined by a
SizeProviderinstance. By default, there are two types: fixed and dynamic.- A fixed size provider will always return the rows specified during its creation.
- A dynamic size provider will change its size depending on how many entries are in the GUI.
- The size of each page is determined by a
- Added a module for connecting to SQL databases:
midnightcore:sql- Database connection prefixes can be defined in the module's configuration.
- It is intended for mods that use the API to allow the server admin to declare a preset and any relevant overrides in that mod's configuration.
- The preset system is designed to allow server administrators to declare their database details once, rather than once for each mod which uses SQL.
- This module is disabled by default, and needs to be enabled manually via the config or by
/mcore module enable midnightcore:sqlin order for mods to use it. Mods that require it may fail to start if the module is disabled.
- Added a module for communicating with other servers on the network:
midnightcore:messenger- Not to be confused with the existing
midnightcore:messagingmodule, which has now been renamed tomidnightcore:plugin_message - This module is designed to allow individual backend servers to communicate with one another without having to worry about server infrastructure.
- By default, only one messenger type is available:
plugin_message- This messenger type leverages the built in custom payload packets to send messages between a backend server and a proxy over an existing player connection.
- This messenger type requires a proxy server also running MidnightCore to be connected to the server. As of now, only Velocity is supported.
- For large networks, or for networks which use an end-to-end encrypted system such as MidnightProxy, this messenger type will not work. It is instead recommended to use the AMQP Messenger.
- Similarly to the SQL module, messenger instances are defined as presets, which other mods should reference. This is so messenger details can be defined once, rather than once per mod.
- Not to be confused with the existing
- Removed the concept of component content resolution.
- Now all components should be able to be converted and sent to the player directly.
- All unresolved components should use the
UnresolvedComponentclass.
- 1.20.5+ servers on Fabric and Spigot now support changing the number format on scoreboards.
- This means the numbers on the right hand side of scoreboards can be styled, replaced, or removed.
- Use
CustomScoreboard::setNumberFormatto change the number format. - Format types
STYLEDandFIXEDrequire a (unresolved) component as an argument. TheSTYLEDformat type will only inherit the style of the component, while theFIXEDformat type will use that entire component in place of the number.
- Fixed a lot of bugs, especially concerning plugin messages and older Spigot versions.
- The spigot version of the mod is now compiled against 3 different Java versions.
- The version supporting Spigot 1.8-1.16 is compiled against Java 8
- The version supporting Spigot 1.17-1.20.4 is compiled against Java 17
- The version supporting Spigot 1.20.5-1.20.6 is compiled against Java 21
Some known (minor) issues:
- Currently, on Spigot 1.20.2+, applying a skin to a player or loading a savepoint causes that player to think its lost its status effects for a bit. It appears that the server sends effect updates periodically, so it will eventually fix itself, but it is not ideal nonetheless.
- The Java 8 Spigot builds shadow SLF4J simple, for a consistent logging framework across versions. This causes logs sent from the mod on those versions to repeat the thread name. It also appears that Log4j will always mark messages sent from SLF4J simple as warnings. Ideally I would shadow
log4j-slf4j2-implinstead, but from my initial findings it looks like the version of Log4j used by Spigot <= 1.16 is too old to properly support it.