PlayerHooks.isFake always returns false on fabric
TropheusJ opened this issue ยท 3 comments
FTB Teams uses this hook to check if a player is fake. Create uses Fake Player API for the fake players of several blocks. Since the result is always false, FTB Teams believes the players are not fake, and crashes.
Create issue: Fabricators-of-Create/Create#307
Depends on #202
This is the check we use in AE2 btw:
public static boolean isFakePlayer(Player player) {
return player instanceof ServerPlayer && player.getClass() != ServerPlayer.class;
}
This is the check we use in AE2 btw:
public static boolean isFakePlayer(Player player) { return player instanceof ServerPlayer && player.getClass() != ServerPlayer.class; }
I would say that this is a reasonable "default" expectation, and if mods have custom ServerPlayer subclasses that are not fake players, they can use the event described in 202