1.5.6
VARIOUS FIXES:
- Fixed a memory leak related to the search filters (Many thanks to magik6k)
- Fixed a crash on /help due to a null string (Many thanks to Epix Zhang)
- Fixed all slow down server and client side due to large NBT tags.
API CHANGES:
- Fixed loading order of the modules. This fixes the "empty list" problem for mods trying to override the head or tail section.
- Deprecated registerSyncedNBTKey() in favor of registerNBTProvider()
- Added new method getNBTData() to IWailaDataProvider and IWailaEntityProvider
- Added new registration method registerNBTProvider() to register a NBT data provider.
ABOUT THE CHANGES IN THE API
The previous system to synchronize data between server and client was based on the default saved NBT tag (as generated by
writeToNBT()). The partial syncing system (with
registerSyncedNBTKey() as the public facing interface for it) was dumping the full NBT tag before trimming it to fit inside MC restricted packet size.
This way of doing things worked well until recently when a few mods started to save a very large amount of data in their NBT tags. This lead to slow down both server and client side.
To fix that, Waila 1.5.6 provides a new system for syncing data. During registration, it is now possible to call
registrar.registerNBTProvider(IWailaDataProvider dataProvider, Class entity)
to register a server side provider. This registration will make the server call for the corresponding
IWailaDataProvider.getNBTData(TileEntity te, NBTTagCompound tag, World world, int x, int y, int z);
in the registered IWailaDataProvider. This method provides a tag and you are expected to add/modify it before returning it (the same way it is done for
getWailaXXX() methods). This tag will then be sent back to the client where it is accessible via
accessor.getNBTData()
in the providers.
Registering a NBT provider will automatically activate the synchronization. If no provider is registered, the synchronization will never be run, saving ressources on both the server and the network.
A similar set of methods exists for Entities, allowing devs to sync arbitrary data for those.
IMPORTANT NOTES ON THE NEW SYSTEM
- getNBTData() code is run SERVER SIDE. This means users have to have the module server side too to activate sync. It also means you should always test your modules on a dedicated server to make sure you are not calling anything that doesn't exist there.
- This new system allows for way better ressource management, server side specific data collection and maintenance. As such, the oldregisterSyncedNBTKey is now deprecated and will be removed in Waila for 1.8
- Those changes are backward compatible with all currently available modules (because of JVM trickery). You can update to the new API when you feel like it.
1.5.6a
Temporary desactivation of Thaumcraft module to prevent server side crash.