[Refactor] Reformatted code and organized imports
parent
fb189c7d8f
commit
c4d07d5902
|
@ -4,25 +4,16 @@ import java.io.IOException;
|
|||
import java.util.Random;
|
||||
|
||||
import org.aeonbits.owner.ConfigFactory;
|
||||
import org.apache.commons.cli.CommandLine;
|
||||
import org.apache.commons.cli.DefaultParser;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.cli.*;
|
||||
import org.apache.logging.log4j.*;
|
||||
import org.joml.Vector3f;
|
||||
import org.lwjgl.Version;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.lwjgl.glfw.GLFWErrorCallback;
|
||||
import org.lwjgl.glfw.*;
|
||||
|
||||
import com.github.halotroop.litecraft.input.Input;
|
||||
import com.github.halotroop.litecraft.input.KeyCallbackHandler;
|
||||
import com.github.halotroop.litecraft.input.Keybind;
|
||||
import com.github.halotroop.litecraft.input.MouseCallbackHandler;
|
||||
import com.github.halotroop.litecraft.input.*;
|
||||
import com.github.halotroop.litecraft.logic.Timer;
|
||||
import com.github.halotroop.litecraft.logic.Timer.TickListener;
|
||||
import com.github.halotroop.litecraft.options.SettingsConfig;
|
||||
import com.github.halotroop.litecraft.options.SettingsHandler;
|
||||
import com.github.halotroop.litecraft.options.*;
|
||||
import com.github.halotroop.litecraft.render.RenderWrapper;
|
||||
|
||||
import io.github.hydos.ginger.engine.elements.objects.RenderPlayer;
|
||||
|
@ -32,7 +23,7 @@ import io.github.hydos.ginger.engine.render.models.TexturedModel;
|
|||
|
||||
public class LiteCraftMain implements Runnable
|
||||
{
|
||||
public static Logger logger = Logger.getLogger(Logger.class.getName());
|
||||
public static Logger logger = LogManager.getLogger(Logger.class.getName());
|
||||
private static SettingsConfig config;
|
||||
public static int width = 640, height = 480, maxFPS = 60; // Don't change these values. They just initialize it in case we forget to set them later.
|
||||
public static boolean spamLog = false, debug = false, limitFPS = false;
|
||||
|
@ -85,49 +76,40 @@ public class LiteCraftMain implements Runnable
|
|||
private void init()
|
||||
{
|
||||
// Leave this alone.
|
||||
logger.setLevel(debug ? Level.ALL : Level.INFO);
|
||||
GLFWErrorCallback.createPrint(System.err).set();
|
||||
if (!GLFW.glfwInit()) throw new IllegalStateException("Unable to initialize GLFW");
|
||||
|
||||
timer = new Timer(20);
|
||||
timer.addTickListener(tickListener);
|
||||
|
||||
try
|
||||
{
|
||||
String[] splashes = TextFileReader.readFileToStringArray("text/splashes.txt");
|
||||
splashText = splashes[new Random().nextInt(splashes.length)];
|
||||
}
|
||||
catch (IOException e)
|
||||
{ e.printStackTrace(); }
|
||||
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
//because someone has not made player models and im lazy lets use the ones bundeled with the engine :)
|
||||
|
||||
RenderWrapper.preInit();
|
||||
|
||||
TexturedModel tModel = ModelLoader.loadModel("stall.obj", "stallTexture.png");
|
||||
tModel.getTexture().setReflectivity(1f);
|
||||
tModel.getTexture().setShineDamper(7f);
|
||||
RenderPlayer renderPlayer = new RenderPlayer(tModel, new Vector3f(0,0,-3),0,180f,0, new Vector3f(0.2f, 0.2f, 0.2f));
|
||||
|
||||
RenderPlayer renderPlayer = new RenderPlayer(tModel, new Vector3f(0, 0, -3), 0, 180f, 0, new Vector3f(0.2f, 0.2f, 0.2f));
|
||||
RenderWrapper.init(splashText, renderPlayer);
|
||||
|
||||
long windowId = Window.window;
|
||||
KeyCallbackHandler.trackWindow(windowId);
|
||||
MouseCallbackHandler.trackWindow(windowId);
|
||||
// window.setWindowTitle("LiteCraft - " + ((splashText == "" || splashText == null) ? "INSERT SPLASH TEXT HERE!" : splashText));
|
||||
// window.setWindowTitle("LiteCraft - " + ((splashText == "" || splashText == null) ? "INSERT SPLASH TEXT HERE!" : splashText));
|
||||
input();
|
||||
}
|
||||
|
||||
// Sets up the key inputs for the game (currently just esc for closing the game)
|
||||
public void input()
|
||||
{
|
||||
Input.addPressCallback(Keybind.EXIT, LiteCraftMain::shutDown);
|
||||
}
|
||||
{ Input.addPressCallback(Keybind.EXIT, LiteCraftMain::shutDown); }
|
||||
|
||||
// Things that the game should do over and over and over again until it is closed
|
||||
private void loop()
|
||||
{
|
||||
|
||||
ups++;
|
||||
// Poll for window events. The key callback above will only be invoked during this call.
|
||||
GLFW.glfwPollEvents();
|
||||
|
@ -157,11 +139,10 @@ public class LiteCraftMain implements Runnable
|
|||
init();
|
||||
frameTimer = System.currentTimeMillis();
|
||||
// Run the rendering loop until the player has attempted to close the window
|
||||
while(!Window.closed()) {
|
||||
|
||||
if(Window.isUpdating()) {
|
||||
loop();
|
||||
}
|
||||
while (!Window.closed())
|
||||
{
|
||||
if (Window.isUpdating())
|
||||
{ loop(); }
|
||||
}
|
||||
shutDown();
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package com.github.halotroop.litecraft;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.*;
|
||||
|
||||
public class TextFileReader
|
||||
{
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package com.github.halotroop.litecraft.input;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/*
|
||||
* Author: Valoeghese
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.github.halotroop.litecraft.input;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.lwjgl.glfw.GLFWKeyCallback;
|
||||
import org.lwjgl.glfw.*;
|
||||
|
||||
/*
|
||||
* Author: Valoeghese
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.github.halotroop.litecraft.input;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.lwjgl.glfw.GLFWMouseButtonCallback;
|
||||
import org.lwjgl.glfw.*;
|
||||
|
||||
/*
|
||||
* Author: Valoeghese
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.github.halotroop.litecraft.logic;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
/*
|
||||
* @author Jack Wilsdon (Stack Exchange)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.github.halotroop.litecraft.options;
|
||||
|
||||
import org.apache.commons.cli.Option;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.*;
|
||||
|
||||
public class SettingsHandler
|
||||
{
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
package com.github.halotroop.litecraft.render;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.halotroop.litecraft.LiteCraftMain;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Entity;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Light;
|
||||
import io.github.hydos.ginger.engine.elements.objects.RenderPlayer;
|
||||
import io.github.hydos.ginger.engine.elements.objects.*;
|
||||
import io.github.hydos.ginger.engine.font.TextMaster;
|
||||
import io.github.hydos.ginger.engine.io.Window;
|
||||
import io.github.hydos.ginger.engine.particle.ParticleMaster;
|
||||
|
|
|
@ -2,8 +2,7 @@ package io.github.hydos.ginger.UI;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import io.github.hydos.ginger.UI.enums.UIDefaultClipSide;
|
||||
import io.github.hydos.ginger.UI.enums.UIType;
|
||||
import io.github.hydos.ginger.UI.enums.*;
|
||||
import io.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
|
||||
public abstract class UICanvas
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package io.github.hydos.ginger.engine.cameras;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.lwjgl.glfw.GLFWScrollCallback;
|
||||
import org.lwjgl.glfw.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.elements.objects.RenderPlayer;
|
||||
import io.github.hydos.ginger.engine.io.Window;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.font;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
|
||||
/** Represents a piece of text in the game. */
|
||||
public class GUIText
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.font;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/** Represents a line of text during the loading of a text.
|
||||
*
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package io.github.hydos.ginger.engine.font;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import com.github.halotroop.litecraft.LiteCraftMain;
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.font;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.render.renderers.FontRenderer;
|
||||
import io.github.hydos.ginger.engine.utils.Loader;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.font;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
public class TextMeshCreator
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.font;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/** During the loading of a text this represents one word in the text. */
|
||||
public class Word
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
package io.github.hydos.ginger.engine.io;
|
||||
|
||||
import java.nio.DoubleBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.*;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.lwjgl.glfw.GLFWImage;
|
||||
import org.lwjgl.glfw.GLFWVidMode;
|
||||
import org.lwjgl.opengl.GL;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GLCapabilities;
|
||||
import org.lwjgl.glfw.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.halotroop.litecraft.LiteCraftMain;
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package io.github.hydos.ginger.engine.math;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
import java.lang.Math;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
|
||||
|
@ -65,18 +64,19 @@ public class Maths
|
|||
return matrix;
|
||||
}
|
||||
|
||||
public static Vector3f Vec4ToVec3(Vector4f eyeSpacePos) {
|
||||
public static Vector3f Vec4ToVec3(Vector4f eyeSpacePos)
|
||||
{
|
||||
Vector3f vec3 = new Vector3f();
|
||||
vec3.x = eyeSpacePos.x;
|
||||
vec3.y = eyeSpacePos.y;
|
||||
vec3.z = eyeSpacePos.z;
|
||||
|
||||
return vec3;
|
||||
}
|
||||
|
||||
public static void scale(Vector3f change, float time) {
|
||||
change.x = change.x*time;
|
||||
change.y = change.y*time;
|
||||
change.x = change.x*time;
|
||||
public static void scale(Vector3f change, float time)
|
||||
{
|
||||
change.x = change.x * time;
|
||||
change.y = change.y * time;
|
||||
change.x = change.x * time;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package io.github.hydos.ginger.engine.obj;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
|
||||
public class OBJFileLoader
|
||||
{
|
||||
|
|
|
@ -2,8 +2,7 @@ package io.github.hydos.ginger.engine.obj.normals;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
|
@ -13,75 +12,75 @@ public class NormalMappedObjLoader
|
|||
{
|
||||
public static RawModel loadOBJ(String objFileName)
|
||||
{
|
||||
// BufferedReader isr = null;
|
||||
// isr = new BufferedReader(new InputStreamReader(Class.class.getResourceAsStream("/models/" + objFileName)));
|
||||
// BufferedReader reader = new BufferedReader(isr);
|
||||
// String line;
|
||||
// List<VertexNM> vertices = new ArrayList<VertexNM>();
|
||||
// List<Vector2f> textures = new ArrayList<Vector2f>();
|
||||
// List<Vector3f> normals = new ArrayList<Vector3f>();
|
||||
// List<Integer> indices = new ArrayList<Integer>();
|
||||
// try
|
||||
// {
|
||||
// while (true)
|
||||
// {
|
||||
// line = reader.readLine();
|
||||
// if (line.startsWith("v "))
|
||||
// {
|
||||
// String[] currentLine = line.split(" ");
|
||||
// Vector3f vertex = new Vector3f(Float.valueOf(currentLine[1]),
|
||||
// Float.valueOf(currentLine[2]),
|
||||
// Float.valueOf(currentLine[3]));
|
||||
// VertexNM newVertex = new VertexNM(vertices.size(), vertex);
|
||||
// vertices.add(newVertex);
|
||||
// }
|
||||
// else if (line.startsWith("vt "))
|
||||
// {
|
||||
// String[] currentLine = line.split(" ");
|
||||
// Vector2f texture = new Vector2f(Float.valueOf(currentLine[1]),
|
||||
// Float.valueOf(currentLine[2]));
|
||||
// textures.add(texture);
|
||||
// }
|
||||
// else if (line.startsWith("vn "))
|
||||
// {
|
||||
// String[] currentLine = line.split(" ");
|
||||
// Vector3f normal = new Vector3f(Float.valueOf(currentLine[1]),
|
||||
// Float.valueOf(currentLine[2]),
|
||||
// Float.valueOf(currentLine[3]));
|
||||
// normals.add(normal);
|
||||
// }
|
||||
// else if (line.startsWith("f "))
|
||||
// { break; }
|
||||
// }
|
||||
// while (line != null && line.startsWith("f "))
|
||||
// {
|
||||
// String[] currentLine = line.split(" ");
|
||||
// String[] vertex1 = currentLine[1].split("/");
|
||||
// String[] vertex2 = currentLine[2].split("/");
|
||||
// String[] vertex3 = currentLine[3].split("/");
|
||||
// VertexNM v0 = processVertex(vertex1, vertices, indices);
|
||||
// VertexNM v1 = processVertex(vertex2, vertices, indices);
|
||||
// VertexNM v2 = processVertex(vertex3, vertices, indices);
|
||||
// calculateTangents(v0, v1, v2, textures);//NEW
|
||||
// line = reader.readLine();
|
||||
// }
|
||||
// reader.close();
|
||||
// }
|
||||
// catch (IOException e)
|
||||
// {
|
||||
// System.err.println("Error reading the file");
|
||||
// }
|
||||
// removeUnusedVertices(vertices);
|
||||
// float[] verticesArray = new float[vertices.size() * 3];
|
||||
// float[] texturesArray = new float[vertices.size() * 2];
|
||||
// float[] normalsArray = new float[vertices.size() * 3];
|
||||
// float[] tangentsArray = new float[vertices.size() * 3];
|
||||
// @SuppressWarnings("unused")
|
||||
// //some weird eclipse only error here i think
|
||||
// float furthest = convertDataToArrays(vertices, textures, normals, verticesArray,
|
||||
// texturesArray, normalsArray, tangentsArray);
|
||||
// int[] indicesArray = convertIndicesListToArray(indices);
|
||||
// return Loader.loadToVAO(verticesArray, indicesArray, normalsArray, tangentsArray, texturesArray);
|
||||
// BufferedReader isr = null;
|
||||
// isr = new BufferedReader(new InputStreamReader(Class.class.getResourceAsStream("/models/" + objFileName)));
|
||||
// BufferedReader reader = new BufferedReader(isr);
|
||||
// String line;
|
||||
// List<VertexNM> vertices = new ArrayList<VertexNM>();
|
||||
// List<Vector2f> textures = new ArrayList<Vector2f>();
|
||||
// List<Vector3f> normals = new ArrayList<Vector3f>();
|
||||
// List<Integer> indices = new ArrayList<Integer>();
|
||||
// try
|
||||
// {
|
||||
// while (true)
|
||||
// {
|
||||
// line = reader.readLine();
|
||||
// if (line.startsWith("v "))
|
||||
// {
|
||||
// String[] currentLine = line.split(" ");
|
||||
// Vector3f vertex = new Vector3f(Float.valueOf(currentLine[1]),
|
||||
// Float.valueOf(currentLine[2]),
|
||||
// Float.valueOf(currentLine[3]));
|
||||
// VertexNM newVertex = new VertexNM(vertices.size(), vertex);
|
||||
// vertices.add(newVertex);
|
||||
// }
|
||||
// else if (line.startsWith("vt "))
|
||||
// {
|
||||
// String[] currentLine = line.split(" ");
|
||||
// Vector2f texture = new Vector2f(Float.valueOf(currentLine[1]),
|
||||
// Float.valueOf(currentLine[2]));
|
||||
// textures.add(texture);
|
||||
// }
|
||||
// else if (line.startsWith("vn "))
|
||||
// {
|
||||
// String[] currentLine = line.split(" ");
|
||||
// Vector3f normal = new Vector3f(Float.valueOf(currentLine[1]),
|
||||
// Float.valueOf(currentLine[2]),
|
||||
// Float.valueOf(currentLine[3]));
|
||||
// normals.add(normal);
|
||||
// }
|
||||
// else if (line.startsWith("f "))
|
||||
// { break; }
|
||||
// }
|
||||
// while (line != null && line.startsWith("f "))
|
||||
// {
|
||||
// String[] currentLine = line.split(" ");
|
||||
// String[] vertex1 = currentLine[1].split("/");
|
||||
// String[] vertex2 = currentLine[2].split("/");
|
||||
// String[] vertex3 = currentLine[3].split("/");
|
||||
// VertexNM v0 = processVertex(vertex1, vertices, indices);
|
||||
// VertexNM v1 = processVertex(vertex2, vertices, indices);
|
||||
// VertexNM v2 = processVertex(vertex3, vertices, indices);
|
||||
// calculateTangents(v0, v1, v2, textures);//NEW
|
||||
// line = reader.readLine();
|
||||
// }
|
||||
// reader.close();
|
||||
// }
|
||||
// catch (IOException e)
|
||||
// {
|
||||
// System.err.println("Error reading the file");
|
||||
// }
|
||||
// removeUnusedVertices(vertices);
|
||||
// float[] verticesArray = new float[vertices.size() * 3];
|
||||
// float[] texturesArray = new float[vertices.size() * 2];
|
||||
// float[] normalsArray = new float[vertices.size() * 3];
|
||||
// float[] tangentsArray = new float[vertices.size() * 3];
|
||||
// @SuppressWarnings("unused")
|
||||
// //some weird eclipse only error here i think
|
||||
// float furthest = convertDataToArrays(vertices, textures, normals, verticesArray,
|
||||
// texturesArray, normalsArray, tangentsArray);
|
||||
// int[] indicesArray = convertIndicesListToArray(indices);
|
||||
// return Loader.loadToVAO(verticesArray, indicesArray, normalsArray, tangentsArray, texturesArray);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.obj.normals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package io.github.hydos.ginger.engine.particle;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import java.lang.Math;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.io.Window;
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.particle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package io.github.hydos.ginger.engine.particle;
|
||||
|
||||
import java.lang.Math;
|
||||
import java.util.Random;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
import org.joml.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.io.Window;
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.postprocessing;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
public class ContrastChanger
|
||||
{
|
||||
|
|
|
@ -2,10 +2,7 @@ package io.github.hydos.ginger.engine.postprocessing;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
import org.lwjgl.opengl.GL14;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.halotroop.litecraft.LiteCraftMain;
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.postprocessing;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import io.github.hydos.ginger.engine.utils.Loader;
|
||||
|
|
|
@ -1,31 +1,20 @@
|
|||
package io.github.hydos.ginger.engine.render;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.lang.Math;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector4f;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.joml.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.halotroop.litecraft.LiteCraftMain;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Entity;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Light;
|
||||
import io.github.hydos.ginger.engine.elements.objects.*;
|
||||
import io.github.hydos.ginger.engine.io.Window;
|
||||
import io.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import io.github.hydos.ginger.engine.render.renderers.EntityRenderer;
|
||||
import io.github.hydos.ginger.engine.render.renderers.GuiRenderer;
|
||||
import io.github.hydos.ginger.engine.render.renderers.NormalMappingRenderer;
|
||||
import io.github.hydos.ginger.engine.render.renderers.SkyboxRenderer;
|
||||
import io.github.hydos.ginger.engine.render.renderers.TerrainRenderer;
|
||||
import io.github.hydos.ginger.engine.render.shaders.GuiShader;
|
||||
import io.github.hydos.ginger.engine.render.shaders.StaticShader;
|
||||
import io.github.hydos.ginger.engine.render.shaders.TerrainShader;
|
||||
import io.github.hydos.ginger.engine.render.renderers.*;
|
||||
import io.github.hydos.ginger.engine.render.shaders.*;
|
||||
import io.github.hydos.ginger.engine.shadow.ShadowMapMasterRenderer;
|
||||
import io.github.hydos.ginger.engine.terrain.Terrain;
|
||||
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
package io.github.hydos.ginger.engine.render.renderers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.elements.objects.Entity;
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
import io.github.hydos.ginger.engine.render.MasterRenderer;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import io.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import io.github.hydos.ginger.engine.render.models.*;
|
||||
import io.github.hydos.ginger.engine.render.shaders.StaticShader;
|
||||
import io.github.hydos.ginger.engine.render.texture.ModelTexture;
|
||||
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
package io.github.hydos.ginger.engine.render.renderers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.font.FontType;
|
||||
import io.github.hydos.ginger.engine.font.GUIText;
|
||||
import io.github.hydos.ginger.engine.font.*;
|
||||
import io.github.hydos.ginger.engine.render.shaders.FontShader;
|
||||
|
||||
public class FontRenderer
|
||||
|
|
|
@ -3,10 +3,7 @@ package io.github.hydos.ginger.engine.render.renderers;
|
|||
import java.util.List;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
package io.github.hydos.ginger.engine.render.renderers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector4f;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.joml.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Entity;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Light;
|
||||
import io.github.hydos.ginger.engine.elements.objects.*;
|
||||
import io.github.hydos.ginger.engine.io.Window;
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
import io.github.hydos.ginger.engine.render.MasterRenderer;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import io.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import io.github.hydos.ginger.engine.render.models.*;
|
||||
import io.github.hydos.ginger.engine.render.shaders.NormalMappingShader;
|
||||
import io.github.hydos.ginger.engine.render.texture.ModelTexture;
|
||||
|
||||
|
|
|
@ -1,22 +1,16 @@
|
|||
package io.github.hydos.ginger.engine.render.renderers;
|
||||
|
||||
import java.lang.Math;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.GL31;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
import io.github.hydos.ginger.engine.particle.Particle;
|
||||
import io.github.hydos.ginger.engine.particle.ParticleTexture;
|
||||
import io.github.hydos.ginger.engine.particle.*;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import io.github.hydos.ginger.engine.render.shaders.ParticleShader;
|
||||
import io.github.hydos.ginger.engine.utils.Loader;
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package io.github.hydos.ginger.engine.render.renderers;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
|
|
|
@ -2,19 +2,13 @@ package io.github.hydos.ginger.engine.render.renderers;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector3f;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.joml.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import io.github.hydos.ginger.engine.render.shaders.TerrainShader;
|
||||
import io.github.hydos.ginger.engine.terrain.Terrain;
|
||||
import io.github.hydos.ginger.engine.terrain.TerrainTexture;
|
||||
import io.github.hydos.ginger.engine.terrain.TerrainTexturePack;
|
||||
import io.github.hydos.ginger.engine.terrain.*;
|
||||
|
||||
public class TerrainRenderer
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.render.shaders;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.font.GUIText;
|
||||
|
||||
|
|
|
@ -2,10 +2,7 @@ package io.github.hydos.ginger.engine.render.shaders;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
import org.joml.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.elements.objects.Light;
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
package io.github.hydos.ginger.engine.render.shaders;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.*;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
import org.joml.*;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
public abstract class ShaderProgram
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@ import org.joml.Matrix4f;
|
|||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
|
||||
public class SkyboxShader extends ShaderProgram
|
||||
{
|
||||
private int location_projectionMatrix;
|
||||
|
|
|
@ -2,14 +2,12 @@ package io.github.hydos.ginger.engine.render.shaders;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Light;
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
|
||||
|
||||
public class StaticShader extends ShaderProgram
|
||||
{
|
||||
private static final int MAX_LIGHTS = 5;
|
||||
|
|
|
@ -2,8 +2,7 @@ package io.github.hydos.ginger.engine.render.shaders;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Light;
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
package io.github.hydos.ginger.engine.render.texture;
|
||||
|
||||
import static org.lwjgl.stb.STBImage.stbi_failure_reason;
|
||||
import static org.lwjgl.stb.STBImage.stbi_info_from_memory;
|
||||
import static org.lwjgl.stb.STBImage.stbi_load_from_memory;
|
||||
import static org.lwjgl.stb.STBImage.*;
|
||||
import static org.lwjgl.system.MemoryStack.stackPush;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.*;
|
||||
|
||||
import org.lwjgl.system.MemoryStack;
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.render.texture;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL14;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
public class ModelTexture
|
||||
{
|
||||
|
|
|
@ -2,11 +2,9 @@ package io.github.hydos.ginger.engine.render.tools;
|
|||
|
||||
import static org.lwjgl.BufferUtils.createByteBuffer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.*;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import java.nio.channels.*;
|
||||
|
||||
import org.lwjgl.BufferUtils;
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package io.github.hydos.ginger.engine.render.tools;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.halotroop.litecraft.LiteCraftMain;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package io.github.hydos.ginger.engine.shadow;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
import java.lang.Math;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.halotroop.litecraft.LiteCraftMain;
|
||||
|
||||
|
@ -146,7 +146,6 @@ public class ShadowBox
|
|||
Vector3f centerNear, Vector3f centerFar)
|
||||
{
|
||||
Matrix4f upMatrix = rotation;
|
||||
|
||||
Vector3f upVector = Maths.Vec4ToVec3(upMatrix.transform(UP));
|
||||
Vector3f rightVector = new Vector3f().cross(forwardVector, upVector);
|
||||
Vector3f downVector = new Vector3f(-upVector.x, -upVector.y, -upVector.z);
|
||||
|
|
|
@ -2,11 +2,7 @@ package io.github.hydos.ginger.engine.shadow;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
import org.lwjgl.opengl.GL14;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.GL32;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.halotroop.litecraft.LiteCraftMain;
|
||||
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
package io.github.hydos.ginger.engine.shadow;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.elements.objects.Entity;
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
import io.github.hydos.ginger.engine.render.MasterRenderer;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import io.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import io.github.hydos.ginger.engine.render.models.*;
|
||||
|
||||
public class ShadowMapEntityRenderer
|
||||
{
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
package io.github.hydos.ginger.engine.shadow;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.lang.Math;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import io.github.hydos.ginger.engine.cameras.ThirdPersonCamera;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Entity;
|
||||
import io.github.hydos.ginger.engine.elements.objects.Light;
|
||||
import io.github.hydos.ginger.engine.elements.objects.*;
|
||||
import io.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
|
||||
/** This class is in charge of using all of the classes in the shadows package to
|
||||
|
|
|
@ -2,11 +2,11 @@ package io.github.hydos.ginger.engine.terrain;
|
|||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.lang.Math;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.math.Maths;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
|
|
|
@ -1,24 +1,14 @@
|
|||
package io.github.hydos.ginger.engine.utils;
|
||||
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.nio.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.EXTTextureFilterAnisotropic;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL14;
|
||||
import org.lwjgl.opengl.GL15;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
import org.lwjgl.opengl.GL33;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import io.github.hydos.ginger.engine.io.Window;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import io.github.hydos.ginger.engine.render.texture.Image;
|
||||
import io.github.hydos.ginger.engine.render.texture.ModelTexture;
|
||||
import io.github.hydos.ginger.engine.render.texture.*;
|
||||
import io.github.hydos.ginger.engine.terrain.TerrainTexture;
|
||||
|
||||
public class Loader
|
||||
|
|
|
@ -6,8 +6,7 @@ import io.github.hydos.ginger.engine.font.TextMaster;
|
|||
import io.github.hydos.ginger.engine.obj.ModelLoader;
|
||||
import io.github.hydos.ginger.engine.obj.normals.NormalMappedObjLoader;
|
||||
import io.github.hydos.ginger.engine.render.MasterRenderer;
|
||||
import io.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import io.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import io.github.hydos.ginger.engine.render.models.*;
|
||||
import io.github.hydos.ginger.engine.render.texture.ModelTexture;
|
||||
|
||||
public class GingerMain
|
||||
|
|
|
@ -34,17 +34,9 @@ length - 1.
|
|||
A version of 2 represents a deflated (zlib compressed) NBT file. The deflated
|
||||
data is the chunk length - 1.
|
||||
*/
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.zip.DeflaterOutputStream;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.InflaterInputStream;
|
||||
import java.util.zip.*;
|
||||
|
||||
public class RegionFile
|
||||
{
|
||||
|
|
|
@ -5,14 +5,9 @@ package scaveleous.mcregion;
|
|||
** (Public domain)
|
||||
**/
|
||||
// A simple cache and wrapper for efficiently multiple RegionFiles simultaneously.
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.io.*;
|
||||
import java.lang.ref.*;
|
||||
import java.util.*;
|
||||
|
||||
public class RegionFileCache
|
||||
{
|
||||
|
|
|
@ -5,18 +5,10 @@ package scaveleous.mcregion;
|
|||
** (Public domain)
|
||||
**/
|
||||
// A tool to convert to and from chunk/region files
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.util.regex.*;
|
||||
import java.util.zip.*;
|
||||
|
||||
class RegionTool
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue