AFK message spam after placing GT fakeplayer block
Justfines opened this issue · 6 comments
Forge Version is: forge-1.7.10-10.13.4.1614-1.7.10-universal
Gregtech5U version is: Gregtech 5.09.32.20 (running with GT++ pre-release final 8)
FE build is: 1354
After placing a block from GT that uses a fake player (for example: a Basic Pump) for the first time, The FE new player message appears with the placer's username. After a short period when ever the owner of the block moves the "You are now AFK" and "You are not AFK any more" display messages in a alternating fashion. This also spams the entire server if AFK announces are permitted.
This appears somewhat related to how GT names the fakeplayers: After whomever places the block.
I believe this is the case from this line within the GT5u github.
I've dug through old issues related to fakeplayer and have a question… Is GT actually DO use Forge FakePlayer, or cook up his own based on EntityPlayerMP ?
This also appears to effect plots by mutating the player's uuid in their user ident
The commit that added fake players for pumps and such is here: Blood-Asp/GT5-Unofficial@e725c45
It's using forge's fake playerfactory with a game profile that has a null uuid and the player's name.
public static FakePlayer getFakePlayer(IGregTechTileEntity aBaseMetaTileEntity) {
if (aBaseMetaTileEntity.getWorld() instanceof WorldServer) {
return FakePlayerFactory.get((WorldServer) aBaseMetaTileEntity.getWorld(), new GameProfile(null, aBaseMetaTileEntity.getOwnerName()));
}
return null;
}
fake playerfactory with a game profile that has a null uuid
That explains it.
As we moved to 1.12.2, is this still an issue on 1.12.2 @Justfines ?