use of net.minecraft.network.protocol.game.ClientboundGameEventPacket in project SpongeCommon by SpongePowered.
the class ServerPlayerMixin method impl$performGameWinLogic.
@SuppressWarnings("ConstantConditions")
@Override
protected final Entity impl$performGameWinLogic() {
this.shadow$unRide();
this.shadow$getLevel().removePlayerImmediately((net.minecraft.server.level.ServerPlayer) (Object) this);
if (!this.wonGame) {
this.wonGame = true;
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, this.seenCredits ? 0.0F : 1.0F));
this.seenCredits = true;
}
return (Entity) (Object) this;
}
Aggregations