From d749bbe3ffaf3faf9abf5c861e92ebe1471145ae Mon Sep 17 00:00:00 2001 From: gnembon Date: Wed, 22 Apr 2020 02:10:28 -0300 Subject: [PATCH] mappings --- gradle.properties | 2 +- .../java/carpet/helpers/FeatureGenerator.java | 65 ++++++++++++------- .../carpet/mixins/StructureFeatureMixin.java | 2 +- 3 files changed, 43 insertions(+), 26 deletions(-) diff --git a/gradle.properties b/gradle.properties index 7f7fb840..c8f0fb00 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G # check these on https://fabricmc.net/use # or better: https://modmuss50.me/fabric.html minecraft_version=20w16a - yarn_mappings=20w16a+build.1 + yarn_mappings=20w16a+build.9 loader_version=0.8.2+build.194 # Mod Properties diff --git a/src/main/java/carpet/helpers/FeatureGenerator.java b/src/main/java/carpet/helpers/FeatureGenerator.java index 03496e48..5a881319 100644 --- a/src/main/java/carpet/helpers/FeatureGenerator.java +++ b/src/main/java/carpet/helpers/FeatureGenerator.java @@ -6,9 +6,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; import net.minecraft.block.Blocks; -import net.minecraft.class_5179; -import net.minecraft.class_5186; import net.minecraft.server.world.ServerWorld; +import net.minecraft.structure.BastionRemnantGenerator; import net.minecraft.util.math.BlockPos; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biomes; @@ -20,7 +19,25 @@ import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.chunk.OverworldChunkGenerator; import net.minecraft.world.gen.chunk.OverworldChunkGeneratorConfig; import net.minecraft.world.gen.decorator.BeehiveTreeDecorator; -import net.minecraft.world.gen.feature.*; +import net.minecraft.world.gen.feature.BastionRemnantFeatureConfig; +import net.minecraft.world.gen.feature.BoulderFeatureConfig; +import net.minecraft.world.gen.feature.BranchedTreeFeatureConfig; +import net.minecraft.world.gen.feature.ConfiguredFeature; +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.HugeFungusFeatureConfig; +import net.minecraft.world.gen.feature.MineshaftFeature; +import net.minecraft.world.gen.feature.MineshaftFeatureConfig; +import net.minecraft.world.gen.feature.OceanRuinFeature; +import net.minecraft.world.gen.feature.OceanRuinFeatureConfig; +import net.minecraft.world.gen.feature.RandomPatchFeatureConfig; +import net.minecraft.world.gen.feature.SeaPickleFeatureConfig; +import net.minecraft.world.gen.feature.SeagrassFeatureConfig; +import net.minecraft.world.gen.feature.ShipwreckFeatureConfig; +import net.minecraft.world.gen.feature.SingleStateFeatureConfig; +import net.minecraft.world.gen.feature.StructureFeature; +import net.minecraft.world.gen.feature.StructurePoolFeatureConfig; import net.minecraft.world.gen.foliage.BlobFoliagePlacer; import net.minecraft.world.gen.stateprovider.SimpleBlockStateProvider; import net.minecraft.world.gen.trunk.StraightTrunkPlacer; @@ -191,17 +208,17 @@ public class FeatureGenerator put("mineshaft", gridCustomStructure(Feature.MINESHAFT, new MineshaftFeatureConfig(0.0, MineshaftFeature.Type.NORMAL), Biomes.PLAINS)); put("mineshaft_mesa", gridCustomStructure(Feature.MINESHAFT, new MineshaftFeatureConfig(0.0, MineshaftFeature.Type.MESA), Biomes.PLAINS)); - put("village", gridCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/plains/town_centers",6), Biomes.PLAINS)); - put("village_desert", gridCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/desert/town_centers", 6), Biomes.PLAINS)); - put("village_savanna", gridCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/savanna/town_centers", 6), Biomes.PLAINS)); - put("village_taiga", gridCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/taiga/town_centers", 6), Biomes.PLAINS)); - put("village_snowy", gridCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/snowy/town_centers", 6), Biomes.PLAINS)); + put("village", gridCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/plains/town_centers",6), Biomes.PLAINS)); + put("village_desert", gridCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/desert/town_centers", 6), Biomes.PLAINS)); + put("village_savanna", gridCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/savanna/town_centers", 6), Biomes.PLAINS)); + put("village_taiga", gridCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/taiga/town_centers", 6), Biomes.PLAINS)); + put("village_snowy", gridCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/snowy/town_centers", 6), Biomes.PLAINS)); put("nether_fossil", ((StructureFeatureInterface)Feature.NETHER_FOSSIL)::gridAnywhere); - put("bastion_remnant", gridCustomStructure(Feature.field_23997, new class_5186(class_5179.field_23994), Biomes.NETHER_WASTES)); - put("bastion_remnant_housing", gridCustomStructure(Feature.field_23997, new class_5186(new ImmutableMap.Builder().put("bastion/units/base", 60).build()), Biomes.NETHER_WASTES)); - put("bastion_remnant_stable", gridCustomStructure(Feature.field_23997, new class_5186(new ImmutableMap.Builder().put("bastion/hoglin_stable/origin", 60).build()), Biomes.NETHER_WASTES)); - put("bastion_remnant_treasure", gridCustomStructure(Feature.field_23997, new class_5186(new ImmutableMap.Builder().put("bastion/treasure/starters", 60).build()), Biomes.NETHER_WASTES)); - put("bastion_remnant_bridge", gridCustomStructure(Feature.field_23997, new class_5186(new ImmutableMap.Builder().put("bastion/bridge/start", 60).build()), Biomes.NETHER_WASTES)); + put("bastion_remnant", gridCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(BastionRemnantGenerator.START_POOLS_TO_SIZES), Biomes.NETHER_WASTES)); + put("bastion_remnant_housing", gridCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(new ImmutableMap.Builder().put("bastion/units/base", 60).build()), Biomes.NETHER_WASTES)); + put("bastion_remnant_stable", gridCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(new ImmutableMap.Builder().put("bastion/hoglin_stable/origin", 60).build()), Biomes.NETHER_WASTES)); + put("bastion_remnant_treasure", gridCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(new ImmutableMap.Builder().put("bastion/treasure/starters", 60).build()), Biomes.NETHER_WASTES)); + put("bastion_remnant_bridge", gridCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(new ImmutableMap.Builder().put("bastion/bridge/start", 60).build()), Biomes.NETHER_WASTES)); }}; private static final Map featureMap = new HashMap() {{ @@ -322,18 +339,18 @@ public class FeatureGenerator put("mineshaft", spawnCustomStructure(Feature.MINESHAFT, new MineshaftFeatureConfig(0.0, MineshaftFeature.Type.NORMAL), Biomes.PLAINS)); put("mineshaft_mesa", spawnCustomStructure(Feature.MINESHAFT, new MineshaftFeatureConfig(0.0, MineshaftFeature.Type.MESA), Biomes.PLAINS)); - put("village", spawnCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/plains/town_centers",6), Biomes.PLAINS)); - put("village_desert", spawnCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/desert/town_centers", 6), Biomes.PLAINS)); - put("village_savanna", spawnCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/savanna/town_centers", 6), Biomes.PLAINS)); - put("village_taiga", spawnCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/taiga/town_centers", 6), Biomes.PLAINS)); - put("village_snowy", spawnCustomStructure(Feature.VILLAGE, new VillageFeatureConfig("village/snowy/town_centers", 6), Biomes.PLAINS)); + put("village", spawnCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/plains/town_centers",6), Biomes.PLAINS)); + put("village_desert", spawnCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/desert/town_centers", 6), Biomes.PLAINS)); + put("village_savanna", spawnCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/savanna/town_centers", 6), Biomes.PLAINS)); + put("village_taiga", spawnCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/taiga/town_centers", 6), Biomes.PLAINS)); + put("village_snowy", spawnCustomStructure(Feature.VILLAGE, new StructurePoolFeatureConfig("village/snowy/town_centers", 6), Biomes.PLAINS)); put("nether_fossil", ((StructureFeatureInterface)Feature.NETHER_FOSSIL)::plopAnywhere); - put("bastion_remnant", spawnCustomStructure(Feature.field_23997, new class_5186(class_5179.field_23994), Biomes.NETHER_WASTES)); - put("bastion_remnant_housing", spawnCustomStructure(Feature.field_23997, new class_5186(new ImmutableMap.Builder().put("bastion/units/base", 60).build()), Biomes.NETHER_WASTES)); - put("bastion_remnant_stable", spawnCustomStructure(Feature.field_23997, new class_5186(new ImmutableMap.Builder().put("bastion/hoglin_stable/origin", 60).build()), Biomes.NETHER_WASTES)); - put("bastion_remnant_treasure", spawnCustomStructure(Feature.field_23997, new class_5186(new ImmutableMap.Builder().put("bastion/treasure/starters", 60).build()), Biomes.NETHER_WASTES)); - put("bastion_remnant_bridge", spawnCustomStructure(Feature.field_23997, new class_5186(new ImmutableMap.Builder().put("bastion/bridge/start", 60).build()), Biomes.NETHER_WASTES)); - put("ruined_portal", ((StructureFeatureInterface)Feature.field_23996)::plopAnywhere); + put("bastion_remnant", spawnCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(BastionRemnantGenerator.START_POOLS_TO_SIZES), Biomes.NETHER_WASTES)); + put("bastion_remnant_housing", spawnCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(new ImmutableMap.Builder().put("bastion/units/base", 60).build()), Biomes.NETHER_WASTES)); + put("bastion_remnant_stable", spawnCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(new ImmutableMap.Builder().put("bastion/hoglin_stable/origin", 60).build()), Biomes.NETHER_WASTES)); + put("bastion_remnant_treasure", spawnCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(new ImmutableMap.Builder().put("bastion/treasure/starters", 60).build()), Biomes.NETHER_WASTES)); + put("bastion_remnant_bridge", spawnCustomStructure(Feature.BASTION_REMNANT, new BastionRemnantFeatureConfig(new ImmutableMap.Builder().put("bastion/bridge/start", 60).build()), Biomes.NETHER_WASTES)); + put("ruined_portal", ((StructureFeatureInterface)Feature.RUINED_PORTAL)::plopAnywhere); }}; diff --git a/src/main/java/carpet/mixins/StructureFeatureMixin.java b/src/main/java/carpet/mixins/StructureFeatureMixin.java index fa8a44af..d6068a8a 100644 --- a/src/main/java/carpet/mixins/StructureFeatureMixin.java +++ b/src/main/java/carpet/mixins/StructureFeatureMixin.java @@ -126,7 +126,7 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface } Biome biome_1 = generator.getBiomeSource().getBiomeForNoiseGen((chunkpos.getStartX() + 9) >> 2, 0, (chunkpos.getStartZ() + 9) >> 2 ); StructureStart structurestart1 = getStructureStartFactory().create((StructureFeature)(Object)this, chunkpos.x, chunkpos.z, BlockBox.empty(),0,generator.getSeed()); - structurestart1.initialize(generator, ((ServerWorld)worldIn).getStructureManager() , chunkpos.x, chunkpos.z, biome_1); + structurestart1.init(generator, ((ServerWorld)worldIn).getStructureManager() , chunkpos.x, chunkpos.z, biome_1); structurestart = structurestart1.hasChildren() ? structurestart1 : StructureStart.DEFAULT; if (structurestart.hasChildren())