Skip to content

Instantly share code, notes, and snippets.

View HyCraftHD's full-sized avatar

Johannes Jäger HyCraftHD

View GitHub Profile
private void pasteNameFromInt(AbstractInsnNode insnode) {
try {
Field[] fields = Opcodes.class.getFields();
for (Field field : fields) {
Object obj = field.get(null);
if (!(obj instanceof Integer)) {
continue;
}
if ((Integer) obj == insnode.getOpcode()) {
System.out.println(field.getName() + " - " + insnode.getOpcode() + " - " + insnode);
@HyCraftHD
HyCraftHD / Events.java
Created March 1, 2017 13:29
TestEvents für CoreLib Minecraft Forge
// ONLY DEBUG
// WILL BE REMOVED.
@SubscribeEvent
public void a(CapeUpdatedEvent event) {
event.setResourceLocation(new ResourceLocation("textures/blocks/ice.png"));
}
@SubscribeEvent
public void a(EntityViewRenderEvent.CameraSetup event) {
int rendererUpdateCount = ObfuscationReflectionHelper.getPrivateValue(EntityRenderer.class, event.getRenderer(), "rendererUpdateCount", "field_78529_t");
private Main main = Main.getInstance();
private ExecutorService pool;
private Field uuidField;
private HashMap<Player, NickName> nicknames = new HashMap<>();
public NickApi() {
pool = Executors.newCachedThreadPool();
package net.hycrafthd.main.util;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutorService;
#!/bin/bash
MCP_VERSION="721"
FORGE_VERSION="latest"
MCP_URL="https://dl.dropbox.com/s/dao8itysfwuhj9q/mcp$MCP_VERSION.zip?dl=1"
FORGE_URL="http://files.minecraftforge.net/minecraftforge-src-$FORGE_VERSION.zip"
mkdir -p forge
cd forge
@HyCraftHD
HyCraftHD / Micro aufnehmen
Created March 26, 2016 21:03
Micro aufnehmen
AudioFormat format = new AudioFormat(44100, 16, 2, true, true);
DataLine.Info targetInfo = new DataLine.Info(TargetDataLine.class, format);
DataLine.Info sourceInfo = new DataLine.Info(SourceDataLine.class, format);
try {
TargetDataLine targetLine = (TargetDataLine) AudioSystem.getLine(targetInfo);
targetLine.open(format);
targetLine.start();