Issue Summary
Washing a shulker box in a chauldron should remove both colors
Detailed information
Steps to reproduce:
- Place a chauldron, fill it with with water
- Have in hand a shulker box with two colors applied
- Right click on the chauldron
Observed behavior:
- Only the primary (vanilla) color is removed
Expected behavior:
- The secondary (moded) color should be removed as well
Suggested fix
Some time back, I start developing a similar mod. However I don't maintain it, and yours is globally better anyway. 😀 However, I used the following method to solve this issue, which you mind find usefull.
// Override cauldron behavior to also clean the secondary color of shulker boxes
CauldronBehavior CLEAN_SHULKER_BOX = ((state, world, pos, player, hand, stack) -> {
ActionResult ret = CauldronBehavior.CLEAN_SHULKER_BOX.interact(state, world, pos, player, hand, stack);
if (ret != ActionResult.PASS && !world.isClient) {
ItemStack itemStack = player.getStackInHand(hand);
NbtCompound nbt = BlockItem.getBlockEntityNbt(itemStack);
if (nbt != null) ShulkerBoxBlockEntityExt.putNbtSecondaryColor(nbt, null);
}
return ret;
});
// Replace vanilla behavior by overriden behavior
Map<Item, CauldronBehavior> map = CauldronBehavior.WATER_CAULDRON_BEHAVIOR.map();
map.replaceAll((item, behavior) -> behavior == CauldronBehavior.CLEAN_SHULKER_BOX ? CLEAN_SHULKER_BOX : behavior);
Issue Summary
Washing a shulker box in a chauldron should remove both colors
Detailed information
Steps to reproduce:
Observed behavior:
Expected behavior:
Suggested fix
Some time back, I start developing a similar mod. However I don't maintain it, and yours is globally better anyway. 😀 However, I used the following method to solve this issue, which you mind find usefull.