From 50c13bafdc7043b40fe54c53a414d480cc3a344e Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Mon, 22 Jul 2019 11:31:24 +0100 Subject: [PATCH] 1.14.4 --- build.gradle | 10 +- settings.gradle | 2 +- .../java/techreborn/world/WorldGenerator.java | 174 +++++++++--------- 3 files changed, 93 insertions(+), 93 deletions(-) diff --git a/build.gradle b/build.gradle index 0330eb814..c6508db74 100644 --- a/build.gradle +++ b/build.gradle @@ -77,12 +77,12 @@ license { group = 'TechReborn' dependencies { - minecraft "com.mojang:minecraft:1.14.3" - mappings "net.fabricmc:yarn:1.14.3+build.9" - modCompile "net.fabricmc:fabric-loader:0.4.8+build.155" + minecraft "com.mojang:minecraft:1.14.4" + mappings "net.fabricmc:yarn:1.14.4+build.2" + modCompile "net.fabricmc:fabric-loader:0.4.8+build.157" //Fabric api - modCompile "net.fabricmc.fabric-api:fabric-api:0.3.0+build.187" + modCompile "net.fabricmc.fabric-api:fabric-api:0.3.0+build.200" modCompile "io.github.prospector.modmenu:ModMenu:1.5.4-85" @@ -90,7 +90,7 @@ dependencies { // transitive = false // } - compile 'RebornCore:RebornCore-1.14.3:4.0.0.14' + compile 'RebornCore:RebornCore-1.14.4:4.0.0.14' compileOnly "com.google.code.findbugs:jsr305:+" } diff --git a/settings.gradle b/settings.gradle index f63c2e9c4..c34563a97 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -rootProject.name = "TechReborn-1.14.3" \ No newline at end of file +rootProject.name = "TechReborn-1.14.4" \ No newline at end of file diff --git a/src/main/java/techreborn/world/WorldGenerator.java b/src/main/java/techreborn/world/WorldGenerator.java index 8fbea58bb..bc52ee8ec 100644 --- a/src/main/java/techreborn/world/WorldGenerator.java +++ b/src/main/java/techreborn/world/WorldGenerator.java @@ -1,88 +1,88 @@ -/* - * This file is part of TechReborn, licensed under the MIT License (MIT). - * - * Copyright (c) 2018 TechReborn - * - * 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 techreborn.world; - -import net.minecraft.util.registry.Registry; -import net.minecraft.world.biome.Biome; -import net.minecraft.world.biome.Biome.Category; -import net.minecraft.world.gen.GenerationStep; -import net.minecraft.world.gen.decorator.CountExtraChanceDecoratorConfig; -import net.minecraft.world.gen.decorator.Decorator; -import net.minecraft.world.gen.decorator.RangeDecoratorConfig; -import net.minecraft.world.gen.feature.DefaultFeatureConfig; -import net.minecraft.world.gen.feature.Feature; -import net.minecraft.world.gen.feature.FeatureConfig; -import net.minecraft.world.gen.feature.OreFeatureConfig; -import net.minecraft.world.gen.feature.OreFeatureConfig.Target; -import techreborn.init.TRContent; - -/** - * @author drcrazy - * - */ -public class WorldGenerator { - -// public static final Predicate IS_ENDSTONE = (state) -> { -// return state != null && (state.getBlock() == Blocks.END_STONE); -// }; - - public static void initBiomeFeatures() { - for (Biome biome : Registry.BIOME) { - if (biome.getCategory() == Category.NETHER) { - addOre(biome, OreFeatureConfig.Target.NETHERRACK, TRContent.Ores.CINNABAR); - addOre(biome, OreFeatureConfig.Target.NETHERRACK, TRContent.Ores.PYRITE); - addOre(biome, OreFeatureConfig.Target.NETHERRACK, TRContent.Ores.SPHALERITE); - - } else if (biome.getCategory() == Category.THEEND) { - // addOre(biome, IS_ENDSTONE, TRContent.Ores.PERIDOT); - // addOre(biome, IS_ENDSTONE, TRContent.Ores.SHELDONITE); - // addOre(biome, IS_ENDSTONE, TRContent.Ores.SODALITE); - // addOre(biome, IS_ENDSTONE, TRContent.Ores.TUNGSTEN); - } else { - addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.BAUXITE); - addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.COPPER); - addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.GALENA); - addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.IRIDIUM); - addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.LEAD); - addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.RUBY); - addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.SAPPHIRE); - addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.SILVER); - addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.TIN); - if (biome.getCategory() == Category.FOREST || biome.getCategory() == Category.TAIGA) { - biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, - Biome.configureFeature(new RubberTreeFeature(DefaultFeatureConfig::deserialize, false), - FeatureConfig.DEFAULT, Decorator.COUNT_EXTRA_HEIGHTMAP, - new CountExtraChanceDecoratorConfig(10, 0.1F, 1))); - } - } - } - } - - private static void addOre(Biome biome, Target canReplaceIn, TRContent.Ores ore) { - biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, Biome.configureFeature(Feature.ORE, - new OreFeatureConfig(canReplaceIn, ore.block.getDefaultState(), ore.veinSize), Decorator.COUNT_RANGE, - new RangeDecoratorConfig(ore.veinsPerChunk, ore.minY, ore.minY, ore.maxY))); - } +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2018 TechReborn + * + * 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 techreborn.world; + +import net.minecraft.util.registry.Registry; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.Biome.Category; +import net.minecraft.world.gen.GenerationStep; +import net.minecraft.world.gen.decorator.CountExtraChanceDecoratorConfig; +import net.minecraft.world.gen.decorator.Decorator; +import net.minecraft.world.gen.decorator.RangeDecoratorConfig; +import net.minecraft.world.gen.feature.DefaultFeatureConfig; +import net.minecraft.world.gen.feature.Feature; +import net.minecraft.world.gen.feature.FeatureConfig; +import net.minecraft.world.gen.feature.OreFeatureConfig; +import net.minecraft.world.gen.feature.OreFeatureConfig.Target; +import techreborn.init.TRContent; + +/** + * @author drcrazy + * + */ +public class WorldGenerator { + +// public static final Predicate IS_ENDSTONE = (state) -> { +// return state != null && (state.getBlock() == Blocks.END_STONE); +// }; + + public static void initBiomeFeatures() { + for (Biome biome : Registry.BIOME) { + if (biome.getCategory() == Category.NETHER) { + addOre(biome, OreFeatureConfig.Target.NETHERRACK, TRContent.Ores.CINNABAR); + addOre(biome, OreFeatureConfig.Target.NETHERRACK, TRContent.Ores.PYRITE); + addOre(biome, OreFeatureConfig.Target.NETHERRACK, TRContent.Ores.SPHALERITE); + + } else if (biome.getCategory() == Category.THEEND) { +// addOre(biome, IS_ENDSTONE, TRContent.Ores.PERIDOT); +// addOre(biome, IS_ENDSTONE, TRContent.Ores.SHELDONITE); +// addOre(biome, IS_ENDSTONE, TRContent.Ores.SODALITE); +// addOre(biome, IS_ENDSTONE, TRContent.Ores.TUNGSTEN); + } else { + addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.BAUXITE); + addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.COPPER); + addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.GALENA); + addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.IRIDIUM); + addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.LEAD); + addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.RUBY); + addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.SAPPHIRE); + addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.SILVER); + addOre(biome, OreFeatureConfig.Target.NATURAL_STONE, TRContent.Ores.TIN); + if (biome.getCategory() == Category.FOREST || biome.getCategory() == Category.TAIGA) { + biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, + Biome.configureFeature(new RubberTreeFeature(DefaultFeatureConfig::deserialize, false), + FeatureConfig.DEFAULT, Decorator.COUNT_EXTRA_HEIGHTMAP, + new CountExtraChanceDecoratorConfig(10, 0.1F, 1))); + } + } + } + } + + private static void addOre(Biome biome, Target canReplaceIn, TRContent.Ores ore) { + biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, Biome.configureFeature(Feature.ORE, + new OreFeatureConfig(canReplaceIn, ore.block.getDefaultState(), ore.veinSize), Decorator.COUNT_RANGE, + new RangeDecoratorConfig(ore.veinsPerChunk, ore.minY, ore.minY, ore.maxY))); + } } \ No newline at end of file