aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-19 23:00:31 +0300
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-19 23:00:31 +0300
commit0c90421761cd68f1aef6c1972644cb560509e095 (patch)
tree8ad327c79cd9626ca378353ee4c00a7db9e535cb
parent8ee43fdb284a4aa2fa3c25d6c7f6694b79ad391c (diff)
downloadLibGui-0c90421761cd68f1aef6c1972644cb560509e095.tar.gz
LibGui-0c90421761cd68f1aef6c1972644cb560509e095.tar.bz2
LibGui-0c90421761cd68f1aef6c1972644cb560509e095.zip
Don't use client-only getStackForRender() in WItem
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
index ffebe76..2572e83 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
@@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.systems.RenderSystem;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
+import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.util.math.MatrixStack;
@@ -107,7 +108,7 @@ public class WItem extends WWidget {
ImmutableList.Builder<ItemStack> builder = ImmutableList.builder();
for (ItemConvertible item : tag.values()) {
- builder.add(item.asItem().getStackForRender());
+ builder.add(new ItemStack(item));
}
return builder.build();