Skip to content

Instantly share code, notes, and snippets.

@Vazkii
Vazkii / Watmean.java
Created May 14, 2014 14:16
Watmean - a small mod to tell you how stuff works.
package vazkii.watmean;
import java.awt.Desktop;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URI;
@Vazkii
Vazkii / GameShow.java
Created August 21, 2014 00:41
Bot Game Show
package vazkii.vbot.gameshow;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@Vazkii
Vazkii / ebay_share.js
Created January 11, 2015 01:25
eBay Share Shopping Cart
// This is a script you can add as an URL for a bookmark
// It'll generate a copy-pastable list of things in your shopping cart
// Script:
javascript:var total='<br><b>Share</b><br>';$('.sci-itmttl a').each(function(i){total+=($(this).text()+': '+$(this).attr('href')+'<br>');});$('.mb15:first').parent().append(total);
// Non-minimized code:
var total='<br><b>Share</b><br>';
$('.sci-itmttl a').each(function(i) {
total+=($(this).text() + ': ' + $(this).attr('href')+ '<br>');
@Vazkii
Vazkii / extract.bat
Created April 24, 2015 17:46
Runescape Music extractor and combiner. Based on josch's work: https://github.com/josch/rsmusicextract
@echo off
py --version 2>NUL
if errorlevel 1 (
echo You need to install Python for the extractor to work.
echo Now go do that.
pause
exit
)
package UnlimitedBits.TDW.core;
import java.util.HashMap;
public class StringConversionHelper {
public static HashMap<Class, StringConverter> converters = new HashMap();
public static void registerConverter(Class clazz, StringConverter converter){
converters.put(clazz, converter);
@Vazkii
Vazkii / ComponentVillageWell.java
Created September 24, 2012 20:24
Well Dungeons
package net.minecraft.src;
import java.util.List;
import java.util.Random;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.DungeonHooks;
public class ComponentVillageWell extends ComponentVillage
{
@Vazkii
Vazkii / CreeperTemper.java
Created July 12, 2013 19:47
The Creeper Temper mod. Creepers turn red as they start igniting.
package vazkii.creepertemper;
import net.minecraft.client.renderer.entity.RenderCreeper;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
@Vazkii
Vazkii / Pie Chart
Last active December 25, 2015 01:09
Pie chart n stuff for minecraft.
Instructions:
Get a class that extends GuiScreen. Preferably one of regular size (i.e. GuiFurnace).
Add to initGui():
PieChartRenderer.buildEntries();
Add to the end of drawScreen():
int xCenter = width / 2;
int yCenter = height / 2;
package vazkii.research;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
@Vazkii
Vazkii / ItemShadowStaff.java
Created January 8, 2014 22:49
Shadowbeam Staff
package vazkii.tinkerer.common.item;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;