Started by
Bxzaar
on
Topic category: Help with Minecraft modding (Java Edition)
Hi,
So I am making a mod and I want a custom banner in my structure. I am aware I could just create one and add it but if you were to mine it and pick it up it would say something like 'Light Blue Banner'. I want to make something more akin to the Illager Banners, which act like normal ones, just keep the name when mined.
TL;DR: A block that behaves like a banner, which just keeps a custom name when mined.
If you use a command generator then you can also set the Item name color and whether or not it's italicized.
It will keep this data when saved with a structure block.
For instance, putting in this command: /give @a lime_banner{BlockEntityTag:{Patterns:[{Pattern:cre,Color:15}]},display:{Name:'["",{"text":"Creeper Banner","italic":false,"color":"green"}]'}}
into a command block in either 1.20 or 1.20.1 will give you a banner named "Creeper Banner" with a green unitalicized name.
/give @a lime_banner{BlockEntityTag:{Patterns:[{Pattern:cre,Color:15}]},display:{Name:'["",{"text":"Creeper Banner","italic":false,"color":"green"}]'},HideFlags:32}
the second one will give you a banner that lacks any of the banner information and just contains the name.
This is a solid generator because it allows you to set these things easily with minimal command knowledge: https://www.gamergeeks.net/apps/minecraft/banner-maker
Hope this helps :)