mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 09:44:24 +00:00
Apply IrisApi's typed keys, grouped values and @Ref(kind)
Batch 6, findings 41 and 42. - Bukkit items, attributes, ambient effects and entities read ResourceIds, ContentKeys and the grouped ItemDrop and EntitySpec; Iris-only entity knobs come from the IrisEntityExtras extension. - Iris serves the host kinds EXPRESSIONS and IMAGE_MAPS; noise styles map their ids back to the exact pack keys of the snapshot. - Studio completes @Ref(kind = ...) of host kinds through Iris's loaders and @IrisStructureRef with the structure-model keys. - Markers, sapling species, upper dimensions and jigsaw start pools are ids. - Modded attribute lookup strips the minecraft namespace before the legacy generic prefixes, now that keys arrive namespaced. - Loot and entity pins retaken: printed the old way, the new values still hash to the old numbers (recorded in the tests).
This commit is contained in:
1 parent
ca07b8ce0b
commit
dc0d61ce63
39 files changed
+523
-320
No files matched your search
+6
-4
@@ -63,6 +63,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
public final class ModdedItemTranslator {
|
||||
private static final Set<String> WARNED = ConcurrentHashMap.newKeySet();
|
||||
private static final String COLOR_CODES = "0123456789AaBbCcDdEeFfKkLlMmNnOoRrXx";
|
||||
private static final String VANILLA_NAMESPACE = "minecraft:";
|
||||
|
||||
private ModdedItemTranslator() {
|
||||
}
|
||||
@@ -224,11 +225,12 @@ public final class ModdedItemTranslator {
|
||||
if (direct != null) {
|
||||
return direct;
|
||||
}
|
||||
if (value.startsWith("generic_")) {
|
||||
return lookupAttribute(registry, Identifier.tryParse("minecraft:" + value.substring("generic_".length())));
|
||||
String path = value.startsWith(VANILLA_NAMESPACE) ? value.substring(VANILLA_NAMESPACE.length()) : value;
|
||||
if (path.startsWith("generic_")) {
|
||||
return lookupAttribute(registry, Identifier.tryParse(VANILLA_NAMESPACE + path.substring("generic_".length())));
|
||||
}
|
||||
if (value.startsWith("generic.")) {
|
||||
return lookupAttribute(registry, Identifier.tryParse("minecraft:" + value.substring("generic.".length())));
|
||||
if (path.startsWith("generic.")) {
|
||||
return lookupAttribute(registry, Identifier.tryParse(VANILLA_NAMESPACE + path.substring("generic.".length())));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user