Displayed new style name when changing betweeen them

This commit is contained in:
Rabbitminers 2023-04-30 20:59:30 +01:00
parent 5634670b27
commit 112306d5d4

View file

@ -178,7 +178,8 @@ public abstract class AbstractBogeyBlock extends Block implements ITE<StandardBo
sbte.setBogeyStyle(style);
if (size == getSize()) {
player.displayClientMessage(Lang.translateDirect("create.bogey.style.updated_style"), true);
player.displayClientMessage(Lang.translateDirect("create.bogey.style.updated_style")
.append(": " + style.displayName), true);
} else {
CompoundTag oldData = sbte.getBogeyData();
level.setBlock(pos, this.getStateOfSize(sbte, size), 3);
@ -186,7 +187,8 @@ public abstract class AbstractBogeyBlock extends Block implements ITE<StandardBo
if (!(newBlockEntity instanceof StandardBogeyTileEntity newTileEntity))
return InteractionResult.FAIL;
newTileEntity.setBogeyData(oldData);
player.displayClientMessage(Lang.translateDirect("create.bogey.style.updated_style_and_size"), true);
player.displayClientMessage(Lang.translateDirect("create.bogey.style.updated_style_and_size")
.append(": " + style.displayName), true);
}
return InteractionResult.CONSUME;
}