-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The game is now run in its own run directory.
- Loading branch information
Showing
30 changed files
with
1,086 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ out/ | |
.gradle/ | ||
*.zip | ||
!gradle/wrapper/gradle-wrapper.jar | ||
/run/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,64 @@ | ||
--- a/tk/valoeghese/fc0/client/Fc0.java | ||
+++ b/tk/valoeghese/fc0/client/Fc0.java | ||
@@ -70,5 +70,5 @@ | ||
@@ -93,5 +93,5 @@ | ||
@Override | ||
public final void run() { | ||
- Object object = this; | ||
+ Fc0 object = this; | ||
GL11.glEnable(2929); | ||
GL11.glClearColor(0.3f, 0.5f, 0.9f, 1.0f); | ||
@@ -85,6 +85,5 @@ | ||
((Fc0)object).player.getCamera().addYaw((float)java.lang.Math.PI); | ||
@@ -109,6 +109,5 @@ | ||
((Fc0)object).ecozoneOverlay = new Text(((Fc0)object).i18n.translate("ecozone.temperate_grassland"), -0.85f, 0.8f, 1.0f); | ||
while (true) { | ||
- object = this.window; | ||
- if (!(!GLFW.glfwWindowShouldClose(((Window)object).pointer))) break; | ||
+ if (!(!GLFW.glfwWindowShouldClose(window.pointer))) break; | ||
+ if (!(!GLFW.glfwWindowShouldClose((window.pointer)))) break; | ||
long l = System.currentTimeMillis(); | ||
if (l >= this.field_106) { | ||
@@ -170,12 +169,10 @@ | ||
@@ -118,5 +117,5 @@ | ||
fc0.player.getCamera().addYaw(0.002f); | ||
} | ||
- Object object2 = fc0; | ||
+ Fc0 object2 = fc0; | ||
if (((Fc0)object2).field_169) { | ||
if (Keybinds.DESTROY.isPressed()) { | ||
@@ -223,10 +222,10 @@ | ||
} | ||
fc0.player.tick(); | ||
- object2 = ChunkGenerator.getEcozone(fc0.player.getX(), fc0.player.getZ()); | ||
- if (!fc0.field_169 && object2 != fc0.player.currentEcozone) { | ||
- fc0.player.currentEcozone = object2; | ||
- object2 = fc0.i18n.translate(((Ecozone)object2).toString()); | ||
- System.out.println((String)object2); | ||
- fc0.ecozoneOverlay.method_198((String)object2); | ||
+ Ecozone ecozone = ChunkGenerator.getEcozone(fc0.player.getX(), fc0.player.getZ()); | ||
+ if (!fc0.field_169 && ecozone != fc0.player.currentEcozone) { | ||
+ fc0.player.currentEcozone = ecozone; | ||
+ String translated = fc0.i18n.translate(((Ecozone)ecozone).toString()); | ||
+ System.out.println((String)translated); | ||
+ fc0.ecozoneOverlay.method_198((String)translated); | ||
} | ||
++fc0.field_170; | ||
@@ -234,6 +233,5 @@ | ||
GL11.glClear(16640); | ||
this.method_128(); | ||
this.render(); | ||
- object = this.window; | ||
- GLFW.glfwSwapBuffers(((Window)object).pointer); | ||
+ GLFW.glfwSwapBuffers(window.pointer); | ||
GLFW.glfwPollEvents(); | ||
if (!Keybinds.ESCAPE.isPressed()) continue; | ||
GLFW.glfwSetWindowShouldClose(this.window.pointer, true); | ||
@@ -248,6 +246,5 @@ | ||
this.field_169 = true; | ||
} | ||
- object = this.window; | ||
- GLFW.glfwDestroyWindow(((Window)object).pointer); | ||
+ GLFW.glfwDestroyWindow(window.pointer); | ||
ALC10.alcCloseDevice(GuiVertex.getAudioDevice()); | ||
} | ||
|
||
@@ -191,5 +188,5 @@ | ||
@@ -264,5 +261,5 @@ | ||
f2 /= 2.0f; | ||
f2 = 0.125f + f2 * 1.025f; | ||
- f2 = f > 1.15f ? 1.15f : (f2 < 0.125f ? 0.125f : f2); | ||
+ f2 = f2 > 1.15f ? 1.15f : (f2 < 0.125f ? 0.125f : f2); | ||
GL11.glClearColor(0.35f * f2, 0.55f * f2, 0.95f * f2, 1.0f); | ||
Player.terrainShader.apply(); | ||
GuiVertex.terrainShader.apply(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- a/tk/valoeghese/fc0/client/gui/Gui.java | ||
+++ b/tk/valoeghese/fc0/client/gui/Gui.java | ||
@@ -67,5 +67,5 @@ | ||
GL20.glEnableVertexAttribArray(1); | ||
GL30.glBindVertexArray(0); | ||
- this.vertices.add(new GuiVertex(n3, arrn.length, 0)); | ||
+ this.vertices.add(new GuiVertex(n3, arrn.length, (byte) 0)); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- a/tk/valoeghese/fc0/client/gui/GuiVertex.java | ||
+++ b/tk/valoeghese/fc0/client/gui/GuiVertex.java | ||
@@ -45,5 +45,5 @@ | ||
|
||
public static void initAudio() { | ||
- audioDevice = ALC10.alcOpenDevice(null); | ||
+ audioDevice = ALC10.alcOpenDevice((ByteBuffer) null); | ||
ALCCapabilities aLCCapabilities = ALC.createCapabilities(audioDevice); | ||
IntBuffer intBuffer = BufferUtils.createIntBuffer(16); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- a/tk/valoeghese/fc0/client/gui/I18n.java | ||
+++ b/tk/valoeghese/fc0/client/gui/I18n.java | ||
@@ -18,7 +18,7 @@ | ||
private final String parent; | ||
private Properties translations; | ||
- public static final I18n INSTANCE = new I18n("en.gb", "British English"); | ||
+ public static final I18n INSTANCE; | ||
|
||
- private I18n(String string, String string2) { | ||
+ private I18n(String string, String string2) throws Throwable { | ||
this(string, string2, null); | ||
} | ||
@@ -29,11 +29,12 @@ | ||
* Enabled aggressive exception aggregation | ||
*/ | ||
- private I18n(String object, String object2, @Nullable String object3) { | ||
+ private I18n(String id, String name, @Nullable String parent) throws Throwable { | ||
Throwable throwable; | ||
+ Object object = this; | ||
+ Object object2 = null; | ||
+ Object object3; | ||
block19: { | ||
- this.id = object; | ||
- this.parent = object3; | ||
- object = this; | ||
- object2 = null; | ||
+ this.id = id; | ||
+ this.parent = parent; | ||
if (((I18n)object).parent != null) { | ||
object2 = new Properties(); | ||
@@ -49,5 +50,5 @@ | ||
object = throwable2; | ||
throwable = throwable2; | ||
- throw object; | ||
+ throw (Throwable) object; | ||
} | ||
catch (Throwable throwable3) { | ||
@@ -86,5 +87,5 @@ | ||
object = throwable5; | ||
throwable = throwable5; | ||
- throw object; | ||
+ throw (Throwable) object; | ||
} | ||
catch (Throwable throwable6) { | ||
@@ -118,5 +119,10 @@ | ||
|
||
static { | ||
- new I18n("en.us", "American English", "en.gb"); | ||
+ try { | ||
+ INSTANCE = new I18n("en.gb", "British English"); | ||
+ new I18n("en.us", "American English", "en.gb"); | ||
+ } catch (Throwable t) { | ||
+ throw new RuntimeException("Could not load languages", t); | ||
+ } | ||
} | ||
} |
9 changes: 0 additions & 9 deletions
9
patches/tk/valoeghese/fc0/client/render/OtherTesselator.patch
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 3 additions & 5 deletions
8
patches/tk/valoeghese/fc0/client/render/TerrainRenderer.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
--- a/tk/valoeghese/fc0/client/render/TerrainRenderer.java | ||
+++ b/tk/valoeghese/fc0/client/render/TerrainRenderer.java | ||
@@ -15,7 +15,7 @@ | ||
@@ -15,7 +15,5 @@ | ||
public TerrainRenderer(List<TileRenderer> object) { | ||
super(35048, Player.terrainShader); | ||
super(35048, GuiVertex.terrainShader); | ||
- object = object.iterator(); | ||
- while (object.hasNext()) { | ||
- TileRenderer tileRenderer = (TileRenderer)object.next(); | ||
+ java.util.Iterator<TileRenderer> iter = object.iterator(); | ||
+ while (iter.hasNext()) { | ||
+ TileRenderer tileRenderer = (TileRenderer)iter.next(); | ||
+ for (TileRenderer tileRenderer : object) { | ||
tileRenderer.apply(this); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- a/tk/valoeghese/fc0/client/world/ClientChunk.java | ||
+++ b/tk/valoeghese/fc0/client/world/ClientChunk.java | ||
@@ -28,10 +28,7 @@ | ||
} | ||
super.setAndUpdateTile(n, n2, n3, by); | ||
- int n5 = n4; | ||
- n4 = by; | ||
- by = (byte)n5; | ||
ClientChunk clientChunk3 = this; | ||
if (clientChunk3.renderer != null) { | ||
- clientChunk3.renderer.setTile(by, (byte)n4); | ||
+ clientChunk3.renderer.setTile(n4, by); | ||
} | ||
if (n == 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
--- a/tk/valoeghese/fc0/io/ResourceLoader.java | ||
+++ b/tk/valoeghese/fc0/io/ResourceLoader.java | ||
@@ -5,4 +5,5 @@ | ||
|
||
import java.io.ByteArrayOutputStream; | ||
+import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.net.URL; | ||
@@ -14,10 +15,10 @@ | ||
@@ -18,7 +18,7 @@ | ||
} | ||
|
||
- public static String readResource(String object) { | ||
+ public static String readResource(String object) throws IOException { | ||
- public static String read(String object) { | ||
+ public static String read(String location) throws java.io.IOException { | ||
int n; | ||
- object = ResourceLoader.class.getClassLoader().getResourceAsStream((String)object); | ||
+ InputStream in = ResourceLoader.class.getClassLoader().getResourceAsStream((String)object); | ||
- object = ResourceLoader.load((String)object); | ||
+ InputStream object = ResourceLoader.load((String)location); | ||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); | ||
byte[] arrby = new byte[16384]; | ||
- while ((n = ((InputStream)object).read(arrby, 0, 16384)) != -1) { | ||
+ while ((n = in.read(arrby, 0, 16384)) != -1) { | ||
byteArrayOutputStream.write(arrby, 0, n); | ||
} |
Oops, something went wrong.