Leeizazombie wrote:Thank you Dzienny, it was helpful!
I was able to make it place a pillar at a set height but the problem is that I have to place two blocks to set the spot, I tried:
- Code: Select all
BlockCatch.CaptureOneBlock(p, 2, DrawCuboid, new BasicDrawArgs(block));
No matter what arguments I use it keeps giving errors that the arguments are invalid, I have no idea how to make it capture one block only, can you show an example please?
The CaptureOneBlock method has a different signature. You can use
- Code: Select all
BlockCatch.CaptureOneBlock(p, DrawPillar, new BasicDrawArgs(block));
or alternatively
- Code: Select all
BlockCatch.CaptureMultipleBlocks(p, 1, DrawPillar, new BasicDrawArgs(block));
where 1 is the number of blocks to capture.
If you use the first option then your callback method has to be:
- Code: Select all
void DrawPillar(Player p, ChangeInfo change, BasicDrawArgs args) { }
If you use
CaptureMultipleBlocks then the callback method signature is:
- Code: Select all
void DrawPillar(Player p, List<ChangeInfo> changes, BasicDrawArgs args) { }
Of course if you use
CaptureMultipleBlocks with the argument of blocks to catch equal to 1, then the list of changes will contain exactly one element.