Skip to content

Instantly share code, notes, and snippets.

View AlexCouch's full-sized avatar
😛
Who's asking...?

Alex Couch AlexCouch

😛
Who's asking...?
  • Spokane, Washington area
View GitHub Profile
open class DialogAttributeError(attr: DialogAttr, error: String) : Error("A dialog attribute has caught an error: ${attr.name}", Throwable(error))
class DialogAttributeValueOutOfBoundsError(attr: DialogAttr) : DialogAttributeError(attr, "Attribute value is out of bounds: ${attr::bounds}")
sealed class BlueJException(override val message: String) : Exception("BlueJ encountered a problem", Throwable(message), false, true)
sealed class LoggedException(open override val message: String) : BlueJException(message)
sealed class DisplayedException(open override val message: String) : BlueJException(message)
class NoProjectLoadedException : LoggedException("No project is loaded! This should not happen! Report to the author!")
class NoStartupFileSpecifiedException : DisplayedException("No startup file! Aborting runtime!")
class NoSourceFileSelectedException : DisplayedException("No source file selected!")
class BlueJComponentToggleException(componentName: String) : DisplayedException("The $componentName component is n
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.tileentity.TileEntity
import net.minecraft.util.ITickable
import net.minecraft.util.ResourceLocation
import net.minecraftforge.common.util.INBTSerializable
private val handlers = HashMap<ResourceLocation, TemperatureHandler>()
interface TemperatureHandler{
fun invoke()
import com.fasterxml.jackson.core.JsonFactory
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.KotlinModule
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
import java.io.BufferedWriter
import java.io.File
import java.io.FileWriter
val mapper = ObjectMapper().registerKotlinModule()
val writer = mapper.writerWithDefaultPrettyPrinter()
import java.util.ArrayList;
import java.util.Random;
public class Grasshopper {
/**
* The leaves that have been eaten. They will be checked against the next position
* to see if the leaf has been eaten or not.
*/
@Override
public NBTTagCompound serializeNBT() {
NBTTagCompound ret = new NBTTagCompound();
if(totalQuests.containsKey(player)){
NBTTagCompound completed = new NBTTagCompound();
int i = 0;
for(QuestBase quest : QuestHelper.completeQuests.get(player)){
completed.setString("QUEST_"+(++i), quest.getName());
}
ret.setTag("QUESTS_COMPLETED", completed);
package ocdiary.theoink.handlers;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.event.entity.living.LivingFallEvent;
@Override
public void onTick() {
if (++counter == 200) {
OnlineRequest.getInstance().make("http://centralos.x10host.com/chat/chat.html", new ResponseHandler() {
@Override
public void handle(boolean success, String response) {
//This should not be here
if (currentData == response){
//chat.addItem("if"+response);
parser grammar CrayScriptParser;
options{
tokenVocab=CrayScriptLexer;
}
block:
CurlyBraceLeft WS* statementList? WS* CurlyBraceRight
;
lexer grammar CrayScriptLexer;
Function : 'function' ;
Integer : 'int' ;
Double : 'double' ;
Type : 'type' ;
If : 'if' ;
For : 'for' ;
ForEach : 'foreach' ;
While : 'while' ;
@AlexCouch
AlexCouch / trigger
Last active November 9, 2017 21:43
bring System into this <- end
function void main[args = String = Array : default = no]: const = no(
class new -> Maths : parent = no(
member function (not int, float, double, long, short, char, or string) add[num1 < Integer with-default = no, num2 < Integer with-default = no] | const = no(
%^
^ This is a multi-line comment, and there is no return keyword. If you are doing one thing, then you can do that thing in the
^ "return" statement, and then
^ specify the return value using a colon (a return value determiner)
^%