Cleanup/remove old "spamless" chat message code.

This was quickly ported to use overlays in 1.19, this commit removes the old junk code.
This commit is contained in:
modmuss50 2022-11-16 21:19:12 +00:00
parent 357c86940d
commit 770ac2292f
15 changed files with 77 additions and 194 deletions

View file

@ -140,18 +140,6 @@ public class ClientBoundPacketHandlers {
});
ClientNetworkManager.registerClientBoundHandler(new Identifier("reborncore", "sync_chunks"), ChunkLoaderManager.CODEC, ClientChunkManager::setLoadedChunks);
ClientNetworkManager.registerClientBoundHandler(new Identifier("reborncore", "no_spam_chat"), (client, handler, buf, responseSender) -> {
final int messageId = buf.readInt();
final Text text = buf.readText();
client.execute(() -> {
int deleteID = RebornCore.MOD_ID.hashCode() + messageId;
MinecraftClient.getInstance().inGameHud.setOverlayMessage(text, false);
});
});
ClientNetworkManager.registerClientBoundHandler(new Identifier("reborncore", "stacks_to_render"), Codec.list(ItemStack.CODEC), ItemStackRenderManager.RENDER_QUEUE::addAll);
}
}