A project to add vanilla functionality into PocketMine-MP (4.0)

Overview

libVanilla

A project to add vanilla functionality into PMMP. As this project was created specifically to support anvils/enchanting, those are the only two features to be enabled right now. Any contributions are greatly appreciated. If you have a feature request, please submit one here.

Disclaimer: PHP 8 or later is required to use this plugin.

Current/Future Feature Set

  • Anvils
  • Enchanting
  • Mobs
Comments
  • Anvils - Improving server-side verification

    Anvils - Improving server-side verification

    Issue

    As of now, anvils are very rough around the edges when it comes to server-side verification, especially when it comes to combining enchanted items / changing the name of an item. This should be top priority before anything else.

    Solution

    I see no evident way to clean this piece up, though there definitely are a million solutions that I haven't even thought of yet.

    bug 
    opened by sylvrs 1
  • Migrate to PlayerSession

    Migrate to PlayerSession

    Reason

    In libVanilla's current state, we'd have to create sessions for each of our features. This makes for an unnecessarily messy codebase to deal with as the project expands.

    Features

    Instead, all of the session data are merged into one class, PlayerSession. This class aims to combine the functionality into one class, where you can instead use managers and properties to cleanly handle it all.

    This pull request also implements a new class, VanillaListener. VanillaListener is a clean way to register and unregister listeners. This will be needed as our listener count increases, and the complexity of our project expands.

    enhancement 
    opened by sylvrs 0
  • Bug Report Enchantement

    Bug Report Enchantement

    Error: Illegal offset type
    File: plugins/Vanilla/src/sylvrs\vanilla/item/enchantment/EnchantmentManager
    Line: 66
    Type: TypeError
    Backtrace:
    #0 plugins/Vanilla/src/sylvrs\vanilla/item/enchantment/EnchantmentManager(59): sylvrs\vanilla\item\enchantment\EnchantmentManager::addBlacklisted(object pocketmine\item\enchantment\KnockbackEnchantment#22793)
    #1 plugins/Vanilla/src/sylvrs\vanilla/VanillaBase(25): sylvrs\vanilla\item\enchantment\EnchantmentManager::load()
    #2 pmsrc/src/plugin/PluginBase(75): sylvrs\vanilla\VanillaBase->onLoad()
    #3 pmsrc/src/plugin/PluginManager(213): pocketmine\plugin\PluginBase->__construct(object DevTools\FolderPluginLoader#22014, object pocketmine\Server#10, object pocketmine\plugin\PluginDescription#22676, string[70] C:/Users/rom1_/Documents/_Projet/Serveur Local/plugin_data/VanillaBase, string[62] C:\Users\****\Documents\_Projet\Serveur Local\plugins\Vanilla, object pocketmine\plugin\DiskResourceProvider#21893)
    #4 pmsrc/src/plugin/PluginManager(362): pocketmine\plugin\PluginManager->internalLoadPlugin(string[62] C:\Users\rom1_\Documents\_Projet\Serveur Local\plugins\Vanilla, object DevTools\FolderPluginLoader#22014, object pocketmine\plugin\PluginDescription#22676)
    #5 pmsrc/src/Server(1007): pocketmine\plugin\PluginManager->loadPlugins(string[55] C:\Users\***\Documents\_Projet\Serveur Local\plugins\, int 0)
    #6 pmsrc/src/PocketMine(305): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[47] C:\Users\rom1_\Documents\_Projet\Serveur Local\, string[55] C:\Users\***\Documents\_Projet\Serveur Local\plugins\)
    #7 pmsrc/src/PocketMine(328): pocketmine\server()
    #8 pmsrc(11): require(string[91] phar://C:/Users/***/Documents/_Projet/Serveur Local/PocketMine-MP.phar/src/Poc)
    
    Code:
    [57] 
    [58] 	public static function load(): void {
    [59] 		self::addBlacklisted(VanillaEnchantments::KNOCKBACK()); // TODO: Load from configuration
    [60] 		foreach (self::ENCHANTMENT_LIST as $id => $info) {
    [61] 			EnchantmentIdMap::getInstance()->register($id, new Enchantment(1000 - $id, ...$info));
    [62] 		}
    [63] 	}
    [64] 
    [65] 	private static function addBlacklisted(Enchantment $enchantment): void {
    [66] 		self::$BLACKLISTED_ENCHANTS[$enchantment->getName()] = true;
    [67] 	}
    [68] 
    [69] 	#[Pure]
    [70] 	public static function isBlacklisted(Enchantment $enchantment): bool {
    [71] 		return isset(self::$BLACKLISTED_ENCHANTS[$enchantment->getName()]);
    [72] 	}
    [73] }
    
    bug 
    opened by RtoxGaming 0
  • Anvils - Removing result checking

    Anvils - Removing result checking

    Issue

    Besides simple debugging, there is no reason that the server has to verify the client's output. This provides unnecessary amounts of work when attempting to verify.

    Solution

    The simplest solution to the problem is to remove the extraneous amounts of verification in the transaction. This will reduce code complexity, remove unneeded methods from the transaction class, and will provide for a cleaner implementation overall.

    enhancement 
    opened by sylvrs 0
  • Enchanting - Add configurable values for system

    Enchanting - Add configurable values for system

    Issue

    As shown by this.) method (among many others), the current enchant system is not configurable & is stuck on a <1.8 enchantment system. This isn't optimal, especially in circumstances where the user wants to increase the difficulty of enchanting.

    Solution

    This isn't a large issue, but will require a minor amount of work to make it configurable. Optimally, we'd have a category called enchanting with a boolean for adding lapis by default.

    enhancement 
    opened by sylvrs 0
Owner
Valiant Network
An organization to manage all of Valiant's projects, both public and private
Valiant Network
A forum software written in vanilla PHP with a MariaDB/MySQL database.

GloomyBB GloomyBB is a simple forum software written in vanilla PHP with a MariaDB/MySQL database. It is currently still in early development but is u

John Vinh 3 Nov 2, 2022
Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.

Laravel Blog Have you worked with Wordpress? Developers call this package wordpress-like laravel blog. Give our package a Star to support us ⭐ ?? Inst

Binshops 279 Dec 28, 2022
A plugin to add more blocks to PocketMine

This plugin aims to add all blocks not included in PocketMine. As of right now the ExtendedBlocks plugin is required to add blocks with IDs above 255.

xSuper 26 Dec 19, 2022
PocketMine-MP plugin for add a "hacker" difficulty bot.

NoDebuffBot NoDebuffBot is a open source plugin for PocketMine-MP. SetUP Put this plugin con your plugins folder. Create a world called ndfbot and exe

SSH Studios 3 Dec 26, 2021
A Pocketmine-MP plugin to add King Of The Hill events to your server.

KOTH KOTH is an event popular on HCF and Faction servers. This plugin lets you add this minigame to you server. Support For questions, please join the

ItsMax123 9 Sep 17, 2022
Add trash can to PocketMine-MP

TrashCan Add trash can to PocketMine-MP Getting Started Prerequisites Your server MUST RUN the latest version of PocketMine. Installation From Poggit

null 3 Jun 30, 2022
Add waterlogging to your PocketMine-MP server

Waterlogging Did you ever miss waterlogging on your server? Give your blocks all the H₂O they deserve Features Pretty much like in vanilla, if you wan

null 14 Nov 3, 2022
This is a simple plugin for PocketMine-MP4 that will add a promo code system.

PromoSystem Author Download TG Releases This is a simple plugin for PocketMine-MP that will add a promo code system. Capabilities Two types of promo c

Aleksey Vorobyov 4 Nov 15, 2022
A PocketMine/Altay Plugin to morph yourself into a block

BlockMorph A PocketMine/Altay Plugin to morph yourself into a block Command To morph yourself into a block use this command: /blockmorph [BlockID|Bloc

Matze 7 Mar 22, 2022
Converts any PocketMine-MP 3.0 extended blocks into PM4 native blocks!

ExtendedBlocksConverter Converts any PocketMine-MP 3.0 extended blocks into PM4 native blocks! Yes, you heard right, this plugin can convert any lefto

Covered123 6 Jun 4, 2022
Roach-example-project - Example project to demonstrate how to use RoachPHP in a Laravel project.

Example repository to illustrate how to use roach-php/laravel in a Laravel app. Check app/Spiders/FussballdatenSpider.php for an example spider that c

Kai Sassnowski 11 Dec 15, 2022
A plugin manager for PocketMine-MP downloads plugin from PocketMine-MP official plugin repository

oh-my-pmmp A plugin manager for PocketMine-MP Getting Started Prerequisites Your server MUST RUN the latest version of PocketMine. Installation From P

thebigcrafter 6 Jan 4, 2023
A Composer Package which installs the PhantomJS binary (Linux, Windows, Mac) into /bin of your project.

phantomjs-installer A Composer package which installs the PhantomJS binary (Linux, Windows, Mac) into /bin of your project. Table of Contents Installa

Jens A. Koch 149 Nov 8, 2022
CPAY is a sdk that encapsulates the Orange Money api with an intuitive syntax allowing you to integrate the Orange Money payment into your PHP project.

CPAY CHOCO PAY is a sdk that encapsulates the Orange Money api with an intuitive syntax allowing you to integrate the Orange Money payment into your P

faso-dev 1 Oct 26, 2022
Type and shape system for arrays. Help write clearer code when implementing configs for your PocketMine-MP plugin or composer project.

ConfigStruct Type and shape system for arrays. Help write clearer code when implementing configs for your PocketMine-MP plugin or composer project. It

EndermanbugZJFC 9 Aug 22, 2022
PHP library providing retry functionality with multiple backoff strategies and jitter support

PHP Backoff Easily wrap your code with retry functionality. This library provides: 4 backoff strategies (plus the ability to use your own) Optional ji

Signature Tech Studio 145 Dec 21, 2022
Provides the functionality to compare PHP values for equality.

sebastian/comparator This component provides the functionality to compare PHP values for equality. Installation You can add this library as a local, p

Sebastian Bergmann 6.7k Jan 1, 2023
Extends the customer functionality of Magento.

FireGento_Customer This extension extends the core functionality of the customer module of Magento. It is possible to temporarily lock the user accoun

FireGento e. V. 23 Apr 1, 2022