Skip to content

Instantly share code, notes, and snippets.

@Deamon5550
Deamon5550 / gist:4465454
Created January 6, 2013 05:35
WorldGen
package net.minecraft.server.v1_4_6;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public abstract class BiomeBase
{
/** An array of all the biomes, indexed by biome id. */
public static final BiomeBase[] biomes = new BiomeBase[256];
@Deamon5550
Deamon5550 / gist:5325586
Last active December 15, 2015 21:28
wtf minecraft
if ((metaData & 8) != 0)
{
if (this.blockAccess.getBlockId(x, y - 1, z) != door.blockID)
{
return false;
}
}
else if (this.blockAccess.getBlockId(x, y + 1, z) != door.blockID)
{
return false;
package com.thevoxelbox.generator;
import java.util.Arrays;
import java.util.Random;
public class TerrainGenerator {
Random rand;
int w, h;
public int size;
IF A == 0 GOTO 6
{
else body
}
GOTO 9
{
if body
}
@Deamon5550
Deamon5550 / gist:6373029
Created August 29, 2013 00:30
entities
Forced entities: 3400 total; [EntityClientPlayerFlying['Deamon5550'/49939626, l='MpServer', x=2589.66, y=32.62, z=1444.05], ok['Painting'/49939627, l='MpServer', x=2578.94, y=31.50, z=1451.50], ok['Painting'/49939628, l='MpServer', x=2578.94, y=31.50, z=1452.50], ok['Painting'/49939629, l='MpServer', x=2578.94, y=31.50, z=1454.50], ok['Painting'/49939630, l='MpServer', x=2578.94, y=31.50, z=1453.50], ok['Painting'/49939631, l='MpServer', x=2578.94, y=31.50, z=1455.50], ok['Painting'/49939632, l='MpServer', x=2578.50, y=36.50, z=1452.06], ok['Painting'/49939633, l='MpServer', x=2579.50, y=36.50, z=1452.06], ok['Painting'/49939634, l='MpServer', x=2577.50, y=36.50, z=1453.06], ok['Painting'/49939639, l='MpServer', x=2570.50, y=36.50, z=1455.94], ok['Painting'/49939640, l='MpServer', x=2569.50, y=36.50, z=1455.94], ok['Painting'/49939641, l='MpServer', x=2568.50, y=36.50, z=1455.94], ok['Painting'/49939642, l='MpServer', x=2570.00, y=38.00, z=1453.06], ok['Painting'/49939643, l='MpServer', x=2568.06, y=36.50, z=
@Deamon5550
Deamon5550 / gist:6472650
Created September 7, 2013 03:38
Java brainfuck interpreter
package ca.deamon.dais.brainfuck;
import java.util.Arrays;
import java.util.Scanner;
public class BrainFuckInterpreter {
byte[] dat;
char[] program;
int counter = 0;
Solve the following system:
{2x+y-2z = 10
3x+2y+2z = 1
5x+4y+3z = 4
Express the system in matrix form:
(2 | 1 | -2
3 | 2 | 2
5 | 4 | 3)(x
y
z) = (10
@Deamon5550
Deamon5550 / gist:7437849
Last active December 28, 2015 03:49
Brush
@Brush
public class Brush {
public static String getName();
public static String getHelp();
public static boolean onUse(Location loc, World w, Sniper s, String[] parameters, Material tool);
public static Material[] getValidTools();
}
@Deamon5550
Deamon5550 / gist:7654758
Created November 26, 2013 07:50
NameTester
package com.thevoxelbox.names;
import java.util.Random;
public class NameTester
{
public NameGen gen;
Random rand = new Random();
public void getProb() {
22:23:17 [SEVERE] Could not pass event AsyncPlayerChatEvent to iSay v0.4.3-b1
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
at net.minecraft.server.v1_6_R2.PlayerConnection.chat(PlayerConnection.java:877)
at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:829)
at com.bergerkiller.bukkit.common.internal.network.CommonPacketHandler$CommonPlayerConnection.a(CommonPacketHandler.java:535)
at net.minecraft.server.v1_6_R2.Packet3Chat.handle(SourceFile:49)