Break Block to spawn entity spawns 2

3 posts / 0 new
Last post
NicoFilippo's picture
Offline
Last seen: 11 months 2 days ago
Joined: 02/13/2015 - 19:36
Gems: 0
Break Block to spawn entity spawns 2

Name is terrible:

I am trying to make a mod. Adds a new block, and when broke, it is supposed to spawn a mob. But is spawns two. One is normal, as supposed to be, but the secon can be removed only by reloging!

Please help ::



DutchAT's picture
Offline
Last seen: 3 months 2 weeks ago
Joined: 10/08/2015 - 23:02
Gems: 57
Sorry, you can't do nothing

Sorry, you can't do nothing :c

You can make a event: Execute command, with the command /summon Entity X Y Z , but the player must have the cheats on

Offline
Last seen: 8 hours 10 min ago
Joined: 08/27/2013 - 18:03
Gems: 486
Part of your code looks like

Part of your code looks like this:

if(true){

sentity = Get.......
world.spawnEntityInWorld(sentity);

}

Simply add this under the if(true){ 

if (!world.isRemote){

So your code will look :

 

if(true){

if (!world.isRemote){

sentity = Get.......
world.spawnEntityInWorld(sentity);

}

}