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

Method render

Minecraft-Utils/1.10/src/WrappedItemStack.java:65–98  ·  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 for (sb modifier : sb.values()) {
73 Multimap<String, st> multimap = item.a(modifier);
74 for (Map.Entry<String, st> entry : multimap.entries()) {
75 st attribute = entry.getValue();
76 double value = attribute.d();
77 if (ITEM_MODIFIER_UUID.equals(attribute.a())) {
78 if (((Variables) MinecraftFactory.getVars()).getPlayer() == null) {
79 value += 1;
80 value += (double) agx.a(item, sk.a);
81 } else {
82 value += ((Variables) MinecraftFactory.getVars()).getPlayer().a(za.e).b();
83 value += (double) agx.a(item, sk.a);
84 }
85 }
86 if (entry.getKey().equals("generic.attackDamage") || entry.getKey().equals("generic.armor")) {
87 GLUtil.disableDepth();
88 GLUtil.pushMatrix();
89 GLUtil.translate(x + 8, y + 10, 1);
90 GLUtil.scale(0.7f, 0.7f, 0.7f);
91 MinecraftFactory.getVars().drawString(ChatColor.BLUE + "+" + Math.round(value), 0, 0);
92 GLUtil.popMatrix();
93 GLUtil.enableDepth();
94 }
95 }
96 }
97 }
98 }
99
100 public static String getResourceKey(adz item) {
101 kn resourceLocation = ado.g.b(item.b());

Callers

nothing calls this directly

Calls 15

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
aMethod · 0.45
getValueMethod · 0.45
dMethod · 0.45

Tested by

no test coverage detected