Skip to content

Instantly share code, notes, and snippets.

Avatar

tterrag tterrag1098

View GitHub Profile
View gist:7801442
private Icon[] icons = new Icon[2];
private int iconIndex = 0;
registerIcons()
{
icons[0] = register.registerblahblah
icons[1] = register.registerblahblahsomethingdifferent
}
getIcon()
@tterrag1098
tterrag1098 / gist:8593064
Last active Jan 4, 2016
Tutorial for OSX users with java 6 on launching TPPI
View gist:8593064
How to launch FTB_Launcher.jar with Java 7 on a mac.
Step 1: Download and install the Java 7 JDK (NOT JRE) from the following address:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Click the bubble next to "Accept License Agreement", and then click "jdk-7u51-macosx-x64.dmg" which is to the right of "Mac OS X x64"
Once the download is finished, double click on "jdk-7u51-macosx-x64.dmg" wherever you have your downloads go to (it defaults to the Downloads folder in your Home folder, which is /Users/<your computer username>/Downloads), and it will mount the image.
From there, double click on "JDK 7 Update 51.pkg" to start the installation process, and follow the on screen prompts to finish the installation. There's no need to restart your computer after this, but if you want to anyways, it won't cause any harm.
View gist:9425814
This file has been truncated, but you can view the full file.
[23:20:07] [INFO] LaunchFrame.main:185: FTBLaunch starting up (version 1.3.5)
[23:20:07] [INFO] JGoogleAnalyticsTracker$2.run:483: AnalyticsBackgroundThread started
[23:20:07] [INFO] LaunchFrame.main:186: Java version: 1.7.0_45
[23:20:07] [INFO] LaunchFrame.main:187: Java vendor: Oracle Corporation
[23:20:07] [INFO] LaunchFrame.main:188: Java home: C:\Program Files\Java\jre7
[23:20:07] [INFO] LaunchFrame.main:189: Java specification: Java Virtual Machine Specification version: 1.7 by Oracle Corporation
[23:20:07] [INFO] LaunchFrame.main:191: Java vm: Java HotSpot(TM) 64-Bit Server VM version: 24.45-b08 by Oracle Corporation
[23:20:07] [INFO] LaunchFrame.main:192: OS: amd64 Windows 7 6.1
[23:20:07] [INFO] LaunchFrame.main:193: Launcher Install Dir: C:\FTB
View gist:9433253
local pulses = 0
local ticksSinceLast = 0
while true do
if redstone.getInput("left") == true then
pulses = pulses + 1 --stack up pulses
end
if ticksSinceLast >= 200 and pulses > 0 then --10 seconds
redstone.setOutput("right", true)
ticksSinceLast = 0 --reset ticks
View gist:11054099
int id = OreDictionary.getOreID(stack);
for (ItemStack i : OreDictionary.getOres(id))
{
if (GameRegistry.findUniqueIdentifierFor(i.getItem()).modId.contains("modid"))
//drop items
}
View gist:11170560
player.fallDistance = Math.min(player.fallDistance, 2.5f);
if (!player.capabilities.isFlying)
{
player.motionY = Math.min(player.motionY, -0.32f);
}
View gist:9b7d750d72f764875241
package tterrag.supermassivetech.tile;
import java.util.List;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagFloat;
View gist:5d2d9dde72bf9ead67cf
public static void checkRecipes()
{
Set<ShapedRecipes> shaped = new HashSet<ShapedRecipes>();
Set<ShapelessRecipes> shapeless = new HashSet<ShapelessRecipes>();
Set<ShapedOreRecipe> shapedOre = new HashSet<ShapedOreRecipe>();
Set<ShapelessOreRecipe> shapelessOre = new HashSet<ShapelessOreRecipe>();
for (Object o : CraftingManager.getInstance().getRecipeList())
{
View gist:e66bf09fa79c97590fef
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
View gist:4a5f47debe28bda99741
1401157165262 ### java.lang.NullPointerException
1401157165262 ### at tterrag.tppibot.runnables.ReminderProcess.isRemindEnabledFor(ReminderProcess.java:88)
1401157165262 ### at tterrag.tppibot.commands.DisableRemind.onCommand(DisableRemind.java:15)
1401157165262 ### at tterrag.tppibot.TPPIBot.onMessage(TPPIBot.java:59)
1401157165262 ### at org.jibble.pircbot.PircBot.handleLine(PircBot.java:990)
1401157165262 ### at org.jibble.pircbot.InputThread.run(InputThread.java:92)