Giter Site home page Giter Site logo

motivational-dragon / potion-blender Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 3.0 4.23 MB

Potion Blender is a small minecraft mod to merge potion effects into one item, allowing for interesting combinations.

License: GNU General Public License v3.0

Java 100.00%
fabricmc-mod forge-mod java minecraft

potion-blender's Introduction

Potion Blender

Curseforge Curseforge

Overview

Potion Blender is a small mod to merge potion effects into one item, allowing for interesting combinations.

Gif overview

How to use

1 - Cauldron

First, you need to make a special cauldron. Do so by right-clicking a campfire with a vanilla cauldron.

2 - Starting to blend

Then, throw a potion into the cauldron. It can be any vanilla potion that is not Splash or Lingering. The potion effects will be the base of your combined brew. You can then add up to two more potions (neither splash nor lingering) to add their effects to the final product.

Note that throwing any combined potion into the cauldron is strongly discouraged

3 - The final ingredient

Now it is time to finish the brewing and choose the type of potion you desire. You may choose one of three of these ingredients :

  • Nether wart ; Normal potion
  • Gunpowder ; Splash potion
  • Dragon Breath ; Lingering potion

4 - Using arrows

The combined potions can be used with arrows using the vanilla craft to add the combined effects to the arrows.

5 - Cancelling the blend

Reset the cauldron anytime by right-clicking on the cauldron to get back the ingredients.

Effect stacking

Adding the same effect to a potion multiple times results in effects adding. It, however, comes with a price as with each stacked effect gain decay. The first stacked effect adds 50% of its duration, and the 2nd one 25%.

Instant Effects does not stack as duplicated effects are lost.

Configuration

The configuration file is in your .minecraft folder at potionblender/potion_blender_config.json

The configurable options are:

  • max_effects: The maximum number of potions in a cauldron. Be careful when updating this value in an already existing world, as it may cause desync on an already placed cauldron.

Known issues

Some rendering mods (like sodium) can sometimes cause the cauldron to appear with water instead of the potion's colors.

License

This mod is available under the GPLv3 license.

potion-blender's People

Contributors

motivational-dragon avatar medustyy avatar

Stargazers

 avatar Guilherme avatar molli avatar

Watchers

 avatar

potion-blender's Issues

[Issue] Not working for Fabric 1.19.2

Hi! I really love the idea of this mod, however I can't fill the brewing cauldron with any potion :(
I don't know if there's some compatibility issue around it, I have a really long list of mods installed and some them maybe causing this issue.

I'm sending you the log. Thank you!
latest.log

Game breaking bug ATM9

Looks like potion blender breaks some other mods:
Original thread: P3pp3rF1y/Reliquary#645

"When right clicking a bucket of water into the apothecary cauldron it crashes the client game (not the server) and it breaks the chunk at and below the cauldron up to 16 blocks (probably isolated to the chunk section based on chunk viewing) causing existing and new blocks placed to not appear. Restarting doesn't fix the chunk only restoring a backup. The current modpack installed is All the Mods 9 pack version 0.0.65.

Context probably isn't relevant but I was trying to figure out why potion mixing wasn't working with certain mods, and trying to add water to cauldron's was part of the testing."

chunkbroken3
chunk broken1
chunk broken2

Crash Logs:
crash-2023-09-07_18.32.55-client.txt
crash-2023-09-07_17.58.53-client.txt

[Bug] Cauldron Block Doesn't follow campfire lit BlockState

2024-04-25.20-16-18.mp4

So as you can see in the video, the Blockstate of the placed campfire is campfire{BlockStateTag:{lit:"false"}} Though when placing the cauldron on top of it, it changes the campfire itself to be lit, which's a bit odd and in my opinion it breaks the whole imersion of it. I know that the cauldron block doesn't have an unlit state or anything, but it'd be nice to have it, specially because it'd complement vanilla minecraft quite well and give a seameless feeling to it.

Outdated version on Modrinth

The last version that's available on Modrinth is 1.1.0 for 1.20.1 (both forge and fabric), while on Curseforge the version 2.0.0 can be found, and even for 1.20.4
I'd like to know if the updated version will be available on Modrinth at some point, or I have no choice but to use Curseforge (Just asking for curiosity)

[Enhancement] Add recipe data type for Potion Blender

So basically one of the biggest issues rn is how recipes are all hard coded and based of of the ones in vanilla, i think this is a very impractical way of doing this as it leaves almost 0 ground for modpack makers and users in general to customize and create their own recipes for custom potions added by other mods.

My idea would be to handle potion recipes for potion blender simmilarly to how recipes for new crating stations like the "Crafting Table" are handled.

See below

{
    "type": "minecraft:crafting_shaped",
    "pattern": [
        "###",
        " / ",
        " / "
    ],
    "key": {
        "#": {
            "item": "minecraft:cobblestone"
        },
        "/": {
            "item": "minecraft:stick"
        }
    },
    "result": {
        "item": "minecraft:stone_pickaxe",
        "count": 1
    }
}

Recipe for a stone pickaxe

As you can see this could kinda be applied to potion blender, but i doubt it'd work the same way as it doesn't have it's own custom GUI, so maybe make it so instead of dropping potions you right click them on the cauldron, and you can customize the specific order you need to add them to the cauldron within the recipe data. Would also be nice to be able to set a different time for each recipe in the recipe data json.

This change would also allow people to add recipes that are not related at all with potions, like for example, if i wanted to make it so you get a specific item after right clicking them on the cauldron... (i.e 1° right click "Leather" on the cauldron, 2° right click honeycomb, wait X ammount of time specified in the recipe data, and get a new custom item "Tanned Leather")

I'm not sure if this is where you plan to take the mod, but i think this would also cut your work in relation to other mods by 90% as you'd be giving the tools to the community to make your mod more compatible with others.

Here's an example of what it could look like

{
    "type": "potionblender:cauldron",
     "duration":120, //In ticks or seconds, whatever is easier
    "pattern": [
        "#",
        "/"
    ],
    "key": {
        "#": {
            "item": "minecraft:leather"
        },
        "/": {
            "item": "minecraft:honeycomb"
        }
    },
    "result": {
        "item": "kubejs:tanned_leather",
        "count": 1
    }
}

Thats it :)
(Also i know it's easier said than done, but that'd be my solution for most of the problems i found when using this mod, might fork this and make these changes in the future, but yeah idk)

Potion Blender registers `potionblender:brewing_cauldron_recipe` twice, causing EMI to fail to load

Hi!

Potion Blender is loading 2 recipes for potionblender:brewing_cauldron_recipe causing the exception below. This exception effectively stops EMI (a JEI like client) to load properly when opening the inventory.

Informations

  • Mod Version: 3.1.0
  • Game Version: 1.20.1
  • Mod Loader: Fabric
  • Fabric API Version: 0.92.1+1.20.1
  • Mod Loaded:
    • Fabric API (0.92.1+1.20.1)
    • EMI (1.1.6+1.20.1)
    • Potion Blender (3.1.0)

Trace

The Below trace is the exerpt when the exception happens (just after loading EMI), if you want the full log I can give it to you.

[21:18:27] [Render thread/INFO]: [EMI] Joining server, EMI waiting for data from server...
[21:18:27] [Render thread/ERROR]: Error executing task on Client
java.lang.IllegalStateException: Duplicate recipe ignored with ID potionblender:brewing_cauldron_recipe
	at net.minecraft.class_1863.method_20704(class_1863.java:149) ~[client-intermediary.jar:?]
	at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
	at net.minecraft.class_1863.method_20702(class_1863.java:143) ~[client-intermediary.jar:?]
	at net.minecraft.class_634.method_11106(class_634.java:1440) ~[client-intermediary.jar:?]
	at net.minecraft.class_2788.method_11997(class_2788.java:32) ~[client-intermediary.jar:?]
	at net.minecraft.class_2788.method_11054(class_2788.java:14) ~[client-intermediary.jar:?]
	at net.minecraft.class_2600.method_11072(class_2600.java:22) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?]
	at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1175) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:802) ~[client-intermediary.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:250) ~[minecraft-1.20.1-client.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.11.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.11.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.11.jar:?]
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) ~[NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) ~[NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[NewLaunch.jar:?]
[21:18:27] [Render thread/INFO]: [EMI] Recipes synchronized, waiting for tags to reload EMI...
[21:18:28] [Render thread/INFO]: Loaded 2 advancements
[21:18:34] [Server thread/INFO]: Saving and pausing game...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.