Enginecrafter77 / SurvivalInc

A Minecraft mod that aims to make your minecraft life a little bit more annoying
https://www.curseforge.com/minecraft/mc-mods/survival-inc
MIT License
9 stars 6 forks source link

Feature Request: Canteen as a water container #48

Open theLadyStardust opened 3 years ago

theLadyStardust commented 3 years ago

Canteen as a water container Having the canteen being able to hold water instead of just acting as if it had durability would mean that it could be filled with, say, a Reservoir from Thermal Expansion. It would act the same, being able to be filled up with water bottles or with a water source, but also be able to be refilled automatically.

gatoborrachon commented 3 years ago

mmm, it just would require to add a function to detect if the block from what you want to fill (a tank) has a FluidTank and if the fluid is "water" (at least from the opinion of a begginer),

but you could also add a CraftTweaker recipe in the machine of any mod (to fill things with water, like the Bottler of IE) so that you can insert the input "Canteen" and output the same item canteen filled with water (as a NBT Tag), use /ct hand with an empty canteen and with a filled one so you have the 2 states

but anyways, lets see what EngineCrafter77 has to say, maybe he has a better implementation on mind

Enginecrafter77 commented 3 years ago

I'm sorry that I'm not as active these days. I don't want to over-apologize again (because it might get annoying over time) so I will continue on topic.

I think I agree with @gatoborrachon, we should definitely check whether the block is a tank or a water block. Additionally, I think there may be some fluid handling capacity for items. I mean, that's what the other mods are probably using so TE machines recognize their fluid containers automatically. So I think I should do something similar. But using this approach, I'm facing an issue with the water quality functionality, as this would render it completely unusable. Like, fluids can't have NBT, right? One possible solutions would be to reduce the water quality functionality to only 3 variants of water (like it used to work in Schopcraft): fresh water, salt water and contaminated water (from swamps). But since the liquids could be extracted from the canteen and repacked again, this would create a loophole where players could pump the water out from swamps let's say and put it into the canteens and it would count as fresh water. One solution for this would be to reuse the existing ChunkFilter class to run the generated chunks through a filter which would replace the fresh water in swamps with contaminated water (sea water would work likewise). But this will create a slight performance hit in return.

So, to summarize what I have said:

3 water types loophole:

Let me know your ideas about this.

theLadyStardust commented 3 years ago

Thanks for giving my idea a look! Items can have fluid handling, see the Reservoir in TE that I referenced in my original post. I really like the filtering machine idea with implementing different types of water for different biomes, maybe including water filters that take durability (maybe you can smelt them to clean them and reset durability?), and/or using power to do so (maybe in vanilla/sans power, they have to see the sun?)

Enginecrafter77 commented 3 years ago

Actually I think SchopCraft used to have something like the filters. But when I got into this mod I couldn't really see a use for them anymore because I temporarily scrapped the whole idea of water quality, I just deleted them. But in the context of the machines, they would kinda make sense. And if TE wasn't installed, then some primitive machine could be made, or even just crafting the filter with the canteen if I'm really desperate.

Anyways I will have to think about the possible implementation ways first, and it really depends on my free time (which is kinda scarce these days). I will let you know here when I make any considerable progress on it.

gatoborrachon commented 3 years ago

I don't want to over-apologize again

nah yeah, don't worry, i think we should not care that much just for this

+and regarding to your implementation: -(As far as i know) We can find a pretty similar situtation in the mod TerraFirmaCraft, they replaced Vanilla Water with (at least 2) types of water: Fresh and Salty water, but by what i was able to hear, they had some issues when interacting with some machines from different mods, like the Railcraft Boiler (the only one i know, at least)

+While i was investigating the above comment, this came to my mind: -leave the water biome quality system as it is -Create a new fluid: Purified Water ("purifiedwater", which can be obtained by boiling a Water Bottle in a furnace OR with a rudimentary purifier, something like this or from any other machine in a CraftTweaker script) -Changing the behavior of the Canteen to only accept being filled with this "purifiedwater" and vanilla "water" (making it a Fluid Container exclusive for these fluids when it is in its "refilling" state) AND then (only when it changed to its "drinkable" state) exchange the contained fluid into a NBT value (just like it is now), so "purifiedwater" is 100% potable water, and "water" could be salty water on the NBT system.

As an additional note, (if you actually like the idea of implementing 3 types of water (and maybe having a way to exchange between Fresh water and Vanilla water, being able to use it in machines/mechanics that are hardcoded to use vanilla water)) i think that the only reason why adding these 3 types of water would worth the effort would be if there were more features around them, (like in TFC), but idk if that would be in the scope of the mod

(although i would not be against something new, like using Salty water to create Brine, and using that brine (inside special barrels) to store food to slow down its putrefaction, or creating a freezing chamber as an advanced method, or even an energyzed cooler (that requires FE) when you have mods that produce it, i have a more developed idea about this to avoid 2 big issues around it, but only if you would like to hear it, i don't want to post a bigger text wall than i already did)

Finally, i could recommend that for anything on this level (Early game) it would be better to follow the Cult of Kitteh, which consist on not using GUIs to have an immersive gameplay, and this idea is pretty well implemented in PrimalCore