Topic category: User side tutorials
Well, if you are here, that means you have installed Animations+ incorrectly and you are getting an error. Don't worry, you're not to blame.
Usually, plugins are installed by clicking the load plugin option in the Manage Plugins section of Mcreator preferences.
In our case, we don't want to load the plugin there.
If you have already installed the plugin, make sure to delete it, as we will be placing it in a different location.
Now that you have deleted the incorrectly installed plugin, what's next?
Well, you will need to head over to your desktop, where the MCreator.exe shortcut is located. Once you've found it, right click it, and select Open file location as show below:
Now, you need to make sure that the exe you have opened leads to the correct version of MCreator. If it does not, you will need to find the folder for the exe of MCreator 2022.1+
You should now be seeing another plugin folder. This is the correct location the plugin requires to work. Place the plugin there:
Great, you should now have solved the error! Enjoy your new animations :)
I am still getting issues. I deleted the installed plugin and put it in the plugins folder in my mcreator.exe directory but it is still producing errors.
Is it the directory that has the version you use? Can you also share the error?
Yes the directory is same version(2022.2).
This is the error:
--------------------------------------------------------
C:\Users\45435354\MCreatorWorkspaces\modeltestworkspace\src\main\java\net\mcreator\modeltestworkspace\client\model\Modelbird.java:93: error: cannot find symbol
this.rightwing.xRot = (EndMath.sin(ageInTicks * 0.6F) * 0.6F);
^
symbol: variable EndMath
location: class Modelbird<T>
where T is a type-variable:
T extends Entity declared in class Modelbird
C:\Users\45435354\MCreatorWorkspaces\modeltestworkspace\src\main\java\net\mcreator\modeltestworkspace\client\model\Modelbird.java:94: error: cannot find symbol
this.leftwing.xRot = (EndMath.sin(ageInTicks * 0.6F + 3) * 0.6F);
^
symbol: variable EndMath
location: class Modelbird<T>
where T is a type-variable:
T extends Entity declared in class Modelbird
2 errors
-----------------------------------------------------------------------------------------------------------------------------------------
This is the directory where I put the plugin [C:\Program Files\Pylo\MCreator\plugins]
Well I have no idea why this happens for you. But there is a manual solution to this.
Open your workspace folder, and inside the folder where you find the first .Java file, make a new file and name it EndMath.txt
Then, male a custom element variable and copy the package that will generate, paste it inside the text file and delete the custom element.
Then paste the code below under the package:
import net.minecraft.util.Mth;
import java.util.Random;
public class EndMath extends Mth {
public static boolean inRange(int value, int min, int max) {
return value >= min && value <= max;
}
public static boolean inRange(float value, float min, float max) {
return value >= min && value <= max;
}
public static boolean inRange(double value, double min, double max) {
return value >= min && value <= max;
}
public static boolean inAverage(int value, int average, int range) {
return value >= average - range && value <= average + range;
}
}
Rename the EndMath.txt to EndMath.java
I mean a custom element in mcreator, not a variable.
Also, you need to name the custom element EndMath too to get the correct package name
Actually, you need to make the file in the same folder that the custom EndMath element you make generates.
The custom element seemed to have fixed it. It's not producing errors when using the animations
Yeah, make sure you actually make the element like I told you by copying the stuff in a text file, not mcreator's custom element, since the exported mod won't load with it.
Alright I'll be sure to do that
Also, just gonna leave this here for future reference:
If you encounter the same issue in 1.16, you will need to do the same method except the code will be this instead:
import net.minecraft.util.math.MathHelper;
import java.util.Random;
public class EndMath extends MathHelper {
public static boolean inRange(int value, int min, int max) {
return value >= min && value <= max;
}
public static boolean inRange(float value, float min, float max) {
return value >= min && value <= max;
}
public static boolean inRange(double value, double min, double max) {
return value >= min && value <= max;
}
public static boolean inAverage(int value, int average, int range) {
return value >= average - range && value <= average + range;
}
}
Not sure why this plugin requires this, but usually plugins should not be installed in the core plugins folder. Just a heads-up
I don't know, but it replaces the generator.yaml in which I add the template for the EndMath element, so that's probably what's causing it.