Plant events

Started by LueLusten on

Topic category: Help with MCreator software

Joined Nov 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Plant events
Wed, 11/30/2016 - 13:46 (edited)

Why is there no plaint item events at all? I need to change add a random event to add seeds when a crap is havist 

if ((Math.random() * 100) <= 20) {
        if (entity instanceof EntityPlayer)
               ((EntityPlayer) entity).inventory.addItemStackToInventory(new ItemStack(mcreator_soulSeeds.block, 1));
 }

But there is no place to put it no events or anything and I tried adding it to the item code but clearly that was wrong
        @Override
        public Item getItemDropped(IBlockState state, Random rand, int fortune) {
            return new ItemStack(mcreator_babySouls.block).getItem();
        }

@Override
        public Item getItemDropped(IBlockState state, Random rand, int fortune) {      if ((Math.random() * 100) <= 20) {
                    if (entity instanceof EntityPlayer)
                         ((EntityPlayer) entity).inventory.addItemStackToInventory(new ItemStack(mcreator_soulSeeds.block, 1));
               }

            return new ItemStack(mcreator_babySouls.block).getItem();
 }       

 

Not getting any errors but it does not drop the seeds at all

Also there is a strange bug with the Univrisal locations of crops and plants, they spawned all over and in the sky ...

Edited by LueLusten on Wed, 11/30/2016 - 13:46
Joined Nov 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes I know its werid but that
Wed, 11/30/2016 - 14:36

Yes I know its werid but that is not helpful and pushs a reply,please reply helpfully, ideas on how to fix it or ideas where the code should go.

One word replies tho give me fauls hope that someone can help me, hope you understand.

Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have the same problem with
Wed, 11/30/2016 - 21:18

I have the same problem with plants spawning everywhere. i am going to mess around with them and see if I can change that, because I need to add in some into my mod.

Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Yes I know its werid but that
Thu, 12/01/2016 - 00:12

@#2 Sry. I think a soulution would be to make the drop rate anything except 1. (That happens with mob spawn rates, so...)