mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-27 13:15:52 +01:00
parent
583ed4b58a
commit
4fc476a125
@ -164,7 +164,7 @@ class EntityUtilities {
|
||||
FuzzyFieldContract.newBuilder()
|
||||
.banModifier(Modifier.STATIC)
|
||||
.requirePublic()
|
||||
.typeExact(org.bukkit.craftbukkit.libs.it.unimi.dsi.fastutil.ints.Int2ObjectMap.class)
|
||||
.typeExact(MinecraftReflection.getInt2ObjectMapClass())
|
||||
.build()
|
||||
)
|
||||
);
|
||||
|
@ -2248,4 +2248,18 @@ public class MinecraftReflection {
|
||||
public static Class<?> getAttributeBase() {
|
||||
return getMinecraftClass("world.entity.ai.attributes.AttributeBase", "AttributeBase");
|
||||
}
|
||||
|
||||
public static Class<?> getInt2ObjectMapClass() {
|
||||
try {
|
||||
return getMinecraftLibraryClass("it.unimi.dsi.fastutil.ints.Int2ObjectMap");
|
||||
} catch (RuntimeException ex) {
|
||||
try {
|
||||
Class<?> clazz = getMinecraftLibraryClass("org.bukkit.craftbukkit.libs.it.unimi.dsi.fastutil.ints.Int2ObjectMap");
|
||||
setMinecraftLibraryClass("it.unimi.dsi.fastutil.ints.Int2ObjectMap", clazz);
|
||||
return clazz;
|
||||
} catch (RuntimeException ignored) {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user