Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void renderGuiItem(ItemStack pStack, int pX, int pY, BakedModel pBakedModel) {
- this.textureManager.getTexture(TextureAtlas.LOCATION_BLOCKS).setFilter(false, false);
- RenderSystem.setShaderTexture(0, TextureAtlas.LOCATION_BLOCKS);
- RenderSystem.enableBlend();
- RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
- RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
- PoseStack posestack = RenderSystem.getModelViewStack();
- posestack.pushPose();
- posestack.translate((double)pX, (double)pY, (double)(100.0F + this.blitOffset));
- posestack.translate(8.0D, 8.0D, 0.0D);
- posestack.scale(1.0F, -1.0F, 1.0F);
- posestack.scale(16.0F, 16.0F, 16.0F);
- RenderSystem.applyModelViewMatrix();
- PoseStack posestack1 = new PoseStack();
- MultiBufferSource.BufferSource multibuffersource$buffersource = Minecraft.getInstance().renderBuffers().bufferSource();
- boolean flag = !pBakedModel.usesBlockLight();
- if (flag) {
- Lighting.setupForFlatItems();
- }
- this.render(pStack, ItemTransforms.TransformType.GUI, false, posestack1, multibuffersource$buffersource, 15728880,
- OverlayTexture.NO_OVERLAY, pBakedModel);
- multibuffersource$buffersource.endBatch();
- RenderSystem.enableDepthTest();
- if (flag) {
- Lighting.setupFor3DItems();
- }
- posestack.popPose();
- RenderSystem.applyModelViewMatrix();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement