From 5adfa887a43f8fec0e5a9945d12f5a7dd307245c Mon Sep 17 00:00:00 2001 From: dags- Date: Mon, 9 Mar 2020 10:37:36 +0000 Subject: [PATCH] update mappings + version bump --- .../com/terraforged/mod/biome/WarmBeach.java | 4 +- .../mod/biome/provider/TerraBiomeManager.java | 54 ------------------- .../terraforged/mod/chunk/TerraContainer.java | 2 + .../mod/chunk/fix/RegionDelegate.java | 4 +- gradle.properties | 4 +- 5 files changed, 8 insertions(+), 60 deletions(-) delete mode 100644 TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/TerraBiomeManager.java diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/biome/WarmBeach.java b/TerraForgedMod/src/main/java/com/terraforged/mod/biome/WarmBeach.java index 3aa0ebb..9627606 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/biome/WarmBeach.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/biome/WarmBeach.java @@ -41,8 +41,8 @@ public class WarmBeach extends BiomeVariant { public WarmBeach() { super((new Biome.Builder()).surfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.SAND_CONFIG).precipitation(Biome.RainType.RAIN).category(Category.BEACH).depth(-0.5F).scale(0.1F).temperature(1.5F).downfall(0.5F).waterColor(4445678).waterFogColor(270131).parent((String)null)); - this.addStructure(Feature.MINESHAFT.func_225566_b_(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL))); - this.addStructure(Feature.BURIED_TREASURE.func_225566_b_(new BuriedTreasureConfig(0.01F))); + this.addStructure(Feature.MINESHAFT.withConfiguration(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL))); + this.addStructure(Feature.BURIED_TREASURE.withConfiguration(new BuriedTreasureConfig(0.01F))); DefaultBiomeFeatures.addCarvers(this); DefaultBiomeFeatures.addStructures(this); DefaultBiomeFeatures.addMonsterRooms(this); diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/TerraBiomeManager.java b/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/TerraBiomeManager.java deleted file mode 100644 index 20c39c9..0000000 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/TerraBiomeManager.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * - * MIT License - * - * Copyright (c) 2020 TerraForged - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package com.terraforged.mod.biome.provider; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.biome.Biome; -import net.minecraft.world.biome.BiomeManager; -import net.minecraft.world.biome.ColumnFuzzedBiomeMagnifier; -import net.minecraft.world.biome.provider.BiomeProvider; - -public class TerraBiomeManager extends BiomeManager { - - private final long seed; - private final IBiomeReader provider; - - public TerraBiomeManager(IBiomeReader reader, long seed) { - super(reader, seed, ColumnFuzzedBiomeMagnifier.INSTANCE); - this.provider = reader; - this.seed = seed; - } - - @Override - public BiomeManager func_226835_a_(BiomeProvider provider) { - return new TerraBiomeManager(provider, seed); - } - - @Override - public Biome func_226836_a_(BlockPos pos) { - return provider.getNoiseBiome(pos.getX(), pos.getY(), pos.getZ()); - } -} diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/TerraContainer.java b/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/TerraContainer.java index 2528a26..ba69e83 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/TerraContainer.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/TerraContainer.java @@ -33,6 +33,8 @@ import net.minecraft.util.math.MathHelper; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeContainer; +// holds a 1:1 map of biomes in the chunk +// also holds the chunk's view on the heightmap for convenience public class TerraContainer extends BiomeContainer { private static final int BITS_WIDTH = (int) Math.round(Math.log(16.0D) / Math.log(2.0D)) - 2; diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/fix/RegionDelegate.java b/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/fix/RegionDelegate.java index d8b3b5a..6e70e6c 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/fix/RegionDelegate.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/fix/RegionDelegate.java @@ -110,8 +110,8 @@ public class RegionDelegate extends WorldGenRegion { } @Override - public BiomeManager func_225523_d_() { - return region.func_225523_d_(); + public BiomeManager getBiomeManager() { + return region.getBiomeManager(); } @Override diff --git a/gradle.properties b/gradle.properties index 7255c35..06db157 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ -mod_version=0.0.2 +mod_version=0.0.3 mc_version=1.15.2 forge_version=31.1.1 mcp_channel=snapshot -mcp_version=20200124-1.15.1 +mcp_version=20200225-1.15.1 org.gradle.jvmargs=-Xmx4G org.gradle.daemon=false \ No newline at end of file