ExtendedMetadata
ExtendedMetadata is a core mod for Forge that significantly expands the limits of block IDs and metadata in Minecraft. In the standard version of the game, block information is stored using 12 bits for IDs and 4 bits for metadata, which together fit into a 16-bit value. This modification replaces this approach with the use of integers, increasing the range of block IDs to 15 bits and metadata to 16 bits. As a result, the number of possible block IDs increases from 4096 to 32768, and metadata options increase from 16 to 65536.
Important Warnings
This mod changes the way game worlds are stored on disk. Existing worlds are automatically converted, but after this, they cannot be opened in standard Minecraft or Forge without ExtendedMetadata installed.
It should also be noted that the mod increases disk space consumption and network traffic, which may lead to slower game performance. Particular caution should be exercised when using the model and texture loader from version 1.8 - excessive metadata can cause out-of-memory errors. To solve this problem, a special model and texture loader is required, which has already been implemented but continues to be improved.
For Mod Developers
Detailed information on how to integrate ExtendedMetadata into your mods is available on the GitHub page: https://github.com/AgeCraft/ExtendedMetadata
Dependencies
- Minecraft Forge version 11.15.0.1608 or newer
- LLibrary version 0.6.1 or newer
Installation
- Download and install Minecraft Forge
- Download and install LLibrary
- Download ExtendedMetadata and place the file in the mods folder
Limitations
Initially, it was planned to increase block IDs to 16 bits, but this is impossible due to the peculiarities of working with integers in Java. Java versions 7 and below only support signed integers in the range from 2^-31 to 2^31. There are two possible solutions:
- Require Java 8, which supports unsigned integers
- Use the long type to store block states, but this would significantly increase the amount of stored data and network traffic, and also require serious code changes
Therefore, the mod fully expands only block metadata, not their identifiers, since metadata has more practical value.
Technical Creation Details
To create this mod, a fork of Minecraft Forge with a configured development environment was used. After studying the decompiled Minecraft code, the internal mechanisms of working with block states, chunk storage, and network transmission were identified. During the process of making changes to the source code, all modified fields and methods were recorded, which significantly simplified the creation of the core mod - all that remained was to find the corresponding bytecode and configure ASM transformations. This process required significant effort, but the CodeChickenLib/CodeChickenCore tools and the Bytecode Outline plugin for Eclipse were very helpful in the work.
Authors
- Development: AgeCraft team
- Main developer: DanielHuisman