MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / render

Method render

Minecraft-Utils/1.8.9/src/WrappedItemStack.java:65–90  ·  view source on GitHub ↗
(int x, int y, boolean withGenericAttributes)

Source from the content-addressed store, hash-verified

63 }
64
65 @Override
66 public void render(int x, int y, boolean withGenericAttributes) {
67 if (item == null)
68 return;
69 ((Variables) MinecraftFactory.getVars()).renderItem(item, x, y);
70
71 if (withGenericAttributes) {
72 Multimap<String, qd> multimap = item.B();
73 for (Map.Entry<String, qd> entry : multimap.entries()) {
74 qd attribute = entry.getValue();
75 double value = attribute.d();
76 if (nameDisplayModifier.equals(attribute.a())) {
77 value = value + (double) ack.a(item, pw.a);
78 }
79 if (entry.getKey().equals("generic.attackDamage") || entry.getKey().equals("generic.armor")) {
80 GLUtil.disableDepth();
81 GLUtil.pushMatrix();
82 GLUtil.translate(x + 8, y + 10, 1);
83 GLUtil.scale(0.7f, 0.7f, 0.7f);
84 MinecraftFactory.getVars().drawString(ChatColor.BLUE + "+" + Math.round(value), 0, 0);
85 GLUtil.popMatrix();
86 GLUtil.enableDepth();
87 }
88 }
89 }
90 }
91
92 public static String getResourceKey(zx item) {
93 jy resourceLocation = zw.e.c(item.b());

Callers

nothing calls this directly

Calls 14

getVarsMethod · 0.95
disableDepthMethod · 0.95
pushMatrixMethod · 0.95
translateMethod · 0.95
scaleMethod · 0.95
popMatrixMethod · 0.95
enableDepthMethod · 0.95
drawStringMethod · 0.65
renderItemMethod · 0.45
getValueMethod · 0.45
dMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected