![](https://forums.minecraftforge.net/uploads/set_resources_2/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Felina-Lain
-
Posts
6 -
Joined
-
Last visited
Posts posted by Felina-Lain
-
-
14 minutes ago, crackedEgg said:
Perhaps you're looking for MathHelper.clamp(int num, int min, int max), there are float and double versions too.
Well I thought so too, but I only got one argument to feed in there, unless I got to somehow switch the order of the clamp and getInt function around but when I tried, I got errors anyway
-
Hello, me again, very sorry but I have an error that stop me from compiling (but apparently during test-play it doesn't seems to break anything *shrug*)
final int pitchMin = MathHelper.clampAngle(getInt(argumentMap, ARGUMENT_ROTX_MIN, 0));
"The method clampAngle(int) is undefined for the type MathHelper"
I'm using forge-1.12.2-14.23.2.2611 mdk. Did the clampAngle function change name between this version and a previous one? I tried looking into clamp, or angle, but nothing that take the parameters I had, so I'm a bit confused.
(I'm really just beginning at modding, though I have background on java, and so far I'm learning by updating/changing open source mods for myself, and I managed to do so by guessing new names from old names and parameters but this one has me stumped, so sorry if this is another noob question)
thanks!
-
1 hour ago, Choonster said:
Use GameRules#getString, GameRules#getBoolean or GameRules#getInt to get a String, boolean or int value respectively from a GameRrule.
You should get the GameRules instance from the player's World, not the World for dimension 0 (which is what MinecraftServer#getEntityWorld returns).
Thank you very much, that got me exactly what I wanted! ^^
-
Hello
Sorry for this obviously noobish question, but I managed to figure out how to modify the value of a gamerule
player.getServer().getEntityWorld().getGameRules().setOrCreateGameRule("gamerule", "value");
But not how to read the value as it is already set. I was expecting something like "GetGamerule" or something, but I can't find it (or I did but passed it over because it didn't look like what I expected and I had no clue)
So if someone could please tell me.
thanks a lot!
-
Asking because after looking around a while, i couldn't find anything
Forge seems to have a "disable" button, when you open the mod list in the game menu. But as far as I can see, clicking it does nothing?
Is there a way to make it work? I'd love to be able to enable/disable my mods as I please but so far I can't find anything to do it... (aside from renaming or moving the .jar of my mods which can get tedious)
(and yes, I know the common answer is profile, or multiMc or whatever, but I don't want to use those because using those means having duplicates of your saved worlds and resources packs everywhere and it's just crappy-designed. Forge way to handle mods is actually what everyone should do to handle profiles, but anyway...)
0
Did MathHelper.clampAngle change?
in Modder Support
Posted
wrapDegrees worked just fine![:) :)](https://forums.minecraftforge.net/uploads/emoticons/smile.png)
thank you both for the answers!