Skip to content

Instantly share code, notes, and snippets.

View DavyCraft648's full-sized avatar
⁉️
Who am I?

Asfadavy Aulia A. DavyCraft648

⁉️
Who am I?
View GitHub Profile
@DavyCraft648
DavyCraft648 / analyze_pm_dumpmemory.php
Created November 23, 2025 22:56
Theis script parses the JSON dump files generated by src/MemoryDump.php and produces a command-line summary of reference counts, instance counts, static/function statics, and top objects. It can also build an object reference graph to show reference chains, detect reference cycles, report string-size statistics, and print detailed information fo…
<?php
$top = 15;
$folder = null;
$script = basename($argv[0]);
$doDetails = false;
$detailHash = null;
$doCycles = false;
$doSizes = false;
@DavyCraft648
DavyCraft648 / rename_files.py
Created October 26, 2025 22:36
Fix white/blank Ore UI icon in Minecraft
import os
import glob
# The directory where the files are located.
# We will use the absolute path you provided.
BASE_PATH = r"D:\DavyCraft648\Minecraft\MCLauncher\Minecraft-1.21.114.1\data\gui\dist\hbui\assets"
ENCODED_STRING = "%40"
DECODED_STRING = "@"
@DavyCraft648
DavyCraft648 / FreezeTester.php
Created October 25, 2025 21:35
A plugin to test my pm Powder Snow PR pmmp/PocketMine-MP#6857
<?php
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\command\PluginCommand;
use pocketmine\entity\Living;
use pocketmine\event\entity\EntityDamageEvent;
use pocketmine\permission\DefaultPermissionNames;
use pocketmine\permission\Permission;
use pocketmine\permission\PermissionManager;
<?php
declare(strict_types=1);
use pocketmine\data\bedrock\item\ItemTypeNames;
use pocketmine\data\bedrock\item\SavedItemData;
use pocketmine\entity\Entity;
use pocketmine\event\EventPriority;
use pocketmine\event\player\PlayerChatEvent;
use pocketmine\item\Item;
use pocketmine\item\ItemIdentifier;
@DavyCraft648
DavyCraft648 / nukkit_block_to_pm.php
Created October 23, 2024 16:54
This PHP script converts block palette file from Nukkit to PocketMine, so PocketMine can read it. It takes the block palette file as input, decompresses and processes the block data, then converts it to a format compatible with PocketMine.
<?php
use pocketmine\data\bedrock\block\BlockStateData;
use pocketmine\errorhandler\ErrorToExceptionHandler;
use pocketmine\nbt\BigEndianNbtSerializer;
use pocketmine\nbt\NbtDataException;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\nbt\TreeRoot;
use pocketmine\network\mcpe\convert\BlockStateDictionary;
use pocketmine\network\mcpe\convert\BlockStateDictionaryEntry;
@DavyCraft648
DavyCraft648 / CustomiesProxySync.php
Last active July 30, 2025 12:45
Having problems with custom items and blocks on your server because you use a proxy like WaterdogPE? It can be solved with this plugin!
<?php
declare(strict_types=1);
namespace DavyCraft648\CustomiesProxySync;
use customiesdevs\customies\block\BlockPalette;
use customiesdevs\customies\block\CustomiesBlockFactory;
use customiesdevs\customies\item\CustomiesItemFactory;
use pmmp\thread\ThreadSafeArray;
use pocketmine\block\Block;
@DavyCraft648
DavyCraft648 / FlyingShield.php
Created November 12, 2022 21:26
A plugin that fixes a bug where players fly when using shield on wdpe proxy by sending EntityMetadataProperties::FLAGS when sending EntityMetadataProperties::FLAGS2
<?php
namespace DavyCraft648\FlyingShield;
use pocketmine\event\EventPriority;
use pocketmine\event\server\DataPacketSendEvent;
use pocketmine\network\mcpe\protocol\SetActorDataPacket;
use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties;
/**
@DavyCraft648
DavyCraft648 / UninitializedSyncedPropertiesFix.php
Last active November 12, 2022 21:13
A plugin that helps you to fix "Typed property (packet)::$syncedProperties must not be accessed before initialization" error which actually occurs because one of your plugins is outdated, but the plugin is not detected in the crashdump. This plugin will tell you which plugins you should update
<?php
namespace DavyCraft648\UninitializedSyncedPropertiesFix;
use pocketmine\event\EventPriority;
use pocketmine\event\server\DataPacketSendEvent;
use pocketmine\network\mcpe\protocol\AddActorPacket;
use pocketmine\network\mcpe\protocol\AddPlayerPacket;
use pocketmine\network\mcpe\protocol\SetActorDataPacket;
use pocketmine\network\mcpe\protocol\types\entity\PropertySyncData;
@DavyCraft648
DavyCraft648 / RegisterLegacyMappings.php
Last active July 20, 2022 20:38
Register legacy mappings from pm4
<?php
namespace DavyCraft648\RegisterLegacyMappings;
use pocketmine\data\bedrock\block\upgrade\LegacyBlockIdToStringIdMap;
use pocketmine\network\mcpe\convert\RuntimeBlockMapping;
use pocketmine\plugin\PluginBase;
use pocketmine\world\format\io\GlobalBlockStateHandlers;
use function array_flip;