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 Config.kt
package mnm.mods.tabbychat.util.config
import com.google.common.reflect.TypeToken
import kotlin.reflect.KProperty
sealed class AbstractValue<T> {
abstract val type: TypeToken<T>?
abstract val value: T
override fun toString(): String {
View latest.log
[07Sep2019 16:33:52.049] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20190719.225934, --fml.mcVersion, 1.14.4, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 28.0.3, --version, MOD_DEV, --assetIndex, 1.14, --assetsDir, C:\Users\Matthew\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[07Sep2019 16:33:52.055] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 3.2.0+60+b86c1d4 starting: java version 1.8.0_222 by AdoptOpenJDK
[07Sep2019 16:33:52.448] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[07Sep2019 16:33:53.334] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmluserdevclient' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\Matthew\.gradle\caches\forge_gradle\assets, --assetIndex, 1.14, --use
View ConfigManager.java
public class ConfigManager {
private static Set<String> configPaths = new HashSet<>();
private static Map<Object, ConfigInstance> configs = new HashMap<>();
public static <T extends JsonConfig> void register(String path, T config) {
Preconditions.checkState(!configPaths.contains(path), "Duplicate configuration file!");
Preconditions.checkState(!configs.containsKey(config), "Duplicate config instance!");
Path configPath = FabricLoader.getInstance().getConfigDirectory().toPath().resolve(path);
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();
/**
You can’t perform that action at this time.