Topic category: Help with Minecraft modding (Java Edition)
this is my first time writing Topic in forum,
and i'm using Mcreator having so much wonderful time,
problem is: i'm trying to review in survival map and didn't want to find horse everytime for speed up game review,
so when i do : /summon EntityHorse ~ ~1 ~-3 {Tame:1,Saddle:1,Variant:770} which is perfectly fine,
but when i wanna give him name by /summon EntityHorse ~ ~1 ~-3 {Tame:1,Saddle:1,Variant:770,CustomName:"Rabel"} (by the way, her name is rabel)
when i type this command in minecraft which is fine,
it's always fail in my mcreator, i don't know why i can't execute this command in mod item.
E:\MCreator163\forge\build\sources\java\mod\mcreator\mcreator_rabel.java:155: error: ')' expected
if(entity instanceof EntityPlayer){MinecraftServer minecraftserver = MinecraftServer.getServer();if(minecraftserver!=null)minecraftserver.getCommandManager().executeCommand((EntityPlayer)entity, "summon EntityHorse ~ ~1 ~-3 {Tame:1,Saddle:1,Variant:770,CustomName:"Rabel"}");}
^
E:\MCreator163\forge\build\sources\java\mod\mcreator\mcreator_rabel.java:155: error: not a statement
if(entity instanceof EntityPlayer){MinecraftServer minecraftserver = MinecraftServer.getServer();if(minecraftserver!=null)minecraftserver.getCommandManager().executeCommand((EntityPlayer)entity, "summon EntityHorse ~ ~1 ~-3 {Tame:1,Saddle:1,Variant:770,CustomName:"Rabel"}");}
^
E:\MCreator163\forge\build\sources\java\mod\mcreator\mcreator_rabel.java:155: error: ';' expected
if(entity instanceof EntityPlayer){MinecraftServer minecraftserver = MinecraftServer.getServer();if(minecraftserver!=null)minecraftserver.getCommandManager().executeCommand((EntityPlayer)entity, "summon EntityHorse ~ ~1 ~-3 {Tame:1,Saddle:1,Variant:770,CustomName:"Rabel"}");}
^
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
this is Gradle Log.
plz anybody help me to get through this,
and by the way my english is terrible...
wait,
i was dumb
i thought this topic was "help for modding" is mean shouting HELP
not instead of helping peaple in modding...
how can i delete this stupid useless topic?
First paste here code of the item.
... mmh...
where is mod item code?
and by the way every time i'm trying to use item to summon namedmob result is same.