@@ -5,7 +5,7 @@ import animationMcb from './datapackCompiler/animation.mcb'
55import { AnyRenderedNode , IRenderedRig } from './rigRenderer'
66import { IRenderedAnimation } from './animationRenderer'
77import { Variant } from '../variants'
8- import { NbtCompound , NbtFloat , NbtInt , NbtList , NbtString } from 'deepslate/lib/nbt'
8+ import { NbtByte , NbtCompound , NbtFloat , NbtInt , NbtList , NbtString } from 'deepslate/lib/nbt'
99import {
1010 arrayToNbtFloatArray ,
1111 matrixToNbtFloatArray ,
@@ -24,7 +24,7 @@ import {
2424} from '../util/minecraftUtil'
2525import { JsonText } from './minecraft/jsonText'
2626import { MAX_PROGRESS , PROGRESS , PROGRESS_DESCRIPTION } from '../interface/exportProgressDialog'
27- import { eulerFromQuaternion , roundTo } from '../util/misc'
27+ import { eulerFromQuaternion , floatToHex , roundTo , tinycolorToDecimal } from '../util/misc'
2828import { setTimeout } from 'timers'
2929import { MSLimiter } from '../util/msLimiter'
3030
@@ -316,7 +316,12 @@ async function generateRootEntityPassengers(rig: IRenderedRig, rigHash: string)
316316 'text' ,
317317 new NbtString ( node . text ? node . text . toString ( ) : '"Invalid Text Component"' )
318318 )
319+
320+ const color = new tinycolor ( node . backgroundColor + floatToHex ( node . backgroundAlpha ) )
321+ passenger . set ( 'background' , new NbtInt ( tinycolorToDecimal ( color ) ) )
319322 passenger . set ( 'line_width' , new NbtInt ( node . lineWidth ) )
323+ passenger . set ( 'shadow' , new NbtByte ( node . shadow ? 1 : 0 ) )
324+ passenger . set ( 'see_through' , new NbtByte ( node . seeThrough ? 1 : 0 ) )
320325
321326 if ( node . config ) {
322327 TextDisplayConfig . fromJSON ( node . config ) . toNBT ( passenger )
0 commit comments