Skip to content

Commit 5cc328b

Browse files
author
ozelot379
committed
More table icons (Experimental)
1 parent 015eeb4 commit 5cc328b

5 files changed

Lines changed: 140 additions & 11 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Changelog
22

3-
## [x]
3+
## [3.1.0]
44
- Possible speed up texture pack loading
55
- First sounds support
66
- Improve dialog ui (Experimental)
7+
- More table icons (Experimental)
78

89
## [3.0.4]
910
- Improve error handling

‎README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ Some conversions of HD texture packs may takes a while
1414

1515
This project is inspired by the no longer continued [PCTexture2PE](https://github.com/rodrigojxd/PCTexture2PE)
1616

17-
It supports to convert blocks, items, entities, paintings, particles, map icons, mob effects and some more basic ui textures (hotbar)
17+
It supports to convert blocks, items, entities, paintings, particles, map icons, mob effects and hotbar
1818

19-
Some experimental conversions are disabled by default, but can be enabled if you want to try:
19+
Some experimental conversions are disabled by default, but can be enabled if you want to try, but please be warned, it contains many bugs and may are not beautiful and may not usable:
2020
- UI
2121
- Buttons
2222
- Tabs
2323
- Dialogs
24-
- Inventory
24+
- Inventory / Recipe book
25+
- Tables
2526

2627
## Web app
2728
Look at https://ozelot379.github.io/ConvertJavaTextureToBedrock

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ozelot379/convert-minecraft-java-texture-to-bedrock",
33
"productName": "ConvertJavaTextureToBedrock",
4-
"version": "3.0.4",
4+
"version": "3.1.0",
55
"description": "Convert Minecraft Java texture packs to Bedrock texture packs",
66
"keywords": [
77
"Minecraft",

‎src/converter/DespriteExperimentalConverter.js‎

Lines changed: 79 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ class DespriteExperimentalConverter extends AbstractConverter {
2626

2727
const factor = (image_from.getWidth() / factor_detect);
2828

29-
for (const [x, y, width, height, to] of sprites) {
29+
for (const [x, y, width, height, to, empty_area_alternative] of sprites) {
3030
this.log.log(`Desprite ${to} (Experimental)`);
3131

32-
const image = image_from.clone().crop((x * factor), (y * factor), (width * factor), (height * factor));
32+
let image = image_from.clone().crop((x * factor), (y * factor), (width * factor), (height * factor));
33+
34+
if (image.isEmptyArea(0, 0, image.getWidth(), image.getHeight()) && empty_area_alternative) {
35+
image = image_from.clone().crop((empty_area_alternative[0] * factor), (empty_area_alternative[1] * factor), (empty_area_alternative[2] * factor), (empty_area_alternative[3] * factor));
36+
}
3337

3438
await this.writeImage(to, image);
3539
}
@@ -42,6 +46,16 @@ class DespriteExperimentalConverter extends AbstractConverter {
4246
*/
4347
static get DEFAULT_CONVERTER_DATA() {
4448
return [
49+
[
50+
"textures/gui/recipe_book.png",
51+
256,
52+
[
53+
[152, 41, 26, 16, "textures/ui/craft_toggle_off.png"],
54+
[152, 59, 26, 16, "textures/ui/craft_toggle_off_hover.png"],
55+
[180, 41, 26, 16, "textures/ui/craft_toggle_on.png"],
56+
[180, 59, 26, 16, "textures/ui/craft_toggle_on_hover.png"]
57+
]
58+
],
4559
[
4660
"textures/gui/widgets.png",
4761
256,
@@ -54,17 +68,67 @@ class DespriteExperimentalConverter extends AbstractConverter {
5468
"textures/gui/container/anvil.png",
5569
256,
5670
[
57-
[102, 48, 22, 15, "textures/ui/arrow_large.png"],
71+
[99, 45, 22, 15, "textures/ui/arrow_large.png"],
5872
[17, 7, 30, 30, "textures/ui/anvil_icon.png"],
59-
[53, 49, 13, 13, "textures/ui/anvil-plus.png"]
73+
[53, 49, 13, 13, "textures/ui/anvil-plus.png"],
74+
[176, 0, 28, 21, "textures/ui/crossout.png"]
75+
]
76+
],
77+
[
78+
"textures/gui/container/beacon.png",
79+
256,
80+
[
81+
[58, 108, 5, 18, "textures/ui/beacon_item_seperator_pocket.png"],
82+
[58, 108, 5, 18, "textures/ui/item_seperator.png"],
83+
[18, 22, 19, 22, "textures/ui/pyramid_level_1.png"],
84+
[18, 47, 19, 22, "textures/ui/pyramid_level_2.png"],
85+
[18, 72, 19, 22, "textures/ui/pyramid_level_3.png"],
86+
[158, 22, 19, 22, "textures/ui/pyramid_level_4.png"],
87+
[88, 219, 22, 22, "textures/ui/confirm.png"],
88+
[110, 219, 22, 22, "textures/ui/cancel.png"]
89+
]
90+
],
91+
[
92+
"textures/gui/container/brewing_stand.png",
93+
256,
94+
[
95+
[17, 17, 16, 16, "textures/ui/brewing_fuel_empty.png"],
96+
[56, 51, 16, 16, "textures/ui/bottle_empty.png"],
97+
[60, 43, 19, 6, "textures/ui/brewing_fuel_bar_empty.png"],
98+
[176, 29, 18, 4, "textures/ui/brewing_fuel_bar_full.png"],
99+
[63, 14, 12, 29, "textures/ui/bubbles_empty.png"],
100+
[185, 0, 12, 29, "textures/ui/bubbles_full.png"],
101+
[34, 28, 26, 20, "textures/ui/brewing_fuel_pipes.png"],
102+
[73, 34, 28, 23, "textures/ui/brewing_pipes.png"],
103+
[73, 34, 28, 23, "textures/ui/brewing_pipes_large.png"],
104+
[97, 16, 9, 28, "textures/ui/brewing_arrow_empty.png"],
105+
[97, 16, 9, 28, "textures/ui/brewing_arrow_large_empty.png"],
106+
[176, 0, 9, 28, "textures/ui/brewing_arrow_full.png"],
107+
[176, 0, 9, 28, "textures/ui/brewing_arrow_large_full.png"]
108+
]
109+
],
110+
[
111+
"textures/gui/container/enchanting_table.png",
112+
256,
113+
[
114+
[35, 47, 16, 16, "textures/ui/lapis.png"],
115+
[35, 47, 16, 16, "textures/ui/lapis_image.png"],
116+
[3, 225, 13, 11, "textures/ui/dust_selectable_1.png"],
117+
[19, 225, 13, 11, "textures/ui/dust_selectable_2.png"],
118+
[34, 225, 13, 11, "textures/ui/dust_selectable_3.png"],
119+
[3, 241, 13, 11, "textures/ui/dust_unselectable_1.png"],
120+
[19, 241, 13, 11, "textures/ui/dust_unselectable_2.png"],
121+
[34, 241, 13, 11, "textures/ui/dust_unselectable_3.png"]
60122
]
61123
],
62124
[
63125
"textures/gui/container/furnace.png",
64126
256,
65127
[
66-
[80, 35, 22, 15, "textures/ui/arrow_inactive.png"],
67-
[177, 14, 22, 15, "textures/ui/arrow_active.png"]
128+
[79, 35, 24, 17, "textures/ui/arrow_inactive.png"],
129+
[176, 14, 24, 17, "textures/ui/arrow_active.png"],
130+
[56, 36, 14, 14, "textures/ui/flame_empty_image.png"],
131+
[176, 0, 14, 14, "textures/ui/flame_full_image.png"]
68132
]
69133
],
70134
[
@@ -82,6 +146,15 @@ class DespriteExperimentalConverter extends AbstractConverter {
82146
[
83147
[135, 29, 16, 13, "textures/ui/arrow.png"]
84148
]
149+
],
150+
[
151+
"textures/gui/container/loom.png",
152+
256,
153+
[
154+
[176, 0, 16, 16, "textures/ui/loom_banner_empty.png", [13, 26, 16, 16]],
155+
[192, 0, 16, 16, "textures/ui/loom_dye_empty.png", [33, 26, 16, 16]],
156+
[208, 0, 16, 16, "textures/ui/loom_pattern_item_empty.png", [23, 45, 16, 16]]
157+
]
85158
]
86159
];
87160
}

‎src/converter/NineSliceConverter.js‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,20 @@ class NineSliceConverter extends AbstractConverter {
6666
*/
6767
static get DEFAULT_CONVERTER_DATA() {
6868
return [
69+
[
70+
"textures/gui/recipe_book.png",
71+
256,
72+
[
73+
[54, 206, 24, 24, 5, [
74+
"textures/ui/cell_image_red",
75+
"textures/ui/recipe_book_red_button",
76+
"textures/ui/recipe_book_red_button_pressed",
77+
"textures/ui/button_trade_red",
78+
"textures/ui/button_trade_red_pressed"
79+
]]
80+
],
81+
[]
82+
],
6983
[
7084
"textures/gui/widgets.png",
7185
256,
@@ -95,6 +109,9 @@ class NineSliceConverter extends AbstractConverter {
95109
"textures/ui/recipe_book_button_borderless_lightpressed",
96110
"textures/ui/recipe_book_dark_button_pressed",
97111
"textures/ui/recipe_book_light_button_pressed"
112+
]],
113+
[0, 22, 24, 24, 5, [
114+
"textures/ui/cell_image_invert"
98115
]]
99116
],
100117
[
@@ -106,12 +123,49 @@ class NineSliceConverter extends AbstractConverter {
106123
"textures/ui/world_screenshot_focus_border"
107124
]
108125
],
126+
[
127+
"textures/gui/container/beacon.png",
128+
256,
129+
[
130+
[0, 219, 22, 22, 5, [
131+
"textures/ui/beacon_button_default"
132+
]],
133+
[22, 219, 22, 22, 5, [
134+
"textures/ui/beacon_button_pressed"
135+
]],
136+
[44, 219, 22, 22, 5, [
137+
"textures/ui/beacon_button_locked"
138+
]],
139+
[66, 219, 22, 22, 5, [
140+
"textures/ui/beacon_button_hover"
141+
]]
142+
],
143+
[]
144+
],
145+
[
146+
"textures/gui/container/enchanting_table.png",
147+
256,
148+
[
149+
[0, 166, 108, 19, 5, [
150+
"textures/ui/enchanting_active_background"
151+
]],
152+
[0, 185, 108, 19, 5, [
153+
"textures/ui/enchanting_dark_background"
154+
]],
155+
[0, 204, 108, 19, 5, [
156+
"textures/ui/enchanting_active_background_with_hover_text"
157+
]]
158+
],
159+
[]
160+
],
109161
[
110162
"textures/gui/container/generic_54.png",
111163
256,
112164
[
113165
[7, 17, 18, 18, 5, [
114166
"textures/ui/cell_image",
167+
"textures/ui/cell_image_normal",
168+
"textures/ui/item_cell",
115169
"textures/ui/recipe_book_item_bg"
116170
]],
117171
[2, 2, 1, 1, 0, [

0 commit comments

Comments
 (0)