ExtendedMetadata

ExtendedMetadata

ExtendedMetadata is a Forge core mod that increases the block ID and metadata limit. Vanilla Minecraft uses 12 bits for block IDs and 4 bits for metadata, so combined it can be stored in a 16-bit short/character. ExtendedMetadata replaces the short/character stores with integers, this extends block IDs to 15 bit numbers and metadata to 16 bit numbers. This increases the block ID possibilities from 4096 to 32768 and block metadata possibilities from 16 to 65536.

Warning

This mod changes the way your world is stored on disk. Old worlds get converted automatically, but you can't open worlds touched by ExtendedMetadata using vanilla Minecraft or Forge.
ExtendedMetadata also increases the amount of disk storage and network bandwidth being used. This in can cause lag, you have been warned.
Also be careful with the 1.8 model / texture loader, using too much metadata can cause out of memory errors. The solution for this is a custom model or texture loader, we have implemented this, but it might take some time to perfect.

For modders

Information on how to use ExtenededMetadata with your mod(s) go to the GitHub page: https://github.com/AgeCraft/ExtendedMetadata

Dependencies

  • Minecraft Forge 11.15.0.1608 or higher
  • LLibrary 0.6.1 or higher

Installation

  1. Download and install Minecraft Forge
  2. Download and install LLibrary
  3. Download ExtendedMetadata and put the file in the mods folder

Limits

Ideally we would also want 16 bit block IDs, but that's not possible due to the way Java handles integers. Java 7 and below can only handle signed integer, with a range from 2^-31 to 2^31. There are two solutions for this:

  • Force Java 8 as a dependency, which can handle unsigned integers.
  • Use longs to store the block states, but this would increase storage and network usage an awful lot and it would be way to much work to change everything from integers to longs. So that's why this mod only fully increases block metadata and not block IDs, because metadata is more useful than block IDs.

How the mod was made

For those that are curious how this mod was made: I forked Minecraft Forge and setup the contributor environment (https://github.com/MinecraftForge/MinecraftForge/wiki/If-you-want-to-contribute-to-Forge) and started looking through the decompiled Minecraft code to get an idea of the internals of block states, chunk storage and chunk networking. While I was making changes to the source code I wrote down all the fields and/or methods I changed. This simplified making the coremod because I already knew where to change what, all that was left todo was search the corresponding bytecode and setup the ASM transformations for it. This is quite a tedious process, but CodeChickenLib/CodeChickenCore and the Bytecode Outline plugin for Eclipse (http://marketplace.eclipse.org/content/bytecode-outline) helped a lot.

Credits


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members