![Architect's Palette [FABRIC]](https://media.forgecdn.net/avatars/thumbnails/387/802/256/256/637578262044642359.png)
AP registers two tree features, minecraft:twisted and architects_palette:twisted
reoseah opened this issue ยท 1 comments
So, there are two configured features that ArchitectsPalette registers: minecraft:twisted
and architects_palette:twisted
.
At
minecraft:twisted
one, later at architects_palette:twisted
, which is not used anywhere, is being created and registered.
I imagine that happened during updating to 1.18.2, and I think instead you can call BuiltinRegistries.CONFIGURED_FEATURE.getEntry(...)
from SaplingGenerator.getTreeFeature
, which could look like this (haven't tested, just guessing):
public class TwistedTree extends SaplingGenerator {
public static final ConfiguredFeature<TreeFeatureConfig, ?> TWISTED_TREE = new ConfiguredFeature<>(Feature.TREE, twisted().build());
@Nullable
@Override
protected RegistryEntry<? extends ConfiguredFeature<?, ?>> getTreeFeature(Random randomIn, boolean largeHive) {
return BuiltinRegistries.CONFIGURED_FEATURE.getEntry(BuiltinRegistries.CONFIGURED_FEATURE.getKey(TWISTED_TREE).orElseThrow()).orElseThrow();
}
public static TreeFeatureConfig.Builder twisted() {
return new TreeFeatureConfig.Builder(BlockStateProvider.of(APBlocks.TWISTED_LOG),
new ForkingTrunkPlacer(5, 2, 2),
BlockStateProvider.of(APBlocks.TWISTED_LEAVES),
new AcaciaFoliagePlacer(ConstantIntProvider.create(2), ConstantIntProvider.create(0)),
new TwoLayersFeatureSize(1, 0, 2))
.ignoreVines();
}
public static void registerTreeFeature() {
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier(ArchitectsPalette.MOD_ID, "twisted"), TWISTED_TREE);
}
}