upgrade: minor fixes, disable some scoreboard stuff temporarily

(cherry picked from commit db28c44b40)
This commit is contained in:
mworzala 2023-12-19 00:52:47 +02:00 committed by Matt Worzala
parent 5de3436c71
commit 055b927bca
4 changed files with 16 additions and 5 deletions

View File

@ -348,6 +348,9 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
refreshHealth(); // Heal and send health packet
refreshAbilities(); // Send abilities packet
// Start chunk load
sendPacket(new ChangeGameStatePacket(ChangeGameStatePacket.Reason.LEVEL_CHUNKS_LOAD_START, 0));
return setInstance(spawnInstance);
}

View File

@ -42,6 +42,7 @@ public record ChangeGameStatePacket(@NotNull Reason reason, float value) impleme
PLAY_PUFFERFISH_STING_SOUND,
PLAYER_ELDER_GUARDIAN_MOB_APPEARANCE,
ENABLE_RESPAWN_SCREEN,
LIMITED_CRAFTING
LIMITED_CRAFTING,
LEVEL_CHUNKS_LOAD_START
}
}

View File

@ -67,7 +67,8 @@ public interface Scoreboard extends Viewable, PacketGroupingAudience {
* @param score The new score
*/
default void updateScore(Player player, int score) {
sendPacketsToViewers(new UpdateScorePacket(player.getUsername(), (byte) 0, getObjectiveName(), score));
//todo
// sendPacketsToViewers(new UpdateScorePacket(player.getUsername(), (byte) 0, getObjectiveName(), score));
}
/**

View File

@ -335,7 +335,9 @@ public class Sidebar implements Scoreboard {
* @return a {@link UpdateScorePacket}
*/
private UpdateScorePacket getScoreCreationPacket(String objectiveName) {
return new UpdateScorePacket(entityName, (byte) 0, objectiveName, line);
//todo
throw new UnsupportedOperationException();
// return new UpdateScorePacket(entityName, (byte) 0, objectiveName, line);
}
/**
@ -345,7 +347,9 @@ public class Sidebar implements Scoreboard {
* @return a {@link UpdateScorePacket}
*/
private UpdateScorePacket getScoreDestructionPacket(String objectiveName) {
return new UpdateScorePacket(entityName, (byte) 1, objectiveName, 0);
//todo
throw new UnsupportedOperationException();
// return new UpdateScorePacket(entityName, (byte) 1, objectiveName, 0);
}
/**
@ -356,7 +360,9 @@ public class Sidebar implements Scoreboard {
* @return a {@link UpdateScorePacket}
*/
private UpdateScorePacket getLineScoreUpdatePacket(String objectiveName, int score) {
return new UpdateScorePacket(entityName, (byte) 0, objectiveName, score);
//todo
throw new UnsupportedOperationException();
// return new UpdateScorePacket(entityName, (byte) 0, objectiveName, score);
}
/**