Java Code Examples for net.minecraft.entity.EnumCreatureType#monster()
The following examples show how to use
net.minecraft.entity.EnumCreatureType#monster() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CustomSpawner.java From mocreaturesdev with GNU General Public License v3.0 | 5 votes |
private int getEnumIndex(EnumCreatureType enumcreaturetype) { if (enumcreaturetype == EnumCreatureType.monster) { return 0; } if (enumcreaturetype == EnumCreatureType.creature) { return 1; } if (enumcreaturetype == EnumCreatureType.waterCreature) { return 3; } if (enumcreaturetype == EnumCreatureType.ambient) { return 2; } return 0; }
Example 2
Source File: CustomSpawner.java From mocreaturesdev with GNU General Public License v3.0 | 5 votes |
private List[] getCustomSpawnableList(EnumCreatureType enumcreaturetype) { if (enumcreaturetype == EnumCreatureType.monster) { return customMobSpawnList; } if (enumcreaturetype == EnumCreatureType.creature) { return customCreatureSpawnList; } if (enumcreaturetype == EnumCreatureType.waterCreature) { return customAquaticSpawnList; } if (enumcreaturetype == EnumCreatureType.ambient) { return customAmbientSpawnList; } return null; }
Example 3
Source File: CustomSpawner.java From mocreaturesdev with GNU General Public License v3.0 | 5 votes |
private int getMax(EnumCreatureType enumcreaturetype) { if (enumcreaturetype == EnumCreatureType.monster) { return getMaxMobs(); } if (enumcreaturetype == EnumCreatureType.creature) { return getMaxAnimals(); } if (enumcreaturetype == EnumCreatureType.waterCreature) { return getMaxAquatic(); } if (enumcreaturetype == EnumCreatureType.ambient) { return getMaxAmbient(); } return 30; }
Example 4
Source File: MoCClientProxy.java From mocreaturesdev with GNU General Public License v3.0 | 4 votes |
public void showEntitySettings(String entityName) { MoCEntityData entityData = entityMap.get(entityName); if (entityData != null) { if (entityData.getEntityWindow() == null) { WidgetSinglecolumn widgetEntitySettingColumn = new WidgetSinglecolumn(new Widget[0]); String category = ""; if (entityData.getType() == EnumCreatureType.creature) category = CATEGORY_MOC_CREATURE_FREQUENCIES; else if (entityData.getType() == EnumCreatureType.monster) category = CATEGORY_MOC_MONSTER_FREQUENCIES; else if (entityData.getType() == EnumCreatureType.waterCreature) category = CATEGORY_MOC_WATER_CREATURE_FREQUENCIES; else if (entityData.getType() == EnumCreatureType.ambient) category = CATEGORY_MOC_AMBIENT_FREQUENCIES; MoCSettingInt settingFrequency = new MoCSettingInt(category, entityName + " Frequency", entityData.frequency, 0, 1, 20); guiapiSettings.append(settingFrequency); widgetEntitySettingColumn.add(new WidgetInt(settingFrequency, entityName + " Frequency")); MoCSettingInt settingMinGroup = new MoCSettingInt(category, entityName + " Min", entityData.minGroup, 1, 1, 20); guiapiSettings.append(settingMinGroup); widgetEntitySettingColumn.add(new WidgetInt(settingMinGroup, entityName + " Min")); MoCSettingInt settingMaxGroup = new MoCSettingInt(category, entityName + " Max", entityData.maxGroup, 1, 1, 20); guiapiSettings.append(settingMaxGroup); widgetEntitySettingColumn.add(new WidgetInt(settingMaxGroup, entityName + " Max")); if (entityData.getBiomeGroups() != null) { entityBiomeList = guiapiSettings.addSetting(widgetEntitySettingColumn, entityName + " Biome Groups", entityName + " Biome Groups", entityData.getBiomeGroups(), CATEGORY_ENTITY_BIOME_SETTINGS); } ((WidgetList) entityBiomeList.displayWidget).listBox.setTheme("/listbox"); widgetEntitySettingColumn.heightOverrideExceptions.put(entityBiomeList.displayWidget, 140); WidgetSingleRow listBoxRow = new WidgetSingleRow(110, 20); MoCSettingText textSetting = new MoCSettingText("", "enter biome"); listBoxRow.add(GuiApiHelper.makeButton("Add Group", new ModAction(this,"addGroupListboxOption", MoCSettingList.class, MoCSettingText.class).setDefaultArguments(entityBiomeList, textSetting), true)); guiapiSettings.append(textSetting); listBoxRow.add(new WidgetText(textSetting, "")); //listBoxRow.add(GuiApiHelper.makeButton("Display Selected", new ModAction(this, "showSelectedListboxOption", MoCSettingList.class).setDefaultArguments(entityBiomeList), true)); listBoxRow.add(GuiApiHelper.makeButton("Remove Selected", new ModAction(this, "removeSelectedListboxOption", MoCSettingList.class).setDefaultArguments(entityBiomeList), true)); widgetEntitySettingColumn.add(listBoxRow); widgetEntitySettingColumn.widthOverrideExceptions.put(listBoxRow, 0); entityData.setEntityWindow(new WidgetSimplewindow(widgetEntitySettingColumn, entityName)); } this.currentSelectedEntity = entityData; GuiModScreen.show(entityData.getEntityWindow()); } }