Skip to content

Instantly share code, notes, and snippets.

CreativeTabs creativeTabLamp = new CreativeTabs("ftLighting") {
{
LanguageRegistry.instance.addStringLocalization("itemGroup.ftLighting", "en_US", "Lighting");
ItemStack icon = ItemLamp.buildStack(0, Colors.Magenta, Shapes.Block, isOn = true);
}
public ItemStack getIconItemStack(){return icon;}
}
blockLamp.setCreativeTab(creativeTabLamp);
package cpc.client;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraftforge.client.MinecraftForgeClient;
import cpc.CommonProxy;
import cpc.client.model.*;
import cpc.client.render.*;
import cpc.entity.*;
import cpw.mods.fml.client.registry.RenderingRegistry;
*.class
# Package Files #
*.jar
*.war
*.ear
# Config Files #
/**
* It goes to touching block. If the cond function returns true on that block,
* it goes on and operates on the values of that block using the op function.
* It then executes itself with that block as the base.
* To make a generic TreeCapitator, cond should be
* <code>return wrd.getBlockId(x, y, z) == Block.wood.blockID || wrd.getBlockId(x, y, z) == Block.leaves.blockID</code>
* op should be
* <code>wrd.destroyBlock(x, y, z, true)</code>
*
* For more information see the wikipedia page on recursion, especially Multiple Recursion
def iterateTouching(x: Int, y: Int, z: Int, cond: (Int, Int, Int) => Boolean, op: (Int, Int, Int) => Unit) {
if (cond(x + 1, y, z)) {
op(x + 1, y, z)
iterateTouching(x + 1, y, z, cond, op)
}
if (cond(x - 1, y, z)) {
op(x - 1, y, z)
iterateTouching(x - 1, y, z, cond, op)
}
if (cond(x, y + 1, z)) {
def addRecipe(res: ItemStack, rec: List[String], keyValue: List[(Char, Either[OreDict, Item])]) {
val v: Array[Any] = rec.toArray ++
keyValue.map(
(v) => {
Array[Any](v._1,
v._2 match {
case x: Right[OreDict, Item] => x.right.get
case x: Left[OreDict, Item] => x.left.get
})
}).flatten
/usr/lib/jvm/java-7-oracle/bin/java -Djava.library.path=/home/ft/Desktop/Minecraft/lib/natives -Didea.launcher.port=7532 -Didea.launcher.bin.path=/home/ft/Desktop/.IntelliJ-program/bin -Dfile.encoding=UTF-8 -classpath "/usr/lib/jvm/java-7-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-7-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-7-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-7-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jfxrt.jar:/usr/lib/jvm/java-7-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-7-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-7-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-7-oracle/jre/li
/usr/lib/jvm/java-7-oracle/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:34278,suspend=y,server=n -Djava.library.path=/home/ft/Desktop/Minecraft/lib/natives -Dfile.encoding=UTF-8 -classpath "/usr/lib/jvm/java-7-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-7-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-7-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-7-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jfxrt.jar:/usr/lib/jvm/java-7-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-7-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-7-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/zipfs.
java.lang.NullPointerException
at mods.ft975.util.Recipe.checkMatch(Recipe.scala:49)
at mods.ft975.util.Recipe.matches(Recipe.scala:30)
at net.minecraft.item.crafting.CraftingManager.findMatchingRecipe(CraftingManager.java:270)
at net.minecraft.inventory.ContainerPlayer.onCraftMatrixChanged(ContainerPlayer.java:61)
at net.minecraft.inventory.ContainerPlayer.<init>(ContainerPlayer.java:53)
at net.minecraft.entity.player.EntityPlayer.<init>(EntityPlayer.java:186)
at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:163)
at net.minecraft.server.management.ServerConfigurationManager.createPlayerForUser(ServerConfigurationManager.java:383)
at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:91)
java.lang.NullPointerException
at mods.ft975.util.Recipe.checkMatch(Recipe.scala:49)
at mods.ft975.util.Recipe.matches(Recipe.scala:30)
at net.minecraft.item.crafting.CraftingManager.findMatchingRecipe(CraftingManager.java:270)
at net.minecraft.inventory.ContainerPlayer.onCraftMatrixChanged(ContainerPlayer.java:61)
at net.minecraft.inventory.ContainerPlayer.<init>(ContainerPlayer.java:53)
at net.minecraft.entity.player.EntityPlayer.<init>(EntityPlayer.java:186)
at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:163)
at net.minecraft.server.management.ServerConfigurationManager.createPlayerForUser(ServerConfigurationManager.java:383)
at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:91)