Started by
Dumble_Berries
on
Topic category: Advanced modding
Does anybody know Mcreators main mod class?
also can they turn this into a if then statement?
if (helmet.getItem() == yourmodsmainclass.thehelmetyouwant&& plate.getItem() ==yourmodsmainclass.thechestplateyouwant&& legs.getItem() == yourmodsmainclass.thelegsyouwant&& boots.getItem() ==yourmodsmainclass.thebootsyouwant)
{
player.fallDistance = 0.0F;
player.capabilities.allowFlying = true;
}
}
}
Edited by Dumble_Berries on Fri, 10/28/2016 - 22:51
There is a new "Potion effect" which allows elevation (flying). You could make an event, "When armor in use" give potion effect. It would make it easier.
You practically do not need do anything with , because every element classes are in same package and item/block/mob... variables are saved directly in these classes. In the main class are saved only instances of these classes. So if you want get custom armor part (that have name for example "SteelArmor"), you will use: mod.mcreator.mcreator_steelArmor.helmet
What if i want a chest plate?
would it be .plate instead of .helmet?
It will be simply the name of variable from your amor code. Maybe something like .chestplate