1

How place Note Block with particular note using craftscript?

redstone_trail •8/8/16 11:58 pm
•
155
•
Using a craftscript file (js code), I am trying to place a Note Block (item 25) in Minecraft (v1.6.4) with a particular note set on that Note Block when it is placed.

I tried the following with no success:

importPackage(Packages.com.sk89q.worldedit);
importPackage(Packages.com.sk89q.worldedit.blocks);

var meGetBlockIn = player.getBlockIn();
var sess = context.remember();

//var myNoteBlock = new BaseBlock(BlockID.NOTE_BLOCK);
var myNoteBlock = new NoteBlock();
myNoteBlock.setNote(7);

sess.setBlock(meGetBlockIn.add(2, 0, 0), myNoteBlock);


If someone knows how to do this, please respond by typing a code snippet in your response.

Thanks so much.
Posted by
redstone_trail
Level 1 : New Miner
0

  Have something to say?

Join • Sign in

Welcome