This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Voting | |
public void TakeVote() | |
{ | |
if (!VoteIsOn) return; | |
//Actual voting | |
if (!_votingRestarting) | |
{ | |
World[] voteWorlds = PropHuntWorlds.OrderBy(x => RandWorld.Next()) | |
.Take(3) | |
.ToArray(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Trees: (Leaves and Logs and Planks and Sapling) | |
- Aspen Tree | |
- Kapok Tree | |
- Pine Tree | |
Plants: | |
- Grass | |
- Blueberry bush | |
- Daisy flower | |
- Cowbell flower |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Interval(SchedulerTask task) | |
{ | |
//check to stop Interval | |
if (_world == null) | |
{ | |
_world = null; | |
task.Stop(); | |
return; | |
#if DEBUG | |
Server.Message("World was null"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
NewerOlder