diff --git a/core/assets/sand.png b/core/assets/sand.png new file mode 100644 index 0000000..a690716 Binary files /dev/null and b/core/assets/sand.png differ diff --git a/core/assets/snow.png b/core/assets/snow.png new file mode 100644 index 0000000..0100539 Binary files /dev/null and b/core/assets/snow.png differ diff --git a/core/assets/stone.png b/core/assets/stone.png new file mode 100644 index 0000000..7e65b12 Binary files /dev/null and b/core/assets/stone.png differ diff --git a/core/src/com/mygdx/game/Dimension/BlockMaterials.java b/core/src/com/mygdx/game/Dimension/BlockMaterials.java index e827b29..ed22708 100644 --- a/core/src/com/mygdx/game/Dimension/BlockMaterials.java +++ b/core/src/com/mygdx/game/Dimension/BlockMaterials.java @@ -19,9 +19,15 @@ public class BlockMaterials { materials.put("grass",new Block("grass",true,false,true,true,true)); materials.put("wood",new Block("wood",false,true,true,true,false)); materials.put("water",new Block("water",true,false,false,false,false)); + materials.put("stone",new Block("stone",true,false,false,false,false)); + materials.put("snow",new Block("snow",true,false,false,false,false)); + materials.put("sand",new Block("sand",true,false,false,false,false)); textures.put("grass", new Texture("core/assets/grass.png")); textures.put("wood", new Texture("core/assets/wood.png")); textures.put("water", new Texture("core/assets/water.png")); + textures.put("stone", new Texture("core/assets/stone.png")); + textures.put("snow", new Texture("core/assets/snow.png")); + textures.put("sand", new Texture("core/assets/sand.png")); } } diff --git a/core/src/com/mygdx/game/Dimension/Chunks.java b/core/src/com/mygdx/game/Dimension/Chunks.java index e8fa86d..a99f957 100644 --- a/core/src/com/mygdx/game/Dimension/Chunks.java +++ b/core/src/com/mygdx/game/Dimension/Chunks.java @@ -26,14 +26,23 @@ public class Chunks { } public Block getTerrain(int i, int j) { - OpenSimplexNoise openSimplexNoise = new OpenSimplexNoise(seed); - double terrainType = openSimplexNoise.eval(i*0.01,j*0.01); - if(terrainType < 0.3) { - return BlockMaterials.materials.get("grass"); + double terrainType = openSimplexNoise.eval(i*0.001,j*0.001); + + if(terrainType < 0){ + return BlockMaterials.materials.get("water"); + } + else if(terrainType < 0.05 && terrainType > 0){ + return BlockMaterials.materials.get("sand"); + } + else if (terrainType > 0.7){ + return BlockMaterials.materials.get("snow"); + } + else if (terrainType > 0.5){ + return BlockMaterials.materials.get("stone"); } else { - return BlockMaterials.materials.get("water"); + return BlockMaterials.materials.get("grass"); } }