Posted May 25, 20205 yr So I'm trying to spawn an entity from code, and I just don't know what command to use. As in not using the /summon command in minecraft. I found a way to do this with vanilla entities, but it doesn't seem to work with modded ones. Any advice on how to do this is appreciated!
May 25, 20205 yr Use World#addEntity (spelling might be off), and pass in an instance of the desired entity. Some tips: Spoiler Modder Support: Spoiler 1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code. 2. Always post your code. 3. Never copy and paste code. You won't learn anything from doing that. 4. Quote Programming via Eclipse's hotfixes will get you nowhere 5. Learn to use your IDE, especially the debugger. 6. Quote The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it. Support & Bug Reports: Spoiler 1. Read the EAQ before asking for help. Remember to provide the appropriate log(s). 2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.
May 25, 20205 yr Author 3 hours ago, DavidM said: Use World#addEntity (spelling might be off), and pass in an instance of the desired entity. that doesn't seem to be working, could you give me an example of how its used?
May 25, 20205 yr Please define "not working". Show your code. I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.
May 25, 20205 yr Author 17 minutes ago, imacatlolol said: Please define "not working". Show your code. nvm I figured it out, I had a capital where there shouldn't have been one my bad
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.