Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Incorrect Display of Server TPS #217

Open
3 tasks done
Xujiayao opened this issue Feb 8, 2024 · 1 comment
Open
3 tasks done

[Bug] Incorrect Display of Server TPS #217

Xujiayao opened this issue Feb 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Xujiayao
Copy link
Owner

Xujiayao commented Feb 8, 2024

Checks

Minecraft Version

1.20.4

MC-Discord-Chat Version

2.2.6

Description

MCDC always calculates the Server TPS by using the following code:

tps = Math.min(1000.0 / mspt, 20)

However, if the TPS is modified using the Carpet mod, the MSPT value remains unchanged, and as a result, MCDC cannot reflect the modified TPS.

To Reproduce

  1. Install Carpet mod
  2. Execute /tick rate 15
  3. Execute /mcdc info

The message still displays the default Server TPS of 20 instead of 15.

Log

[17:31:29] [Netty Server IO #1/INFO]: <Xujiayao> /tick rate 15
[17:31:29] [Server thread/INFO]: [Xujiayao: Set the target tick rate to 15.0 per second]
[17:31:40] [Netty Server IO #1/INFO]: <Xujiayao> /mcdc info

Config

{
  "generic": {
    "language": "zh_cn",
    "botToken": "REDACTED",
    "botPlayingStatus": "Minecraft (%onlinePlayerCount%/%maxPlayerCount%)",
    "botListeningStatus": "",
    "useWebhook": true,
    "channelId": "REDACTED",
    "consoleLogChannelId": "",
    "updateNotificationChannelId": "",
    "useUuidInsteadOfName": true,
    "avatarApi": "https://mc-heads.net/avatar/%player%.png",
    "broadcastPlayerCommandExecution": true,
    "broadcastSlashCommandExecution": true,
    "announceServerStartStop": true,
    "announcePlayerJoinLeave": true,
    "announceDeathMessages": true,
    "announceAdvancements": true,
    "broadcastChatMessages": true,
    "formatChatMessages": true,
    "allowedMentions": [
      "everyone",
      "users",
      "roles"
    ],
    "useServerNickname": true,
    "discordNewlineLimit": 3,
    "announceHighMspt": true,
    "msptCheckInterval": 5000,
    "msptLimit": 50,
    "whitelistRequiresAdmin": true,
    "notifyUpdates": true,
    "mentionAdminsForUpdates": true,
    "updateChannelTopic": false,
    "channelTopicUpdateInterval": 600000,
    "shutdownImmediately": false,
    "excludedCommands": [
      "/msg",
      "/tell",
      "/tellraw",
      "/w"
    ],
    "adminsIds": [
      "REDACTED"
    ]
  },
  "multiServer": {
    "enable": false,
    "host": "127.0.0.1",
    "port": 5000,
    "name": "SMP",
    "botIds": []
  },
  "customMessage": {
    "unformattedResponseMessage": "",
    "unformattedChatMessage": "",
    "unformattedOtherMessage": "",
    "unformattedCommandNotice": "",
    "formattedResponseMessage": "",
    "formattedChatMessage": "",
    "formattedOtherMessage": "",
    "formattedCommandNotice": "",
    "messageWithoutWebhook": "",
    "messageWithoutWebhookForMultiServer": "",
    "serverStarted": "",
    "serverStopped": "",
    "joinServer": "",
    "leftServer": "",
    "deathMessage": "",
    "advancementTask": "",
    "advancementGoal": "",
    "advancementChallenge": "",
    "highMspt": "",
    "offlineChannelTopic": "",
    "onlineChannelTopic": "",
    "onlineChannelTopicForMultiServer": ""
  },
  "latestVersion": "2.2.4",
  "latestCheckTime": 1702137321152
}
@Xujiayao Xujiayao added the bug Something isn't working label Feb 8, 2024
Xujiayao added a commit that referenced this issue Feb 8, 2024
@Xujiayao
Copy link
Owner Author

Xujiayao commented Feb 9, 2024

Commits 889b963 and d6845a8 only resolves version 1.20.3 or above. Versions below 1.20.3 will need to find another solution.

Xujiayao added a commit that referenced this issue Feb 9, 2024
Xujiayao added a commit that referenced this issue Feb 9, 2024
Relates to #217
Xujiayao added a commit that referenced this issue Feb 11, 2024
Xujiayao added a commit that referenced this issue Feb 11, 2024
Xujiayao added a commit that referenced this issue Feb 11, 2024
Relates to #217
Xujiayao added a commit that referenced this issue Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant