aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/utils
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-12-05 20:02:56 -0500
committerGitHub <noreply@github.com>2020-12-05 20:02:56 -0500
commiteb87255d5a52e512aa8a26a2f4d9257eed935a02 (patch)
treedca8d1ab4196da94d5b0d45b53f49457fcecb15a /src/main/java/me/Danker/utils
parentb294ee1f83d85bc58bc9b9f97f94135d395ebf74 (diff)
parent72d6ae0777d19582136f6e5865fb830f6d712490 (diff)
downloadSkyblockMod-eb87255d5a52e512aa8a26a2f4d9257eed935a02.tar.gz
SkyblockMod-eb87255d5a52e512aa8a26a2f4d9257eed935a02.tar.bz2
SkyblockMod-eb87255d5a52e512aa8a26a2f4d9257eed935a02.zip
Merge pull request #36 from My-Name-Is-Jeff/development
Add Superpairs helper
Diffstat (limited to 'src/main/java/me/Danker/utils')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index 9d460bc..e0a7454 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -9,6 +9,7 @@ import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.network.NetworkPlayerInfo;
import net.minecraft.client.renderer.GlStateManager;
+import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.entity.RenderManager;
@@ -18,6 +19,7 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityItemFrame;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.ScoreObjective;
import net.minecraft.util.*;
import org.lwjgl.opengl.GL11;
@@ -363,6 +365,22 @@ public class Utils {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix();
}
+
+ public static void renderItem(ItemStack item, float x, float y, float z) {
+
+ GlStateManager.enableRescaleNormal();
+ RenderHelper.enableGUIStandardItemLighting();
+ GlStateManager.enableDepth();
+
+ GlStateManager.pushMatrix();
+ GlStateManager.translate(x, y, z);
+ Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(item, 0, 0);
+ GlStateManager.popMatrix();
+
+ GlStateManager.disableDepth();
+ RenderHelper.disableStandardItemLighting();
+ GlStateManager.disableRescaleNormal();
+ }
public static BlockPos getFirstBlockPosAfterVectors(Minecraft mc, Vec3 pos1, Vec3 pos2, int strength, int distance) {
double x = pos2.xCoord - pos1.xCoord;