#1494: TreeType - add missing pale oak trees

This commit is contained in:
shanebeee 2024-10-24 07:07:57 +11:00 committed by md_5
parent 7b5b63b222
commit 55141ae996
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11
2 changed files with 11 additions and 1 deletions

View File

@ -53,7 +53,7 @@
WorldGenFeatureConfigured<?, ?> worldgenfeatureconfigured1 = (WorldGenFeatureConfigured) holder1.value(); WorldGenFeatureConfigured<?, ?> worldgenfeatureconfigured1 = (WorldGenFeatureConfigured) holder1.value();
IBlockData iblockdata2 = worldserver.getFluidState(blockposition).createLegacyBlock(); IBlockData iblockdata2 = worldserver.getFluidState(blockposition).createLegacyBlock();
@@ -165,11 +173,62 @@ @@ -165,11 +173,66 @@
return true; return true;
} }
@ -102,6 +102,10 @@
+ BlockSapling.treeType = TreeType.TALL_MANGROVE; + BlockSapling.treeType = TreeType.TALL_MANGROVE;
+ } else if (worldgentreeabstract == TreeFeatures.CHERRY || worldgentreeabstract == TreeFeatures.CHERRY_BEES_005) { + } else if (worldgentreeabstract == TreeFeatures.CHERRY || worldgentreeabstract == TreeFeatures.CHERRY_BEES_005) {
+ BlockSapling.treeType = TreeType.CHERRY; + BlockSapling.treeType = TreeType.CHERRY;
+ } else if (worldgentreeabstract == TreeFeatures.PALE_OAK) {
+ BlockSapling.treeType = TreeType.PALE_OAK;
+ } else if (worldgentreeabstract == TreeFeatures.PALE_OAK_CREAKING) {
+ BlockSapling.treeType = TreeType.PALE_OAK_CREAKING;
+ } else { + } else {
+ throw new IllegalArgumentException("Unknown tree generator " + worldgentreeabstract); + throw new IllegalArgumentException("Unknown tree generator " + worldgentreeabstract);
+ } + }

View File

@ -274,6 +274,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
case CHERRY: case CHERRY:
gen = TreeFeatures.CHERRY; gen = TreeFeatures.CHERRY;
break; break;
case PALE_OAK:
gen = TreeFeatures.PALE_OAK;
break;
case PALE_OAK_CREAKING:
gen = TreeFeatures.PALE_OAK_CREAKING;
break;
case TREE: case TREE:
default: default:
gen = TreeFeatures.OAK; gen = TreeFeatures.OAK;