Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
change how packs are provided
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Feb 19, 2022
1 parent 7d4109f commit 8da26ca
Show file tree
Hide file tree
Showing 15,978 changed files with 898 additions and 720 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ TypeScript library for getting urls (hosted on GitHub) to Hypixel SkyBlock item

To generate and optimize the texture packs, run `npm run generate`. This requires [Oxipng](https://github.com/shssoichiro/oxipng) to be installed. Optimization will take a few minutes.

## Usage

First, import the packs that you want to use.
```ts
import vanilla from 'skyblock-assets/matchers/vanilla.json'
import packshq from 'skyblock-assets/matchers/packshq.json'
```
The reason you have to import the packs yourself is so the library uses less memory if you're not using every pack.

Then, you can use the `getTextureUrl` function to get the url of an item.
```ts
const itemTextureUrl = skyblockAssets.getTextureUrl({
id: 'minecraft:nether_star',
nbt: {
ExtraAttributes: {
id: 'SKYBLOCK_MENU'
},
display: {
Name: 'SkyBlock Menu (Right Click)'
}
},
packs: [ packshq, vanilla ],
})
```
The order in which you provide packs is the order in which they will be searched, so always put vanilla last.


## Pack versions

[Ectoplasm](https://hypixel.net/threads/2239953) - Completionist's Update
Expand Down
Loading

0 comments on commit 8da26ca

Please sign in to comment.