Change gamemode action not working

Started by Lenare on Wed, 07/08/2015 - 21:36
Last seen on 23:49, 11. Jan 2016
Joined Jul 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Change gamemode action not working
Wed, 07/08/2015 - 21:36

So I have a few events that are supposed to change the player's gamemode but when I try to compile my mod it just spits out this error:


>C:\Pylo\MCreator156\forge\build\sources\java\mod\mcreator\mcreator_iceCreamBlock.java:174: error: cannot find symbol
>if(entity instanceof EntityPlayer)((EntityPlayer)entity).setGameType(EnumGameType.CREATIVE);
>                                                                     ^
>  symbol:   variable EnumGameType
>  location: class BlockIceCreamBlock
 

Its interpreting EnumGameType as a variable!?!?!?! That makes no sense at all.

 

Last seen on 23:49, 11. Jan 2016
Joined Jul 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Well I have a little java
Fri, 07/10/2015 - 01:07

Well I have a little java experience and hunted around on forge forums, I think I need to import 
net.minecraft.world.EnumGameType but when I tried that it wouldn't let it compile, as if the file doesn't exist. Is there some way to download this file I think needs to be imported? Or is that not the problem?