Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Bedrock Cauldron #231

Merged

Conversation

lonefelidae16
Copy link
Contributor

@lonefelidae16 lonefelidae16 commented Feb 27, 2023

please wait a moment while I play test on my 1.19.4-pre1 fabric server... Looks good

resolve #176

Important: Supports for Minecraft 1.19.4, not compatible with 1.19.3.

This allows to color the cauldron filled with water and dye the item by it, and to keep the Potion fluid.

New configurable option bedrockCauldron is available, and I haven’t added it to SettingsGUI. Please check BedrockifySettings.java.

I tried to describe the changes and it got long, so I collapsed it. Click to expand.


Behavior...

The Behavior from Bedrock Edition is Implemented

  • Empty Cauldron

    • Allows to place the Potion item; after placing, it will be a Glass Bottle
  • Water Cauldron

    • Allows water to be colored with the Dye item
    • Allows to place Splash Water Bottle and Lingering Water Bottle
  • Colored Water Cauldron

    • Allows the color of water to be changed with the Dye item
    • Allows the Dyeable item to dye three times (Bedrock’s Colored Water can dye six times)
    • Allows to take out water with the Glass Bottle; it will be a Water Bottle
    • Allows water to be placed with Water Bottles and the Water Bucket; the color will be lost
  • Potion Cauldron

    • Allows to take out potion with a Glass Bottle
    • Allows to place the same Potion item
    • Doesn’t allow to place the wrong Potions, Water Bottles and Buckets; the fluid in the cauldron and the item in your hand will empty, even if the fluid level is maximum

The Default Behavior from Java Edition is Retained

  • All Cauldrons, excluding Potion-filled
    • Other fluid can be placed without losing

Recipes

  • Revokes all dye recipes for the Dyeable item

Known Issues...
  • Different types of items can be stored in the cauldron, as long as they are of the same potion type. e.g. Fire Resistance and then Lingering Fire Resistance.
    In this case, the last stored item takes priority, so when all of the items are taken out with Glass Bottle, they will be Lingering Fire Resistance. This is the Bedrock specification.

  • Partially compatible with Extra Alchemy.
    ✅ Place the modded Potion fluid.
    ✅ Take out the modded Potion fluid.
    ✅ Launch without this mod while keeping the modded Potion fluid; appears black.
    ✅ Re-install this and take out the modded Potion fluid without errors.
    ❌ Empty the modded Potion container and get this. This case is an Empty Vial. That’s because the Potion Cauldron can only interact with the Glass Bottle, but if you take out the fluid with the Glass Bottle, it will be a Breakable Potion. The only exception is the Breakable Water Bottle; the Cauldron becomes a Water Cauldron (not a Potion fluid) and you get a Glass Bottle. It cannot be undone.


Changes...
  • update dependencies

    • sodium mc1.19.3-0.4.9
  • new configurable option in BedrockifySettings

    • boolean bedrockCauldron
  • new event callbacks have been registered in BedrockifyClient

    • the block color tint for ColoredWaterCauldronBlock and PotionCauldronBlock
    • the particle receiver for the behavior of Potion-filled Cauldron
  • registered mixins

    • mixin.client.compat.sodium.LinearColorBlenderMixin
    • mixin.common.features.cauldron.AbstractCauldronBlockMixin
    • mixin.common.features.cauldron.ArmorDyeRecipeMixin
    • mixin.common.features.cauldron.CauldronBehaviorMixin
    • mixin.common.features.cauldron.LeveledCauldronBlockAccessor
    • mixin.common.features.cauldron.MinecraftServerMixin
  • new files

    • common.block.cauldron.BedrockCauldronBehavior
    • common.block.entity.WaterCauldronBlockEntity
    • common.block.AbstractBECauldronBlock
    • common.block.ColoredWaterCauldronBlock
    • common.block.PotionCauldronBlock
    • common.features.cauldron.BedrockCauldronBlocks
    • assets/blockstates/colored_water_cauldron.json
    • assets/blockstates/potion_cauldron.json

This allows to color the cauldron filled with water and dye the item by it.

New configurable option `bedrockCauldron` is available, and I haven't added it to SettingsGUI. Please check `BedrockifySettings.java`.

* new configurable option in `BedrockifySettings`
  - boolean `bedrockCauldron`

* new block color tint has registered in `BedrockifyClient`
  - for `ColoredWaterCauldronBlock`

* registered mixins
  - `mixin.common.features.cauldron.AbstractCauldronBlockMixin`
  - `mixin.common.features.cauldron.ArmorDyeRecipeMixin`

* new files
  - `common.block.cauldron.BedrockCauldronBehavior`
  - `common.block.entity.WaterCauldronBlockEntity`
  - `common.block.ColoredWaterCauldronBlock`
  - `common.features.cauldron.BedrockCauldronBlocks`
  - `assets/blockstates/colored_water_cauldron.json`
This allows to keep the Potion fluid in Cauldron.

* new particle receiver has registered in `BedrockifyClient`
  - for the behavior of Potion-filled Cauldron

* add block definition in `BedrockCauldronBlocks`
  - `PotionCauldronBlock`

* update `BedrockCauldronBehavior.java`
  - add behavior of potions

* registered mixins
  - `mixin.common.features.cauldron.CauldronBehaviorMixin`
  - `mixin.common.features.cauldron.LeveledCauldronBlockAccessor`
  - `mixin.common.features.cauldron.MinecraftServerMixin`

* new files
  - `common.block.AbstractBECauldronBlock`
  - `common.block.PotionCauldronBlock`
  - `assets/blockstates/potion_cauldron.json`
* update dependencies
  - sodium mc1.19.3-0.4.9

* registered mixin
  - `mixin.client.compat.sodium.LinearColorBlenderMixin`
* update `AbstractBECauldronBlock`
* update `BedrockCauldronBehavior`
@lonefelidae16 lonefelidae16 marked this pull request as ready for review February 27, 2023 12:07
Set the loot table and block tag.

* new files
  - `data/bedrockify/loot_tables/blocks/colored_water_cauldron.json`
  - `data/bedrockify/loot_tables/blocks/potion_cauldron.json`
  - `data/minecraft/tags/blocks/cauldrons.json`
Fabric API has some useful event listeners.

* removed mixin
  - `mixin.common.features.cauldron.MinecraftServerMixin`

* update files
  - `Bedrockify.java`
  - `BedrockifyClient.java`
@juancarloscp52
Copy link
Owner

Hello! So sorry for the looong time to respond. I've been testing and seems to be working great. Thank you for this clean implementation and detailed description. Awesome work!!!

@juancarloscp52 juancarloscp52 merged commit 0100e24 into juancarloscp52:1.19.4 Mar 15, 2023
@lonefelidae16 lonefelidae16 deleted the feat/cauldron-behavior branch March 19, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants