Skip to content

Instantly share code, notes, and snippets.

View tterrag1098's full-sized avatar

tterrag tterrag1098

View GitHub Profile
public class PrettifyMessageCreate extends MessageConverter {
public static DiscordClient client;
private static Cache<Long, String> channelNames = CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.HOURS).build();
public String convert(ILoggingEvent event) {
if (event.getLoggerName().startsWith("discord4j.gateway.inbound.0")) {
for (Object param : event.getArgumentArray()) {
if (param instanceof GatewayPayload) {
GatewayPayload<?> payload = (GatewayPayload) param;
package com.enderio.core.common.transform;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.io.IOUtils;
@tterrag1098
tterrag1098 / Hw4.java
Created October 12, 2018 18:14 — forked from treeofwar/java
import java.util.Scanner;
import java.util.Random;
public class Hw4 {
public static final int BOARD_SIZE = 10;
enum space {Empty,Player,Walked_Path,Goal,Mines};//eumeration creates a type
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
Random r = new Random();
int pX = 0;//players x and y
package chisel.scripts;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.io.FileUtils;
@tterrag1098
tterrag1098 / changes.diff
Created December 4, 2017 00:10
Better proxy prototype
Author:
Committer:
Parent: 74d08d66f9fcfb267b4fc6b38b62c3fd0317847c (Merge branch '1.12.x' of https://github.com/MinecraftForge/MinecraftForge into emissive_items)
Branch:
Follows:
Precedes:
Local uncommitted changes, not checked in to index
-------- src/main/java/net/minecraftforge/fml/common/ProxyInjector.java --------
private void renderModel(IBakedModel model, int color, ItemStack stack)
{
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder bufferbuilder = tessellator.getBuffer();
List<BakedQuad> allquads = new ArrayList<>();
for (EnumFacing enumfacing : EnumFacing.values())
{
allquads.addAll(model.getQuads((IBlockState)null, enumfacing, 0L));
{
"forge_marker": 1,
"defaults": {"model":"cube_all"},
"variants": {
"indent": [{"textures":{"all":"chisel:blocks/andesite/indent"}}],
"bricks-small": [{"textures":{"all":"chisel:blocks/andesite/bricks-small"}}],
"bricks-soft": [{"textures":{"all":"chisel:blocks/andesite/bricks-soft"}}],
"tiles-small": [{"textures":{"all":"chisel:blocks/andesite/tiles-small"}}],
"bricks-encased": [{"textures":{"all":"chisel:blocks/andesite/bricks-encased"}}],
"cracked": [{"textures":{"all":"chisel:blocks/andesite/cracked"}}],
#!/bin/bash
# Terminate running screen, if it exists
if screen -list | grep -q "botscreen"; then
echo "Terminating current bot instance"
screen -S botscreen -p 0 -X stuff "stop^M"
else
echo "No current bot instance found"
fi