Replacing substring with replaceAll using regex (#178)

This commit is contained in:
threader 2021-02-24 10:01:48 -03:00 committed by GitHub
parent 3408941d33
commit 691871ebbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ public class CraftLegacyLegacyMixin {
if (((MaterialBridge) (Object) material).bridge$getType() == MaterialPropertySpec.MaterialType.FORGE) { if (((MaterialBridge) (Object) material).bridge$getType() == MaterialPropertySpec.MaterialType.FORGE) {
return material.name(); return material.name();
} else { } else {
return material.name().substring("LEGACY_".length()); return material.name().replaceAll("^LEGACY_", "");
} }
} }
} }