promotional bannermobile promotional banner

LK: Shop and Market

A player-driven marketplace inspired by Albion Online featuring global buy/sell orders and villager-linked server shops.
Back to Files

LKShopMarket-0.8.0.jar

File nameLKShopMarket-0.8.0.jar
Uploaded
Aug 19, 2026
Downloads
34
Size
1.4 MB
Mod Loaders
Forge
File ID
8682504
Type
R
Release
Supported game versions
  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:lk-shop-market-1650513:8682504")

Learn more about Curse Maven

What's new

LK Shop & Market v0.8.0

Minecraft 1.20.1 · Forge 47+

⚠️ Network protocol raised to 7 — client and server must both update. A 0.7.x client is refused at connection time instead of failing halfway through a delivery. Worlds, saves and configs carry over untouched: existing mailboxes load as-is, no migration, nothing to do.


🇬🇧 English

📬 The mailbox now knows where each delivery came from

Until now the mailbox stored only the stacks. A diamond that arrived from a purchase and one returned by a cancelled order were indistinguishable, so there was nothing to filter by. It now records why each stack arrived, at the moment it is deposited — which is the only moment that information still exists.

  • Filter chips at the top of the mailbox: All, Purchases, Refunds — each showing how many stacks it holds, so you can see a category is empty without clicking it.
  • Purchases covers everything you bought, in the World Market and in Server Shops.
  • Refunds covers everything that came back: orders you cancelled, orders an admin cancelled, expired orders, trades that fell through, and goods returned by a sale that could not complete.
  • Stacks from before this update — and anything restored from a backup — carry no origin, so they appear only under All. Filing them under a category would be inventing a fact; hiding them would put claimable items out of reach.
  • Grouping still works, and now respects the origin: two deliveries of the same item merge only if they came from the same place, so a row's label can never be a lie about half its contents.
  • The search box and the sort (received / name / amount) are unchanged, and the sort is now remembered.

🪙 The balance plate tells you which way the coins went

Getting paid and paying out moved the same counter in opposite directions and looked exactly the same, so without reading the number you had no idea which had just happened.

  • Money in — the coin flashes gold, fading out in step with the counter itself, so light and number finish together.
  • Money out — the plate flashes crimson (#EF4444): the frame takes the colour and a translucent veil tints the glass without flattening the gradient underneath.
  • The gold glow no longer fires on a payment. Tinting the frame red and lighting the coin gold would be telling you two different things at once.

💾 Your sort order is remembered

The market screen is rebuilt from scratch every time you open /market, so anyone who works with "most expensive first" had to pick it again on every single open.

  • Browse remembers its sort order (cheapest, priciest, biggest lot, newest) and its type filter (all, sales only, purchases only).
  • The mailbox remembers its own sort too.
  • Saved in config/lkshopmarket-common.toml under [interface], written by the GUI itself. A value that no longer resolves falls back to the default instead of throwing — a convenience setting must never be able to stop the market from opening.

🔧 Fixes from a full code audit

A read-only audit of the whole codebase turned up five issues. All five are fixed here.

  • 🔴 Opening your own world after a long break no longer wipes your balance. With inactivePurgeDays enabled, the archiving sweep ran at server start — before the login that updates your last-seen date — so reopening a singleplayer or LAN world after the configured period deleted the host's own balance, reputation and stats seconds before they joined. The sweep now skips anyone playing and the owner of a local world; a host is not an inactive player, they are the person opening the game. Dedicated servers are unaffected: someone genuinely away for months is still archived, which is what the setting is for.
  • 💰 Selling to a Server Shop now asks for confirmation above the threshold. The whole confirmation block sat inside a buy-only branch, so selling fired on the first click no matter the value — with the ×64 chip selected, one click sent 64 units out of your inventory with no dialog. Both directions now use confirmPurchasesFrom, each measured against its own price. The dialog already knew how to word a sale ("you will earn" instead of "cost", and no balance check, because selling is not something you can fail to afford).
  • ⚡ The market no longer re-hashes every shop item on every refresh. The virtual Server Shop rows validated their cache by walking every shop and hashing each item's full NBT tree — on every page build, once per viewer per broadcast tick. On a busy server that was tens of thousands of hash steps every couple of ticks on the main thread, almost always to conclude nothing had changed. It now compares two integers.
  • 🏷️ A corrected inverted price now refreshes open screens. When a legacy entry is auto-corrected because its buyback exceeded its sale price, the change was saved but not broadcast, so if the sale was rejected right afterwards every open shop and market row kept showing the old price.
  • 🧹 One per-player map was not being pruned on disconnect, unlike its two siblings cleaned three lines away. No malfunction, but it grew for the lifetime of the server.

🇪🇸 Español

📬 El buzón ya sabe de dónde vino cada entrega

Hasta ahora el buzón guardaba solo los stacks. Un diamante llegado de una compra y otro devuelto por una orden cancelada eran indistinguibles, así que no había nada por lo que filtrar. Ahora se anota por qué llegó cada stack, en el momento de depositarlo, que es el único momento en que esa información todavía existe.

  • Chips de filtro arriba del buzón: Todo, Compras, Devoluciones — cada uno con cuántos stacks tiene, para ver que una categoría está vacía sin llegar a pulsarla.
  • Compras es todo lo que has comprado, en el Mercado Mundial y en Tiendas de Servidor.
  • Devoluciones es todo lo que vuelve: órdenes que cancelaste, órdenes canceladas por un administrador, caducadas, tratos que se cayeron y género devuelto de una venta que no pudo completarse.
  • Los stacks anteriores a esta actualización —y lo restaurado desde una copia de seguridad— no llevan origen, así que salen solo bajo Todo. Meterlos en una categoría sería inventarse un dato; esconderlos dejaría fuera de la vista items reclamables.
  • El agrupado sigue funcionando y ahora respeta el origen: dos entregas del mismo item se fusionan solo si vienen de lo mismo, así que la etiqueta de una fila no puede mentir sobre la mitad de su contenido.
  • El buscador y el orden (recibido / nombre / cantidad) siguen igual, y el orden ahora se recuerda.

🪙 La placa del saldo dice hacia dónde han ido las monedas

Cobrar y pagar movían el mismo contador en direcciones opuestas y se veían exactamente igual, así que sin leer la cifra no había forma de saber cuál de las dos acababa de pasar.

  • Entra dinero — la moneda destella en oro y se apaga al ritmo del propio contador, así que la luz y el número terminan a la vez.
  • Sale dinero — la placa lanza un destello carmesí (#EF4444): el marco toma el color y un velo translúcido tiñe el cristal sin aplastar el degradado que tiene debajo.
  • El brillo dorado ya no salta al pagar. Teñir el marco de rojo y encender la moneda en oro sería contarte dos cosas distintas a la vez.

💾 Se recuerda tu orden

La pantalla del mercado se reconstruye entera cada vez que abres /market, así que quien trabaja con «lo más caro primero» tenía que volver a elegirlo en cada apertura.

  • Explorar recuerda su orden (barato, caro, lote mayor, reciente) y su filtro de tipo (todas, solo ventas, solo compras).
  • El buzón recuerda también el suyo.
  • Se guardan en config/lkshopmarket-common.toml, sección [interface], y los escribe la propia interfaz. Un valor que ya no resuelve cae al valor por defecto en vez de reventar: una preferencia de comodidad nunca puede impedir que se abra el mercado.

🔧 Arreglos de una auditoría completa

Una revisión de solo lectura de todo el código sacó cinco problemas. Los cinco entran aquí.

  • 🔴 Abrir tu propio mundo tras una temporada ya no te borra el saldo. Con inactivePurgeDays activado, el barrido de archivado corría al arrancar el servidor —antes del login que actualiza tu fecha de última conexión—, así que reabrir un mundo local o de LAN pasado el plazo borraba el saldo, la reputación y las estadísticas del propio anfitrión segundos antes de que entrase. Ahora el barrido se salta a quien esté jugando y al dueño de una partida local: un anfitrión no es un jugador inactivo, es el que está abriendo el juego. Los servidores dedicados no cambian: quien lleva meses fuera se sigue archivando, que es para lo que está el ajuste.
  • 💰 Vender a una Tienda de Servidor ya pide confirmación por encima del umbral. Todo el bloque de confirmación estaba dentro de una rama que solo cubría la compra, así que vender salía disparado al primer clic costase lo que costase: con el atajo de ×64 puesto, una pulsación sacaba 64 unidades del inventario sin diálogo. Ahora las dos direcciones usan confirmPurchasesFrom, cada una medida contra su propio precio. El diálogo ya sabía redactar una venta («ganarás» en vez de «coste», y sin comprobar el saldo, porque vender no es algo que no te puedas permitir).
  • ⚡ El mercado ya no re-hashea todos los artículos en cada refresco. Las filas virtuales de las Tiendas de Servidor validaban su caché recorriendo todas las tiendas y hasheando el árbol NBT completo de cada item, en cada construcción de página y una vez por espectador y por tick de difusión. En un servidor con gente eran decenas de miles de pasos de hash cada dos ticks en el hilo principal, casi siempre para concluir que no había cambiado nada. Ahora compara dos enteros.
  • 🏷️ Un precio invertido corregido ya refresca las pantallas abiertas. Cuando una entrada heredada se autocorrige porque su precio de recompra superaba al de venta, el cambio se guardaba pero no se avisaba, así que si la venta se rechazaba justo después, las tiendas abiertas y la fila del mercado seguían con el precio viejo.
  • 🧹 Un mapa por jugador no se podaba al desconectar, al contrario que sus dos hermanos, que se limpian tres líneas más abajo. No fallaba nada, pero crecía durante toda la vida del servidor.

🔎 Note on the "Sales" category / Nota sobre la categoría «Ventas»

🇬🇧 There is no Sales tab, and that is deliberate. Nothing a sale produces ever reaches the mailbox: when you sell, you are paid in coins, and money goes straight to your balance without passing through it. A tab that can never hold anything only ever shows an empty list that looks like a bug. The value exists internally, so the day sales are ever paid in goods, the tab appears with no format change.

🇪🇸 No hay pestaña de Ventas, y es a propósito. Nada de lo que produce una venta llega al buzón: al vender se cobra en monedas, y el dinero va directo al saldo sin pasar por él. Una pestaña que nunca puede tener contenido solo enseña un vacío que parece un fallo. El valor existe por dentro, así que el día que haya ventas cobradas en especie, la pestaña aparece sin cambiar el formato.

Made by Nek4z.

This mod has no additional files