Jump to content

kyazuki

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by kyazuki

  1. My cord is only this. @SubscribeEvent public static void onAnimalBreeding(BabyEntitySpawnEvent event) { LOGGER.debug("Child:" + event.getChild()); LOGGER.debug("Parents:" + event.getParentA() + ", " + event.getParentB()); }
  2. BabyEntitySpawnEvent doesn't work for Villager.
  3. My mod add a new world type which generates only my biome. My biome is made by 1 block and fluids. WorldType: public class TestWorldType extends WorldType { public TestWorldType() { super("testworld"); } @Override public ChunkGenerator<?> createChunkGenerator(World world) { if (world.getDimension().getType() == DimensionType.OVERWORLD) { OverworldGenSettings overworldGenSettings = new OverworldGenSettings(); SingleBiomeProviderSettings biomeProviderSettings = new SingleBiomeProviderSettings(world.getWorldInfo()); biomeProviderSettings.setBiome(TestWorld.TEST_BIOME); overworldGenSettings.setDefaultBlock(TestWorld.TEST_BLOCK.getDefaultState()); return new OverworldChunkGenerator(world, new SingleBiomeProvider(biomeProviderSettings), overworldGenSettings); } else return super.createChunkGenerator(world); } } Biome(I refered to PlainsBiome): public class TestBiome extends Biome { private static final BlockState WATER = Blocks.WATER.getDefaultState(); private static final BlockState LAVA = Blocks.LAVA.getDefaultState(); public static final BlockState TEST_BLOCK_STATE = TestWorld.TEST_BLOCK.getDefaultState(); public static final TreeFeatureConfig TEST_TREE_CONFIG = (new TreeFeatureConfig.Builder(new SimpleBlockStateProvider(TEST_BLOCK_STATE), new SimpleBlockStateProvider(TEST_BLOCK_STATE), new BlobFoliagePlacer(2, 0))).baseHeight(4).heightRandA(2).foliageHeight(3).ignoreVines().setSapling((IPlantable) TestWorld.TEST_BLOCK).build(); public static final BlockStateProvidingFeatureConfig HAY_PILE_CONFIG = new BlockStateProvidingFeatureConfig(new SimpleBlockStateProvider(TestWorld.TEST_BLOCK.getDefaultState())); public TestBiome() { super((new Builder()).surfaceBuilder(SurfaceBuilder.DEFAULT, new SurfaceBuilderConfig(TEST_BLOCK_STATE, TEST_BLOCK_STATE, TEST_BLOCK_STATE)).precipitation(RainType.RAIN).category(Category.PLAINS).depth(0.125F).scale(0.05F).temperature(0.8F).downfall(0.4F).waterColor(4159204).waterFogColor(329011).parent((String) null)); TestVillagePools.init(); this.addStructure(Feature.VILLAGE.withConfiguration(new VillageConfig("village/test/town_centers", 6))); this.addCarver(GenerationStage.Carving.AIR, Biome.createCarver(new TestCaveWorldCarver(ProbabilityConfig::deserialize, 256), new ProbabilityConfig(0.14285715F))); this.addCarver(GenerationStage.Carving.AIR, Biome.createCarver(new TestCanyonWorldCarver(ProbabilityConfig::deserialize), new ProbabilityConfig(0.02F))); this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, new TestLakesFeature(BlockStateFeatureConfig::func_227271_a_).withConfiguration(new BlockStateFeatureConfig(WATER)).withPlacement(Placement.WATER_LAKE.func_227446_a_(new ChanceConfig(4)))); this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, new TestLakesFeature(BlockStateFeatureConfig::func_227271_a_).withConfiguration(new BlockStateFeatureConfig(LAVA)).withPlacement(Placement.LAVA_LAKE.func_227446_a_(new ChanceConfig(80)))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.NORMAL_TREE.withConfiguration(TEST_TREE_CONFIG).withPlacement(Placement.COUNT_EXTRA_HEIGHTMAP.func_227446_a_(new AtSurfaceWithExtraConfig(0, 0.05F, 1)))); this.addFeature(GenerationStage.Decoration.SURFACE_STRUCTURES, Feature.VILLAGE.withConfiguration(new VillageConfig("village/plains/town_centers", 6)).withPlacement(Placement.NOPE.func_227446_a_(IPlacementConfig.NO_PLACEMENT_CONFIG))); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.SHEEP, 12, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.PIG, 10, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.CHICKEN, 10, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.COW, 8, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.HORSE, 5, 2, 6)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.DONKEY, 1, 1, 3)); this.addSpawn(EntityClassification.AMBIENT, new SpawnListEntry(EntityType.BAT, 10, 8, 8)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SPIDER, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SKELETON, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.CREEPER, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SLIME, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.WITCH, 5, 1, 1)); } }
  4. I want to set localized CustomName(e.g. "componentA (componentB)") to chests. I wrote this: chestEntity.setCustomName(new TranslationTextComponent("chestname.testmod.testA") + " (" + new TranslationTextComponent("chestname.testmod.testB") + ")"); However, setCustomName method requires TextComponent. How do I do?
  5. I want to change blocks of villages. So I copied structure's data into data/minecraft/structures/village, and modified blocks except jigsaw in nbt files. It works but only jigsaw blocks turn into default blocks. Jigsaw's "Turns into" tag doesn't exist in structure nbt files. How do I change? It's solved. "final_state" tag exists in nbt files.
  6. I saved structure data on: main/resources/data/minecraft/village/test/ I created TestVillagePools class, and I wrote this cord in my biome class. However the test village isn't generated. What's wrong? I made a stupid mistake. The correct village directory is /data/minecraft/structures/village/ TestVillagePools.init(); this.addStructure(Feature.VILLAGE.withConfiguration(new VillageConfig("village/test/town_centers", 6))); this.addFeature(GenerationStage.Decoration.SURFACE_STRUCTURES, Feature.VILLAGE.withConfiguration(new VillageConfig("village/test/town_centers", 6)).withPlacement(Placement.NOPE.func_227446_a_(IPlacementConfig.NO_PLACEMENT_CONFIG))); public class TestVillagePools { public static void init() { } static { ImmutableList<StructureProcessor> lvt_0_1_ = ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new RuleEntry(new RandomBlockMatchRuleTest(Blocks.COBBLESTONE, 0.8F), AlwaysTrueRuleTest.INSTANCE, Blocks.MOSSY_COBBLESTONE.getDefaultState()), new RuleEntry(new TagMatchRuleTest(BlockTags.DOORS), AlwaysTrueRuleTest.INSTANCE, Blocks.AIR.getDefaultState()), new RuleEntry(new BlockMatchRuleTest(Blocks.TORCH), AlwaysTrueRuleTest.INSTANCE, Blocks.AIR.getDefaultState()), new RuleEntry(new BlockMatchRuleTest(Blocks.WALL_TORCH), AlwaysTrueRuleTest.INSTANCE, Blocks.AIR.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.COBBLESTONE, 0.07F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.MOSSY_COBBLESTONE, 0.07F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.WHITE_TERRACOTTA, 0.07F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.OAK_LOG, 0.05F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.OAK_PLANKS, 0.1F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.OAK_STAIRS, 0.1F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.STRIPPED_OAK_LOG, 0.02F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.GLASS_PANE, 0.5F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new RuleEntry[]{new RuleEntry(new BlockStateMatchRuleTest((BlockState) ((BlockState) Blocks.GLASS_PANE.getDefaultState().with(PaneBlock.NORTH, true)).with(PaneBlock.SOUTH, true)), AlwaysTrueRuleTest.INSTANCE, (BlockState) ((BlockState) Blocks.BROWN_STAINED_GLASS_PANE.getDefaultState().with(PaneBlock.NORTH, true)).with(PaneBlock.SOUTH, true)), new RuleEntry(new BlockStateMatchRuleTest((BlockState) ((BlockState) Blocks.GLASS_PANE.getDefaultState().with(PaneBlock.EAST, true)).with(PaneBlock.WEST, true)), AlwaysTrueRuleTest.INSTANCE, (BlockState) ((BlockState) Blocks.BROWN_STAINED_GLASS_PANE.getDefaultState().with(PaneBlock.EAST, true)).with(PaneBlock.WEST, true)), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.3F), AlwaysTrueRuleTest.INSTANCE, Blocks.CARROTS.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.2F), AlwaysTrueRuleTest.INSTANCE, Blocks.POTATOES.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.1F), AlwaysTrueRuleTest.INSTANCE, Blocks.BEETROOTS.getDefaultState())}))); ImmutableList<StructureProcessor> lvt_1_1_ = ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new RuleEntry(new RandomBlockMatchRuleTest(Blocks.COBBLESTONE, 0.1F), AlwaysTrueRuleTest.INSTANCE, Blocks.MOSSY_COBBLESTONE.getDefaultState())))); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/town_centers"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/town_centers/plains_fountain_01", ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new RuleEntry(new RandomBlockMatchRuleTest(Blocks.COBBLESTONE, 0.2F), AlwaysTrueRuleTest.INSTANCE, Blocks.MOSSY_COBBLESTONE.getDefaultState()))))), 50), new Pair(new SingleJigsawPiece("village/test/town_centers/plains_meeting_point_1", ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new RuleEntry(new RandomBlockMatchRuleTest(Blocks.COBBLESTONE, 0.2F), AlwaysTrueRuleTest.INSTANCE, Blocks.MOSSY_COBBLESTONE.getDefaultState()))))), 50), new Pair(new SingleJigsawPiece("village/test/town_centers/plains_meeting_point_2"), 50), new Pair(new SingleJigsawPiece("village/test/town_centers/plains_meeting_point_3", ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new RuleEntry(new RandomBlockMatchRuleTest(Blocks.COBBLESTONE, 0.7F), AlwaysTrueRuleTest.INSTANCE, Blocks.MOSSY_COBBLESTONE.getDefaultState()))))), 50), new Pair(new SingleJigsawPiece("village/test/zombie/town_centers/plains_fountain_01", lvt_0_1_), 1), new Pair(new SingleJigsawPiece("village/test/zombie/town_centers/plains_meeting_point_1", lvt_0_1_), 1), new Pair(new SingleJigsawPiece("village/test/zombie/town_centers/plains_meeting_point_2", lvt_0_1_), 1), new Pair(new SingleJigsawPiece("village/test/zombie/town_centers/plains_meeting_point_3", lvt_0_1_), 1)), JigsawPattern.PlacementBehaviour.RIGID)); ImmutableList<StructureProcessor> lvt_2_1_ = ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new RuleEntry(new BlockMatchRuleTest(Blocks.GRASS_PATH), new BlockMatchRuleTest(Blocks.WATER), Blocks.OAK_PLANKS.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.GRASS_PATH, 0.1F), AlwaysTrueRuleTest.INSTANCE, Blocks.GRASS_BLOCK.getDefaultState()), new RuleEntry(new BlockMatchRuleTest(Blocks.GRASS_BLOCK), new BlockMatchRuleTest(Blocks.WATER), Blocks.WATER.getDefaultState()), new RuleEntry(new BlockMatchRuleTest(Blocks.DIRT), new BlockMatchRuleTest(Blocks.WATER), Blocks.WATER.getDefaultState())))); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/streets"), new ResourceLocation("village/test/terminators"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/streets/corner_01", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/streets/corner_02", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/streets/corner_03", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/streets/straight_01", lvt_2_1_), 4), new Pair(new SingleJigsawPiece("village/test/streets/straight_02", lvt_2_1_), 4), new Pair(new SingleJigsawPiece("village/test/streets/straight_03", lvt_2_1_), 7), new Pair(new SingleJigsawPiece("village/test/streets/straight_04", lvt_2_1_), 7), new Pair(new SingleJigsawPiece("village/test/streets/straight_05", lvt_2_1_), 3), new Pair(new SingleJigsawPiece("village/test/streets/straight_06", lvt_2_1_), 4), new Pair(new SingleJigsawPiece("village/test/streets/crossroad_01", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/streets/crossroad_02", lvt_2_1_), 1), new Pair(new SingleJigsawPiece("village/test/streets/crossroad_03", lvt_2_1_), 2), new Pair[]{new Pair(new SingleJigsawPiece("village/test/streets/crossroad_04", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/streets/crossroad_05", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/streets/crossroad_06", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/streets/turn_01", lvt_2_1_), 3)}), JigsawPattern.PlacementBehaviour.TERRAIN_MATCHING)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/zombie/streets"), new ResourceLocation("village/test/terminators"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/zombie/streets/corner_01", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/streets/corner_02", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/streets/corner_03", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/streets/straight_01", lvt_2_1_), 4), new Pair(new SingleJigsawPiece("village/test/zombie/streets/straight_02", lvt_2_1_), 4), new Pair(new SingleJigsawPiece("village/test/zombie/streets/straight_03", lvt_2_1_), 7), new Pair(new SingleJigsawPiece("village/test/zombie/streets/straight_04", lvt_2_1_), 7), new Pair(new SingleJigsawPiece("village/test/zombie/streets/straight_05", lvt_2_1_), 3), new Pair(new SingleJigsawPiece("village/test/zombie/streets/straight_06", lvt_2_1_), 4), new Pair(new SingleJigsawPiece("village/test/zombie/streets/crossroad_01", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/streets/crossroad_02", lvt_2_1_), 1), new Pair(new SingleJigsawPiece("village/test/zombie/streets/crossroad_03", lvt_2_1_), 2), new Pair[]{new Pair(new SingleJigsawPiece("village/test/zombie/streets/crossroad_04", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/streets/crossroad_05", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/streets/crossroad_06", lvt_2_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/streets/turn_01", lvt_2_1_), 3)}), JigsawPattern.PlacementBehaviour.TERRAIN_MATCHING)); ImmutableList<StructureProcessor> lvt_3_1_ = ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new RuleEntry(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.3F), AlwaysTrueRuleTest.INSTANCE, Blocks.CARROTS.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.2F), AlwaysTrueRuleTest.INSTANCE, Blocks.POTATOES.getDefaultState()), new RuleEntry(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.1F), AlwaysTrueRuleTest.INSTANCE, Blocks.BEETROOTS.getDefaultState())))); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/houses"), new ResourceLocation("village/test/terminators"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/houses/plains_small_house_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_small_house_2", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_small_house_3", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_small_house_4", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_small_house_5", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_small_house_6", lvt_1_1_), 1), new Pair(new SingleJigsawPiece("village/test/houses/plains_small_house_7", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_small_house_8", lvt_1_1_), 3), new Pair(new SingleJigsawPiece("village/test/houses/plains_medium_house_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_medium_house_2", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_big_house_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_butcher_shop_1", lvt_1_1_), 2), new Pair[]{new Pair(new SingleJigsawPiece("village/test/houses/plains_butcher_shop_2", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_tool_smith_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_fletcher_house_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_shepherds_house_1"), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_armorer_house_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_fisher_cottage_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_tannery_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_cartographer_1", lvt_1_1_), 1), new Pair(new SingleJigsawPiece("village/test/houses/plains_library_1", lvt_1_1_), 5), new Pair(new SingleJigsawPiece("village/test/houses/plains_library_2", lvt_1_1_), 1), new Pair(new SingleJigsawPiece("village/test/houses/plains_masons_house_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_weaponsmith_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_temple_3", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_temple_4", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_stable_1", lvt_1_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_stable_2"), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_large_farm_1", lvt_3_1_), 4), new Pair(new SingleJigsawPiece("village/test/houses/plains_small_farm_1", lvt_3_1_), 4), new Pair(new SingleJigsawPiece("village/test/houses/plains_animal_pen_1"), 1), new Pair(new SingleJigsawPiece("village/test/houses/plains_animal_pen_2"), 1), new Pair(new SingleJigsawPiece("village/test/houses/plains_animal_pen_3"), 5), new Pair(new SingleJigsawPiece("village/test/houses/plains_accessory_1"), 1), new Pair(new SingleJigsawPiece("village/test/houses/plains_meeting_point_4", ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new RuleEntry(new RandomBlockMatchRuleTest(Blocks.COBBLESTONE, 0.7F), AlwaysTrueRuleTest.INSTANCE, Blocks.MOSSY_COBBLESTONE.getDefaultState()))))), 3), new Pair(new SingleJigsawPiece("village/test/houses/plains_meeting_point_5"), 1), Pair.of(EmptyJigsawPiece.INSTANCE, 10)}), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/zombie/houses"), new ResourceLocation("village/test/terminators"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_small_house_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_small_house_2", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_small_house_3", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_small_house_4", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_small_house_5", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_small_house_6", lvt_0_1_), 1), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_small_house_7", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_small_house_8", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_medium_house_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_medium_house_2", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_big_house_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_butcher_shop_1", lvt_0_1_), 2), new Pair[]{new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_butcher_shop_2", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_tool_smith_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_fletcher_house_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_shepherds_house_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_armorer_house_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_fisher_cottage_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_tannery_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_cartographer_1", lvt_0_1_), 1), new Pair(new SingleJigsawPiece("village/test/houses/plains_library_1", lvt_0_1_), 3), new Pair(new SingleJigsawPiece("village/test/houses/plains_library_2", lvt_0_1_), 1), new Pair(new SingleJigsawPiece("village/test/houses/plains_masons_house_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_weaponsmith_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_temple_3", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_temple_4", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_stable_1", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_stable_2", lvt_0_1_), 2), new Pair(new SingleJigsawPiece("village/test/houses/plains_large_farm_1", lvt_0_1_), 4), new Pair(new SingleJigsawPiece("village/test/houses/plains_small_farm_1", lvt_0_1_), 4), new Pair(new SingleJigsawPiece("village/test/houses/plains_animal_pen_1", lvt_0_1_), 1), new Pair(new SingleJigsawPiece("village/test/houses/plains_animal_pen_2", lvt_0_1_), 1), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_animal_pen_3", lvt_0_1_), 5), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_meeting_point_4", lvt_0_1_), 3), new Pair(new SingleJigsawPiece("village/test/zombie/houses/plains_meeting_point_5", lvt_0_1_), 1), Pair.of(EmptyJigsawPiece.INSTANCE, 10)}), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/terminators"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/terminators/terminator_01", lvt_2_1_), 1), new Pair(new SingleJigsawPiece("village/test/terminators/terminator_02", lvt_2_1_), 1), new Pair(new SingleJigsawPiece("village/test/terminators/terminator_03", lvt_2_1_), 1), new Pair(new SingleJigsawPiece("village/test/terminators/terminator_04", lvt_2_1_), 1)), JigsawPattern.PlacementBehaviour.TERRAIN_MATCHING)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/trees"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new FeatureJigsawPiece(Feature.NORMAL_TREE.withConfiguration(DefaultBiomeFeatures.OAK_TREE_CONFIG)), 1)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/decor"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/plains_lamp_1"), 2), new Pair(new FeatureJigsawPiece(Feature.NORMAL_TREE.withConfiguration(DefaultBiomeFeatures.OAK_TREE_CONFIG)), 1), new Pair(new FeatureJigsawPiece(Feature.FLOWER.withConfiguration(DefaultBiomeFeatures.PLAINS_FLOWER_CONFIG)), 1), new Pair(new FeatureJigsawPiece(Feature.BLOCK_PILE.withConfiguration(DefaultBiomeFeatures.HAY_PILE_CONFIG)), 1), Pair.of(EmptyJigsawPiece.INSTANCE, 2)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/zombie/decor"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/plains_lamp_1", lvt_0_1_), 1), new Pair(new FeatureJigsawPiece(Feature.NORMAL_TREE.withConfiguration(DefaultBiomeFeatures.OAK_TREE_CONFIG)), 1), new Pair(new FeatureJigsawPiece(Feature.FLOWER.withConfiguration(DefaultBiomeFeatures.PLAINS_FLOWER_CONFIG)), 1), new Pair(new FeatureJigsawPiece(Feature.BLOCK_PILE.withConfiguration(DefaultBiomeFeatures.HAY_PILE_CONFIG)), 1), Pair.of(EmptyJigsawPiece.INSTANCE, 2)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/villagers"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/villagers/nitwit"), 1), new Pair(new SingleJigsawPiece("village/test/villagers/baby"), 1), new Pair(new SingleJigsawPiece("village/test/villagers/unemployed"), 10)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/test/zombie/villagers"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/test/zombie/villagers/nitwit"), 1), new Pair(new SingleJigsawPiece("village/test/zombie/villagers/unemployed"), 10)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/common/animals"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/common/animals/cows_1"), 7), new Pair(new SingleJigsawPiece("village/common/animals/pigs_1"), 7), new Pair(new SingleJigsawPiece("village/common/animals/horses_1"), 1), new Pair(new SingleJigsawPiece("village/common/animals/horses_2"), 1), new Pair(new SingleJigsawPiece("village/common/animals/horses_3"), 1), new Pair(new SingleJigsawPiece("village/common/animals/horses_4"), 1), new Pair(new SingleJigsawPiece("village/common/animals/horses_5"), 1), new Pair(new SingleJigsawPiece("village/common/animals/sheep_1"), 1), new Pair(new SingleJigsawPiece("village/common/animals/sheep_2"), 1), Pair.of(EmptyJigsawPiece.INSTANCE, 5)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/common/sheep"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/common/animals/sheep_1"), 1), new Pair(new SingleJigsawPiece("village/common/animals/sheep_2"), 1)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/common/cats"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/common/animals/cat_black"), 1), new Pair(new SingleJigsawPiece("village/common/animals/cat_british"), 1), new Pair(new SingleJigsawPiece("village/common/animals/cat_calico"), 1), new Pair(new SingleJigsawPiece("village/common/animals/cat_persian"), 1), new Pair(new SingleJigsawPiece("village/common/animals/cat_ragdoll"), 1), new Pair(new SingleJigsawPiece("village/common/animals/cat_red"), 1), new Pair(new SingleJigsawPiece("village/common/animals/cat_siamese"), 1), new Pair(new SingleJigsawPiece("village/common/animals/cat_tabby"), 1), new Pair(new SingleJigsawPiece("village/common/animals/cat_white"), 1), new Pair(new SingleJigsawPiece("village/common/animals/cat_jellie"), 1), Pair.of(EmptyJigsawPiece.INSTANCE, 3)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/common/butcher_animals"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/common/animals/cows_1"), 3), new Pair(new SingleJigsawPiece("village/common/animals/pigs_1"), 3), new Pair(new SingleJigsawPiece("village/common/animals/sheep_1"), 1), new Pair(new SingleJigsawPiece("village/common/animals/sheep_2"), 1)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/common/iron_golem"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/common/iron_golem"), 1)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("village/common/well_bottoms"), new ResourceLocation("empty"), ImmutableList.of(new Pair(new SingleJigsawPiece("village/common/well_bottom"), 1)), JigsawPattern.PlacementBehaviour.RIGID)); } }
  7. Sorry, my problem here was not about changing the content of the table, but applying one to the chests when I generate them in my biome. Am I doing wrong in this case also?
  8. I want to open chests under my block. What methods should I override? isTransparent doesn't work...
  9. Don’t I need ResourceLocation method...?
  10. Can I call datapack's functions in my mod?
  11. I want to change stone to my block. It's solved by using OverworldGenSettings#setDefaultBlock.
  12. Thank you! It works! Then, my biome is generated by only 1 block. So the surface block is same as leaf block. It cause generating tree on tree. How do I fix?
  13. My mod add a biome. The surface block is my block(not grass, dirt). This cord generate trees on grass and dirt. How do I generate trees on my block?
  14. My mod generate some chests in my biome. I want to set my loot table to chests.
  15. It's solved! Thank you! ((ChestTileEntity) chestEntity).setLootTable(new ResourceLocation(TestMod.MODID, "chests/test"), TestMod.rand.nextLong());
  16. What's wrong? ((ChestTileEntity) chestEntity).setLootTable(new ResourceLocation("testmod:chests/test"), TestMod.rand.nextLong());
  17. I want to add a custom biome which is made by 1 block. However I can't change stone layer. How do I do it? @SubscribeEvent public static void onRegisterBiome(RegistryEvent.Register<Biome> event) { TEST_BIOME.setRegistryName("test_biome"); ForgeRegistries.BIOMES.register(TEST_BIOME); BiomeDictionary.addTypes(TEST_BIOME, BiomeDictionary.Type.PLAINS); BiomeManager.addSpawnBiome(TEST_BIOME); } public class TestBiome extends Biome { public TestBiome() { super((new Builder()).surfaceBuilder(SurfaceBuilder.DEFAULT, new SurfaceBuilderConfig(TestMod.TEST_BLOCK.getDefaultState(), TestMod.TEST_BLOCK.getDefaultState(), TestMod.TEST_BLOCK.getDefaultState())).precipitation(RainType.RAIN).category(Category.PLAINS).depth(0.125F).scale(0.05F).temperature(0.8F).downfall(0.4F).waterColor(4159204).waterFogColor(329011).parent((String) null)); DefaultBiomeFeatures.addCarvers(this); DefaultBiomeFeatures.addLakes(this); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.SHEEP, 12, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.PIG, 10, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.CHICKEN, 10, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.COW, 8, 4, 4)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.HORSE, 5, 2, 6)); this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.DONKEY, 1, 1, 3)); this.addSpawn(EntityClassification.AMBIENT, new SpawnListEntry(EntityType.BAT, 10, 8, 8)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SPIDER, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SKELETON, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.CREEPER, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SLIME, 100, 4, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4)); this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.WITCH, 5, 1, 1)); } } It's solved by using OverworldGenSettings#setDefaultBlock.
  18. I see... Thank you!
  19. My block can be crafted most of the items. So I don't need resources.
  20. Yes. I want to go the end in the world. So I need Stronghold.
  21. Should I make a custom biome?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.