mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
know your gusics
This commit is contained in:
parent
67a9c91950
commit
17712de204
@ -84,6 +84,7 @@ import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -882,6 +883,7 @@ public class ModEventHandlerClient {
|
||||
}
|
||||
|
||||
private static final ResourceLocation poster = new ResourceLocation(RefStrings.MODID + ":textures/models/misc/poster.png");
|
||||
private static final ResourceLocation poster_cat = new ResourceLocation(RefStrings.MODID + ":textures/models/misc/poster_cat.png");
|
||||
|
||||
@SubscribeEvent
|
||||
public void renderFrame(RenderItemInFrameEvent event) {
|
||||
@ -903,5 +905,23 @@ public class ModEventHandlerClient {
|
||||
tess.draw();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
||||
if(event.item != null && event.item.getItem() == Items.paper) {
|
||||
event.setCanceled(true);
|
||||
|
||||
double p = 0.0625D;
|
||||
double o = p * 2.75D;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(poster_cat);
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(0.5, 0.5 + o, p * 0.5, 1, 0);
|
||||
tess.addVertexWithUV(-0.5, 0.5 + o, p * 0.5, 0, 0);
|
||||
tess.addVertexWithUV(-0.5, -0.5 + o, p * 0.5, 0, 1);
|
||||
tess.addVertexWithUV(0.5, -0.5 + o, p * 0.5, 1, 1);
|
||||
tess.draw();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 774 KiB |
Loading…
x
Reference in New Issue
Block a user