Skip to content

Instantly share code, notes, and snippets.

package zornco.reploidcraft.modules;
import net.machinemuse.api.MuseItemUtils;
import net.machinemuse.powersuits.powermodule.PropertyModifierLinearAdditive;
import net.minecraft.nbt.NBTTagCompound;
public class PropertyModifierIntLinearAdditive extends PropertyModifierLinearAdditive {
protected int roundTo = 0;
protected int offset = 0;
// Credit goes to iChun and Zorn_Taov (iChun because Zorn got it from him)
// IMPORTANT, make sure when you register your item, it has the .setFull3D() on it, so:
// myItem = new Item3DItem(myItemID).setUnlocalizedName("My3DItem").setFull3D()
//
// in your CLIENT PROXY, you need the line
// MinecraftForgeClient.registerItemRenderer(myItem.itemID, new Render3DItem());
package myPackage.client.renderers;
import net.minecraft.client.Minecraft;
@ZornTaov
ZornTaov / build.sbt
Created August 8, 2013 23:05
used for compiling scala code in minecraft using scala-sbt, place in the mcp root folder
name := "mcp"
version := "1.0"
scalaVersion := "2.10.1"
sourceDirectory <<= baseDirectory / "src/minecraft"
resourceDirectory <<= baseDirectory / "temp/bin/minecraft"
@ZornTaov
ZornTaov / bedremove.java
Created September 21, 2013 07:41
vanilla bed remover
/** Recipes **/
Iterator<IRecipe> iterator = CraftingManager.getInstance().getRecipeList().iterator();
while(iterator.hasNext())
{
ItemStack r = iterator.next().getRecipeOutput();
if(r != null && r.itemID == Item.bed.itemID)
{
iterator.remove();
logger.info("Removed Vanilla Bed.");
}
package zornco.fps;
import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.InputEvent;
@EventHandler
public void init(FMLPreInitializationEvent event)
{
registerBlock(new BlockExample().func_149663_c("ExampleBlock").func_149647_a(CreativeTabs.tabBlock));
registerItem(new Item().setUnlocalizedName("ExampleItem").setCreativeTab(CreativeTabs.tabMisc));
}
public static void registerItem(Item item)
{
GameRegistry.registerItem(item, item.getUnlocalizedName().replace("item.", ""));
@ZornTaov
ZornTaov / CommandTab.lua
Created January 24, 2014 04:14
Bingo game for TinyIrc's TinyBot
----ADD THIS TO THE END OF CommandTab.lua
require('TinyBot/Bingo')
function onBingoStart(server, to, cmd, argv, nuh)
if string.sub(to, 1, 1) == "#" then
if not gameplaying then
gameplaying = true
fillSheet()
bot_sendreply(server, to, nuh.nick, "A game has started, use !bingo_join to join!")
@ZornTaov
ZornTaov / mech design layout.txt
Created June 21, 2014 09:58
mech design layout
Type
Slot
width
height
offsetxyz
maxHealth
resistance
//back
jumpBoost
//constants, I forgot how to make them AS constants, this could also be an Enum instead
public const MODE_EMPTY = 0; // 00000
public const MODE_V = 1; // 00001
public const MODE_H = 2; // 00010
public const MODE_O = 4; // 00100
public const MODE_A = 8; // 01000
public const MODE_Q = 16; // 10000
x = y
x^2 = xy multiply both sides by x
x^2 - y^2 = xy - y^2 subtract y^2 from each side
(x + y) (x - y) = y(x - y) factor
x + y = y divide out x - y
2y = y substitute y for x from x = y
2 = 1 PROFIT