From b16d64a5c72c953861b12b1ec090830b8edd6395 Mon Sep 17 00:00:00 2001 From: dags- Date: Fri, 26 Jun 2020 17:56:07 +0100 Subject: [PATCH] remove redundant thing --- .../mod/chunk/util/TerraContainer.java | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/main/java/com/terraforged/mod/chunk/util/TerraContainer.java b/src/main/java/com/terraforged/mod/chunk/util/TerraContainer.java index 295ffa3..e7b8b2a 100644 --- a/src/main/java/com/terraforged/mod/chunk/util/TerraContainer.java +++ b/src/main/java/com/terraforged/mod/chunk/util/TerraContainer.java @@ -1,11 +1,10 @@ package com.terraforged.mod.chunk.util; import com.terraforged.api.biome.BiomeVariant; -import com.terraforged.mod.biome.provider.TerraBiomeProvider; import com.terraforged.core.cell.Cell; import com.terraforged.core.tile.chunk.ChunkReader; import com.terraforged.core.util.PosIterator; -import net.minecraft.util.math.ChunkPos; +import com.terraforged.mod.biome.provider.TerraBiomeProvider; import net.minecraft.util.math.MathHelper; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeContainer; @@ -96,24 +95,6 @@ public class TerraContainer extends BiomeContainer { return new TerraContainer(biomes3D, biomes2D); } - private static TerraContainer convert(ChunkPos pos, BiomeContainer biomes, TerraBiomeProvider biomeProvider) { - Biome[] biomes2D = new Biome[BIOMES_2D_SIZE]; - Biome[] biomes3D = new Biome[BIOMES_3D_SIZE]; - PosIterator iterator = PosIterator.area(0, 0, 16, 16); - while (iterator.next()) { - int dx = iterator.x(); - int dz = iterator.z(); - Biome biome = biomeProvider.getSurfaceBiome(pos.getXStart() + dx, pos.getZStart() + dz, biomes); - biomes2D[indexOf(dx, dz)] = biome; - if ((dx & 3) == 0 && (dz & 3) == 0) { - for (int dy = 0; dy < 64; dy++) { - biomes3D[indexOf(dx >> 2, dy, dz >> 2)] = biome; - } - } - } - return new TerraContainer(biomes3D, biomes2D); - } - private static int indexOf(int x, int z) { return (z << 4) + x; }