mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-18 22:24:29 +00:00
Fix custom names for 1.17 and 1.18
This commit is contained in:
parent
771a827e33
commit
7fe95f00ec
1 changed files with 4 additions and 3 deletions
|
@ -1310,14 +1310,15 @@ public class ReflectionManager {
|
||||||
public static Object convertInvalidMeta(Object value) {
|
public static Object convertInvalidMeta(Object value) {
|
||||||
if (value instanceof Optional) {
|
if (value instanceof Optional) {
|
||||||
Optional opt = (Optional) value;
|
Optional opt = (Optional) value;
|
||||||
if (nmsReflection != null) {
|
|
||||||
return nmsReflection.convertOptional(opt);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!opt.isPresent()) {
|
if (!opt.isPresent()) {
|
||||||
return NmsVersion.v1_13.isSupported() ? value : com.google.common.base.Optional.absent();
|
return NmsVersion.v1_13.isSupported() ? value : com.google.common.base.Optional.absent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nmsReflection != null) {
|
||||||
|
return nmsReflection.convertOptional(opt.get());
|
||||||
|
}
|
||||||
|
|
||||||
Object val = opt.get();
|
Object val = opt.get();
|
||||||
|
|
||||||
if (val instanceof BlockPosition) {
|
if (val instanceof BlockPosition) {
|
||||||
|
|
Loading…
Reference in a new issue