This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parser grammar CrayScriptParser; | |
options{ | |
tokenVocab=CrayScriptLexer; | |
} | |
block: | |
CurlyBraceLeft WS* statementList? WS* CurlyBraceRight | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lexer grammar CrayScriptLexer; | |
Function : 'function' ; | |
Integer : 'int' ; | |
Double : 'double' ; | |
Type : 'type' ; | |
If : 'if' ; | |
For : 'for' ; | |
ForEach : 'foreach' ; | |
While : 'while' ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
^% |