Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
plugins {
id "java"
id "nova.gradle" version "0.2.5"
id "nova.gradle" version "0.2.6"
id "maven-publish"
id "com.jfrog.artifactory" version "3.1.1"
}


apply from: "https://raw.githubusercontent.com/NOVA-Team/NOVA-Gradle/master/shared-scripts/java.gradle"

dependencies {
compile "nova.core:NovaCore:$novaVersion"
testCompile "nova.core:NovaCore:$novaVersion:wrappertests"
compile nova(nova_version)
}

nova {
wrappers {
"17" {
wrapper "nova.core:NOVA-Core-Wrapper-MC1.7:$novaVersion"
wrapper "nova.core:NOVA-Core-Wrapper-MC1.7:$nova_version"
runtime project(":minecraft:1.7")
}

"18" {
wrapper "nova.core:NOVA-Core-Wrapper-MC1.8:$novaVersion"
wrapper "nova.core:NOVA-Core-Wrapper-MC1.8:$nova_version"
runtime project(":minecraft:1.8")
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version = 0.0.1-SNAPSHOT
group = nova.gui
novaVersion = 0.1.0-SNAPSHOT
nova_version = 0.1.0-SNAPSHOT

packaging = jar
info.inceptionYear = 2015
Expand Down
4 changes: 2 additions & 2 deletions minecraft/1.7/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ minecraft {

dependencies {
compile rootProject
compile group: "nova.core", name: "NovaCore", version: property("novaVersion"), changing: true
compile "nova.wrapper.mc1710:NovaWrapper-MC1.7.10:0.1-SNAPSHOT:deobf"
compile group: "nova.core", name: "NOVA-Core", version: property("nova_version"), changing: true
compile "nova.core:NOVA-Core-Wrapper-MC1.7:0.1.0-SNAPSHOT:deobf"
}

processResources {
Expand Down
5 changes: 4 additions & 1 deletion minecraft/1.7/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
group = nova.gui

minecraft.version = 1.7.10
forge.version = 10.13.4.1448-1.7.10
forgeGradleVersion = 1.2-SNAPSHOT

packaging = jar
info.inceptionYear = 2015
info.description = The NOVA-Minecraft Minecraft 1.7.10 wrapper.
info.description = The NOVA-GUI Minecraft 1.7.10 wrapper.
info.organization.name = NOVA
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc18;
package nova.gui.wrapper.mc.forge.v1_7_10;

import nova.gui.nativeimpl.NativeGuiComponent;
import nova.gui.render.Graphics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.util.ResourceLocation;
import nova.wrapper.mc1710.launcher.NovaMinecraft;
import nova.core.wrapper.mc.forge.v17.launcher.NovaMinecraft;
import org.lwjgl.opengl.GL11;

public class GuiUtils {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import cpw.mods.fml.client.config.GuiButtonExt;
import cpw.mods.fml.common.FMLCommonHandler;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.Tessellator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
Expand All @@ -12,6 +12,7 @@
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import nova.core.network.Packet;
import nova.core.wrapper.mc.forge.v17.network.netty.MCNetworkManager;
import nova.gui.Gui;
import nova.gui.GuiComponent;
import nova.gui.GuiEvent.MouseEvent.EnumMouseButton;
Expand All @@ -20,10 +21,9 @@
import nova.gui.render.Canvas;
import nova.gui.render.Graphics;
import nova.gui.render.text.TextMetrics;
import nova.gui.wrapper.mc17.text.MCTextRenderer;
import nova.gui.wrapper.mc.forge.v1_7_10.text.MCTextRenderer;
import nova.internal.core.Game;
import nova.gui.wrapper.mc17.network.PacketGui;
import nova.wrapper.mc1710.network.netty.MCNetworkManager;
import nova.gui.wrapper.mc.forge.v1_7_10.network.PacketGui;
import org.apache.commons.math3.geometry.euclidean.twod.Vector2D;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import nova.gui.GuiComponent;
import nova.gui.Outline;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import nova.gui.AbstractGuiContainer;
import nova.gui.Gui;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import nova.gui.AbstractGuiContainer;
import nova.gui.GuiComponent;
import nova.gui.Outline;
import nova.gui.nativeimpl.NativeContainer;
import nova.gui.render.Canvas;
import nova.gui.render.Graphics;
import nova.gui.wrapper.mc17.MCGui.MCContainer;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGui.MCContainer;

import java.util.ArrayList;
import java.util.List;
Expand Down
21 changes: 13 additions & 8 deletions ...a/nova/gui/wrapper/mc17/MCGuiFactory.java → ...rapper/mc/forge/v1_7_10/MCGuiFactory.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import cpw.mods.fml.common.network.IGuiHandler;
import net.minecraft.client.Minecraft;
Expand All @@ -8,14 +8,15 @@
import net.minecraft.inventory.Container;
import net.minecraft.world.World;
import nova.core.entity.Entity;
import nova.core.wrapper.mc.forge.v17.launcher.NovaMinecraft;
import nova.core.wrapper.mc.forge.v17.wrapper.entity.backward.BWEntity;
import nova.gui.Gui;
import nova.gui.GuiException;
import nova.gui.factory.GuiFactory;
import nova.gui.factory.GuiManager;
import nova.gui.wrapper.mc17.MCGui.MCContainer;
import nova.gui.wrapper.mc17.MCGui.MCGuiScreen;
import nova.wrapper.mc1710.launcher.NovaMinecraft;
import nova.wrapper.mc1710.wrapper.entity.BWEntity;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGui.MCContainer;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGui.MCGuiScreen;
import nova.internal.core.Game;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;

import java.util.ArrayList;
Expand All @@ -27,6 +28,10 @@ public class MCGuiFactory extends GuiManager {
private static Optional<Gui> guiToOpen = Optional.empty();
private static List<GuiFactory> idMappedFactories = new ArrayList<>();

public MCGuiFactory() {
super(Game.events());
}

@Override
public GuiFactory register(GuiFactory factory) {
idMappedFactories.add(factory);
Expand All @@ -35,8 +40,8 @@ public GuiFactory register(GuiFactory factory) {

@Override
public void showGui(String identifier, Entity entity, Vector3D pos) {
GuiFactory factory = getFactory(identifier).orElseThrow(() -> new GuiException(String.format("No GUI called %s registered!", identifier)));
Gui gui = factory.makeGUI();
GuiFactory factory = registry.get(identifier).orElseThrow(() -> new GuiException(String.format("No GUI called %s registered!", identifier)));
Gui gui = factory.build();
showGui(gui, entity, pos, idMappedFactories.indexOf(factory));
}

Expand Down Expand Up @@ -104,7 +109,7 @@ public GuiContainer getClientGuiElement(int id, EntityPlayer player, World world
guiToOpen = Optional.empty();
} else {
// Try to get the client side GUI from the id mapping
gui = idMappedFactories.get(id).makeGUI();
gui = idMappedFactories.get(id).build();
}
if (gui == null) {
throw new GuiException("Couldn't get client side instance for the provided GUI of id " + id + " !");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import net.minecraft.inventory.IInventory;
import nova.core.wrapper.mc.forge.v17.wrapper.inventory.BWInventory;
import nova.gui.component.inventory.PlayerInventory;
import nova.gui.nativeimpl.NativePlayerInventory;
import nova.gui.render.Graphics;
import nova.gui.wrapper.mc17.MCGui.MCContainer;
import nova.gui.wrapper.mc17.MCGui.MCGuiScreen;
import nova.wrapper.mc1710.wrapper.inventory.BWInventory;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGui.MCContainer;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGui.MCGuiScreen;
import org.apache.commons.math3.geometry.euclidean.twod.Vector2D;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_7_10;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import nova.core.wrapper.mc.forge.v17.wrapper.inventory.FWInventory;
import nova.core.wrapper.mc.forge.v17.wrapper.item.ItemConverter;
import nova.gui.component.inventory.Slot;
import nova.gui.nativeimpl.NativeSlot;
import nova.gui.render.Graphics;
import nova.gui.wrapper.mc17.MCGui.MCContainer;
import nova.gui.wrapper.mc17.MCGui.MCGuiScreen;
import nova.wrapper.mc1710.wrapper.inventory.FWInventory;
import nova.wrapper.mc1710.wrapper.item.ItemConverter;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGui.MCContainer;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGui.MCGuiScreen;
import org.apache.commons.math3.geometry.euclidean.twod.Vector2D;
import org.lwjgl.opengl.GL11;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package nova.gui.wrapper.mc17.dependency;
package nova.gui.wrapper.mc.forge.v1_7_10.dependency;

import nova.gui.factory.GuiComponentFactory;
import nova.gui.factory.GuiManager;
import nova.gui.wrapper.mc17.MCGuiComponentFactory;
import nova.gui.wrapper.mc17.MCGuiFactory;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGuiComponentFactory;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGuiFactory;
import se.jbee.inject.bind.BinderModule;

public class GuiModule extends BinderModule {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package nova.gui.wrapper.mc17.launch;
package nova.gui.wrapper.mc.forge.v1_7_10.launch;

import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import nova.core.loader.Loadable;
import nova.core.loader.Mod;
import nova.gui.wrapper.mc17.MCGuiFactory;
import nova.gui.wrapper.mc17.dependency.GuiModule;
import nova.wrapper.mc1710.launcher.NovaMinecraft;
import nova.core.wrapper.mc.forge.v17.launcher.NovaMinecraft;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGuiFactory;
import nova.gui.wrapper.mc.forge.v1_7_10.dependency.GuiModule;

/**
* The main class to initialize the Gui Plugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package nova.gui.wrapper.mc17.network;
package nova.gui.wrapper.mc.forge.v1_7_10.network;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import net.minecraft.entity.player.EntityPlayer;
import nova.core.network.Packet;
import nova.core.wrapper.mc.forge.v17.network.MCPacket;
import nova.core.wrapper.mc.forge.v17.network.discriminator.PacketAbstract;
import nova.gui.GuiException;
import nova.wrapper.mc1710.network.MCPacket;
import nova.wrapper.mc1710.network.discriminator.PacketAbstract;
import nova.gui.wrapper.mc17.MCGui.MCContainer;
import nova.gui.wrapper.mc.forge.v1_7_10.MCGui.MCContainer;

//TODO: Integrate withPriority NOVA
public class PacketGui extends PacketAbstract {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc18.text;
package nova.gui.wrapper.mc.forge.v1_7_10.text;

import nova.gui.render.text.TextRenderer.RenderedText;
import org.apache.commons.math3.geometry.euclidean.twod.Vector2D;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc18.text;
package nova.gui.wrapper.mc.forge.v1_7_10.text;

import net.minecraft.client.gui.FontRenderer;
import nova.gui.render.text.FormattedText.TextFormat;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package nova.gui.wrapper.mc17.text;
package nova.gui.wrapper.mc.forge.v1_7_10.text;

import net.minecraft.client.gui.FontRenderer;
import nova.core.render.Color;
import nova.core.util.math.MathUtil;
import nova.gui.render.text.FormattedText;
import nova.gui.render.text.TextRenderer;
import nova.gui.wrapper.mc17.MCCanvas;
import nova.gui.wrapper.mc17.text.IText.Text;
import nova.gui.wrapper.mc.forge.v1_7_10.MCCanvas;
import nova.gui.wrapper.mc.forge.v1_7_10.text.IText.Text;
import org.apache.commons.math3.geometry.euclidean.twod.Vector2D;
import org.lwjgl.opengl.GL11;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package nova.gui.wrapper.mc17.text;
package nova.gui.wrapper.mc.forge.v1_7_10.text;

import com.google.common.collect.Lists;
import net.minecraft.client.gui.FontRenderer;
import nova.gui.render.text.FormattedText;
import nova.gui.render.text.FormattedText.TextFormat;
import nova.gui.render.text.TextRenderer;
import nova.gui.render.text.TextRenderer.RenderedText;
import nova.gui.wrapper.mc17.text.IText.Word;
import nova.gui.wrapper.mc.forge.v1_7_10.text.IText.Word;
import org.lwjgl.opengl.GL11;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package nova.gui.wrapper.mc17.text;
package nova.gui.wrapper.mc.forge.v1_7_10.text;

import net.minecraft.client.gui.FontRenderer;
import nova.gui.render.text.FormattedText;
import nova.gui.render.text.FormattedText.TextFormat;
import nova.gui.render.text.TextRenderer;
import nova.gui.render.text.TextRenderer.RenderedText;
import nova.gui.wrapper.mc17.text.IText.Text;
import nova.gui.wrapper.mc.forge.v1_7_10.text.IText.Text;
import org.lwjgl.opengl.GL11;

class SimpleParagraph extends AbstractParagraph<Text> implements RenderedText {
Expand Down
4 changes: 2 additions & 2 deletions minecraft/1.8/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ minecraft {

dependencies {
compile rootProject
compile group: "nova.core", name: "NovaCore", version: property("novaVersion"), changing: true
compile "nova.wrapper.mc18:NovaWrapper-MC1.8:0.1-SNAPSHOT:deobf"
compile group: "nova.core", name: "NOVA-Core", version: property("nova_version"), changing: true
compile "nova.core:NOVA-Core-Wrapper-MC1.8:0.1.0-SNAPSHOT:deobf"
}

processResources {
Expand Down
5 changes: 4 additions & 1 deletion minecraft/1.8/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
group = nova.gui

minecraft.version = 1.8
forge.version = 11.14.3.1491
forgeGradleVersion = 1.2-SNAPSHOT

packaging = jar
info.inceptionYear = 2015
info.description = The NOVA-Minecraft Minecraft 1.8 wrapper.
info.description = The NOVA-GUI Minecraft 1.8 wrapper.
info.organization.name = NOVA
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc17;
package nova.gui.wrapper.mc.forge.v1_8;

import nova.gui.nativeimpl.NativeGuiComponent;
import nova.gui.render.Graphics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package nova.gui.wrapper.mc18;
package nova.gui.wrapper.mc.forge.v1_8;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.util.ResourceLocation;
import nova.wrapper.mc18.launcher.NovaMinecraft;
import nova.core.wrapper.mc.forge.v18.launcher.NovaMinecraft;
import org.lwjgl.opengl.GL11;

public class GuiUtils {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nova.gui.wrapper.mc18;
package nova.gui.wrapper.mc.forge.v1_8;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
Expand Down
Loading