Skip to content

Instantly share code, notes, and snippets.

//Voting
public void TakeVote()
{
if (!VoteIsOn) return;
//Actual voting
if (!_votingRestarting)
{
World[] voteWorlds = PropHuntWorlds.OrderBy(x => RandWorld.Next())
.Take(3)
.ToArray();
var _username = "Account.UserName";
var _password = "Account.PassWord";
var data = "wrap_name=" + _username + "&wrap_password=" + _password + "&wrap_scope=http://xxx.com/";
var url = "https://www.starbucks.com/account/signin";
var wc = new WebClient
{
//BaseAddress = "https://www.starbucks.com/account/signin"
};
var URI = new Uri(url);
@MrBluePotato
MrBluePotato / gist:9126927
Created February 21, 2014 01:12
New Blocks
Trees: (Leaves and Logs and Planks and Sapling)
- Aspen Tree
- Kapok Tree
- Pine Tree
Plants:
- Grass
- Blueberry bush
- Daisy flower
- Cowbell flower
"sound3/fireworks/blast1.ogg",
"sound3/fireworks/launch1.ogg", "sound3/fireworks/twinkle1.ogg", "sound3/random/explode1.ogg",
"sound3/random/explode2.ogg", "sound3/random/explode3.ogg", "sound3/random/fuse.ogg", "sound3/random/splash.ogg",
"sound3/ambient/weather/rain1.ogg", "sound3/ambient/weather/rain2.ogg", "sound3/ambient/weather/rain3.ogg",
"sound3/ambient/weather/rain4.ogg", "sound3/ambient/weather/thunder1.ogg", "sound3/ambient/weather/thunder2.ogg",
"sound3/ambient/weather/thunder3.ogg", "sound3/mob/chicken/say1.ogg", "sound3/mob/chicken/say2.ogg",
"sound3/mob/chicken/say3.ogg", "sound3/mob/pig/say1.ogg", "sound3/mob/pig/say2.ogg",
"sound3/mob/pig/say3.ogg", "sound3/mob/sheep/say1.ogg", "sound3/mob/sheep/say2.ogg",
"sound3/mob/sheep/say3.ogg", "sou
// resource download thread
minecraft.sound.registerSound(new File(fireworksFolder, "blast1.ogg"), "fireworks/blast1.ogg");
// minecraft.java
level.playSound("fireworks.blast1", xCoord, yCoord, zCoord, Volume + 1.0F, 1.0F);
How this should work:
*NOTE* # refers to the number that is supplied on the texture info page of the texture hosting site
- Client executes command (ex: /env terrain #)
- Server sends GET/POST request to URL (ex: texture.classicube.net/getTexture?#)
- Server gets reply of the URL of the texture (ex: texture.classicube.net/repo/mrbluepotato/sphax64x-129484)
- Server stores that URL somewhere (ex: in fCraft, worlds.xml)
- Server sends EnvMapAppearance packet to client containing the URL of the texture
- Client then proceeds to download texture and apply it.
void ProcessSetBlockPacket()
{
BytesReceived += 9;
if (World == null || World.Map == null) return;
ResetIdleTimer();
short x = IPAddress.NetworkToHostOrder(reader.ReadInt16());
short z = IPAddress.NetworkToHostOrder(reader.ReadInt16());
short y = IPAddress.NetworkToHostOrder(reader.ReadInt16());
ClickAction action = (reader.ReadByte() == 1) ? ClickAction.Build : ClickAction.Delete;
byte type = reader.ReadByte();
static readonly CommandDescriptor CdJoke = new CommandDescriptor
{
Name = "Joke",
//Permissions = new Permission[] { Permission.Games},
Aliases = new[] { "Jk" },
Category = CommandCategory.Fun,
IsConsoleSafe = true,
Usage = "/Joke",
Help = "Displays a random joke to the server",
Handler = JokeHandler
public void Interval(SchedulerTask task)
{
//check to stop Interval
if (_world == null)
{
_world = null;
task.Stop();
return;
#if DEBUG
Server.Message("World was null");
public static void takeVote()
{
world1 = PropHuntWorlds[randWorld.Next(0, PropHuntWorlds.Count)];
world2 = PropHuntWorlds[randWorld.Next(0, PropHuntWorlds.Count)];
world3 = PropHuntWorlds[randWorld.Next(0, PropHuntWorlds.Count)];
if (world1 != world2 || world1 != world3 || world2 != world3)
{
VoteThread = new Thread(new ThreadStart(delegate
{
NewVote();