use of net.aufdemrand.denizen.nms.util.jnbt.CompoundTag in project Denizen-For-Bukkit by DenizenScript.
the class PacketHelper_v1_9_R2 method showBannerUpdate.
@Override
public void showBannerUpdate(Player player, Location location, DyeColor base, List<Pattern> patterns) {
List<CompoundTag> nbtPatterns = new ArrayList<CompoundTag>();
for (Pattern pattern : patterns) {
nbtPatterns.add(NMSHandler.getInstance().createCompoundTag(new HashMap<String, Tag>()).createBuilder().putInt("Color", pattern.getColor().getDyeData()).putString("Pattern", pattern.getPattern().getIdentifier()).build());
}
CompoundTag compoundTag = NMSHandler.getInstance().getBlockHelper().getNbtData(location.getBlock()).createBuilder().putInt("Base", base.getDyeData()).put("Patterns", new ListTag(CompoundTag.class, nbtPatterns)).build();
showTileEntityData(player, location, 3, compoundTag);
}
Aggregations