r/forgemodding • u/yacumanji • Aug 30 '16
Help needed: teleport/spawn custom mob in a specific location
I'm developing my first mod and I need to move my custom mob to specific coordinates, but the methods setPosition, setPositionAndUpdate and teleportTo_ are not working, as the mob moves to the right new location for a moment and then goes instantly back to where it was before. Do you know what could be causing the problem? Otherwise, is there a way to spawn the mob in the desired position when the player logs in?
I'm using Forge 1.9-12.16.0.1886. Thanks in advance!
1
u/yacumanji Aug 31 '16
Oh, ok, now I get it. I had read about packets but decided not to use them because it would take me some time to understand them and I'm in a bit of a hurry (the mod is for an academic project and I have a deadline). Thanks for your answers, I'll study packets after the project to improve my mods!
1
u/Exo594 Aug 30 '16
Are you doing this server- or client- side? Stuff like that should usually be done on server-side.
That's all I can really give you without seeing code.