Minecraft What Is Metadata, How Is Mod Item Metadata Accessed By Plugins

This is on Minecraft 12.2Twitch modpack, All The Mods 3 Remixspongeforge-1.12.2-2838-7.1.8

I am trying to use CatClearLag-0.9.0 which deletes objects on the ground every couple minutes, excluding items in a whitelist.

Đang xem: Minecraft what is metadata

Applied Energistics 2 rv6-stable-7 uses a single item “appliedenergistics2:material” and a metadata value for all the various crystals, dusts, orbs, etc.


There does not seem to be a way to specify metadata for whitelisted items in CatClearLag…

This plugin has a way to add items to its config file by holding an item and using a command, but it only ever adds the base “appliedenergistics2:material” without a metadata value, and regardless of the material added.


The metadata value does work via the built-in Minecraft /give command at the console…

/give plawerth appliedenergistics2:material 1 5: Given * 1 to Plawerth

/give plawerth appliedenergistics2:material 1 7: Given * 1 to Plawerth

Is there a way to make this work with a Sponge plugin?

Sadly its a little more complex then you may think.

Due to the magic number id system (both item id and sub id) being deprecated since before 1.8, this was to essentially let mod developers know that they shouldnt be using the magic ids (that being said, minecraft didnt say what to use instead and all tutorials showed how to use the magic ids … So they stuck). So sponge doesnt allow access via its API to the magic values, plugins can use NMS to gain access to the ids, however that breaks support for none NMS servers from using that plugin, aka LanternPowered will not be able to use those plugins. Not to mention the support of NMS code, something difficult to maintain due to the naming being changed, mojang server hotfixes that dont get told to the public that may change NMS and more.

So Sponge didnt use the magic ids, instead use a key value pairing, however sponge has a hard time converting minecrafts metadata to its key value pairing, so sponge needs mod developers to add Data manipulators to sponge to convert into the key value pairs.

Read more: wow crate of battlefield goods

So here are your options:

Request to CatClearLag to use NMS to gain the sub id and be able to whitelist from that.

Request to CatClearLag to allow to whitelist ids with a select key value pairing and then build a data manipulator for AE2.

Request to AE2 to use different main ids for there items

Request/build your own item removing plugin (for the basics – its actually very easy).

Reasons why the CatClearLag team may reject the request – that i can think of.

Read more: Flask Of Mojo Vanilla Wow

dont want to use NMS and break support for none NMS servers

a lot of work for a feature that may not be used

with MC 1.13+, all item ids belong to there own item, mods should follow suit.



So sponge doesnt allow access via its API to the magic values, plugins can use NMS to gain access to the ids

Sidenote: While this is not a direct API, it is available without NMS. There is item.toContainer().getInt(DataQuery.of(“UnsafeDamage”)) – but as the name suggests, that does not indicate whether the value represents actual damage, the sub id or (i think i saw some mods do that) use it as “charge” for the item. The only thing hinting towards that might be item.getType().getTemplate().supports(Keys.ITEM_DURABILITY) iirc.(Doesn’t change the proposed solutions at all tho)

Leave a Comment