mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 00:04:23 +01:00
Recombine sourcesets. Eh.
This commit is contained in:
parent
f1b1e412dc
commit
078fae82f3
225 changed files with 0 additions and 243 deletions
22
build.gradle
22
build.gradle
|
@ -71,15 +71,6 @@ dependencies {
|
|||
include "com.github.MineLittlePony:HDSkins:${hd_skins_version}"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {}
|
||||
client {
|
||||
// Client-only code
|
||||
compileClasspath += main.compileClasspath
|
||||
compileClasspath += main.output
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
|
@ -105,8 +96,6 @@ task sourcesJar(type: Jar, dependsOn: classes) {
|
|||
}
|
||||
|
||||
jar {
|
||||
from sourceSets.main.output
|
||||
from sourceSets.client.output
|
||||
from "LICENSE"
|
||||
}
|
||||
|
||||
|
@ -127,14 +116,3 @@ task copyBGPones(type: Copy) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Creates HorseLib
|
||||
// A common library for mods to load MineLP features on the server without
|
||||
// any client components
|
||||
task horseLib(type: Jar) {
|
||||
// TODO: Add KirinUI as a dependency.
|
||||
from sourceSets.main.output
|
||||
|
||||
baseName = "HorseLib"
|
||||
}
|
||||
|
|
|
@ -1,101 +0,0 @@
|
|||
package com.minelittlepony.client;
|
||||
|
||||
import com.minelittlepony.MineLittlePony;
|
||||
import com.minelittlepony.client.gui.GuiPonySettings;
|
||||
import com.minelittlepony.client.settings.ClientPonyConfig;
|
||||
import com.minelittlepony.common.client.gui.GuiLiteHost;
|
||||
import com.mumfrey.liteloader.Configurable;
|
||||
import com.mumfrey.liteloader.InitCompleteListener;
|
||||
import com.mumfrey.liteloader.Tickable;
|
||||
import com.mumfrey.liteloader.client.overlays.IMinecraft;
|
||||
import com.mumfrey.liteloader.core.LiteLoader;
|
||||
import com.mumfrey.liteloader.modconfig.ConfigPanel;
|
||||
import com.mumfrey.liteloader.modconfig.ConfigStrategy;
|
||||
import com.mumfrey.liteloader.modconfig.Exposable;
|
||||
import com.mumfrey.liteloader.modconfig.ExposableOptions;
|
||||
import com.mumfrey.liteloader.util.ModUtilities;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Timer;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class LiteModMineLittlePony implements IModUtilities, InitCompleteListener, Tickable, Configurable {
|
||||
|
||||
private final MineLPClient mlp = new MineLPClient(this);
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return MineLittlePony.MOD_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return MineLittlePony.MOD_VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upgradeSettings(String version, File configPath, File oldConfigPath) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(File configPath) {
|
||||
mlp.init(new Config());
|
||||
|
||||
LiteLoader.getInput().registerKeyBinding(MineLPClient.SETTINGS_GUI);
|
||||
LiteLoader.getInstance().registerExposable(config, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitCompleted(Minecraft minecraft, LiteLoader loader) {
|
||||
mlp.postInit(minecraft);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick(Minecraft minecraft, float partialTicks, boolean inGame, boolean clock) {
|
||||
mlp.onTick(minecraft, inGame);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends ConfigPanel> getConfigPanelClass() {
|
||||
return Panel.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends TileEntity> void addRenderer(Class<T> type, TileEntityRenderer<T> renderer) {
|
||||
ModUtilities.addRenderer(type, renderer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends Entity> void addRenderer(Class<T> type, Render<T> renderer) {
|
||||
ModUtilities.addRenderer(type, renderer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasFml() {
|
||||
return ModUtilities.fmlIsPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRenderPartialTicks() {
|
||||
return ((IMinecraft)Minecraft.getInstance()).getTimer().renderPartialTicks;
|
||||
}
|
||||
|
||||
public static class Panel extends GuiLiteHost {
|
||||
public Panel() {
|
||||
super(new GuiPonySettings());
|
||||
}
|
||||
}
|
||||
|
||||
@ExposableOptions(filename = "minelittlepony", strategy = ConfigStrategy.Unversioned)
|
||||
class Config extends ClientPonyConfig implements Exposable {
|
||||
@Override
|
||||
public void save() {
|
||||
LiteLoader.getInstance().writeConfig(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
package com.minelittlepony.common.client.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.mumfrey.liteloader.gl.GLClippingPlanes;
|
||||
import com.mumfrey.liteloader.modconfig.ConfigPanel;
|
||||
import com.mumfrey.liteloader.modconfig.ConfigPanelHost;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class GuiLiteHost extends GuiHost implements ConfigPanel {
|
||||
|
||||
private boolean isInPanel = false;
|
||||
|
||||
private int contentHeight;
|
||||
|
||||
public GuiLiteHost(IGuiGuest guest) {
|
||||
super(guest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPanelTitle() {
|
||||
return format(getTitle());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getContentHeight() {
|
||||
return contentHeight + 40;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends GuiButton> T addButton(T button) {
|
||||
if (button.y > contentHeight) {
|
||||
contentHeight = button.y;
|
||||
}
|
||||
return super.addButton(button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPanelShown(ConfigPanelHost host) {
|
||||
mc = Minecraft.getMinecraft();
|
||||
width = host.getWidth();
|
||||
buttonList.clear();
|
||||
initGui();
|
||||
isInPanel = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPanelResize(ConfigPanelHost host) {
|
||||
width = host.getWidth();
|
||||
buttonList.clear();
|
||||
initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPanelHidden() {
|
||||
isInPanel = false;
|
||||
onGuiClosed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick(ConfigPanelHost host) {
|
||||
updateScreen();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPanel(ConfigPanelHost host, int mouseX, int mouseY, float partialTicks) {
|
||||
drawContents(mouseX, mouseY, partialTicks);
|
||||
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GLClippingPlanes.glDisableClipping();
|
||||
|
||||
postDrawContents(mouseX, mouseY, partialTicks);
|
||||
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mousePressed(ConfigPanelHost host, int mouseX, int mouseY, int mouseButton) {
|
||||
try {
|
||||
mouseClicked(mouseX, mouseY, mouseButton);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(ConfigPanelHost host, int mouseX, int mouseY, int mouseButton) {
|
||||
mouseReleased(mouseX, mouseY, mouseButton);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseMoved(ConfigPanelHost host, int mouseX, int mouseY) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyPressed(ConfigPanelHost host, char keyChar, int keyCode) {
|
||||
try {
|
||||
keyTyped(keyChar, keyCode);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawWorldBackground(int tint) {
|
||||
if (!isInPanel) {
|
||||
super.drawWorldBackground(tint);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mustScroll() {
|
||||
return isInPanel;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue