scarpet
scarpet copied to clipboard
silk_spawners.sc doesnt work as exepcted
I am using the latest of everything as of this minute. Latest carpet works fine for me in 21w08b, however silk_spawners.sc does not, the spawner just breaks.
I did some more testing, and when using a netherite pick, it works. This appears to be specific to diamond pickaxes.
IIRC it was changed to require a netherite pickaxe no long ago.
Edit: Looking back at it, it should allow both...
I have another issue to add -- when placing a spawner that has been renamed with the aqua NBT tag stuff, there are actually two spawners placed. This doesnt happen when setting down spawners that have not been renamed, and doesnt happen at all if the script is unloaded..
Line 17 is if (!tool || get(tool, 0) != 'diamond_pickaxe', !tool || get(tool, 0) != 'netherite_pickaxe', return());
Or with whitespace
if (!tool || get(tool, 0) != 'diamond_pickaxe',
!tool || get(tool, 0) != 'netherite_pickaxe',
return()
);
It's literally if(cond, cond, expr); which is wrong. It should be
if (
!tool ||
(get(tool, 0) != 'diamond_pickaxe' && get(tool, 0) != 'netherite_pickaxe'),
return()
);
Additionally, the spawner is always renamed to "Null Spawner" because the block nbt structure must've changed.
Line 32 has data:'SpawnData.id' which should now be data:'SpawnData.entity.id'.
And line 46 prevents setting from the offhand.
And apparently you don't have to shift click on some blocks to place the spawner anyway (eg right click on anything with a gui with spawner in hand).
I have another issue to add -- when placing a spawner that has been renamed with the aqua NBT tag stuff, there are actually two spawners placed. This doesnt happen when setting down spawners that have not been renamed, and doesnt happen at all if the script is unloaded..
Could you describe exactly how to reproduce this behavior? I haven't used the script much so I've never had this happen to me.