本文整理汇总了Java中com.mumfrey.liteloader.core.LiteLoader类的典型用法代码示例。如果您正苦于以下问题:Java LiteLoader类的具体用法?Java LiteLoader怎么用?Java LiteLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LiteLoader类属于com.mumfrey.liteloader.core包,在下文中一共展示了LiteLoader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
void init() {
LiteLoader.getInput().registerKeyBinding(SETTINGS_GUI);
this.config = new PonyConfig();
this.ponyManager = new PonyManager(config);
LiteLoader.getInstance().registerExposable(config, null);
IReloadableResourceManager irrm = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
irrm.registerReloadListener(this.ponyManager);
MetadataSerializer ms = Minecraft.getMinecraft().getResourcePackRepository().rprMetadataSerializer;
ms.registerMetadataSectionType(new PonyDataSerialzier(), IPonyData.class);
// This also makes it the default gateway server.
SkinServer.defaultServers.add("legacy:http://minelpskins.voxelmodpack.com;http://minelpskinmanager.voxelmodpack.com");
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:18,代码来源:MineLittlePony.java
示例2: clearSkinCache
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
public static void clearSkinCache() {
LiteLoaderLogger.info("Clearing local player skin cache");
try {
FileUtils.deleteDirectory(new File(LiteLoader.getAssetsDirectory(), "skins"));
TextureManager textures = Minecraft.getMinecraft().getTextureManager();
INSTANCE.skinCache.values().stream()
.flatMap(m -> m.values().stream())
.forEach(textures::deleteTexture);
INSTANCE.skinCache.clear();
INSTANCE.skins.invalidateAll();
} catch (IOException var1) {
var1.printStackTrace();
}
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:17,代码来源:HDSkinManager.java
示例3: init
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void init(File configPath) {
// register config
LiteLoader.getInstance().registerExposable(this, null);
// try it initialize voxelmenu button
try {
Class<?> ex = Class.forName("com.thevoxelbox.voxelmenu.GuiMainMenuVoxelBox");
Method mRegisterCustomScreen = ex.getDeclaredMethod("registerCustomScreen", Class.class, String.class);
mRegisterCustomScreen.invoke(null, GuiSkins.class, "HD Skins Manager");
} catch (ClassNotFoundException var4) {
// voxelmenu's not here, man
} catch (Exception var5) {
var5.printStackTrace();
}
IReloadableResourceManager irrm = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
irrm.registerReloadListener(HDSkinManager.INSTANCE);
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:21,代码来源:LiteModHDSkinsMod.java
示例4: onInitCompleted
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void onInitCompleted(Minecraft minecraft, LiteLoader loader) {
expTracker = new ExperienceTracker();
cdTracker = new CooldownTracker();
manaBar = new ManaBar();
partyFrame = new PartyFrame(manaBar);
boostTracker = new BoostTracker();
// Render renderer = new HeroPlayerRenderer();
// ModUtilities.addRenderer(EntityPlayer.class, renderer);
Minimap.initColors();
minimap = new Minimap(this);
guiBind = new KeyBinding("GuiBind", Keyboard.KEY_U, "heromod.settings");
mapMenu = new KeyBinding("Map Menu", Keyboard.KEY_M, "heromod.settings");
mapZoom = new KeyBinding("Map Zoom", Keyboard.KEY_Z, "heromod.settings");
mapLargeToggle = new KeyBinding("Toggle Large Map", Keyboard.KEY_X, "heromod.settings");
mapCreateWaypoint = new KeyBinding("Create Waypoint", Keyboard.KEY_C, "heromod.settings");
registerKeys(guiBind, mapMenu, mapZoom, mapLargeToggle, mapCreateWaypoint);
//Player list crap
//NetHandlerPlayClient#func_175106_d()
//List of NetworkPlayerInfo
//NetworkPlayerInfo#func_178854_k().getFormattedText()
}
开发者ID:unknownloner,项目名称:HeroMod,代码行数:26,代码来源:LiteModHeroMod.java
示例5: init
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
public void init() {
// Set global settings
settings = new TabbySettings();
LiteLoader.getInstance().registerExposable(settings, null);
spellcheck = new Spellcheck(getDataFolder());
// Keeps the current language updated whenever it is changed.
IReloadableResourceManager irrm = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
irrm.registerReloadListener(spellcheck);
bus.register(new ChatAddonAntiSpam());
bus.register(new FilterAddon());
bus.register(new ChatLogging(new File("logs/chat")));
}
开发者ID:killjoy1221,项目名称:TabbyChat-2,代码行数:18,代码来源:TabbyChat.java
示例6: init
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void init(File configPath) {
LiteLoader.getInput().registerKeyBinding(mKey);
prevMessage = new String();
// Create folder
String pathToFolder = "../mod_data_ChemicalStudios";
File folder = new File(pathToFolder);
folder.mkdirs();
// Create text file
String pathToTxt = "/muteList.txt";
File muteTxt = new File(pathToFolder + pathToTxt);
try {
muteTxt.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
开发者ID:dylanrainwater,项目名称:Taciturn,代码行数:22,代码来源:LiteModSpam.java
示例7: loadTexture
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
private void loadTexture(GameProfile profile, final Type type, final SkinAvailableCallback callback) {
if (profile.getId() != null) {
Map<Type, MinecraftProfileTexture> data = getProfileData(profile);
final MinecraftProfileTexture texture = data.get(type);
String skinDir = type.toString().toLowerCase() + "s/";
final ResourceLocation skin = new ResourceLocation("hdskins", skinDir + texture.getHash());
File file2 = new File(LiteLoader.getAssetsDirectory(), "hd/" + skinDir + texture.getHash().substring(0, 2) + "/" + texture.getHash());
final IImageBuffer imagebufferdownload = type == Type.SKIN ? new ImageBufferDownloadHD() : null;
ITextureObject texObject = new ThreadDownloadImageETag(file2, texture.getUrl(),
DefaultPlayerSkin.getDefaultSkinLegacy(),
new IImageBuffer() {
@Nonnull
@Override
public BufferedImage parseUserSkin(@Nonnull BufferedImage image) {
BufferedImage image1 = image;
if (imagebufferdownload != null) {
image1 = imagebufferdownload.parseUserSkin(image);
}
return image1 == null ? image : image1;
}
@Override
public void skinAvailable() {
if (imagebufferdownload != null) {
imagebufferdownload.skinAvailable();
}
callback.skinAvailable(type, skin, texture);
}
});
// schedule texture loading on the main thread.
TextureLoader.loadTexture(skin, texObject);
}
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:38,代码来源:HDSkinManager.java
示例8: onInitCompleted
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void onInitCompleted(Minecraft minecraft, LiteLoader loader) {
ModUtilities.addRenderer(EntityPlayerModel.class, new RenderPlayerModel<>(minecraft.getRenderManager()));
// register skin servers.
for (String s : skin_servers) {
try {
HDSkinManager.INSTANCE.addSkinServer(SkinServer.from(s));
} catch (IllegalArgumentException e) {
e.printStackTrace();
}
}
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:14,代码来源:LiteModHDSkinsMod.java
示例9: init
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void init(File configPath) {
instance = this;
this.rd = new Rainblower();
this.konamiCode = new Konami(rd);
this.pbh = new PickBlockHandler();
this.favorites = new Favorites();
LiteLoader.getInstance().registerExposable(this, null);
LiteLoader.getInstance().registerExposable(this.ignored, null);
this.dataFile = new File(configPath, "itemdash.dat");
}
开发者ID:MineLittlePony,项目名称:ItemDash,代码行数:14,代码来源:LiteModItemDash.java
示例10: onInitCompleted
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void onInitCompleted(Minecraft minecraft, LiteLoader loader) {
this.mc = minecraft;
// init later so I catch other mods and their items/blocks
this.readDataFile();
this.itemdash = new ItemDash(ignored.getIgnored(), favorites);
}
开发者ID:MineLittlePony,项目名称:ItemDash,代码行数:8,代码来源:LiteModItemDash.java
示例11: registerKeys
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
private void registerKeys(KeyBinding... binds) {
if(binds != null) {
for(KeyBinding bind : binds) {
LiteLoader.getInput().registerKeyBinding(bind);
}
}
}
开发者ID:unknownloner,项目名称:HeroMod,代码行数:8,代码来源:LiteModHeroMod.java
示例12: init
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void init(File configPath) {
LiteLoader.getInput().registerKeyBinding(keyGui);
if(!location.exists()) saveAlts();
else loadAlts();
}
开发者ID:Its-its,项目名称:AltManager,代码行数:8,代码来源:LiteModAccountManager.java
示例13: fromLiteMod
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
static VersionData fromLiteMod(LiteMod litemod) {
String updateurl = LiteLoader.getInstance().getModMetaData(litemod, "updateUrl", null);
String url = LiteLoader.getInstance().getModMetaData(litemod, "url", null);
String rev = LiteLoader.getInstance().getModMetaData(litemod, "revision", null);
if (updateurl == null || rev == null)
return null;
return new VersionData(litemod.getName(), updateurl, url, Doubles.tryParse(rev));
}
开发者ID:killjoy1221,项目名称:MnM-Utils,代码行数:9,代码来源:VersionData.java
示例14: runUpdateChecks
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
public static void runUpdateChecks(IChatProxy chat, Set<Class<? extends LiteMod>> disabled) {
List<VersionData> list = Lists.newArrayList();
for (LiteMod mod : LiteLoader.getInstance().getLoadedMods()) {
VersionData data = VersionData.fromLiteMod(mod);
if (data != null && !disabled.contains(mod.getClass()))
list.add(data);
}
if (!list.isEmpty()) {
new UpdateChecker(chat, list.toArray(new VersionData[0])).start();
}
}
开发者ID:killjoy1221,项目名称:MnM-Utils,代码行数:13,代码来源:UpdateChecker.java
示例15: regKeys
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
public static void regKeys(KeyBinding[] keyArray) {
for (KeyBinding currentKey : keyArray) {
if (currentKey != null) {
LiteLoader.getInput().registerKeyBinding(currentKey);
}
}
}
开发者ID:uyjulian,项目名称:ControlPack,代码行数:8,代码来源:LiteModControlPack.java
示例16: onInitCompleted
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void onInitCompleted(Minecraft minecraft, LiteLoader loader) {
MnmUtils utils = loader.getMod(LiteModMnmUtils.class).getUtils();
tc.postInit(utils);
if (!this.tc.settings.general.checkUpdates.get()) {
utils.disableUpdateCheck(this.getClass());
}
}
开发者ID:killjoy1221,项目名称:TabbyChat-2,代码行数:9,代码来源:LiteModTabbyChat.java
示例17: onGuiClosed
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void onGuiClosed() {
super.onGuiClosed();
for (SettingPanel<?> settingPanel : panels) {
SettingsFile config = settingPanel.getSettings();
LiteLoader.getInstance().writeConfig(config);
}
((ChatManager) TabbyChat.getInstance().getChat()).getChatBox().getChatArea().markDirty();
}
开发者ID:killjoy1221,项目名称:TabbyChat-2,代码行数:10,代码来源:GuiSettingsScreen.java
示例18: setLocation
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void setLocation(ILocation location) {
super.setLocation(location);
// save bounds
TabbySettings sett = TabbyChat.getInstance().settings;
sett.advanced.chatX.set(location.getXPos());
sett.advanced.chatY.set(location.getYPos());
sett.advanced.chatW.set(location.getWidth());
sett.advanced.chatH.set(location.getHeight());
LiteLoader.getInstance().writeConfig(sett);
}
开发者ID:killjoy1221,项目名称:TabbyChat-2,代码行数:12,代码来源:ChatBox.java
示例19: UyjuliansXrayModMain
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
private UyjuliansXrayModMain() {
if (currentModInstance == null) {
currentModInstance = this;
minecraftInstance = Minecraft.getMinecraft();
XrayModConfiguration.init(minecraftInstance.mcDataDir.getPath());
loadBlockList(currentBlocklistName);
// Keybinding setup
UyjuliansXrayModMain.keyBinds.add(new KeyBinding("Toggle X-ray", Keyboard.KEY_X, "Uyjulian's X-ray Mod"));
UyjuliansXrayModMain.keyBinds.add(new KeyBinding("Toggle Cave Finder", Keyboard.KEY_V, "Uyjulian's X-ray Mod"));
UyjuliansXrayModMain.keyBinds.add(new KeyBinding("Toggle Special Mode 1", Keyboard.KEY_C, "Uyjulian's X-ray Mod"));
for (KeyBinding currentKey : UyjuliansXrayModMain.keyBinds) {
LiteLoader.getInput().registerKeyBinding(currentKey);
}
// Update notifier setup
boolean checkUpdate = true;
String updatenotify = XrayModConfiguration.getProperty("updatenotify");
if (updatenotify != null) {
if (updatenotify.equals("false")) {
checkUpdate = false;
}
}
if (checkUpdate) {
startUpdateChecker();
}
}
else {
printLineInLog("There seems to be something odd going on...");
}
}
开发者ID:uyjulian,项目名称:MinecraftX-RAY,代码行数:31,代码来源:UyjuliansXrayModMain.java
示例20: onGuiClosed
import com.mumfrey.liteloader.core.LiteLoader; //导入依赖的package包/类
@Override
public void onGuiClosed() {
LiteLoader.getInstance().writeConfig(config);
MineLittlePony.getInstance().initializeMobRenderers(mc.getRenderManager());
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:6,代码来源:PonySettingPanel.java
注:本文中的com.mumfrey.liteloader.core.LiteLoader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论