Ability to have trees with trunks wider than 1 block
ferreusveritas opened this issue ยท 8 comments
This is a placeholder issue for a future feature. This is necessary for trees like dark oaks and giant sequoias to look and work properly.
Currently my plan is to use 2 blocks per tree family that uses thick trunks. At this point that will only be Dark Oak and Redwoods(giant sequoias) in BoP. One block will hold that radius value from 1-16, the other block 17-24. The complete radius range will therefor be 1-24. This is enough for trees with up to 3 block thick trunks which is more than enough for Dark Oaks and probably just enough for Redwoods.
The blocks can be wider than a standard minecraft block in the horizontal axis only. I will use this only for the trunk to minimize complications. If there are obstructions surrounding the trunk while it is growing it will not be able to exceed the standard log thickness. Dirt, leaves, and maybe stone could be destroyed if it impedes the trunk's outward growth. I will place "control" blocks around the trunk when it exceeds radius 8 to prevent players from setting blocks around a trunk that has already exceeded standard log thickness. When a tree is harvested I will cleanup up the control blocks. Blocks that will not interfere with expansion are other branch blocks and control blocks.
To texture these thick blocks I have to use a little artistic license. The sides will be the standard bark texture repeated like you would expect. However the tree ring texture would look pretty bad if it was a repeating pattern on the cut face. I intend to solve this problem by stretching the ring texture over the large face making a giant ring texture. This may not look so great but I imagine this to be preferable to the alternative.
I'd like to note that in vanilla not just dark oak are 2 wide, but jungle trees can be as well. Would you consider jungle trees for this plan?
will it only be a 2 wide maximum or is 3 a possibility? that way some biomes can have giant trees?
Currently the radius limit is 8 texels(Metadata 0-7 or 3/4 available metadata bits). A minecraft block is 16 texels wide. Since the radius is doubled to produce the diameter this has been sufficient.
This could be expanded to use 0-15 and use all 4 of the bits but that would only give us a tree that is 2 blocks wide but we want to go bigger than that. If we use 2 blockstates we can combine the 2 bit sets and get a radius of 1-32. Which means that the trunk could in theory be 4 blocks wide. Without resorting to a multiblock structure Minecraft has a limitation on block sizes for the model and collision detection volume and that is 3x3x3 blocks with the actual block in the middle. This is the same reason why some block models can go outside of the block(rustic chairs) and the collision volume can also(fences).
For this reason the plan is to make the tree trunks up to 3 blocks wide. Three meters is a very respectable maximum thickness and isn't exceeded by 99% of the tree species on earth. If larger trees are needed(giant sequoia) then it will need to be achieved through other means.