From 3e89d1ad7d488959a5425f6377f07ec2bfe5511c Mon Sep 17 00:00:00 2001 From: hYdos Date: Fri, 28 Feb 2020 15:09:03 +1000 Subject: [PATCH] clean up and wtf is that weird lambda --- src/main/java/com/github/halotroop/litecraft/Litecraft.java | 2 +- .../com/github/halotroop/litecraft/types/block/Blocks.java | 4 ++++ .../com/github/halotroop/litecraft/world/gen/Dimension.java | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/halotroop/litecraft/Litecraft.java b/src/main/java/com/github/halotroop/litecraft/Litecraft.java index 7baafbe..e419934 100644 --- a/src/main/java/com/github/halotroop/litecraft/Litecraft.java +++ b/src/main/java/com/github/halotroop/litecraft/Litecraft.java @@ -54,7 +54,7 @@ public class Litecraft extends Game KeyCallbackHandler.trackWindow(Window.window); // set up the gateways keybind key tracking MouseCallbackHandler.trackWindow(Window.window); setupKeybinds(); // set up keybind - @SuppressWarnings("unused") Block b = Blocks.AIR; // make sure blocks are initialised + Blocks.setup(); // make sure blocks are initialised GingerUtils.init(); // set up ginger utilities Window.setBackgroundColour(0.2f, 0.2f, 0.6f); // set the window refresh colour TexturedModel dirtModel = ModelLoader.loadGenericCube("block/cubes/stone/brick/stonebrick.png"); diff --git a/src/main/java/com/github/halotroop/litecraft/types/block/Blocks.java b/src/main/java/com/github/halotroop/litecraft/types/block/Blocks.java index 3636fc1..90b19b6 100644 --- a/src/main/java/com/github/halotroop/litecraft/types/block/Blocks.java +++ b/src/main/java/com/github/halotroop/litecraft/types/block/Blocks.java @@ -7,4 +7,8 @@ public final class Blocks public static final Block AIR = new Block(new Properties("air").visible(false)); public static final Block DIRT = new Block("block/cubes/soil/dirt.png", new Properties("dirt")); public static final Block STONE = new Block("block/cubes/stone/basic/gneiss.png", new Properties("stone")); + public static Block setup() + { + return AIR; + } } diff --git a/src/main/java/com/github/halotroop/litecraft/world/gen/Dimension.java b/src/main/java/com/github/halotroop/litecraft/world/gen/Dimension.java index e3d9724..1e0a929 100644 --- a/src/main/java/com/github/halotroop/litecraft/world/gen/Dimension.java +++ b/src/main/java/com/github/halotroop/litecraft/world/gen/Dimension.java @@ -22,7 +22,7 @@ public abstract class Dimension } public WorldModifier[] getWorldModifierArray() - { return this.worldModifiers.toArray(WorldModifier[]::new); } + { return new WorldModifier[0]; } public abstract T createChunkGenerator(long seed);