Change gamemode action not working

2 posts / 0 new
Last post
Lenare's picture
Offline
Last seen: 1 year 1 week ago
Joined: 07/08/2015 - 04:01
Gems: 0
Change gamemode action not working

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.

 



Lenare's picture
Offline
Last seen: 1 year 1 week ago
Joined: 07/08/2015 - 04:01
Gems: 0
Well I have a little java

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?