Skip to content

Instantly share code, notes, and snippets.

View legoboy0215's full-sized avatar

Legoboy0215 legoboy0215

View GitHub Profile
@PEMapModder
PEMapModder / dot.php
Last active November 18, 2015 14:44
<?php
/**
* @param number $x the X coordinate of the center of the circle
* @param number $y the Y coordinate to place particles at
* @param number $z the Z coordinate of the center of the circle
* @param number $radius the distance for each dot from the center
* @param number $step the angle per step, in degrees
* @param callable $callback the function to call for each dot, with parameters $x, $y, $z representing the coordinates of the dot
*/
@PEMapModder
PEMapModder / mysqli.php
Created January 20, 2016 11:13
Simple MySQL client written in PHP
#!/usr/bin/env php
<?php
if(!defined("STDIN")) define("STDIN", fopen("php://stdin", "R"));
$host = "localhost";
$user = "root";
$password = "";
$schema = "";
$opts = getopt("h:u:p:s:");
@byteandahalf
byteandahalf / customblocksnippet.cpp
Last active February 7, 2016 13:41
Add a custom block to Minecraft Windows 10 Edition (not complete code)
static uintptr_t** mBlocks = (uintptr_t**) (((uint8_t*)baseAddr) + 0xA75750);
static TextureUVCoordinateSet myCustomTexture{0.0F,0.0F,0.0625F,0.0625F,16,16,1,1};
TextureUVCoordinateSet& customGetTexture()
{
return myCustomTexture;
}
uint32_t customGetColor()
{

[QUOTE="TheDeibo, post: 142836, member: 16757"]correction: shoghi OR shoghicp[/QUOTE] That's not important. [QUOTE="Legoboy0215, post: 142835, member: 18294"]Hi: I am a very very inactive dev on ImagicalMine. I contributed a lot on the early days where there was a skin bug, chest bug, and etc. At start, ImagicalCorp consisted of members of… [USER=29074]@k3ithkfng[/USER]'s server's staff. We thought: "Wow, where did shogi go?" So we started. I still don't get the reason why [USER=29074]@k3ithkfng[/USER] did not fork the repo, but it's too late :)

We tried our best, and I tried my best typing this on my paperwhite XD Hope this answers your question.

TL; DR:

<?php
$world = $this->getServer()->getDefaultLevel();
$radius = 136;
$total = (($radius * 2) + 1) ** 2;
$count = 0;
$bList = clone \pocketmine\block\Block::$list;
$search = [];
<?php
namespace shoghicp\MinecraftSimulator\task;
use pocketmine\Player;
use pocketmine\scheduler\PluginTask;
use shoghicp\MinecraftSimulator\Loader;
class MarqueeTask extends PluginTask{

You want to override the tell command, that has also the w and msg aliases by default. The class that will override these commands is MyTellCommand (extends PluginCommand).

To do this, you've to set the original command in a state that allows it to be overriden. Also, aliases will be registered directly, but since all the work was done for the first registration, it's pretty simple.

//We are in the context of a plugin
@jojoe77777
jojoe77777 / metadata.md
Last active February 27, 2019 03:20
Helpful metadata information
ID Description Type
1 Air Short
2 Name tag String
3 Name visibility Byte
4 Silent Byte
7 Potion bubbles Int
12 Baby zombies Byte
14 Baby animals, wolf data (angry) Byte
16 Sheep/Villager type, also slime size, and pig saddle Byte
@shoghicp
shoghicp / Rules.md
Last active November 23, 2020 21:53
Rules of channels #mcpedevs and #pocketmine on irc.freenode.net
#!/bin/bash
USER="root"
PASSWORD=""
FILES="/Users/tenold/Backups/MySQL/*"
for f in $FILES
do
echo "Processing $f file..."