Skip to content

Add concrete cauldron conversion QoL - #30

Open
Kauziin wants to merge 1 commit into
mainfrom
qol/concrete-cauldron
Open

Add concrete cauldron conversion QoL#30
Kauziin wants to merge 1 commit into
mainfrom
qol/concrete-cauldron

Conversation

@Kauziin

@Kauziin Kauziin commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • register a new QoL runtime for concrete cauldron interactions along with a dedicated qol folder
  • let filled vanilla cauldrons convert matching concrete powder stacks into solid concrete
  • consume cauldron water based on the converted stack size and safely spill overflow items when the inventory is full

Why

  • smol qol. why not

Files touched

  • BP/scripts/main.js
  • BP/scripts/qol/concrete_cauldron.js

Notes

  • I don't know if UtilityCraft is a machine add-on or a utility one anymore

## Scripts
- registered the new concrete cauldron QoL runtime from BP/scripts/main.js.
- convert concrete powder stacks into their matching concrete blocks when used on filled vanilla cauldrons.
- consume cauldron water based on the converted stack size and drop overflow safely when the player inventory is full.
Copilot AI review requested due to automatic review settings May 29, 2026 16:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new QoL interaction that lets players right-click a (filled) vanilla cauldron with concrete powder to convert it into matching concrete, consuming cauldron water and spilling overflow items when the inventory is full.

Changes:

  • Register a new world.beforeEvents.playerInteractWithBlock handler for minecraft:cauldron.
  • Convert <color>_concrete_powder into <color>_concrete up to a per-fill-level cap, then reduce fill_level.
  • Add converted items to inventory and spawn overflow above the cauldron.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
BP/scripts/qol/concrete_cauldron.js Implements the cauldron → concrete conversion behavior and water consumption logic.
BP/scripts/main.js Imports the new QoL module so it registers at runtime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


event.cancel = true

const selectedSlot = player.selectedSlotIndex
Comment on lines +26 to +30
const fillLevel = block.permutation.getState('fill_level')
if (typeof fillLevel !== 'number' || fillLevel < 2) return

const concreteId = getConcreteId(itemStack.typeId)
if (!concreteId) return
Comment on lines +67 to +71
const cauldronBlock = player.dimension.getBlock(location)
if (!cauldronBlock || cauldronBlock.typeId !== 'minecraft:cauldron') return

const nextLevel = Math.max(0, fillLevel - getLevelsConsumed(toConvert))
cauldronBlock.setPermutation(cauldronBlock.permutation.withState('fill_level', nextLevel))
@Kauziin Kauziin self-assigned this Jun 1, 2026
@Kauziin Kauziin added the QoL Optional features for quality of life enchancements label Jun 1, 2026
@Kauziin
Kauziin requested review from RealMilo504 and Copilot June 1, 2026 19:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment on lines +40 to +47
system.run(() => {
const inventory = player.getComponent('minecraft:inventory')?.container
const currentItem = inventory?.getItem(selectedSlot)

if (!inventory || !currentItem || currentItem.typeId !== itemStack.typeId) return

const toConvert = Math.min(currentItem.amount, maxConvertible)
if (toConvert <= 0) return
Comment on lines +67 to +71
const cauldronBlock = player.dimension.getBlock(location)
if (!cauldronBlock || cauldronBlock.typeId !== 'minecraft:cauldron') return

const nextLevel = Math.max(0, fillLevel - getLevelsConsumed(toConvert))
cauldronBlock.setPermutation(cauldronBlock.permutation.withState('fill_level', nextLevel))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QoL Optional features for quality of life enchancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants