Skip to content

Commit

Permalink
Fix ITeleporter class check
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Mar 6, 2024
1 parent cdb8b35 commit aa2a74b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.fabricators_of_create.porting_lib.extensions;

import java.util.Objects;
import java.util.function.Function;

import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -66,7 +67,8 @@ default PortalInfo getPortalInfo(Entity entity, ServerLevel destWorld, Function<
* Is this teleporter the vanilla instance.
*/
default boolean isVanilla() {
return this.getClass() == PortalForcer.class;
// Ignore the warning, this is fine at runtime
return Objects.equals(this.getClass(), PortalForcer.class);
}

/**
Expand Down

0 comments on commit aa2a74b

Please sign in to comment.