Пожалуйста, авторизуйтесь для просмотра ссылки.
1.Создаём класс
Java:
package im.expensive.functions.impl.misc;
import com.google.common.eventbus.Subscribe;
import im.expensive.events.EventDisplay;
import im.expensive.functions.api.Category;
import im.expensive.functions.api.Function;
import im.expensive.functions.api.FunctionRegister;
import im.expensive.functions.settings.Setting;
import im.expensive.functions.settings.impl.ModeSetting;
@FunctionRegister(
name = "Тян",
type = Category.Render
)
public class Tyan extends Function {
public final ModeSetting type33 = new ModeSetting("Выбор", "Первая", new String[]{"Первая", "Вторая", "Третья"});
public static Tyan tyan;
public boolean state;
public Tyan() {
this.toggle();
this.addSettings(new Setting[]{this.type33});
}
@Subscribe
public void onRender(EventDisplay e) {
}
}
2.Заходим в DropDown и вставляем это в 129-133 строку
Java:
Tyan tyan = functionRegistry.getTyan();
boolean tyanState = tyan.isState();
ResourceLocation firstImage = new ResourceLocation("expensive/images/tyan1.png");
ResourceLocation secondImage = new ResourceLocation("expensive/images/tyan2.png");
ResourceLocation thirdImage = new ResourceLocation("expensive/images/tyan3.png");
Это в 134-143
Java:
if (tyanState) {
ModeSetting type33 = tyan.type33;
if (((String)type33.get()).equals("Первая")) {
DisplayUtils.drawImage(firstImage, x + 700.0F, (float)windowHeight / 2.0F - 60.0F, 400.0F, 400.0F, -1);
} else if (((String)type33.get()).equals("Вторая")) {
DisplayUtils.drawImage(secondImage, x + 700.0F, (float)windowHeight / 2.0F - 60.0F, 400.0F, 400.0F, -1);
} else if (((String)type33.get()).equals("Третья")) {
DisplayUtils.drawImage(thirdImage, x + 760.0F, (float)windowHeight / 2.0F - 60.0F, 400.0F, 400.0F, -1);
}
}
3.Скидываем в assets/expensive/images свои картинки и радуемся