mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Allow For Default Titles in InventoryView Builders (#12013)
This commit is contained in:
@@ -9,8 +9,12 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public AbstractContainerMenu createMenu(int containerId, Inventory playerInventory, Player player) {
|
||||
@@ -106,7 +_,7 @@
|
||||
return (Component)(second.hasCustomName() ? second.getDisplayName() : Component.translatable("container.chestDouble"));
|
||||
@@ -103,10 +_,10 @@
|
||||
if (first.hasCustomName()) {
|
||||
return first.getDisplayName();
|
||||
} else {
|
||||
- return (Component)(second.hasCustomName() ? second.getDisplayName() : Component.translatable("container.chestDouble"));
|
||||
+ return (Component)(second.hasCustomName() ? second.getDisplayName() : Component.translatable("container.chestDouble")); // Paper - diff on change - CraftDoubleChestInventoryViewBuilder.defaultTitle
|
||||
}
|
||||
}
|
||||
- });
|
||||
|
@@ -37,3 +37,12 @@
|
||||
protected ChestBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState blockState) {
|
||||
super(type, pos, blockState);
|
||||
}
|
||||
@@ -71,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
protected Component getDefaultName() {
|
||||
- return Component.translatable("container.chest");
|
||||
+ return Component.translatable("container.chest"); // Paper - diff on change - CraftStandardInventoryViewBuilder.defaultTitle
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user