Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

499 profile views

LeBonCharlie's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. For anyone interested, I fixed this by extending the data/minecraft/tags/blocks/logs.json file in my mod with my blocks ids.
  2. Oh yeah right, I'll definitely do that, thanks ! Also, that worked ! It's pretty ugly but by exploring Biome#createDecoratedFeature, I managed to add the feature trees that I wanted. Finally, the thing I had not taken into account was that vanilla leaves would not recognize my TrunkBlocks as block it can attach to and hence despawn! I guess it's the normal process to find a new problem each time one is solved
  3. Yeah I'll definitely take another look at it. I want to implement the fact that when you try to chop down a 5 blocks high tree, it takes 5 * log hardness. Right now, I implemented it as so in the TrunkBlock class: @Override public float getBlockHardness(BlockState blockState, IBlockReader worldIn, BlockPos blockPos) { return localTreeHeight(worldIn, blockPos) * super.blockHardness; } When the destruction propagation *is vertical*, the tree size is easy to compute, but if I add horizontal/diagonal propagation, I have to make sure that I don't count any log twice, and I think that one of your methods could solve that problem ! But anyway, my main issue right now is to have the vanilla trees use my TrunkBlock instead of vanilla <wood>_LOG Block. I think I could manage it by creating a custom Feature tree for each occurring tree in the calls to Biome#addFeature and somehow replace all of these occurrences but I don't know how yet
  4. Thanks for the help, but this seems really complex for my needs... I'll keep looking. Really cool feature these aging trees though !
  5. for my post to make more sense, my custom TrunkBlock propagates the destruction vertically, so that you'd only need to break one block to cut down a tree. With that conception the 2x2 trees are 4 trees. For that reason, and the fact that some trees (jungle, oak) have branches, i'll add a horizontal propagation
  6. I don't actually want to "detect" the trees but make them generate with my custom blocks. But maybe you're suggesting that it's possible to let the Vanilla trees generate as so and then detect them and replace the blocks ?
  7. I've added a custom trunk block to my mod and I'd like to replace all log blocks used in vanilla trees with that block. What would be the easiest way to achieve that ? I've seen that some tree features, for example TreeFeature, have a constructor where you can input the blocks to use to generate the tree, so I can register custom trees quite easily, but then I would have to remove all the vanilla trees to all biomes (if that is even possible) and add the custom ones. Is that a good solution ?
  8. Very new to modding, so I'm not sure about the first two questions. For the last one though, what I did was using Biome#addStructure to add my structure to the structures of a given Biome, then Biome#createDecoratedFeature to specify how your feature should be generated, and finally use the returned value in Biome#addFeature. I'm not sure it is necessary to use both addFeature and addStructure, seems a little weird. Anyway, hope that'll help you
  9. Hi, have you found a solution to this ? I want to create a Block similar to a brewing stand so I need to add a custom stat to the Vanilla "custom" StatType, but I cannot manage to register it
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.