Is there a Block Definition for nerve gas?

Is there a Block Definition for nerve gas?

Postby Warren1001 » 13 Jun 2013, 06:31

I have the defaults, I didn't see anything related to nerve gas on it.
I'm not even sure if you can place nerve gas this way ._.
Is there a way? :p

Code: Select all
p.level.Blockchange(p, x, y, z, Block.?????);
Warren1001
 
Posts: 197
Joined: 08 Aug 2012, 03:50

Re: Is there a Block Definition for nerve gas?

Postby Ultima » 13 Jun 2013, 13:02

Code: Select all
p.level.Blockchange(p, x, y, z, (byte)192);


Use /b and it will give the the ID of the block.
User avatar
Ultima
 
Posts: 953
Joined: 19 Aug 2011, 23:45

Re: Is there a Block Definition for nerve gas?

Postby Warren1001 » 13 Jun 2013, 16:25

Ultima wrote:
Code: Select all
p.level.Blockchange(p, x, y, z, (byte)192);


Use /b and it will give the the ID of the block.

ty :p
Warren1001
 
Posts: 197
Joined: 08 Aug 2012, 03:50

Re: Is there a Block Definition for nerve gas?

Postby dzienny » 15 Jun 2013, 19:44

@Ultima
Great answer.

@Warren
It's named Block.deathair.
Generally, it's better to use constants instead of magic numbers. But, in this case you may not always be able to identify the name of the block, hence Ultima's answer is very valid.
User avatar
dzienny
Administrator
 
Posts: 1181
Joined: 23 Jan 2011, 14:27


Return to Help in Coding

Who is online

Users browsing this forum: No registered users and 5 guests

cron