Allow shields to use banner meta#745
Conversation
|
Has this been added and will have support in next release ? |
|
This PR is incomplete as the deserialization needs to be implemented as well. Please make sure you test PRs before you submit them. P.S. Spigot does not provide support for Shield meta at this point in time. |
|
Sorry that it's incomplete. Spigot does support shield meta though, because this command works (sans colored name): /give player minecraft:shield 1 0 {BlockEntityTag:{Base:14,Patterns:[{Pattern:gra,Color:11},{Pattern:gru,Color:1},{Pattern:tt,Color:11},{Pattern:cbo,Color:0},{Pattern:tt,Color:0},{Pattern:moj,Color:0},{Pattern:mc,Color:0},{Pattern:bo,Color:0}]},display:{Name:§4§lAr§0§le§4§ls's §4Shield}} So can this be added? |
|
That's not a Spigot command. That's a Minecraft command. When I say Spigot I mean the Spigot API. |
|
Spigot does provide support for shield meta at this time (and has for several months). ItemStack shield = new ItemStack( Material.SHIELD );
BlockStateMeta meta = (BlockStateMeta) shield.getItemMeta();
Banner banner = (Banner) meta.getBlockState();
banner.setBaseColor( DyeColor.BROWN );
banner.addPattern( new Pattern( DyeColor.PINK, PatternType.CROSS ) );
banner.addPattern( new Pattern( DyeColor.RED, PatternType.CREEPER ) );
banner.update();
meta.setBlockState( banner );
shield.setItemMeta( meta );
event.getPlayer().getInventory().addItem( shield ); |
|
@md-5 Is there a reason it's not done traditionally (i.e. via BannerMeta)? |
Ask Mojang. I think it's actually a pretty smart idea, attaching a banner directly to a shield. Much simpler to implement and allows for future possibilities. |
No description provided.