You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 boxesCauldronBehaviorCLEAN_SHULKER_BOX = ((state, world, pos, player, hand, stack) -> {
ActionResultret = CauldronBehavior.CLEAN_SHULKER_BOX.interact(state, world, pos, player, hand, stack);
if (ret != ActionResult.PASS && !world.isClient) {
ItemStackitemStack = player.getStackInHand(hand);
NbtCompoundnbt = BlockItem.getBlockEntityNbt(itemStack);
if (nbt != null) ShulkerBoxBlockEntityExt.putNbtSecondaryColor(nbt, null);
}
returnret;
});
// Replace vanilla behavior by overriden behaviorMap<Item, CauldronBehavior> map = CauldronBehavior.WATER_CAULDRON_BEHAVIOR.map();
map.replaceAll((item, behavior) -> behavior == CauldronBehavior.CLEAN_SHULKER_BOX ? CLEAN_SHULKER_BOX : behavior);
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: