Railcraft

Railcraft

34M Downloads

[Feature Request]: Support for Botania mana pool cart (Mana on wheels)

McSharidan opened this issue ยท 11 comments

commented

Please excuse a possible double post, in case I missed this feature request / wish somewhere.

Support for Botania minecart:
Botania adds a "Minecart with Mana Pool" (mana-cart) to the rail system, allowing transport of Botania mana via a rail network.

It would be amazing, if this "Minecart with Mana Pool" was supported by Railcraft's already excellent handlers and detectors.
Cart Dispenser does not accept the mana-cart in it's inventory.
Train Dispenser does not accept the mana-cart in it's inventory.
Advanced Detector does not accept the mana-cart in it's filter.

Observed so far:
The mana-cart can be crowbar and track linked or unlinked, as any other cart and/or locomotive.
The Train Detector correctly detects the mana-cart as part of a linked train.
The Any Detector correctly detects the mana-cart as being there.

I placed the "Minecart with Mana Pool" (mana-cart) inside a normal vanila dispenser and used a ComputerCraft script to read the contents of the dispenser. The mana-cart is reported as having a raw_name of: "item.poolminecart". WAILA reports it as: "Botania:poolMinecart". I have no further data available.

Thank you Covert for giving us this excellent mod and for taking the time to keep giving us updates.

Sharidan

commented

I do think it would be easier to have @Vazkii add support on their side, but I'm not sure.

commented

Things are clear that Vasco does never want to support cart mods. See VazkiiMods/Botania#719

commented

To be honest I'm not entirely sure from which side the code needs to be modified to support it, but my guess is that it's just a matter of appending existing filters in Railcraft to support it, if it's there. I could be wrong and I will gladly be proven wrong too. I'll let Sir CovertJaguar decide what he would like to do about this. If Sir CovertJaguar refers me to Vazkii, I'll gladly go have a talk with her :)

commented

Well...most likely the issue is the Mana Pool cart Item doesn't extend the vanilla ItemMinecart or the Railcraft API IMinecartItem. Meaning that Railcraft has no idea the item is a Minecart.

I don't actually have a system in place for specifically whitelisting items since I assumed that one of the previous two statements would always be true.

commented

Just for the record, it would be impossible to add a config option to whitelist specific items as minecarts, if that turns out to be necessary. Its kind of a pain for users though.

commented

Could you make an IMinecart interface instead of having us implement ItemMinecart?

commented

Note it says that placeCart() is optional, but only if you don't want a dispenser to be able to place it.

My implementation can be found here:
https://github.com/CovertJaguar/Railcraft/blob/master/src/main/java/mods/railcraft/common/carts/CartUtils.java#L75-75

But it would take some adaption.

commented

Awesome, I'll use that then

commented

Thanks to the both of you for taking the time to have a look at this. It's greatly appreciated :)

commented

Aah ok, well that makes sense.
I've been running a number of different tests the past few days, trying to get around the glitching invisible minecart and locomotive problem and also had a good chance to test out a lot of different Cart Dispenser setups for both spawning locomotives & carts, aswell as despawning them. The Cart Dispenser from Railcraft, can in fact de-spawn Vazkii's Manapool cart and eject it into pipes (I've been using both EnderIO item conduits and Thermal Dynamics itemducts), however the other way around doesnt work. I can't pipe the Manapool cart item back into the Cart Dispenser, just like I can't place the item in the Cart Dispenser through it's UI. If I get the code reference you are making correctly, that's because it doesnt inherit the Minecart item template, which then accounts for my observations of whitelisting-like events.

In any case, thank you for taking the time to check into this CovertJaguar. It's greatly appreciated. I'll go pester Vazkii about this :)