Skip to content

Instantly share code, notes, and snippets.

View ItsSpyce's full-sized avatar
🔰

Spyce ItsSpyce

🔰
View GitHub Profile
@ItsSpyce
ItsSpyce / Extensions
Last active August 29, 2015 14:05
PEOPLE WANT ME TO TYPE QUIETER.
//HOPEFULLY this will allow for you to put something in like "5..10" and have the returning array
//replicate the Ruby method of int..int to get all methods in between. Sadly, the ints will have to be a string variable.
//EX:
//"2..12".GetInts(); will return [3,4,5,6,7,8,9,10,11] while (Gets all ints in between)
//"2...12".GetInts(); will return [2,3,4,5,6,7,8,9,10,11,12]. (Gets all ints in between INCLUDING BARRIERS)
//To be quite honest, the only reason for writing this is so that I can get all numbers in between for the simplicity.
//I'm really just fucking sick of the fact that .NET doesn't have the int implementations and should REALLY
//work on making their shit just work for once. If you see something another language implements, TRY TAKING A FCKING HINT AND
//USE IT TOO.
public static string JsonifyAnon(this object input){
var model = input.ToString().Replace("=", ":");
var builder = new StringBuilder();
string[] keys;
object[] values;
foreach(var word in model.Split(' ')){
if (keys.Length == values) keys.Concat(new [] {String.Format("\"{0}\"", word)});
if (keys.Length >= values) {
public void Commit()
{
foreach (var thread in Stack.Select(v => new Thread(() =>
{
using (var writer = File.OpenWrite(Location + "\\" + v.Key + ".vdb"))
{
foreach (
var s in
v.Value.GetType()
.GetProperties()
var position = new Position();
var val = connection.ReadLong();
position.X = (int) (val >> 38);
if (position.X >= (2 ^ 25)) position.X -= 2 ^ 26;
position.Y = (int) ((val >> 26) & 0xFFF);
if (position.Y >= (2 ^ 11)) position.Y -= 2 ^ 12;
position.Z = (int) (val << 38 >> 38);
if (position.Z >= (2 ^ 25)) position.Z -= 2 ^ 26;
return position;
if (string.IsNullOrEmpty(newPassword)){
validation.Add("Please choose a new password.");
}
else if (string.IsNullOrEmpty(confirmPassword)){
validation.Add("Please confirm your password.");
}
else{
// now we know that newPassword and confirmPassword have contents, lets check them.
if (newPassword != confirmPassword){
validation.Add("Your new password and confirmed password do not match.");
public class BenchWindow : IGameWindow
{
public event PropertyChangedEventHandler PropertyChanged;
public byte Id => 1;
public string TechnicalName => "Workbench";
public short Length => 46;
}
public class BenchWindow : IGameWindow
{
public event PropertyChangedEventHandler PropertyChanged;
public byte Id => 1;
public string TechnicalName => "minecraft:crafting_table";
public short Length => 10;
}
stream.WriteUByte(WindowId);
stream.WriteString(InventoryType);
stream.WriteString(new Chat(WindowTitle).ToString());
stream.WriteUByte(SlotCount);
if (InventoryType == "EntityHorse")
stream.WriteInt(EntityId.GetValueOrDefault());
return mode;
15w35b: a list (varint for size, one varint per entry) of possible block state
ids (type = x >> 4, meta = x & 15), and an array of indices pointing to state
ids in the list (varint representing the number of bits per block, varint for
the raw data array length, one long per data array element)
using System;
using System.Drawing;
using System.Windows.Forms;
using SharpDX;
using SharpDX.Direct3D;
using SharpDX.DXGI;
using SharpDX.Windows;
using D3D11 = SharpDX.Direct3D11;
namespace Syhno.Game.Eureka.Engine