I hereby claim:
- I am amaranth on github.
- I am amaranth (https://keybase.io/amaranth) on keybase.
- I have a public key whose fingerprint is B259 09E6 A5A6 606E 4887 1338 90BE F6C5 9A45 1675
To claim this, I am signing this object:
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration status="WARN" shutdownHook="disable"> | |
<Appenders> | |
<Queue name="ServerGuiConsole"> | |
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg{nolookups}%n" /> | |
</Queue> | |
<TerminalConsole name="TerminalConsole"> | |
<PatternLayout> | |
<LoggerNamePatternSelector defaultPattern="%highlightError{[%d{HH:mm:ss} %level]: [%logger] %msg%n%xEx{full}}"> | |
<!-- Log root, Minecraft, Mojang and Bukkit loggers without prefix --> |
/* | |
This pattern was inspired by the following docs from the Rust SDL2 library. | |
https://docs.rs/sdl2/0.30.0/sdl2/render/struct.TextureCreator.html | |
> Any Texture created here can only be drawn onto the original Canvas. | |
> A Texture used in a Canvas must come from a TextureCreator coming | |
> from that same Canvas. Using a Texture to render to a Canvas not | |
> being the parent of the Texture's TextureCreator is undefined behavior. |
I hereby claim:
To claim this, I am signing this object:
/* | |
* Copyright (c) 2015. Starlis LLC / dba Empire Minecraft | |
* | |
* MIT License: | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of | |
* this software and associated documentation files (the "Software"), to deal in | |
* the Software without restriction, including without limitation the rights to use, | |
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the | |
* Software, and to permit persons to whom the Software is furnished to do so, |
public final class ResultFuture implements Future<Result> { | |
private final CountDownLatch latch = new CountDownLatch(1); | |
private Result value; | |
@Override | |
public boolean cancel(boolean mayInterruptIfRunning) { | |
return false; | |
} | |
@Override |
"""Perlin noise implementation.""" | |
# Licensed under ISC | |
from itertools import product | |
import math | |
import random | |
def smoothstep(t): | |
"""Smooth curve with a zero derivative at 0 and 1, making it useful for | |
interpolating. |
use fixedbitset::FixedBitSet; | |
use std::any::{Any, TypeId}; | |
use std::{mem, ptr}; | |
/// How many instances are stored in each chunk of memory in the pool | |
const CHUNK_COUNT: usize = 1024; | |
// Methods of this are generic on T instead of the struct itself so we can | |
// store them in a Vec<ComponentTable> without trying to box a trait object and | |
// later downcast |
// TODO: Add systems, figure out parallelization | |
extern crate fixedbitset; | |
use self::fixedbitset::FixedBitSet; | |
use std::collections::HashMap; | |
use std::{mem, ptr}; | |
pub const MAX_COMPONENTS: usize = 256; | |
const CHUNK_SIZE: usize = 8192; |
// Based on the implementation from http://godsnotwheregodsnot.blogspot.com/2013/11/field-diamond-squared-fractal-terrain.html | |
use std::iter::range_step; | |
use std::rand::{IsaacRng, Rng}; | |
pub struct FieldDiamondSquare { | |
x: int, | |
y: int, | |
width: uint, | |
height: uint, |
import java.util.Arrays; | |
import java.util.HashSet; | |
public class BlockStorage { | |
private static final int DATA_SHIFT = 12; | |
private static final int EMITTEDLIGHT_SHIFT = DATA_SHIFT + 4; | |
private static final int SKYLIGHT_SHIFT = EMITTEDLIGHT_SHIFT + 4; | |
private static final int EMPTY_ENTRY = -1; | |
private byte[] index = new byte[2048]; |