GrzybcioRynek

CustomItemsHook

Clone of the stored ItemStack and optional Nexo/Oraxen rebuild only when the item is AIR.

Compatible with: GrzybcioRynek 1.0.3Minecraft 26.2Web 0.1.0

Based on GrzybcioRynek 1.0.3 and web 0.1.0 source.

CustomItemsHook wraps NexoHook and OraxenHook. Both hooks are optional (softdepend). The plugin works without resource packs.

Public methods

MethodSource
getNexoId(ItemStack)NexoHook.getNexoId
getOraxenId(ItemStack)OraxenHook.getOraxenId
recreateItem(MarketListing)recreateItem(listing.getItem(), nexoId, oraxenId)
recreateItem(ItemStack, nexoId, oraxenId)clone + optional rebuild

recreateItem — AIR rule

  1. originalItem == nullnull.
  2. stored = originalItem.clone() — keeps enchantments, PDC, display name.
  3. Rebuild from pack ID only when stored.getType().isAir():
    • first Nexo (nexoId + nexoHook.isEnabled()getNexoItem);
    • then Oraxen (oraxenHook.recreateItem).
  4. Otherwise returns the clone.
Warning

Changing an ID in the pack does not rebuild a healthy stack. The problem appears only when the stored item is AIR and the ID no longer exists in the pack API.

NexoHook — reflection

Class: com.nexomc.nexo.api.NexoItems.

Nexo methodUse
idFromItem(ItemStack)read ID when listing
itemFromId(String) + build()recreate when AIR

Nexo plugin not loaded → hook disabled (silent). Plugin present, API fails to start:

text
Nexo znaleziono, ale nie udało się załadować API: <msg>

Success: Wykryto Nexo! Włączono wsparcie dla niestandardowych przedmiotów.

getNexoId / getNexoItem catch exceptions and return null. recreateItem in NexoHook itself sets amount from the original — CustomItemsHook only takes this path on AIR via getNexoItem (without copying amount in that branch).

OraxenHook — reflection

Class: io.th0rgal.oraxen.api.OraxenItems.

Oraxen methodUse
getIdByItem(ItemStack)ID when listing
exists(String)whether the ID is alive
getItemById(String) + build()recreate
text
Oraxen znaleziono, ale nie udało się załadować API: <msg>
Wykryto Oraxen! Włączono wsparcie dla niestandardowych przedmiotów.

recreateItem in Oraxen: no hook/ID → clone of original; failed build → clone; success → new stack with original amount.

Where it is called

  • listing: save nexoId / oraxenId on MarketListing;
  • buy, remove, expiry, refund reclaim: recreateItem;
  • search: ItemSearchUtil also compares these IDs.

IDs live in listings.yml and in transaction serialization (nexoId, oraxenId).