Skip to content

Instantly share code, notes, and snippets.

View inxomnyaa's full-sized avatar
🐺
Working on WolvesFortress MCBE RPG Server

inxomnyaa inxomnyaa

🐺
Working on WolvesFortress MCBE RPG Server
View GitHub Profile
@inxomnyaa
inxomnyaa / big oak tree growth.md
Created April 8, 2020 08:48 — forked from Earthcomputer/big oak tree growth.md
A description of the big oak tree growth algorithm in Minecraft

Big Oak Tree Growth Algorithm

Outline

A big oak tree is made up of a main trunk and multiple branches. A "branch" always contains leaves, but may not always contain logs.

Parameters

  • heightLimit: The actual height of the tree, including leaf blocks at the top (between 5 and 16)
  • trunkHeight: The height of the trunk
  • leafDistanceLimit: The distance from a log that leaves can generate, set to 4 for sapling growth, though appears to be set to 5 for natural growth for some reason
@inxomnyaa
inxomnyaa / pmmp_glyph_send.php
Created March 29, 2020 22:38
PocketMine-MP: print all characters/symbols inside a font image file (glyph_XX.png)
<?php
const GRID = 16;//16 * 16 icons
$filename = basename("glyph_E1",".png");
$startChar = hexdec(substr($filename, strrpos($filename, "_")+1)."00");
$i=0;
do{
$x = $i % GRID;
$z = ($i - ($i % GRID)) / GRID;
$ci = $startChar + $i;//char index
$char = mb_chr($ci);
My folder structure:
PM
- virions
-- virion.phar
- pmmp
-- <minecraft_version> i.e. 1.14
--- pmmp.phar
I added the folders "1.14" and "virions" to "External Libraries" on the bottom of the "Project" list/sidebar
right click "PHP" and choose "Include path"
This file has been truncated, but you can view the full file.
// File automatically generated by MinecraftSymbols
// Address : 04f42008
extern "C"
{
void* GImGui;
}
// Address : 008c6b4d
extern "C"
# Blocks Minecraft 1.12 domains that cause the client to be stuck in the loading screen
127.0.0.1 localhost
::1 localhost
# [General]
127.0.0.1 minecraftprod.rtep.msgamestudios.com
127.0.0.1 xforgeassets002.xboxlive.com
127.0.0.1 xforge.xboxlive.com
@inxomnyaa
inxomnyaa / poggit-dark.css
Last active May 20, 2020 03:37
Poggit dark userstyle - Load it via custom css extension i.e. https://github.com/openstyles/stylus
/* ==UserStyle==
@name Poggit Dark
@version 1.0.6
@description Dark theme for Poggit, a GitHub application for managing PocketMine-family plugins, and website for sharing plugins
@namespace XenialDan
@author XenialDan
@homepageURL https://gist.github.com/thebigsmileXD/ed07c6bd4285614d2c5654c9dce76bf2
@supportURL https://gist.github.com/thebigsmileXD/ed07c6bd4285614d2c5654c9dce76bf2
@updateURL https://raw.githubusercontent.com/StylishThemes/StackOverflow-Dark/master/stackoverflow-dark.user.css
==/UserStyle== */
@inxomnyaa
inxomnyaa / PHPFunctionToMySQLQuery.php
Created January 24, 2018 15:34
Executes INSERT INTO, UPDATE, SELECT *, DELETE FROM WHERE with values of keys and DELETE FROM WHERE condition on databases using functions to auto-generate the query
/** @var \mysqli $db */
private $db;
/** @var array */
private $settings;
private $tablename = "";
private $fieldarray = [];
public function __construct($settings = []){
Usage:
single:
minecraft://?argument=value
or multiple:
minecraft://?argument=value&argument2=value2
@inxomnyaa
inxomnyaa / customui_dynamic_subcommand_overview.php
Created September 12, 2017 23:37
customui dynamic subcommand overview
private function registerUIs(){
$ui = new SimpleForm($this->getDescription()->getPrefix() . TextFormat::DARK_PURPLE . ' Commands', 'These are all ' . $this->getDescription()->getPrefix() . ' commands:');
$namespace = __NAMESPACE__. '\subcommand\\';
print $namespace;
foreach (\get_declared_classes() as $class){
if (strpos($class, $namespace) === 0){
$c = substr($class, strlen($namespace));
$c = str_replace('SubCommand', '', $c);
if (strlen($c) > 0){
@inxomnyaa
inxomnyaa / TextFormat constant to Color
Created August 27, 2017 19:28
Transforms a TextFormat constant to Color for example for coloring armor
$colorconstant = TextFormat::RED;
list($r, $g, $b) = str_split(ltrim(str_replace('>', '', str_replace('<span style=color:#', '', TextFormat::toHTML(colorconstant))), '#'));
$color = new Color(...array_map('hexdec', [$r . $r, $g . $g, $b . $b]));