WayofTime / BloodMagic

The place where all of my mod stuffs is!
Other
296 stars 271 forks source link

[1.18] Mystical Agriculture integration failing #1919

Open Chaos02 opened 1 year ago

Chaos02 commented 1 year ago

Issue Description:

Am Modpack author. Log says Mystical agriculture integration fails.

[Worker-Main-5/ERROR] [bloodmagic/]: MysticalAgriculture integration cancelled: unable to find a class: com.blakebr0.mysticalagriculture.api.crop.ICrop

WayofTime commented 1 year ago

Thanks, will look at the changes to their methods later.

andrewsf commented 1 year ago

I noticed that "1.18 and older is NO LONGER SUPPORTED" but then breaking API changes were made in the 1.18 branch..

This MysticalAgriculture commit b77e79cb138e9b8461c33b9489b3539a36aeb516 removed the interface ICrop.

Removing an interface is a little bit crappy to do in an "api" package. But it was marked:

// TODO: 1.17: remove
@Deprecated

https://github.com/WayofTime/BloodMagic/blob/69b627090c55910be40c69ed9f8bd58de5863e07/src/main/java/wayoftime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java#L175

Now you just use the Crop class directly. And I don't know if it matters here but getCrop returns a net.minecraft.world.level.block.CropBlock, not a net.minecraft.block.CropsBlock (class renamed from 1.16 -> 1.18).