Skip to content

Commit

Permalink
Bug fix for entity effect
Browse files Browse the repository at this point in the history
  • Loading branch information
retrooper committed Oct 1, 2023
1 parent 2675b41 commit d95d539
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ public static void load() {

entityBoundingBoxField = Reflection.getField(nmsEntityClass, boundingBoxClass, 0, true);

if (builtInRegistriesClass != null) {
mobEffectsRegistryField = Reflection.getField(builtInRegistriesClass, "e");
}

if (nmsEntityClass != null) {
getBukkitEntity = Reflection.getMethod(nmsEntityClass, craftEntityClass, 0);
}
Expand Down Expand Up @@ -244,6 +240,10 @@ public static void load() {

builtInRegistriesClass = Reflection.getClassByNameWithoutException("net.minecraft.core.registries.BuiltInRegistries");

if (builtInRegistriesClass != null) {
mobEffectsRegistryField = Reflection.getField(builtInRegistriesClass, "e");
}

vec3DClass = NMSUtils.getNMSClassWithoutException("Vec3D");
if (vec3DClass == null) {
vec3DClass = getNMClassWithoutException("world.phys.Vec3D");
Expand Down

0 comments on commit d95d539

Please sign in to comment.