File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
src/integrationTest/java/net/transferproxy/test Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript() {
55 }
66 }
77 dependencies {
8- classpath ' com.github.YvanMazy.MinecraftRemapperGradle:MinecraftRemapperGradle:9b8f7b1c98 '
8+ classpath ' com.github.YvanMazy.MinecraftRemapperGradle:MinecraftRemapperGradle:a2558bb063 '
99 }
1010}
1111
@@ -24,10 +24,14 @@ dependencies {
2424}
2525
2626minecraftRemapper {
27- version = " 1.21.5 "
27+ version = " 1.21.9 "
2828 directionType = ' CLIENT'
29- dependenciesConfigurations = [ " integrationTestCompileOnly " ]
29+ includeRemappedJarDependency = true
3030 includeLibrariesDependency = true
31+ includeRawJarDependency = true
32+ remappedJarDependenciesConfigurations = [" integrationTestCompileOnly" ]
33+ librariesDependenciesConfigurations = [" integrationTestCompileOnly" ]
34+ rawJarDependenciesConfigurations = [" integrationTestRuntimeOnly" ]
3135}
3236
3337shadowJar {
Original file line number Diff line number Diff line change 4949import java .nio .file .Files ;
5050import java .nio .file .Path ;
5151import java .rmi .RemoteException ;
52+ import java .util .List ;
5253
5354import static org .junit .jupiter .api .Assumptions .abort ;
5455
@@ -175,6 +176,7 @@ private StartedMinecraft<TestAgent> launchMinecraft() {
175176 .agentId (TestAgent .ID )
176177 .config (config -> config .version (this .minecraftVersion )
177178 .authentication (Auth .byUsername (PLAYER_NAME ))
179+ .gameArguments (List .of ("--offlineDeveloperMode" ))
178180 .processDirectory (this .cacheDirectory )
179181 .inheritIO (false ))
180182 .start ();
Original file line number Diff line number Diff line change 2727import net .minecraft .client .Minecraft ;
2828import net .minecraft .client .Options ;
2929import net .minecraft .client .gui .screens .ConnectScreen ;
30+ import net .minecraft .client .gui .screens .TitleScreen ;
3031import net .minecraft .client .multiplayer .ServerData ;
3132import net .minecraft .client .multiplayer .ServerStatusPinger ;
3233import net .minecraft .client .multiplayer .resolver .ServerAddress ;
@@ -70,7 +71,7 @@ public void disconnectServer() throws RemoteException {
7071 final CountDownLatch latch = new CountDownLatch (1 );
7172 Minecraft .getInstance ().schedule (() -> {
7273 try {
73- Minecraft .getInstance ().disconnect ();
74+ Minecraft .getInstance ().disconnect (new TitleScreen (), false );
7475 } finally {
7576 latch .countDown ();
7677 }
Original file line number Diff line number Diff line change 2424
2525package net .transferproxy .test .agent .callback ;
2626
27- import com .mojang .authlib .GameProfile ;
2827import net .minecraft .client .multiplayer .ServerData ;
2928import net .minecraft .network .protocol .status .ServerStatus ;
29+ import net .minecraft .server .players .NameAndId ;
3030import net .transferproxy .test .common .SimpleStatusResponse ;
3131import org .jetbrains .annotations .Nullable ;
3232
@@ -67,8 +67,8 @@ private SimpleStatusResponse.Players getPlayers() {
6767 final ServerStatus .Players players = this .serverData .players ;
6868 if (players != null ) {
6969 final List <SimpleStatusResponse .Players .SampleEntry > list = new ArrayList <>();
70- for (final GameProfile profile : players .sample ()) {
71- list .add (new SimpleStatusResponse .Players .SampleEntry (profile .getName (), profile .getId ()));
70+ for (final NameAndId profile : players .sample ()) {
71+ list .add (new SimpleStatusResponse .Players .SampleEntry (profile .name (), profile .id ()));
7272 }
7373 return new SimpleStatusResponse .Players (players .online (),
7474 players .max (),
You can’t perform that action at this time.
0 commit comments