Biomes O' Plenty

Biomes O' Plenty

151M Downloads

[REQUEST] compatibility for saplings with NeoTech's Logger

garath77 opened this issue ยท 9 comments

commented

I'm trying to figure out why NeoTech's logger machine will not accept your saplings to plant like the vanilla saplings. It does accept TechReborn's Rubber Tree saplings oddly enough.

Would you be willing to work with NeoTech's Devs on this? I'm asking them the same thing. Thanks

commented

Big issue here is BOPs saplings aren't correctly implemented in the first place. They register as saplings for other mods, but are missing all the checks to determine if they're plantable.

For instance, if you use an EnderIO Farming Station with BOP saplings, the farming station will attempt to plant them on ANYTHING, even air... causing the saplings to immediately pop off as invalid and blow away in the wind (so to speak)

commented

They implement IGrowable. What exactly is the difference between the two? I really don't know much about it myself.

commented

I'm no expert on these issues, but here's what I've pieced together.

IGrowable is a Minecraft interface that defines the methods required for handling tick-based growth and fertilization. IPlantable is a Forge interface that defines methods that allow for a Forge mod to determine if an item can be planted at a particular place, and if so what block is to be added to the world when that item is planted at that place. IPlantable requires two methods: EnumPlantType getPlantType(IBlockAccess world, BlockPos pos) and IBlockState getPlant(IBlockAccess world, BlockPos pos).

There's a bit of discussion about IPlantable on the Forge wiki (http://www.minecraftforge.net/wiki/Plants). From what I've seen, the idea is that anything that can be "planted" should implement IGrowable (implements fertilization and tick-driven growth) because without it you'll have to implement tick-based growth and fertilization yourself, and IPlantable because Forge, and Forge-based mods, expect it. I think the point of IPlantable is to abstract the process of determining if an item can be "planted", and if so, what block placed in the world when it is planted. The idea, I suppose, is to support mods that wish to implement mechanisms that simulate planting. The interface has been in Forge for a long time, but I'm not clear to what extent it's been used historically.

Interestingly, while ProgressiveAutomation requires saplings to be IPlantable, it doesn't appear to actually use either of IPlantable's methods in the planting code. @Vanhal may simply be using IPlantable as a check for whether the other mod's designed intended the item to be plantable or not, PA uses the Forge ore dictionary to determine if an item is a sapling everywhere else, and so in this case this might be a problem in PA. I haven't looked that closely at EnderIO, but I can say that they do a check for isinstance IPlantable in their farmer as well, but I didn't look to see if they have a fallback for items that aren't IPlantable instances.

The more I look into this, the more confused I get by it all.

commented

The fact that BOP saplings do not implement IPlantable prevents them from being used in ProgressiveAutomation's chopper. This is also what causes the EnderIO Farming Station problem that @ShadowDrakken mentioned.

A lot of people would be a lot happier if BOP would make its saplings implement IPlantable.

commented

Closing this since @GirafiStudios has now implemented IPlantable for saplings. If the issue stems from the other mods checking instanceof BlockSapling then I'm afraid it's something that'll need to be addressed on their end.

commented

First thing: I'm not a BoP dev, i'm just trying to help out :)
It is simply because of the way BoPs saplings is done, that don't allow it. They don't extend vanillas BlockSapling class, which Tech Reborns rubber sapling does.

commented

Ah, sorry for the confusion and thanks for the info. I can understand how it might be easier for NeoTech's devs to change coding, but without knowing how they've handled things for sure...

I guess I'll just have to wait to hear from them.

Thanms

commented

From my point of view, it would be easier to add support for the BoPs saplings on NeoTechs side :)

commented

I've requested of them as well. Haven't heard anything yet. The odd thing is that the rubber tree saplings from TechReborn works just fine with the NeoTech logger. I don't know the difference in how your saplings are coded vs how TRs is...