mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fix custom teleporters NPE (#7296)
This commit is contained in:
1 parent
178e3d244a
commit
e421ea164c
3 files changed
+18
-6
No files matched your search
@@ -24,6 +24,7 @@ import java.util.function.Function;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||
import net.minecraft.world.Teleporter;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
/**
|
||||
@@ -57,4 +58,10 @@ public interface ITeleporter {
|
||||
default Entity placeEntity(Entity entity, ServerWorld currentWorld, ServerWorld destWorld, float yaw, Function<Boolean, Entity> repositionEntity) {
|
||||
return repositionEntity.apply(true);
|
||||
}
|
||||
|
||||
//used internally to handle vanilla hardcoding
|
||||
default boolean isVanilla()
|
||||
{
|
||||
return getClass() == Teleporter.class;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user