Skip to content

Commit

Permalink
Revert some changes to fix test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
theEvilReaper committed Nov 18, 2024
1 parent 3175ae3 commit b55dee5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/java/net/minestom/server/instance/WeatherTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ void testWeatherDefaults(@NotNull Env env) {
assertEquals(0, weather.rainLevel());
assertEquals(0, weather.thunderLevel());

instance.setWeather(new Weather(1, 0.5f), 1);
instance.tick(0);

env.destroyInstance(instance);
}

@Test
void testWeatherSendOnJoin(@NotNull Env env) {
Instance instance = env.createFlatInstance();

instance.setWeather(new Weather(1, 0.5f), 1);
instance.tick(0);

// Weather sent on instance join
var connection = env.createConnection();
var tracker = connection.trackIncoming(ChangeGameStatePacket.class)
Expand All @@ -50,7 +50,7 @@ void testWeatherSendOnJoin(@NotNull Env env) {
assertEquals(ChangeGameStatePacket.Reason.RAIN_LEVEL_CHANGE, state.reason());
assertEquals(1, state.value());

state = packets.getLast();
state = packets.get(2);
assertEquals(ChangeGameStatePacket.Reason.THUNDER_LEVEL_CHANGE, state.reason());
assertEquals(0.5f, state.value());

Expand Down

0 comments on commit b55dee5

Please sign in to comment.