Skip to content

Update TShock for Terraria 1.4.6.0 - #3331

Open
KRWCLASSIC wants to merge 1 commit into
Pryaxis:general-develfrom
KRWCLASSIC:terraria-1.4.6
Open

KRWCLASSIC wants to merge 1 commit into
Pryaxis:general-develfrom
KRWCLASSIC:terraria-1.4.6

Conversation

@KRWCLASSIC

Copy link
Copy Markdown

bumps OTAPI to 3.3.15, fixes the 3 small 1.4.6 API changes, and adds native GNS_Wrapper loading (Windows x64 wrapper here: https://github.com/KRWCLASSIC/Relogic-GNS-Wrapper-Recomp).

@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes reach TShock server startup and player networking.

Supply the missing build inputs before merging; clean launcher builds currently fail.

Findings

  1. P1 Clean builds fail ▶

Summary

Updates TShock to 6.2.2 for Terraria 1.4.6.0.

  • The server uses updated Terraria calls for player connections and damage.
  • The launcher loads GNS_Wrapper from its platform runtime folder.

Reviews (1) · Last reviewed commit: "Update TShock for Terraria 1.4.6.0" · Reviewed by Greptile

Comment on lines +29 to +31
<None Include="..\prebuilts\OpenNAT.dll">
<Link>OpenNAT.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Clean builds fail

TShockLauncher.csproj now copies prebuilts/OpenNAT.dll, but that file is not committed and CI never downloads it. A clean build fails when MSBuild tries to copy the missing file. The new native-library folders are also absent, so their wildcards copy nothing. Commit the required files or add a reproducible download step before building.

Knowledge Base Used:

@magaflaca

Copy link
Copy Markdown

Hii, I opened PRs against your branches with some 1.4.6/1.4.6.1 fixes, tested on Linux and Windows:

plz take a look 💟

@KRWCLASSIC

Copy link
Copy Markdown
Author

Hii, I opened PRs against your branches with some 1.4.6/1.4.6.1 fixes, tested on Linux and Windows:

plz take a look 💟

those should be individual PR's to original repo's not mine, get your claude working on gta 6
also dll recomp tries to match what relogic wrote with small linux compat so im not taking any PR's from you, if you want to contribute do this with your own PR's to base project

@KRWCLASSIC

Copy link
Copy Markdown
Author

tho if they dont pull those PR's in time i might just fork it and do some work for few weeks till they catch up

@magaflaca

Copy link
Copy Markdown

Found a couple of things while testing this:

"has left" is never announced

On 1.4.6, ApproveTermination() sets State = 0 before ServerLeave fires, so this check in OnLeave never passes. FinishedHandshake already covers it:

 // TShockAPI/TShock.cs (OnLeave)
-if (!tsplr.SilentKickInProgress && tsplr.State >= (int)ConnectionState.RequestingWorldData && tsplr.FinishedHandshake)
+if (!tsplr.SilentKickInProgress && tsplr.FinishedHandshake)

This only shows up with SignatureBeef/Open-Terraria-API#175, which hooks the new 1.4.6 join/leave announcements. Without it, players see "has joined" twice (vanilla + TShock) and only vanilla's "has left". Both changes should go together.

GNS natives are not in the repo

TShockLauncher.csproj includes prebuilts/OpenNAT.dll and prebuilts/native/*, but .gitignore excludes *.dll and *.so, so a fresh clone builds without them and GNS can't load. OpenNAT already comes from the OTAPI 3.3.15 package. For the GNS natives, you can do SignatureBeef/Open-Terraria-API#176, which ships them in the nupkg.. or taking them from the vanilla server zip at build time I think.

Duplicate "is connecting" in the console

1.4.6 prints Net.ClientConnecting itself when it processes pending connections, so the line in LinuxTcpSocket now shows twice:

 // TShockAPI/Sockets/LinuxTcpSocket.cs
 ISocket socket = new LinuxTcpSocket(this._listener.AcceptTcpClient());
-Console.WriteLine(Language.GetTextValue("Net.ClientConnecting", socket.GetRemoteAddress()));
 this._listenerCallback(socket);

I'm not opening separate PRs to the main repo for these because they depend on this one, and I'd rather they get fixed here before 1.4.6 lands in the main branch than have it merged with these bugs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants