Started by
Filipvali12
on
Topic category: Advanced modding
Hello!!
I tried to 'play' with MCreator and gave a strange little thing.
When I select "Block that drops" and select a block , and then select "Drop amount: 0" ,had item will be dropped random ?
Sorry for my English . I do not know a lot.
I think it will drop nothing or when you close the editor mcreator will automally set the drop to 1. For make sure that a block doesn't drop nothing a set air for drop.
Here is the link of image http://imgur.com/wVXECxy
No it will not be random. For random amount:
A) Take the par1Random parameter from the quantityDropped field and and use its method nextInt() in the return statement.
Result is something like:
public int quantityDropped(Random par1Random){
return 4 + par1Random.nextInt(2);
}
4 is the minimal drop
2 is maximal-minimal
B)Use Math.random()
For example:
public int quantityDropped(Random par1Random){
return (int)(Math.random()*10);
}
This returns random value between 0 and 10.
cool