sb-glyph

1.0.2 • Public • Published

Skyblock Glyphs

Get item glyphs from item_bytes returned by the hypixel api.

Installation

yarn add sb-glyph # or using npm i sb-glyph 

Usage

Simple usage:

const { getGlyph, getItems } = require('sb-glyph');
 
const fs = require('fs');
 
(async () => {
    // getItems returns an array of the decoded items
    const items = await getItems(item_bytes /* This is the base64 encoded buffer returned by the hypixel api*/, true);
 
    console.log(items);
    
    // getGlyph returns the glyph of the item as a buffer containing the image encoded as png. If no glyph is found, returns undefined
    const buf = await getGlyph(ret[0] /* path_to_head_cache: has default */)
})();

If I went lazy I would've documented with JSDoc :-)

Credits

This module uses code from:

Skyblock-stats

Used their code to determine glyph from item_bytes

Additional credits to the creators of the texture packs used by skyblock-stats and this module:

  • Animated Custom Weapons and Armors: FurfSky+ by Furf__
  • Additional Custom Textures: Vanilla+ by TBlazeWarriorT
  • Default Textures: Minecraft by Mojang
  • Player Heads: SkyBlock by Hypixel.

Crafatar

Used render the player heads

Readme

Keywords

Package Sidebar

Install

npm i sb-glyph

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

21 MB

Total Files

9117

Last publish

Collaborators

  • wykerd