Skip to content

Instantly share code, notes, and snippets.

View AlphaModder's full-sized avatar

AlphaModder

View GitHub Profile
@AlphaModder
AlphaModder / gist:9773151
Created March 25, 2014 22:46
Weird code...
package net.minecraft.client.gui.inventory;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.resources.I18n;
import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
@AlphaModder
AlphaModder / gist:5691467
Created June 1, 2013 19:29
Decompiled Render Code
public void renderBeam(EntityWaypoint par1EntityWaypoint, double baseX, double baseY, double baseZ, float par8)
{
bgd tesselator = bgd.a;
GL11.glDisable(3553);
GL11.glDisable(2896);
GL11.glDisable(2912);
GL11.glDepthMask(false);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
int height = 256;
package net.alphamodder.quantumtech.machine.assembly;
import net.alphamodder.api.Constants;
import net.alphamodder.quantumtech.machine.block.tileentity.AssemblyMachine;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
public class AssemblyMachineCarver extends AssemblyMachine {
@Override
@Override
public void render(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer){
renderer.setRenderMinMax(Constants.ONE_PIXEL * 7, 0.0D, 0.0D, Constants.ONE_PIXEL * 9, Constants.ONE_PIXEL * 10, 0.0D);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderMinMax(Constants.ONE_PIXEL * 7, 0.0D, Constants.MAX_BLOCK_BOUNDS, Constants.ONE_PIXEL * 9, Constants.ONE_PIXEL * 10, Constants.MAX_BLOCK_BOUNDS);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderMinMax(Constants.ONE_PIXEL * 7, Constants.ONE_PIXEL * 10, Constants.ONE_PIXEL, Constants.ONE_PIXEL * 9, Constants.ONE_PIXEL * 11, Constants.MAX_BLOCK_BOUNDS - Constants.ONE_PIXEL);
renderer.renderStandardBlock(block, x, y, z);
renderer.setOverrideBlockTexture(79);
renderer.setRenderMinMax(Constants.ONE_PIXEL * 6, Constants.ONE_PIXEL * 10, Constants.ONE_PIXEL * 6, Constants.ONE_PIXEL * 10, Constants.ONE_PIXEL * 10, Constants.ONE_PIXEL * 10);