Skip to content

Commit

Permalink
Merge pull request #189 from Zundrel/master
Browse files Browse the repository at this point in the history
Add sapling to cutout layer. Fix saplings not generating trees properly.
  • Loading branch information
Shnupbups authored Dec 19, 2019
2 parents 9116803 + 9541ce7 commit 6cc0dab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public static void init() {
HallowedBlocks.INFUSION_ALTAR_BLOCK, HallowedBlocks.INFUSION_PILLAR_BLOCK, HallowedBlocks.RESTLESS_CACTUS,
HallowedBlocks.TINY_PUMPKIN, HallowedBlocks.TOMBSTONE, HallowedBlocks.BRAMBLES,
HallowedBlocks.DEADER_BUSH, HallowedBlocks.GLOOMSHROOM, HallowedBlocks.EERIE_GRASS,
HallowedBlocks.TALL_EERIE_GRASS, HallowedBlocks.DEADWOOD_DOOR, HallowedBlocks.DEADWOOD_TRAPDOOR,
HallowedBlocks.DEADWOOD_VINES);
HallowedBlocks.TALL_EERIE_GRASS, HallowedBlocks.DEADWOOD_SAPLING, HallowedBlocks.DEADWOOD_DOOR,
HallowedBlocks.DEADWOOD_TRAPDOOR, HallowedBlocks.DEADWOOD_VINES);

BlockRenderLayerMap.INSTANCE.putFluids(RenderLayer.getSolid(), HallowedFluids.BLOOD, HallowedFluids.FLOWING_BLOOD);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
package com.fabriccommunity.thehallow.registry;

import com.fabriccommunity.thehallow.TheHallow;
import com.fabriccommunity.thehallow.world.feature.*;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.gen.feature.BranchedTreeFeatureConfig;
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.MegaTreeFeatureConfig;
import net.minecraft.world.gen.feature.TreeFeatureConfig;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.foliage.BlobFoliagePlacer;
import net.minecraft.world.gen.stateprovider.SimpleStateProvider;
import net.minecraft.world.gen.surfacebuilder.SurfaceBuilder;
import net.minecraft.world.gen.surfacebuilder.SurfaceConfig;
import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig;

import com.fabriccommunity.thehallow.TheHallow;
import com.fabriccommunity.thehallow.world.feature.BarrowFeature;
import com.fabriccommunity.thehallow.world.feature.ColoredPumpkinFeature;
import com.fabriccommunity.thehallow.world.feature.DeaderBushFeature;
import com.fabriccommunity.thehallow.world.feature.HallowedCactusFeature;
import com.fabriccommunity.thehallow.world.feature.HallowedOreFeature;
import com.fabriccommunity.thehallow.world.feature.HallowedOreFeatureConfig;
import com.fabriccommunity.thehallow.world.feature.LargeDeadwoodTreeFeature;
import com.fabriccommunity.thehallow.world.feature.LargeSkeletalTreeFeature;
import com.fabriccommunity.thehallow.world.feature.RandomizedWildCropFeature;
import com.fabriccommunity.thehallow.world.feature.SmallDeadwoodTreeFeature;
import com.fabriccommunity.thehallow.world.feature.SmallSkeletalTreeFeature;
import com.fabriccommunity.thehallow.world.feature.SpiderLairFeature;
import com.fabriccommunity.thehallow.world.feature.StoneCircleFeature;
import com.fabriccommunity.thehallow.world.feature.WitchWellFeature;

/**
* @author Indigo Amann
*/
Expand All @@ -47,7 +30,10 @@ public class HallowedFeatures {
public static final Feature<DefaultFeatureConfig> STONE_CIRCLE = register("stone_circle", new StoneCircleFeature());
public static final Feature<BranchedTreeFeatureConfig> SMALL_DEADWOOD_TREE = register("small_deadwood_tree", new SmallDeadwoodTreeFeature(BranchedTreeFeatureConfig::deserialize2));
public static final Feature<MegaTreeFeatureConfig> LARGE_DEADWOOD_TREE = register("large_deadwood_tree", new LargeDeadwoodTreeFeature(MegaTreeFeatureConfig::method_23408));


public static final BranchedTreeFeatureConfig SMALL_DEADWOOD_TREE_CONFIG = (new BranchedTreeFeatureConfig.Builder(new SimpleStateProvider(HallowedBlocks.DEADWOOD_LOG.getDefaultState()), new SimpleStateProvider(HallowedBlocks.DEADWOOD_LEAVES.getDefaultState()), new BlobFoliagePlacer(2, 0))).baseHeight(4).heightRandA(2).foliageHeight(3).noVines().build();
public static final MegaTreeFeatureConfig LARGE_DEADWOOD_TREE_CONFIG = (new MegaTreeFeatureConfig.Builder(new SimpleStateProvider(HallowedBlocks.DEADWOOD_LOG.getDefaultState()), new SimpleStateProvider(HallowedBlocks.DEADWOOD_LEAVES.getDefaultState()))).baseHeight(6).build();

private HallowedFeatures() {
// NO-OP
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
public class DeadwoodSaplingGenerator extends LargeTreeSaplingGenerator {
@Override
protected ConfiguredFeature<BranchedTreeFeatureConfig, ?> createTreeFeature(Random rand) {
return HallowedFeatures.SMALL_DEADWOOD_TREE.configure(null);
return HallowedFeatures.SMALL_DEADWOOD_TREE.configure(HallowedFeatures.SMALL_DEADWOOD_TREE_CONFIG);
}

@Override
protected ConfiguredFeature<MegaTreeFeatureConfig, ?> createLargeTreeFeature(Random var1) {
return HallowedFeatures.LARGE_DEADWOOD_TREE.configure(null);
return HallowedFeatures.LARGE_DEADWOOD_TREE.configure(HallowedFeatures.LARGE_DEADWOOD_TREE_CONFIG);
}
}

0 comments on commit 6cc0dab

Please sign in to comment.