Cart Contraptions now keep their item name

This commit is contained in:
grimmauld 2020-12-04 16:59:05 +01:00
parent da5ae87bec
commit f85c47e9b1

View File

@ -209,7 +209,7 @@ public class MinecartContraptionItem extends Item {
OrientedContraptionEntity contraption = (OrientedContraptionEntity) passengers.get(0);
if (!event.getWorld().isRemote) {
player.inventory.placeItemBackInInventory(event.getWorld(), create(type, contraption));
player.inventory.placeItemBackInInventory(event.getWorld(), create(type, contraption).setDisplayName(entity.getCustomName()));
contraption.remove();
entity.remove();
}