@@ -96,7 +96,8 @@ window.BedrockEntityManager = class BedrockEntityManager {
96
96
}
97
97
}
98
98
if ( valid_textures_list . length == 1 ) {
99
- new Texture ( { keep_size : true , render_mode} ) . fromPath ( valid_textures_list [ 0 ] ) . add ( )
99
+ let texture = new Texture ( { keep_size : true , render_mode} ) . fromPath ( valid_textures_list [ 0 ] ) . add ( )
100
+ if ( isApp ) loadAdjacentTextureSet ( texture ) ;
100
101
if ( render_mode == 'layered' ) {
101
102
updateLayeredTextures ( ) ;
102
103
}
@@ -169,14 +170,15 @@ window.BedrockEntityManager = class BedrockEntityManager {
169
170
cancelIndex : 2 ,
170
171
onButton ( index ) {
171
172
dialog . hide ( ) ;
173
+ let textures_to_import = [ ] ;
172
174
if ( index == 1 ) {
173
- valid_textures_list . forEach ( path => {
174
- new Texture ( { keep_size : true , render_mode} ) . fromPath ( path ) . add ( )
175
- } )
175
+ textures_to_import = valid_textures_list ;
176
176
} else if ( index == 0 ) {
177
- selected_textures . forEach ( path => {
178
- new Texture ( { keep_size : true , render_mode} ) . fromPath ( path ) . add ( )
179
- } )
177
+ textures_to_import = selected_textures ;
178
+ }
179
+ for ( let path of textures_to_import ) {
180
+ let texture = new Texture ( { keep_size : true , render_mode} ) . fromPath ( path ) . add ( ) ;
181
+ if ( isApp ) loadAdjacentTextureSet ( texture ) ;
180
182
}
181
183
if ( render_mode == 'layered' ) {
182
184
updateLayeredTextures ( ) ;
@@ -322,7 +324,8 @@ window.BedrockEntityManager = class BedrockEntityManager {
322
324
} else {
323
325
function tryItWith ( extension ) {
324
326
if ( fs . existsSync ( texture_path + '.' + extension ) ) {
325
- var texture = new Texture ( { keep_size : true } ) . fromPath ( texture_path + '.' + extension ) . add ( )
327
+ var texture = new Texture ( { keep_size : true } ) . fromPath ( texture_path + '.' + extension ) . add ( ) ;
328
+ loadAdjacentTextureSet ( texture ) ;
326
329
return true ;
327
330
}
328
331
}
@@ -454,6 +457,7 @@ window.BedrockBlockManager = class BedrockBlockManager {
454
457
] )
455
458
if ( full_texture_path ) {
456
459
let texture = new Texture ( { keep_size : true } ) . fromPath ( full_texture_path ) . add ( ) ;
460
+ if ( isApp ) loadAdjacentTextureSet ( texture ) ;
457
461
if ( target == '*' ) {
458
462
texture . use_as_default = true ;
459
463
0 commit comments