Skip to content

Instantly share code, notes, and snippets.

View DarkGuardsman's full-sized avatar
😴
5% burnout recovered

Robin - Queen Of Missiles DarkGuardsman

😴
5% burnout recovered
View GitHub Profile

With the release of Forge 14.23.2.2638, a proper way to render items with GL was implemented. Using this system is much simpler than the old system, which required a TileEntity, and does not allow access to the ItemStack.

Using TileEntityItemStackRenderer

TileEntityItemStackRenderer allows you to render your item using public void renderByItem(ItemStack itemStackIn).
There is an overload that takes partialTicks as a parameter, but it is never called in vanilla.

In order to use a TEISR, the Item must first satisfy the condition that its model returns true for IBakedModel#isBuiltInRenderer. Once that returns true, the Item's TEISR will be accessed for rendering. If it does not have one, it will use the default TileEntityItemStackRenderer.instance. For an example IBakedModel to use, see below.

@AtomicBlom
AtomicBlom / pixelate.shader
Created October 9, 2018 14:29
Pixelate effect for OBS Study (obs-shaderfilter plugin)
//-----------------------------------------------------------------------------------------
// Shader constant register mappings (scalars - float, double, Point, Color, Point3D, etc.)
//-----------------------------------------------------------------------------------------
uniform float horizontal_pixel_counts;
uniform float vertical_pixel_counts;
uniform float speed;
//--------------------------------------------------------------------------------------
// Sampler Inputs (Brushes, including ImplicitInput)
@mcenderdragon
mcenderdragon / Primer Forge Gradle Commands for 1.13 and later.md
Last active December 1, 2025 11:30
Short command list of what is now needed to setup forge and MDK

If a command breaks, use --no-daemon as the ForgeGradle currently doesn't uses it

Setup MDK (For Modders who want to create a mod)

package gigaherz.survivalist.rack;
import com.google.common.collect.Lists;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import javax.vecmath.Matrix4f;
import javax.vecmath.Vector4f;
import java.util.Arrays;
@dshadowwolf
dshadowwolf / convert-lang-files.c
Last active February 22, 2019 07:52
tiny utility to automate conversion of MC 1.12 and prior ".lang" files to the new (1.13+) json format for them
/*
* Copyright (c) 2019 Daniel "DShadowWolf" Hazelton
* GNU GPL v2 only
*
* build: gcc -o convert-lang-files convert-lang-files.c -lpcre
* use: convert-lang-files [input file] > [output file] [2> [logfile]]
* "[input file]" and "[output file]" are required, the "2>" bit is redirecting possible error output to a log-file
*
* NOTE: This will break if it finds a line that does not match <key>=<value> or #<comment> in the file outside of blank lines
*/
@carceneaux
carceneaux / remove_gitlab_artifacts.sh
Last active August 22, 2025 14:55
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: [email protected]
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#
@williewillus
williewillus / 1132_to_114.xml
Last active September 24, 2024 10:24
1.13.2 -> 1.14 migration mappings
<?xml version="1.0" encoding="UTF-8"?>
<migrationMap>
<name value="1.13.2 to 1.14" />
<description value="1.13.2 to 1.14 MCP changes" />
<entry oldName="net.minecraft.GameVersion" newName="net.minecraft.util.MinecraftVersion" type="class" />
<entry oldName="net.minecraft.advancements.AdvancementList.Listener" newName="net.minecraft.advancements.AdvancementList.IListener" type="class" />
<entry oldName="net.minecraft.advancements.RequirementsStrategy" newName="net.minecraft.advancements.IRequirementsStrategy" type="class" />
<entry oldName="net.minecraft.advancements.criterion.AbstractCriterionInstance" newName="net.minecraft.advancements.criterion.CriterionInstance" type="class" />
<entry oldName="net.minecraft.block.Block.EnumOffsetType" newName="net.minecraft.block.Block.OffsetType" type="class" />
<entry oldName="net.minecraft.block.BlockAbstractBanner" newName="net.minecraft.block.AbstractBannerBlock" type="class" />
import React from 'react';
import PropTypes from 'prop-types';
import KsPropTypes from 'ks/components/KsPropTypes';
const statusTypes = {
none: 'none',
pending: 'pending',
rejected: 'rejected',
resolved: 'resolved',
};
// ==UserScript==
// @name No More MCreator Mods
// @version 0.6
// @description you weren't gonna use them anyway
// @author comp500
// @namespace https://infra.link/
// @match https://www.curseforge.com/minecraft/*
// @connect addons-ecs.forgesvc.net
// @connect edge.forgecdn.net
// @connect media.forgecdn.net