Anyone! How I can summon boss without glitches? [MCreator version 1.8.9]

Started by _Vitjok_ on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Anyone! How I can summon boss without glitches? [MCreator version 1.8.9]

Hello, people, please, can help me?

The problem is that: when I use event "Spawn entity", MCreator spawns an mob, who's do nothing. In older version MCreator do this too, but it spawns 2 bosses, one is glitchs, but second is normal boss..

Please, people, can I summon the boss without this glitches?

I already used "Execute command" & command /summon boss ~2 ~2 ~2, but the chat says: "I dosn't have permission"..

Anyone, know how I can do this?

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You must spawn it server-side
Fri, 04/15/2016 - 16:21

You must spawn it server-side only , so put before the spawn code: if(!world.isRemote){

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:You must spawn it server-side
Fri, 04/15/2016 - 17:34

@#1 Can I spawn without this code? I want to play in singleplayer too

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:You must spawn it server-side
Fri, 04/15/2016 - 18:01

@#1.1 It will be still playable on singleplayer. Becasue singleplayer in minecraft is defacto "server" and "client" at same time. 

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:You must spawn it server-side
Fri, 04/15/2016 - 18:02

@#1.1.1 *Because

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:You must spawn it server-side
Fri, 04/15/2016 - 18:06

@#1.1.1 Oh, I don't know what I need to do code, I have an crash..

So, how I need to do it? Can I have an screenshot maybe? (In script I zero)

And, if you need, there error:

C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:165: error: illegal start of expression
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:165: error: illegal start of expression
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
       ^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:165: error: ';' expected
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
                          ^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:165: error: ';' expected
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
                                                                ^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:165: error: not a statement
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
                                                                 ^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:165: error: ';' expected
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
                                                                                 ^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:165: error: <identifier> expected
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
                                                                                             ^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:165: error: not a statement
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
                                                                                                      ^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:165: error: ';' expected
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
                                                                                                          ^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:173: error: reached end of file while parsing
}}
  ^
10 errors

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:You must spawn it server-side
Sat, 04/16/2016 - 08:02

@#1.1.1.1 Oh.. I think I can't get help, yeah? :\

Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:You must spawn it server-side
Sat, 04/16/2016 - 10:21

@#1.1.1.2 As nuparu said you have to insert the code if(!world.isRemote){ before the spawning code and close with another bracket.

Example:

if(true){
Entity sentity = EntityList.createEntityByName("Witherstorm", world);if (sentity != null){sentity.setLocationAndAngles(i, j, k, world.rand.nextFloat() * 360F, 0.0F);if(!world.isRemote){world.spawnEntityInWorld(sentity);}((EntityLiving)sentity).playLivingSound();}
}
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:RE:You must spawn it server-side
Sat, 04/16/2016 - 13:30

@#1.1.1.2.1 thanks for your message, but please, tell me, after this event "Custom code" what I need to use? Execute command, or spawn entity? I change your "Witherstorm" to my mob and, use execute command, the same result and spawn entity too. I think I really stupid, but really can't understant, so, sorry D:

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You must change the code of
Sat, 04/16/2016 - 15:22

You must change the code of the whole element. In the workspace is button "View source":



There find line that looks like this:  world.spawnEntityInWorld(sentity);
Before it put : if(!world.isRemote){ 
and after it put }

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:You must change the code of
Sat, 04/16/2016 - 20:04

@#2 Maybe I really stupid, but it dosn't works..Can I have screenshot, where you do this in source editor? (Damn, I really bad at this D:)

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I decided to make a video. 
Sat, 04/16/2016 - 21:48

I decided to make a video.
 

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:I decided to make a video. 
Sun, 04/17/2016 - 09:36

@#3 Um, have build fail

C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_spawnHeavenGuardian.java:98: error: class, interface, or enum expected
if(!world.isRemote)public class mcreator_spawnHeavenGuardian{
^
1 error
:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
BUILD FAILED

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:I decided to make a video. 
Sun, 04/17/2016 - 09:38

@#3 Woops, my error, everything is okay, thanks!

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:I decided to make a video. 
Sun, 04/17/2016 - 09:42

@#3 Uh, now the item dosn't spawn anything.. I have an item, who spawn the boss, they spawn ghost, after this code what I do, the item dosn't work.. Maybe I do something false, but test the code:

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