A little question.

Started by Filipvali12 on

Topic category: Advanced modding

Last seen on 13:51, 24. Mar 2018
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A little question.

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.

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think it will drop nothing
Sun, 11/13/2016 - 07:16

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. 

Last seen on 22:13, 3. Apr 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No it will not be random. For
Sun, 11/13/2016 - 08:55

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.

Last seen on 10:15, 29. Mar 2017
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
cool  
Sun, 11/13/2016 - 13:00

cool