End Portal Recipe (Fabric)

End Portal Recipe (Fabric)

35.8k Downloads

Slight improvement suggestion for util.Util.java in TreeHarvester

lamoyrl90 opened this issue ยท 1 comments

commented

Information

Mod name: Tree Harvest

Feature description

A minor code adjustment to your TreeHarvester mod could improve its compatibility with other mods. I've noticed in Environmental, the Wisteria Leaves block doesn't extend LeavesBlock. In TreeHarvester's util.Util.java class, the IsTreeLeaf() method could check if the block is in the tag minecraft:leaves instead of checking if it's an instance of LeavesBlock. A similar change could also be applied to the isTreeLog() method.

Particularly, line 86 reads
if (block instanceof LeavesBlock || block instanceof BushBlock)

It could instead read
if (block.isIn(BlockTags.LEAVES) || block instanceof BushBlock)

This would also make it possible to modify your mod's checks with datapacks, although I'm not sure how useful that would be lol.

commented

Thanks for the suggestion! I've added BlockTags to both leaves and logs in version 2.9 of Tree Harvester.

https://www.curseforge.com/minecraft/mc-mods/tree-harvester/files/all