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

Method render

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

Source from the content-addressed store, hash-verified

68 }
69
70 @Override
71 public void render(int x, int y, boolean withGenericAttributes) {
72 if (item == null)
73 return;
74 ((Variables) MinecraftFactory.getVars()).renderItem(item, x, y);
75
76 if (withGenericAttributes) {
77 for (aet modifier : aet.values()) {
78 Multimap<String, afl> multimap = item.a(modifier);
79 for (Map.Entry<String, afl> entry : multimap.entries()) {
80 afl attribute = entry.getValue();
81 double value = attribute.d();
82 if (ITEM_MODIFIER_UUID.equals(attribute.a())) {
83 if (((Variables) MinecraftFactory.getVars()).getPlayer() == null) {
84 value += 1;
85 value += (double) awc.a(item, afa.a);
86 } else {
87 value += ((Variables) MinecraftFactory.getVars()).getPlayer().a(ang.f).b();
88 value += (double) awc.a(item, afa.a);
89 }
90 }
91 if (entry.getKey().equals("generic.attackDamage") || entry.getKey().equals("generic.armor")) {
92 GLUtil.disableDepth();
93 GLUtil.pushMatrix();
94 GLUtil.translate(x + 8, y + 10, 1);
95 GLUtil.scale(0.7f, 0.7f, 0.7f);
96 MinecraftFactory.getVars().drawString(ChatColor.BLUE + "+" + Math.round(value), 0, 0);
97 GLUtil.popMatrix();
98 GLUtil.enableDepth();
99 }
100 }
101 }
102 }
103 }
104
105 public static String getResourceKey(ata item) {
106 pc resourceLocation = asw.f.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