Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Compatibility with PR MCreator/MCreator#653
Browse files Browse the repository at this point in the history
  • Loading branch information
KlemenDEV committed Dec 17, 2020
1 parent bdf4538 commit efa88b0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions forge-1.14.4/templates/biome.java.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ package ${package}.world.biome;
addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Biome.createDecoratedFeature(Feature.CACTUS, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(${data.cactiPerChunk})));
</#if>

<#if (data.sandPathcesPerChunk > 0)>
addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.DISK, new SphereReplaceConfig(Blocks.SAND.getDefaultState(), 7, 2, Lists.newArrayList(${mappedBlockToBlockStateCode(data.groundBlock)}, ${mappedBlockToBlockStateCode(data.undergroundBlock)})), Placement.COUNT_TOP_SOLID, new FrequencyConfig(${data.sandPathcesPerChunk})));
<#if (data.sandPatchesPerChunk > 0)>
addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.DISK, new SphereReplaceConfig(Blocks.SAND.getDefaultState(), 7, 2, Lists.newArrayList(${mappedBlockToBlockStateCode(data.groundBlock)}, ${mappedBlockToBlockStateCode(data.undergroundBlock)})), Placement.COUNT_TOP_SOLID, new FrequencyConfig(${data.sandPatchesPerChunk})));
</#if>

<#if (data.gravelPatchesPerChunk > 0)>
Expand Down Expand Up @@ -315,7 +315,7 @@ package ${package}.world.biome;
|| state.getBlock() == ${mappedBlockToBlockStateCode(data.treeVines)}.getBlock()
|| state.getBlock() == ${mappedBlockToBlockStateCode(data.treeBranch)}.getBlock()){

<#if data.spawnVines>
<#if !data.treeVines.isEmpty()>
if (genh > 0) {
if (rand.nextInt(3) > 0 && world.isAirBlock(position.add(-1, genh, 0)))
setTreeBlockState(changedBlocks, world, position.add(-1, genh, 0), ${mappedBlockToBlockStateCode(data.treeVines)}, bbox);
Expand All @@ -333,7 +333,7 @@ package ${package}.world.biome;
}
}

<#if data.spawnVines>
<#if !data.treeVines.isEmpty()>
for (int genh = position.getY() - 3 + height; genh <= position.getY() + height; genh++) {
int k4 = (int) (1 - (genh - (position.getY() + height)) * 0.5);
for (int genx = position.getX() - k4; genx <= position.getX() + k4; genx++) {
Expand Down Expand Up @@ -365,6 +365,7 @@ package ${package}.world.biome;
}
</#if>

<#if !data.treeFruits.isEmpty()>
if (rand.nextInt(4) == 0 && height > 5) {
for (int hlevel = 0; hlevel < 2; hlevel++) {
for (Direction Direction : Direction.Plane.HORIZONTAL) {
Expand All @@ -376,6 +377,7 @@ package ${package}.world.biome;
}
}
}
</#if>

return true;
} else {
Expand Down

0 comments on commit efa88b0

Please sign in to comment.