Skip to content

Instantly share code, notes, and snippets.

Matthew Messinger killjoy1221

Block or report user

Report or block killjoy1221

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View NotificationToast.java
package mnm.mods.tabbychat.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MainWindow;
import net.minecraft.client.gui.toasts.IToast;
import net.minecraft.client.gui.toasts.ToastGui;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import org.lwjgl.opengl.GL11;
View functions.kt
fun main(args: Array<String>) {
val dummy: (String) -> Unit = {}
val dummy2: (String) -> String = { "foo" }
val foo = dummy2..dummy
dummy(dummy2(""))
}
operator fun <T, K> (() -> T).rangeTo(block: (T) -> K): () -> K = { block(this()) }
View ChatEvent.java
package org.spongepowered.api.event.message;
import org.spongepowered.api.event.Cancellable;
import org.spongepowered.api.event.Event;
import org.spongepowered.api.network.PlayerConnection;
import org.spongepowered.api.text.Text;
public interface ChatEvent extends Event {
PlayerConnection getConnection();
View ChatManager.java
package org.spongepowered.api.client;
import org.spongepowered.api.text.Text;
import java.time.Instant;
public interface ChatManager {
/**
* Sends a raw message to the server. Any client commands will be processed
View Maths.kt
import kotlin.math.pow
import kotlin.math.sqrt
import kotlin.reflect.full.primaryConstructor
interface Maths<Num : Number> {
fun plus(a: Num, b: Num): Num
fun minus(a: Num, b: Num): Num
fun times(a: Num, b: Num): Num
fun div(a: Num, b: Num): Num
fun pow(a: Num, b: Num): Num
View MyObfHelper.java
public class MyObfHelper<Owner, Type> extends ObfHelper<Owner, Type> {
public static final ObfHelper<Entity, Double> LAST_PORTAL_POS = new ObfHelper<>(Entity.class, "field_181016_an");
public static final ObfHelper<Entity, Double> LAST_PORTAL_VEC = new ObfHelper<>(Entity.class, "field_181017_ao");
public static final ObfHelper<Entity, Double> TELEPORT_DIRECTION = new ObfHelper<>(Entity.class, "field_181018_ap");
protected ObfHelper(Class<Owner> owner, String srgname) {
super(owner, srgname);
}
}
View WorldInfo.java
/**
* Gets the names of the enabled packs from this world. Use
* {@link PackRepository#getPack(String)} to turn this into a set of
* {@link Pack Packs}
*
* @return The names of the enabled packs
*/
Set<String> getEnabledPacks();
/**
View Arg.java
public interface CommandArg<T> {
Text getName();
TypeToken<T> getType();
}
public interface CommandArgs {
<T> T getOne(CommandArg<T> arg) throws NoSuchElementException;
<T> Optional<T> getOne(Text arg);
}
View triforce.py
#!/usr/bin/env python3
"""
Make a triforce
"""
def main():
char = '3'
size = 3
View EpicGame.java
import java.awt.Desktop
import java.io.IOException
import java.net.URI;
class EpicGame extends Game {
private final String game;
public EpicGame(String game, String name) {
super(name);
You can’t perform that action at this time.