JR1811 / Boatism

This mod adds new engines to the existing boats in Minecraft.
MIT License
1 stars 1 forks source link

[Request] Fuel handling and Engine HP #10

Open Shinchai opened 6 months ago

Shinchai commented 6 months ago

Currently stuck trying to find sea pickles for fuel, nearest village got wiped by zombies (I don't even know if they sell pickles) and i started in the middle of a deep ocean biome (not warm ocean which spawns corals resulting in pickles) and i've enabled large biomes so i've been boating A LOT trying to find warm ocean (let alone any other biome). Gonna try nether fast travel to see if I can cover more ground.

I would appreciate if there was an alternative fuel source (maybe with different qualities like dirty fuel that works but has higher malfunction/overheat rate) to make this easier mod easier to take advantage of.

JR1811 commented 6 months ago

Thank you for the suggestion!

I had planned to introduce a new fluid source to the mod as fuel, but due to the time limit of the ModFest event, I put in the fuel bucket (more or less as a debug item). This will most likely be worked on pretty soon, and I am also looking into ways to incorporate other mods which introduce fluid handling.

If you need a fix urgently, you can change the recipe by making a small Datapack for your world with the namespace of boatism instead of minecraft. https://minecraft.wiki/w/Tutorials/Creating_a_data_pack#Recipes

Shinchai commented 6 months ago

Managed the recipe modification approach, thanks! Also, I notice that ur recipe for fuel bucket duplicates the bucket, once on item creation (the water bucket is returned as empty) and again on refuel(engine refuel returns an empty bucket) Nvm, was my eyes playing tricks on me

Shinchai commented 6 months ago

Does the engine disappear when it fails? I got attacked by trident-wielding drowned. I reclaimed the boat but the engine is nowhere to be found. I am using a mod that gives items extending pick-up range so I'm positive it's not just somewhere on the seabed.

JR1811 commented 6 months ago

The engine entity itself has an HP value (which plating should help out with), so it can technically die. If the linked boat gets destroyed while the engine still exists, the engine will be dropped as an item with all the attachments still on it. They just don't render in item form.

Shinchai commented 6 months ago

It's a nightmare to deal with so far. Made the engine twice, upgraded it(not armour lol since it overlaps with fuel canister). Got destroyed in one hit by trident-wielding scum both times despite moving at high speed. Good thing there's a config to tweak the engine properties.

EDIT: Forgot to mention engine keeps the boat moving if u disembark the boat lmfao.

And one last question hopefully. How much fuel does one bucket give?

Actually lots of questions(or requests),

I've increased most of the engine properties by a great factor (base hp x10, base fuel x25 etc) however some things still cause confusion:

I raised overheat threshold but it does not affect the overheat warning (i assume it's because warning is related to rate of overheat instead of how soon it will overheat)

I initially assumed the engine is just a modification to the boat's properties (making it go faster when the engine is on) but the engine providing its own thrust - which is normal and sane - in addition to the rowing's own thrust makes no sense, which makes me wonder, is it possible to mod it so manual forward movement is disabled and only engine thrust is usable (with the row thrust power added to the engine's instead)?

JR1811 commented 6 months ago

It's a nightmare to deal with so far. Made the engine twice, upgraded it(not armour lol since it overlaps with fuel canister). Got destroyed in one hit by trident-wielding scum both times despite moving at high speed. Good thing there's a config to tweak the engine properties.

will take a look at balancing a bit more. Maybe it might be better to give it aloooot of health and destroy it if the boat goes down. But I can imagine that this could lead to side effects where the engine could be used as a shield.

Forgot to mention engine keeps the boat moving if u disembark the boat lmfao.

Yup, it's intended behaviour. An engine doesn't just stop just because you disembark. I could put that into the config too tho.

And one last question hopefully. How much fuel does one bucket give?

Like I mentioned earlier the bucket is more or less a debug item. It always fills up the engine completely. So strap on a canister first and then fill it up if you want to go further.

I raised overheat threshold but it does not affect the overheat warning (i assume it's because warning is related to rate of overheat instead of how soon it will overheat)

Technically the overheat warning is based on if it is starting to overheat. This always happens if the power level is above 6 or your power level is bigger than 3 and you boat is going slower than expected. You can drastically increase the overheat threshold with the exhaust item if needed, or change the base value in the config. The amount of overheat is currently displayed using the overheating sound but I planned on also displaying it in the coming UI feature.

I initially assumed the engine is just a modification to the boat's properties (making it go faster when the engine is on) but the engine providing its own thrust - which is normal and sane - in addition to the rowing's own thrust makes no sense, which makes me wonder, is it possible to mod it so manual forward movement is disabled and only engine thrust is usable (with the row thrust power added to the engine's instead)?

The engine's thrust value is added to the boat's velocity if a player is driving it. But yes in the backend there is a mechanism which calculates empty seats, load value, and other information. This is also what still allows the boat to take a curve at the moment. I was thinking about letting the boat engine rotate to clean up the visuals but I'm not sure on that one yet.

The power level can be changed using the scrolling or by using the keybinds in the settings.

Shinchai commented 6 months ago

But I can imagine that this could lead to side effects where the engine could be used as a shield.

Realistically, engines do make for good shields. It should render it inoperable and switch to a damaged variant if destroyed, or even give it durability points instead of mob HP, this way you can repair it on the anvil.

Like I mentioned earlier the bucket is more or less a debug item. It always fills up the engine completely. So strap on a canister first and then fill it up if you want to go further.

That's strange cuz when i configged the max fuel to 99999, refueling would never stop the low fuel warning. Just examined the code, it seems fuel add amount is hardcoded to 3000.

JR1811 commented 6 months ago

Yup, I see your point. Maybe limiting power levels/thrust and adding ways to repair it on the go with drawbacks might be a good way of dealing with that issue as well.

I double-checked the code too now. Seems like I capped it for the ModFest event a while ago. The bucket will probably be removed or changed completely so I won't change this value for now until the fuel rework.

Thanks for the testing!