MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / getBaseColor

Method getBaseColor

src/main/java/net/minecraft/item/ItemBanner.java:163–178  ·  view source on GitHub ↗
(ItemStack stack)

Source from the content-addressed store, hash-verified

161 }
162
163 private EnumDyeColor getBaseColor(ItemStack stack)
164 {
165 NBTTagCompound nbttagcompound = stack.getSubCompound("BlockEntityTag", false);
166 EnumDyeColor enumdyecolor = null;
167
168 if (nbttagcompound != null && nbttagcompound.hasKey("Base"))
169 {
170 enumdyecolor = EnumDyeColor.byDyeDamage(nbttagcompound.getInteger("Base"));
171 }
172 else
173 {
174 enumdyecolor = EnumDyeColor.byDyeDamage(stack.getMetadata());
175 }
176
177 return enumdyecolor;
178 }
179}

Callers 2

getColorFromItemStackMethod · 0.95

Calls 5

hasKeyMethod · 0.95
byDyeDamageMethod · 0.95
getIntegerMethod · 0.95
getSubCompoundMethod · 0.80
getMetadataMethod · 0.65

Tested by

no test coverage detected