Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Feb 21, 2022
1 parent 651471c commit 2662c6e
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import minecraftIds from '../data/minecraft_ids.json';
export { minecraftIds };
export declare const baseUrl = "https://raw.githubusercontent.com/skyblockstats/skyblock-assets/2.0.3";
export declare const baseUrl = "https://raw.githubusercontent.com/skyblockstats/skyblock-assets/2.0.5";
export interface NBT {
ExtraAttributes?: {
id?: string;
Expand Down
2 changes: 1 addition & 1 deletion build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports.getTextureUrl = exports.getTextureDir = exports.baseUrl = exports.minecr
// @ts-ignore This is outside the rootdir so technically it's illegal but also it's fine
const minecraft_ids_json_1 = __importDefault(require("../data/minecraft_ids.json"));
exports.minecraftIds = minecraft_ids_json_1.default;
exports.baseUrl = 'https://raw.githubusercontent.com/skyblockstats/skyblock-assets/2.0.3';
exports.baseUrl = 'https://raw.githubusercontent.com/skyblockstats/skyblock-assets/2.0.5';
/** Check if all the values from checkerObj are the same in obj */
function objectsPartiallyMatch(obj, checkerObj) {
for (const [attribute, checkerValue] of Object.entries(checkerObj)) {
Expand Down
4 changes: 2 additions & 2 deletions data/minecraft_ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"80": "minecraft:snow",
"81": "minecraft:cactus",
"82": "minecraft:clay",
"83": "minecraft:reeds",
"83": "minecraft:sugar_cane",
"84": "minecraft:jukebox",
"85": "minecraft:fence",
"86": "minecraft:pumpkin",
Expand Down Expand Up @@ -334,7 +334,7 @@
"335": "minecraft:milk_bucket",
"336": "minecraft:brick",
"337": "minecraft:clay_ball",
"338": "minecraft:reeds",
"338": "minecraft:sugar_cane",
"339": "minecraft:paper",
"340": "minecraft:book",
"341": "minecraft:slime_ball",
Expand Down
163 changes: 159 additions & 4 deletions data/vanilla_damages.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@
"birch_log": "log:2",
"jungle_log": "log:3",

"oak_leaves": "leaves",
"spruce_leaves": "leaves:1",
"birch_leaves": "leaves:2",
"jungle_leaves": "leaves:3",

"acacia_leaves": "leaves2:0",
"dark_oak_leaves": "leaves2:1",

"sponge_wet": "sponge:1",

"chiseled_sandstone": "sandstone:1",
Expand All @@ -53,6 +57,7 @@
"lime_wool": "wool:5",
"pink_wool": "wool:6",
"gray_wool": "wool:7",
"silver_wool": "wool:8",
"light_gray_wool": "wool:8",
"cyan_wool": "wool:9",
"purple_wool": "wool:10",
Expand All @@ -62,6 +67,7 @@
"red_wool": "wool:14",
"black_wool": "wool:15",

"poppy": "red_flower:0",
"blue_orchid": "red_flower:1",
"allium": "red_flower:2",
"houstonia": "red_flower:3",
Expand Down Expand Up @@ -156,9 +162,6 @@
"red_stained_glass_pane": "stained_glass_pane:14",
"black_stained_glass_pane": "stained_glass_pane:15",

"acacia_leaves": "leaves2:0",
"dark_oak_leaves": "leaves2:1",

"acacia_log": "log2:0",
"dark_oak_log": "log2:1",

Expand Down Expand Up @@ -217,6 +220,23 @@
"dye_orange": "dye:14",
"dye_white": "dye:15",

"black_dye": "dye:0",
"red_dye": "dye:1",
"green_dye": "dye:2",
"brown_dye": "dye:3",
"blue_dye": "dye:4",
"purple_dye": "dye:5",
"cyan_dye": "dye:6",
"light_gray_dye": "dye:7",
"gray_dye": "dye:8",
"pink_dye": "dye:9",
"lime_dye": "dye:10",
"yellow_dye": "dye:11",
"light_blue_dye": "dye:12",
"magenta_dye": "dye:13",
"orange_dye": "dye:14",
"white_dye": "dye:15",

"bottle_drinkable": "potion",
"bottle_splash": "splash_potion",

Expand Down Expand Up @@ -286,5 +306,140 @@
"brown_concrete_powder": "concrete_powder:12",
"green_concrete_powder": "concrete_powder:13",
"red_concrete_powder": "concrete_powder:14",
"black_concrete_powder": "concrete_powder:15"
"black_concrete_powder": "concrete_powder:15",

"elder_guardian_spawn_egg": "spawn_egg:4",
"wither_skeleton_spawn_egg": "spawn_egg:5",
"stray_spawn_egg": "spawn_egg:6",
"husk_spawn_egg": "spawn_egg:23",
"zombie_villager_spawn_egg": "spawn_egg:27",
"skeleton_horse_spawn_egg": "spawn_egg:28",
"zombie_horse_spawn_egg": "spawn_egg:29",
"donkey_spawn_egg": "spawn_egg:31",
"mule_spawn_egg": "spawn_egg:32",
"evoker_spawn_egg": "spawn_egg:34",
"vex_spawn_egg": "spawn_egg:35",
"vindicator_spawn_egg": "spawn_egg:36",
"creeper_spawn_egg": "spawn_egg:50",
"skeleton_spawn_egg": "spawn_egg:51",
"spider_spawn_egg": "spawn_egg:52",
"zombie_spawn_egg": "spawn_egg:54",
"slime_spawn_egg": "spawn_egg:55",
"ghast_spawn_egg": "spawn_egg:56",
"zombie_pigman_spawn_egg": "spawn_egg:57",
"enderman_spawn_egg": "spawn_egg:58",
"cave_spider_spawn_egg": "spawn_egg:59",
"silverfish_spawn_egg": "spawn_egg:60",
"blaze_spawn_egg": "spawn_egg:61",
"magma_cube_spawn_egg": "spawn_egg:62",
"bat_spawn_egg": "spawn_egg:65",
"witch_spawn_egg": "spawn_egg:66",
"endermite_spawn_egg": "spawn_egg:67",
"guardian_spawn_egg": "spawn_egg:68",
"shulker_spawn_egg": "spawn_egg:69",
"pig_spawn_egg": "spawn_egg:90",
"sheep_spawn_egg": "spawn_egg:91",
"cow_spawn_egg": "spawn_egg:92",
"chicken_spawn_egg": "spawn_egg:93",
"squid_spawn_egg": "spawn_egg:94",
"wolf_spawn_egg": "spawn_egg:95",
"mooshroom_spawn_egg": "spawn_egg:96",
"ocelot_spawn_egg": "spawn_egg:98",
"horse_spawn_egg": "spawn_egg:100",
"rabbit_spawn_egg": "spawn_egg:101",
"polar_bear_spawn_egg": "spawn_egg:102",
"llama_spawn_egg": "spawn_egg:103",
"parrot_spawn_egg": "spawn_egg:105",
"villager_spawn_egg": "spawn_egg:120",

"charcoal": "coal:1",

"clock_01": "clock",
"clock_02": "clock",
"clock_03": "clock",
"clock_04": "clock",
"clock_05": "clock",
"clock_06": "clock",
"clock_07": "clock",
"clock_08": "clock",
"clock_09": "clock",
"clock_10": "clock",
"clock_11": "clock",
"clock_12": "clock",
"clock_13": "clock",
"clock_14": "clock",
"clock_15": "clock",
"clock_16": "clock",
"clock_17": "clock",
"clock_18": "clock",
"clock_19": "clock",
"clock_20": "clock",
"clock_21": "clock",
"clock_22": "clock",
"clock_23": "clock",
"clock_24": "clock",
"clock_25": "clock",
"clock_26": "clock",
"clock_27": "clock",
"clock_28": "clock",
"clock_29": "clock",
"clock_30": "clock",
"clock_31": "clock",
"clock_32": "clock",
"clock_33": "clock",
"clock_34": "clock",
"clock_35": "clock",
"clock_36": "clock",
"clock_37": "clock",
"clock_38": "clock",
"clock_39": "clock",
"clock_40": "clock",
"clock_41": "clock",
"clock_42": "clock",
"clock_43": "clock",
"clock_44": "clock",
"clock_45": "clock",
"clock_46": "clock",
"clock_47": "clock",
"clock_48": "clock",
"clock_49": "clock",
"clock_50": "clock",
"clock_51": "clock",
"clock_52": "clock",
"clock_53": "clock",
"clock_54": "clock",
"clock_55": "clock",
"clock_56": "clock",
"clock_57": "clock",
"clock_58": "clock",
"clock_59": "clock",
"clock_60": "clock",
"clock_61": "clock",
"clock_62": "clock",
"clock_63": "clock",

"skeleton_skull": "skull:0",
"wither_skull": "skull:1",
"zombie_head": "skull:2",

"oak_boat": "boat",

"oak_button": "wooden_button",

"oak_pressure_plate": "wooden_pressure_plate",

"oak_sign": "sign",

"music_disc_11": "record_11",
"music_disc_13": "record_13",
"music_disc_blocks": "record_blocks",
"music_disc_cat": "record_cat",
"music_disc_far": "record_far",
"music_disc_mall": "record_mall",
"music_disc_stal": "record_stal",
"music_disc_strad": "record_strad",
"music_disc_wait": "record_wait",
"music_disc_ward": "record_ward",

"": ""
}
17 changes: 9 additions & 8 deletions generator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ async function readPropertiesFile(fileDir: string): Promise<{ [key: string]: any
setDotNotationAttribute(dotNotationContents, property, contents[property])
}

if (fileDir === 'packs\\furfsky_reborn\\mcpatcher\\cit\\item\\tools\\drills\\titanium_drill_dr_x555\\titanium_drill_dr_x555_display.properties') {
console.log(fileContents, dotNotationContents)
}

return dotNotationContents
}

Expand Down Expand Up @@ -459,15 +455,20 @@ async function addPack(packName: string) {

// remove the minecraft: namespace from matcher items
if (newItems)
newItems = newItems.map(item => item.replace(/^minecraft:/, ''))
newItems = newItems.map(item => item.replace(/^(minecraft:)+/, ''))

// remove items that aren't in minecraftItemNames
// remove/fix items that aren't in minecraftItemNames
const minecraftItemNames = Object.values(minecraftIds).map(item => item.replace(/^minecraft:/, ''))
if (newItems && newItems.length > 0) {
newItems = newItems.filter(item => minecraftItemNames.includes(item))
if (newItems.length === 0)
let originalItems = newItems
newItems = newItems
.map(item => (item in minecraftIds) ? minecraftIds[item].replace(/^minecraft:/, '') : item)
.filter(item => minecraftItemNames.includes(item))
if (newItems.length === 0) {
// none of the items were valid, oh well!
console.log('invalid item??', originalItems, matcherTextures)
return
}
}

matchers.push({
Expand Down
2 changes: 1 addition & 1 deletion matchers/hypixel+.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion matchers/packshq.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion matchers/vanilla.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "skyblock-assets",
"version": "2.0.4",
"version": "2.0.5",
"description": "Library for getting URLs to Hypixel SkyBlock item textures from several resource packs.",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import minecraftIds from '../data/minecraft_ids.json'
export { minecraftIds }

export const baseUrl = 'https://raw.githubusercontent.com/skyblockstats/skyblock-assets/2.0.3'
export const baseUrl = 'https://raw.githubusercontent.com/skyblockstats/skyblock-assets/2.0.5'

export interface NBT {
ExtraAttributes?: {
Expand Down

0 comments on commit 2662c6e

Please sign in to comment.