本文整理汇总了Java中net.minecraftforge.fml.client.config.GuiConfigEntries类的典型用法代码示例。如果您正苦于以下问题:Java GuiConfigEntries类的具体用法?Java GuiConfigEntries怎么用?Java GuiConfigEntries使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GuiConfigEntries类属于net.minecraftforge.fml.client.config包,在下文中一共展示了GuiConfigEntries类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TextNumberSliderEntry
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public TextNumberSliderEntry(GuiConfig owningScreen,
GuiConfigEntries owningEntryList, IConfigElement configElement)
{
super(owningScreen, owningEntryList, configElement, new GuiTextSlider(0, owningEntryList.controlX, 0, owningEntryList.controlWidth, 18,
"", "", Double.valueOf(configElement.getMinValue().toString()), Double.valueOf(configElement.getMaxValue().toString()),
Double.valueOf(configElement.get().toString()), configElement.getType() == ConfigGuiType.DOUBLE, true));
((GuiTextSlider)this.btnValue).parentEntry = this;
if (configElement.getType() == ConfigGuiType.INTEGER)
{
this.beforeValue = Integer.valueOf(configElement.get().toString());
}
else
{
this.beforeValue = Double.valueOf(configElement.get().toString());
}
}
示例2: ConfigFieldEntry
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public ConfigFieldEntry(String name, String langKey, Class<?> clazz, Object instance, Map<Object, Object> parent) {
super(name, null, getType(clazz), langKey);
this.instance = instance;
this.parent = parent;
if(Map.class.isAssignableFrom(clazz)) {
this.isProperty = false;
ImmutableList.Builder<IConfigElement> builder = ImmutableList.builder();
Map<Object, Object> map = ((Map<Object, Object>) instance);
map.forEach((o, o2) -> builder.add(new ConfigFieldEntry(o.toString(), o.toString() + ".lang", o2.getClass(), o2, map)));
this.childElements = builder.build();
this.configEntryClass = GuiConfigEntries.CategoryEntry.class;
}
else {
this.defaultValue = instance.toString();
this.setToDefault();
}
}
示例3: preInit
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
@Override
public void preInit(FMLPreInitializationEvent evt) {
MCDoom.instance.getGoreProperty().setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);
MCDoom.instance.getMaxGoreParticles().setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);
MinecraftForge.EVENT_BUS.register(screenEventHandler);
MinecraftForge.EVENT_BUS.register(soundEventsHandler);
registerItems();
RenderingRegistry.registerEntityRenderingHandler(PlasmaBallEntity.class, new IRenderFactory<PlasmaBallEntity>() {
@Override
public Render<? super PlasmaBallEntity> createRenderFor(RenderManager manager) {
return new RenderPlasmaBall(manager);
}
});
loadWeaponRenderers();
}
示例4: BooleanEntry
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public BooleanEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
super(owningScreen, owningEntryList, configElement);
this.beforeValue = Boolean.valueOf(configElement.get().toString());
this.currentValue = this.beforeValue;
this.btnValue.enabled = this.enabled();
this.updateValueButtonText();
}
示例5: BooleanEntry
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public BooleanEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
super(owningScreen, owningEntryList, configElement);
this.beforeValue = Boolean.valueOf(configElement.get().toString());
this.currentValue = beforeValue;
this.btnValue.enabled = enabled();
updateValueButtonText();
}
示例6: UncraftingMethodCycleEntry
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public UncraftingMethodCycleEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
super(owningScreen, owningEntryList, configElement);
beforeIndex = Integer.valueOf((String)configElement.get());
defaultIndex = Integer.valueOf((String)configElement.getDefault());
currentIndex = beforeIndex;
this.btnValue.enabled = enabled();
updateValueButtonText();
}
示例7: initGui
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
@Override
public void initGui()
{
if (this.entryList == null || this.needsRefresh)
{
this.entryList = new GuiConfigEntries(this, mc);
this.needsRefresh = false;
this.ReplaceIntegerEntries();
}
super.initGui();
}
示例8: ModBooleanEntry
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public ModBooleanEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
this.beforeValue = Boolean.valueOf(configElement.get().toString());
this.currentValue = this.beforeValue;
this.btnValue.enabled = this.enabled();
this.updateValueButtonText();
}
示例9: onDrawScreen
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onDrawScreen(GuiScreenEvent.DrawScreenEvent e) {
if (ConfigHandler.showButtons && e.getGui() != null && e.getGui() instanceof GuiContainer) {
int mouseY = JEIButtons.proxy.getMouseY();
int mouseX = JEIButtons.proxy.getMouseX();
if (JEIButtons.isAnyButtonHovered) {
List<String> tip = Localization.getTooltip(JEIButtons.hoveredButton);
if (tip != null) {
GuiUtils.drawHoveringText(tip, mouseX, mouseY < 17 ? 17 : mouseY, ClientProxy.mc.displayWidth, ClientProxy.mc.displayHeight, -1, ClientProxy.mc.fontRenderer);
RenderHelper.disableStandardItemLighting();
}
}
if (ConfigHandler.enableSubsets)
ModSubsetButtonHandler.drawSubsetList(mouseX, mouseY);
}
if (e.getGui() instanceof GuiConfig) {
GuiConfigEntries eL = ((GuiConfig) e.getGui()).entryList;
GuiConfig cfg = (GuiConfig) e.getGui();
if (cfg.titleLine2 != null && cfg.titleLine2.equals(ConfigHandler.CATEGORY_POSITION)) {
int y = getInt(1, eL);
int x = getInt(0, eL);
GuiUtils.drawGradientRect(10, x, y, x + 75, y + 75, 0x77888888, 0x77888888);
ClientProxy.mc.fontRenderer.drawString("[Buttons]", x + 14, y + 10, 0xFFFFFF);
}
}
}
示例10: getConfigElements
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
private static List<IConfigElement> getConfigElements() {
List<IConfigElement> list = new ArrayList<IConfigElement>();
list.add(new DummyConfigElement.DummyCategoryElement(GGRConfig.CATEGORY_GAMERULES, "ggr.configgui.rules",
(new ConfigElement(GlobalGR.getConfig().getCategory(GGRConfig.CATEGORY_GAMERULES))).getChildElements(), GuiConfigEntries.CategoryEntry.class));
list.add(new DummyConfigElement.DummyCategoryElement(GGRConfig.CATEGORY_MISC, "ggr.configgui.misc",
(new ConfigElement(GlobalGR.getConfig().getCategory(GGRConfig.CATEGORY_MISC))).getChildElements(), GuiConfigEntries.CategoryEntry.class));
return list;
}
示例11: TranslatedCycleValueEntry
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public TranslatedCycleValueEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList,
IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
beforeIndex = getIndex(configElement.get().toString());
defaultIndex = getIndex(configElement.getDefault().toString());
currentIndex = beforeIndex;
this.btnValue.enabled = enabled();
updateValueButtonText();
}
示例12: ColorEntry
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public ColorEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
beforeValue = configElement.get().toString();
this.textFieldValue = new GuiTextField(10, this.mc.fontRendererObj, this.owningEntryList.controlX + 1,
0, this.owningEntryList.controlWidth - 38, 16);
this.textFieldValue.setText(configElement.get().toString());
this.allowAlpha = configElement.getDefault().toString().length() == 8;
}
示例13: ConfigGui
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public ConfigGui(GuiScreen parent)
{
super(parent, new ArrayList<IConfigElement>(), "cubicvillager", false, false, null);
ModConfig config = CubicVillager.me.getConfig();
ConfigCategory category = config.getCategory(Configuration.CATEGORY_GENERAL);
IConfigElement element = new ConfigElement(category);
this.configElements.addAll(element.getChildElements());
this.entryList = new GuiConfigEntries(this, this.mc);
this.title = GuiConfig.getAbridgedConfigPath(config.toString());
}
示例14: getConfigEntryClass
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
@Override
public Class<? extends GuiConfigEntries.IConfigEntry> getConfigEntryClass()
{
return null;
}
示例15: CategoryEntryBlocks
import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public CategoryEntryBlocks(GuiConfig owningScreen, GuiConfigEntries owningEntryList,
IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
}