Summons two golems instead of one

Started by lightmiester on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 02:53, 11. Aug 2019
Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Summons two golems instead of one

I made an item that summons iron golems in my mod. Whenever I use it, it summons two iron golems. One that I cannot harm and I cannot move, and it does not move on its own either. But the second one acts as a normal iron golem should. Any ideas on how to fix this?

 
Last seen on 10:05, 22. Sep 2018
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just relog and then the fake
Fri, 08/04/2017 - 11:11

Just relog and then the fake golem should disappear.

Last seen on 02:53, 11. Aug 2019
Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for the help but is
Fri, 08/04/2017 - 21:44

Thanks for the help but is there anyway for this stop happening entirely?

 

Last seen on 23:21, 14. Apr 2019
Joined Jul 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Thanks for the help but is
Fri, 08/04/2017 - 22:59

@#2 Yes, put this in your Item code:

 

Entity sentity = EntityList.createEntityByName("YOURMOBSNAME", world);
if (sentity != null){sentity.setLocationAndAngles(i, j, k, world.rand.nextFloat() * 360F, 0.0F);
if (!world.isRemote) {
world.spawnEntityInWorld(sentity);
}
((EntityLiving)sentity).playLivingSound();}
}

}
for YOURMOBSNAME put the name of your golem in undercase.  Ex: if your golem mob is named Jimmy put jimmy.  However if it JimmySoup put jimmySoup

 

This code works for 1.7.10.  I dont know what version  you have.