From b91b1707ab41fe7f65dd714679cb4deaf0755cbd Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:36:39 +0700 Subject: [PATCH 01/25] Update CustomSizedInvMenu.php --- .../customsizedinvmenu/CustomSizedInvMenu.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php b/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php index 40ccf39..e19618c 100644 --- a/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php +++ b/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php @@ -14,6 +14,9 @@ use pocketmine\player\Player; use pocketmine\plugin\PluginBase; use pocketmine\utils\TextFormat; + +use NhanAZ\libBedrock\ResourcePackManager; + use RuntimeException; use function array_rand; use function assert; @@ -21,7 +24,6 @@ final class CustomSizedInvMenu extends PluginBase{ - private const RESOURCE_PACK_ID = "21f0427f-572a-416d-a90e-c5d9becb0fa3"; private const TYPE_DYNAMIC_PREFIX = "muqsit:customsizedinvmenu_"; public static function create(int $size) : InvMenu{ @@ -35,11 +37,8 @@ public static function create(int $size) : InvMenu{ } protected function onEnable() : void{ - if($this->getServer()->getResourcePackManager()->getPackById(self::RESOURCE_PACK_ID) === null){ - $this->getLogger()->warning("Resource pack 'Inventory UI Resource Pack' could not be found."); - $this->getLogger()->warning("This plugin cannot be loaded. Please download the resource pack from: https://github.com/tedo0627/InventoryUIResourcePack"); - throw new RuntimeException("Resource pack 'Inventory UI Resource Pack' has not been loaded"); - } + $this->saveDefaultConfig(); + ResourcePackManager::registerResourcePack($this); if(!InvMenuHandler::isRegistered()){ InvMenuHandler::register($this); @@ -80,4 +79,8 @@ public function onCommand(CommandSender $sender, Command $command, string $label $menu->send($sender); return true; } -} \ No newline at end of file + + protected function onDisable() : void{ + ResourcePackManager::unRegisterResourcePack($this); + } +} From 40040d74bbd5cd81691f9eb8bf3dd5d0425826ad Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:38:32 +0700 Subject: [PATCH 02/25] Upload chest_screen.json --- .../ui/chest_screen.json | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 resources/CustomSizedInvMenu Pack/ui/chest_screen.json diff --git a/resources/CustomSizedInvMenu Pack/ui/chest_screen.json b/resources/CustomSizedInvMenu Pack/ui/chest_screen.json new file mode 100644 index 0000000..b3b67c1 --- /dev/null +++ b/resources/CustomSizedInvMenu Pack/ui/chest_screen.json @@ -0,0 +1,136 @@ +{ + "namespace": "chest", + + "small_chest_screen@common.inventory_screen_common": { + "$close_on_player_hurt|default": true, + "close_on_player_hurt": "$close_on_player_hurt", + + "$keyword1": "§1§0§r§r§r§r§r§r§r§r§r", + "$keyword2": "§2§0§r§r§r§r§r§r§r§r§r", + "$keyword3": "§3§0§r§r§r§r§r§r§r§r§r", + "$keyword4": "§4§0§r§r§r§r§r§r§r§r§r", + "$keyword5": "§5§0§r§r§r§r§r§r§r§r§r", + "$keyword6": "§6§0§r§r§r§r§r§r§r§r§r", + + "$keyword_scroll1": "§1§1§r§r§r§r§r§r§r§r§r", + "$keyword_scroll2": "§2§1§r§r§r§r§r§r§r§r§r", + "$keyword_scroll3": "§3§1§r§r§r§r§r§r§r§r§r", + "$keyword_scroll4": "§4§1§r§r§r§r§r§r§r§r§r", + "$keyword_scroll5": "§5§1§r§r§r§r§r§r§r§r§r", + "$keyword_scroll6": "§6§1§r§r§r§r§r§r§r§r§r", + + "$keyword_pocket": "§r§r§r§r§r§r§r§r§r", + + "$container_title_copy": "$container_title", + + "variables": [ + { + "requires": "$desktop_screen", + "$screen_content": "chest.small_chest_panel", + "$screen_bg_content": "common.screen_background" + }, + { + "requires": "$pocket_screen", + "$screen_content": "pocket_containers.small_chest_panel" + }, + + // desktop not scroll + + { // 9 * 1 + "requires": "(not (($container_title_copy - $keyword1) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 176, 130 ], + "$panel_top_half_size": [ "100%", 42 ], + "$scrolling_panel_size": [ 162, 18 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 2 + "requires": "(not (($container_title_copy - $keyword2) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 176, 148 ], + "$panel_top_half_size": [ "100%", 60 ], + "$scrolling_panel_size": [ 162, 36 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 3 + "requires": "(not (($container_title_copy - $keyword3) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 176, 166 ], + "$panel_top_half_size": [ "100%", 78 ], + "$scrolling_panel_size": [ 162, 54 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 4 + "requires": "(not (($container_title_copy - $keyword4) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 176, 184 ], + "$panel_top_half_size": [ "100%", 96 ], + "$scrolling_panel_size": [ 162, 72 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 5 + "requires": "(not (($container_title_copy - $keyword5) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 176, 202 ], + "$panel_top_half_size": [ "100%", 114 ], + "$scrolling_panel_size": [ 162, 90 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 6 + "requires": "(not (($container_title_copy - $keyword6) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 176, 220 ], + "$panel_top_half_size": [ "100%", 132 ], + "$scrolling_panel_size": [ 162, 108 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + + // desktop scroll + + { // 9 * 1 + "requires": "(not (($container_title_copy - $keyword_scroll1) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 184, 130 ], + "$panel_top_half_size": [ "100%", 42 ], + "$scrolling_panel_size": [ 168, 18 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 2 + "requires": "(not (($container_title_copy - $keyword_scroll2) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 184, 148 ], + "$panel_top_half_size": [ "100%", 60 ], + "$scrolling_panel_size": [ 168, 36 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 3 + "requires": "(not (($container_title_copy - $keyword_scroll3) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 184, 166 ], + "$panel_top_half_size": [ "100%", 78 ], + "$scrolling_panel_size": [ 168, 54 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 4 + "requires": "(not (($container_title_copy - $keyword_scroll4) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 184, 184 ], + "$panel_top_half_size": [ "100%", 96 ], + "$scrolling_panel_size": [ 168, 72 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 5 + "requires": "(not (($container_title_copy - $keyword_scroll5) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 184, 202 ], + "$panel_top_half_size": [ "100%", 114 ], + "$scrolling_panel_size": [ 168, 90 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + { // 9 * 6 + "requires": "(not (($container_title_copy - $keyword_scroll6) = $container_title_copy)) and $desktop_screen", + "$root_panel_size": [ 184, 220 ], + "$panel_top_half_size": [ "100%", 132 ], + "$scrolling_panel_size": [ 168, 108 ], + "$screen_content": "custom_scroll_screen.custom_scroll_panel" + }, + + // pocket + + { + "requires": "(not (($container_title_copy - $keyword_pocket) = $container_title_copy)) and $pocket_screen", + "$screen_content": "custom_pocket_containers.panel" + + } + ] + } +} From 9b49f2a699b34556d9b717c1b8201dabaf7459b2 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:39:11 +0700 Subject: [PATCH 03/25] Add files via upload --- .../CustomSizedInvMenu Pack/ui/_ui_defs.json | 6 ++ .../ui/custom_pocket_containers.json | 75 +++++++++++++++++++ .../ui/custom_scroll_screen.json | 71 ++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 resources/CustomSizedInvMenu Pack/ui/_ui_defs.json create mode 100644 resources/CustomSizedInvMenu Pack/ui/custom_pocket_containers.json create mode 100644 resources/CustomSizedInvMenu Pack/ui/custom_scroll_screen.json diff --git a/resources/CustomSizedInvMenu Pack/ui/_ui_defs.json b/resources/CustomSizedInvMenu Pack/ui/_ui_defs.json new file mode 100644 index 0000000..2fd5d7d --- /dev/null +++ b/resources/CustomSizedInvMenu Pack/ui/_ui_defs.json @@ -0,0 +1,6 @@ +{ + "ui_defs": [ + "ui/custom_pocket_containers.json", + "ui/custom_scroll_screen.json" + ] +} \ No newline at end of file diff --git a/resources/CustomSizedInvMenu Pack/ui/custom_pocket_containers.json b/resources/CustomSizedInvMenu Pack/ui/custom_pocket_containers.json new file mode 100644 index 0000000..d1336e1 --- /dev/null +++ b/resources/CustomSizedInvMenu Pack/ui/custom_pocket_containers.json @@ -0,0 +1,75 @@ +{ + "namespace" : "custom_pocket_containers", + + "custom_pocket_container_grid@common.container_grid": { + "layer": 3, + "$item_collection_name": "container_items", + "grid_item_template": "common.pocket_ui_container_item" + }, + + "inventory_panel": { + "type": "panel", + //"size": [ "80%", "95%" ], + "size": [ "84%", "95%" ], // change + "anchor_to": "center", + "anchor_from": "center", + "controls": [ + { + "scrolling_panel@common.scrolling_panel": { + "$allow_scrolling_even_when_content_fits": false, + "layer": 1, + "$scrolling_pane_size": [ "100%", "100%-2px" ], + //"$scrolling_content": "pocket_containers.inventory_grid", + "$scrolling_content": "custom_pocket_containers.custom_pocket_container_grid", // change + "$scroll_box_mouse_image_control": "common-classic.button_state_default", + "$scroll_size": [ "8px", "100%" ] + } + } + ] + }, + + "half_screen": { + "type": "panel", + "size": [ "50%", "100%-27px" ], + "offset": [ 0, 27 ], + "anchor_from": "top_left", + "anchor_to": "top_left", + "controls": [ + { "inventory_panel@inventory_panel": {} } + ] + }, + + "panel": { + "type": "panel", + "controls": [ + { "container_gamepad_helpers@common.container_gamepad_helpers": { "layer": 3 } }, + //{ "header@header_area": { "layer": 2 } }, + { "header@pocket_containers.header_area": { "layer": 2 } }, // change + //{ "bg@background_panel": { "layer": 0 } }, + { "bg@pocket_containers.background_panel": { "layer": 0 } }, // change + { + //"inventory@half_screen": { + "inventory@pocket_containers.half_screen": { // change + "$container_size": 36, + "$pane_collection": "combined_hotbar_and_inventory_items" + } + }, + { + "container@half_screen": { + "anchor_from": "top_middle", + "$pane_collection": "container_items" + } + }, + { "selected_item_details_factory@common.selected_item_details_factory": {} }, + { + "item_lock_notification_factory@common.item_lock_notification_factory": { + "$offset": [ 0, "85%" ] + } + }, + { "gamepad_cursor@common.gamepad_cursor_button": {} }, + { "inventory_selected_icon_button@common.inventory_selected_icon_button": {} }, + { "hold_icon@common.inventory_take_progress_icon_button": {} }, + { "flying_item_renderer@common.flying_item_renderer": {} } + ] + } +} \ No newline at end of file diff --git a/resources/CustomSizedInvMenu Pack/ui/custom_scroll_screen.json b/resources/CustomSizedInvMenu Pack/ui/custom_scroll_screen.json new file mode 100644 index 0000000..4efb811 --- /dev/null +++ b/resources/CustomSizedInvMenu Pack/ui/custom_scroll_screen.json @@ -0,0 +1,71 @@ +{ + "namespace": "custom_scroll_screen", + + "custom_container_grid@common.container_grid": { + "layer": 3, + "$item_collection_name": "container_items" + }, + + "custom_scroll_panel_top_half": { + "type": "panel", + "$panel_top_half_size|default": [ "100%", 132 ], // large_chest_panel_top_half + "size": "$panel_top_half_size", + "offset": [ 0, 11 ], + "anchor_from": "top_left", + "anchor_to": "top_left", + "controls": [ + { "chest_label@chest.chest_label": {} }, + { + "scrolling_panel@common.container_scroll_panel": { + "$scroll_view_port_size": [ "100%", "100%" ], + "$scroll_view_port_size_touch": [ "100%", "100%" ], + "$scroll_view_port_offset": [ 0, 0 ], + "$scroll_view_port_offset_touch": [ 0, 0 ], + "$scroll_bar_left_padding_size": [ 0, 0 ], + "$scroll_bar_right_padding_size": [ 0, 0 ], + "$scrolling_panel_size|default": [ 162, 108 ], // large_chest_grid + "size": "$scrolling_panel_size", + "$scrolling_content": "custom_scroll_screen.custom_container_grid" + } + } + ] + }, + + "custom_scroll_panel": { + "type": "panel", + "controls": [ + { "container_gamepad_helpers@common.container_gamepad_helpers": {} }, + { + "flying_item_renderer@common.flying_item_renderer": { + "layer": 14 + } + }, + { "selected_item_details_factory@common.selected_item_details_factory": {} }, + { "item_lock_notification_factory@common.item_lock_notification_factory": {} }, + { + "root_panel@common.root_panel": { + "$root_panel_size|default": [ 176, 220 ], // large_chest_panel + "size": "$root_panel_size", + "layer": 1, + "controls": [ + { "common_panel@common.common_panel": {} }, + { + "chest_panel": { + "type": "panel", + "layer": 5, + "controls": [ + { "small_chest_panel_top_half@custom_scroll_screen.custom_scroll_panel_top_half": {} }, + { "inventory_panel_bottom_half_with_label@common.inventory_panel_bottom_half_with_label": {} }, + { "hotbar_grid@common.hotbar_grid_template": {} }, + { "inventory_take_progress_icon_button@common.inventory_take_progress_icon_button": {} } + ] + } + }, + { "inventory_selected_icon_button@common.inventory_selected_icon_button": {} }, + { "gamepad_cursor@common.gamepad_cursor_button": {} } + ] + } + } + ] + } +} \ No newline at end of file From 52f7eac3308def924de71e588aef7ddda1a4a5b8 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:39:47 +0700 Subject: [PATCH 04/25] Add files via upload --- .../CustomSizedInvMenu Pack/manifest.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 resources/CustomSizedInvMenu Pack/manifest.json diff --git a/resources/CustomSizedInvMenu Pack/manifest.json b/resources/CustomSizedInvMenu Pack/manifest.json new file mode 100644 index 0000000..cc38b55 --- /dev/null +++ b/resources/CustomSizedInvMenu Pack/manifest.json @@ -0,0 +1,18 @@ +{ + "format_version": 2, + "header": { + "name": "CustomSizedInvMenu Resource Pack", + "description": "CustomSizedInvMenu Resource Pack", + "uuid": "7ca75eab-549d-45e4-b5b8-56d44209abf1", + "version": [1, 1, 0], + "min_engine_version": [1, 18, 0] + }, + "modules": [ + { + "type": "resources", + "description": "CustomSizedInvMenu Resource Pack", + "uuid": "dce102e8-6112-4190-a363-d6ee18bac0d2", + "version": [1, 1, 0] + } + ] +} \ No newline at end of file From 0a9602e5c8df344ec1f88b64955cfc259dfbe428 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:51:32 +0700 Subject: [PATCH 05/25] Update README.md --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 33051e5..4db9577 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # CustomSizedInvMenu -To be able to build custom-sized `InvMenu` instances, you must install the [tedo0627/InventoryUIResourcePack](https://github.com/tedo0627/InventoryUIResourcePack) resource pack on your server. +Now to be able to build custom-sized [`InvMenu`](https://github.com/muqsit/InvMenu) instances, you no longer need to install the [`tedo0627/InventoryUIResourcePack`](https://github.com/tedo0627/InventoryUIResourcePack) resource pack on your server as new version has it built into the plugin. However, you need to install the virion [`libBedrock`](https://github.com/NhanAZ/libBedrock) to your server so that errors do not occur during use A custom-sized InvMenu provides several advantages over traditional ways of displaying menus (`InvMenu::TYPE_CHEST`, `InvMenu::TYPE_DOUBLE_CHEST`): 1. **Dynamic:** To create a menu that can hold `n` items, you need not know the size of a chest or a double chest inventory. Instead, simply create a menu of the preferred size: `CustomSizedInvMenu::create(n)`. @@ -25,8 +25,3 @@ Run `/cinvmenu [title]` to open an InvMenu of `numSlots` number of sl - `/cinvmenu 59 "59-slot Inventory"` ![image](https://github.com/Muqsit/CustomSizedInvMenu/assets/15074389/602e2fdc-b675-4b7f-9e2e-b76c700c64a3) - - -### Resources -- [tedo0627/InventoryUI](https://github.com/tedo0627/InventoryUI) -- [tedo0627/InventoryUIResourcePack](https://github.com/tedo0627/InventoryUIResourcePack) From 02038ac47f0869988ee5951654d178085aeadbea Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:52:25 +0700 Subject: [PATCH 06/25] Update plugin.yml --- plugin.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.yml b/plugin.yml index ba56618..aa7a2b3 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,7 +1,8 @@ name: CustomSizedInvMenu main: muqsit\customsizedinvmenu\CustomSizedInvMenu api: 5.0.0 -version: 0.0.2 +version: 0.0.3 +virion: ["InvMenu", "libBedrock"] commands: cinvmenu: From c7614602bc518cccc8edc19b6b0d4f5d344d6440 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sat, 13 Jan 2024 08:56:14 +0700 Subject: [PATCH 07/25] Add pack icon for `CustomSizedInvMenu Pack` --- resources/CustomSizedInvMenu Pack/pack_icon.png | Bin 0 -> 22774 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 resources/CustomSizedInvMenu Pack/pack_icon.png diff --git a/resources/CustomSizedInvMenu Pack/pack_icon.png b/resources/CustomSizedInvMenu Pack/pack_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cf325f05b3c54182f0d0c47443d0f356bb7c6876 GIT binary patch literal 22774 zcmeEtWmFv7wrO zXUzXN{u;TCjoZIU{yC1f4*x0hNAjO_Us@`|ffe8t;1v`Q;o;{I5)lyQ{@2+4i=>>p zjfJNTT$q=em!E^1hl7Xjf0TRW;$>z3%GcEfF8MzSDEN5(>64dRh~L_VPnbhML{NZ( z-$Fo;Lqt%BkHbos+tNaaPmo{O)`p(zU$-I7^#{HGa%bXP|NH&_L*%~z{?}CgRS!Ow za2?_LPbK+RyZ?ag|Ihb-L;U|w7qqm0ck*u``!`&F!}V_=@NWtKtzCb^^=~2YZwddc zUH{ME!uXeyY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$3 lfagklpyIg_$SLPP>+T=3_I%d+`yO<>o2RRv%Q~loCIA?}_G175 literal 0 HcmV?d00001 From cc8e560c83d9f94530859557e64be1a1b755b315 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sat, 13 Jan 2024 09:04:13 +0700 Subject: [PATCH 08/25] Update CustomSizedActorInvMenuGraphic.php --- .../customsizedinvmenu/CustomSizedActorInvMenuGraphic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php b/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php index cd351b4..a163c41 100644 --- a/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php +++ b/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php @@ -11,7 +11,7 @@ final class CustomSizedActorInvMenuGraphic implements InvMenuGraphic{ - readonly private string $size_data; + private string $size_data; public function __construct( readonly private InvMenuGraphic $inner, @@ -42,4 +42,4 @@ public function getNetworkTranslator() : ?InvMenuGraphicNetworkTranslator{ public function getAnimationDuration() : int{ return $this->inner->getAnimationDuration(); } -} \ No newline at end of file +} From f93e66dfbf3cbbce433ba324cf17bbe9690a09e7 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sat, 13 Jan 2024 09:04:39 +0700 Subject: [PATCH 09/25] Update CustomSizedInvMenuType.php --- src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php b/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php index 605ae4b..125ec3b 100644 --- a/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php +++ b/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php @@ -29,7 +29,7 @@ public static function ofSize(int $size) : self{ return new self($size, $length, $length * 9 < $size); } - readonly private ActorInvMenuGraphic $inner_graphic; + private ActorInvMenuGraphic $inner_graphic; public function __construct( readonly private int $size, @@ -57,4 +57,4 @@ public function createGraphic(InvMenu $menu, Player $player) : ?InvMenuGraphic{ public function createInventory() : Inventory{ return new InvMenuInventory($this->size); } -} \ No newline at end of file +} From 4495b9ad2f7850ddf4468f702ff2ac2989452453 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sat, 13 Jan 2024 09:13:02 +0700 Subject: [PATCH 10/25] Update CustomSizedActorInvMenuGraphic.php --- .../customsizedinvmenu/CustomSizedActorInvMenuGraphic.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php b/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php index a163c41..3548802 100644 --- a/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php +++ b/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php @@ -14,10 +14,10 @@ final class CustomSizedActorInvMenuGraphic implements InvMenuGraphic{ private string $size_data; public function __construct( - readonly private InvMenuGraphic $inner, - readonly private ?string $name, - readonly private int $length, - readonly private bool $scrollbar + private InvMenuGraphic $inner, + private ?string $name, + private int $length, + private bool $scrollbar ){ $scroll = (int) $this->scrollbar; $this->size_data = "§{$this->length}§{$scroll}§r§r§r§r§r§r§r§r§r§r"; From 928aee3370a0e7c0d88a6e9434bd3f161c07a570 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sat, 13 Jan 2024 09:14:19 +0700 Subject: [PATCH 11/25] Update CustomSizedInvMenuType.php --- src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php b/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php index 125ec3b..ca067ac 100644 --- a/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php +++ b/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php @@ -32,9 +32,9 @@ public static function ofSize(int $size) : self{ private ActorInvMenuGraphic $inner_graphic; public function __construct( - readonly private int $size, - readonly private int $length, - readonly private bool $scrollbar + private int $size, + private int $length, + private bool $scrollbar ){ $actor_runtime_identifier = Entity::nextRuntimeId(); From 685360210866845072075178321b4ccef3f09d1d Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:24:12 +0700 Subject: [PATCH 12/25] Update .poggit.yml --- .poggit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.poggit.yml b/.poggit.yml index a7618ef..5aa5ca6 100644 --- a/.poggit.yml +++ b/.poggit.yml @@ -9,4 +9,6 @@ projects: - src: muqsit/InvMenu/InvMenu branch: pm5 version: ^4.6.4 + - src: NhanAZ/libBedrock/libBedrock + version: ^1.1.9 ... From a20b54ce389e9f938296644c1271094fc47d4a83 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:18:59 +0700 Subject: [PATCH 13/25] Update CustomSizedInvMenu.php --- .../customsizedinvmenu/CustomSizedInvMenu.php | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php b/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php index e19618c..98a6aa1 100644 --- a/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php +++ b/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php @@ -56,29 +56,6 @@ protected function onEnable() : void{ ->setByte("summonable", 0) ); } - - public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool{ - if(!($sender instanceof Player)){ - $sender->sendMessage(TextFormat::RED . "Please use this command in-game."); - return true; - } - - if(!isset($args[0]) || !is_numeric($args[0]) || (int) $args[0] <= 0){ - $sender->sendMessage(TextFormat::RED . "/" . $command . " [title : string]"); - return true; - } - - $menu = CustomSizedInvMenu::create((int) $args[0]); - $menu->setName($args[1] ?? null); - - $items = VanillaItems::getAll(); - for($i = 0, $max = $menu->getInventory()->getSize(); $i < $max; $i++){ - $menu->getInventory()->setItem($i, $items[array_rand($items)]); - } - - $menu->send($sender); - return true; - } protected function onDisable() : void{ ResourcePackManager::unRegisterResourcePack($this); From d366bf0e28c7939d119e4e4a9ae13b91bee1a871 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:20:12 +0700 Subject: [PATCH 14/25] Update plugin.yml --- plugin.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/plugin.yml b/plugin.yml index aa7a2b3..cf5db17 100644 --- a/plugin.yml +++ b/plugin.yml @@ -3,14 +3,3 @@ main: muqsit\customsizedinvmenu\CustomSizedInvMenu api: 5.0.0 version: 0.0.3 virion: ["InvMenu", "libBedrock"] - -commands: - cinvmenu: - usage: /cinvmenu [title] - description: Opens a custom-sized inventory menu - permission: customsizedinvmenu.command - -permissions: - customsizedinvmenu.command: - description: Allows using the /cinvmenu command - default: true From c3aa72086a597959e61197fb02e1c4c6f65d7c80 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:22:27 +0700 Subject: [PATCH 15/25] Upload virion.yml --- virion.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 virion.yml diff --git a/virion.yml b/virion.yml new file mode 100644 index 0000000..5dca94d --- /dev/null +++ b/virion.yml @@ -0,0 +1,5 @@ +name: CustomSizedInvMenu +antigen: muqsit\customsizedinvmenu +api: 5.0.0 +version: 0.0.3 +virion: ["InvMenu", "libBedrock"] From 113acb503669575f46b9b8ebb41527882d0fa76d Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:23:30 +0700 Subject: [PATCH 16/25] Delete .poggit.yml --- .poggit.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .poggit.yml diff --git a/.poggit.yml b/.poggit.yml deleted file mode 100644 index 5aa5ca6..0000000 --- a/.poggit.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- # Poggit-CI Manifest. Open the CI at https://poggit.pmmp.io/ci/Muqsit/CustomSizedInvMenu -build-by-default: true -branches: -- master -projects: - CustomSizedInvMenu: - path: "" - libs: - - src: muqsit/InvMenu/InvMenu - branch: pm5 - version: ^4.6.4 - - src: NhanAZ/libBedrock/libBedrock - version: ^1.1.9 -... From fd49980664656b2ff9ca1002f57003c2bf6b37ff Mon Sep 17 00:00:00 2001 From: poggit-bot Date: Thu, 22 Feb 2024 23:27:29 +0700 Subject: [PATCH 17/25] Create .poggit.yml Poggit-CI is enabled for this repo by @ClickedTran Visit the Poggit-CI page for this repo at https://poggit.pmmp.io/ci/ClickedTran/CustomSizedInvMenu --- .poggit.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .poggit.yml diff --git a/.poggit.yml b/.poggit.yml new file mode 100644 index 0000000..2efe3a5 --- /dev/null +++ b/.poggit.yml @@ -0,0 +1,16 @@ +--- # Poggit-CI Manifest. Open the CI at https://poggit.pmmp.io/ci/ClickedTran/CustomSizedInvMenu +build-by-default: true +branches: +- master +projects: + CustomSizedInvMenu: + path: "" + model: virion + type: library + libs: + - src: NhanAZ/libBedrock/libBedrock + version: ^1.1.9 + - src: muqsit/invmenu/InvMenu + version: ^4.6.4 + branch: pm5 +... From 48dfec4fdd1a2a6547205ad5a504c1290eb15a73 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:33:24 +0700 Subject: [PATCH 18/25] Update .poggit.yml --- .poggit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.poggit.yml b/.poggit.yml index 2efe3a5..3218ead 100644 --- a/.poggit.yml +++ b/.poggit.yml @@ -11,6 +11,6 @@ projects: - src: NhanAZ/libBedrock/libBedrock version: ^1.1.9 - src: muqsit/invmenu/InvMenu - version: ^4.6.4 + version: ^4.6.5 branch: pm5 ... From 47deddd4160c6d5ffb53761b0ba0092323d8f063 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:19:54 +0700 Subject: [PATCH 19/25] Delete virion.yml --- virion.yml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 virion.yml diff --git a/virion.yml b/virion.yml deleted file mode 100644 index 5dca94d..0000000 --- a/virion.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: CustomSizedInvMenu -antigen: muqsit\customsizedinvmenu -api: 5.0.0 -version: 0.0.3 -virion: ["InvMenu", "libBedrock"] From 3396c702737fe9f99f3f2015551f2651b61fca21 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:20:08 +0700 Subject: [PATCH 20/25] Delete .poggit.yml --- .poggit.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .poggit.yml diff --git a/.poggit.yml b/.poggit.yml deleted file mode 100644 index 3218ead..0000000 --- a/.poggit.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- # Poggit-CI Manifest. Open the CI at https://poggit.pmmp.io/ci/ClickedTran/CustomSizedInvMenu -build-by-default: true -branches: -- master -projects: - CustomSizedInvMenu: - path: "" - model: virion - type: library - libs: - - src: NhanAZ/libBedrock/libBedrock - version: ^1.1.9 - - src: muqsit/invmenu/InvMenu - version: ^4.6.5 - branch: pm5 -... From ab51b6ecc132a3ca688366f035ed44ba7886e6ff Mon Sep 17 00:00:00 2001 From: poggit-bot Date: Fri, 23 Feb 2024 11:22:59 +0700 Subject: [PATCH 21/25] Create .poggit.yml Poggit-CI is enabled for this repo by @ClickedTran Visit the Poggit-CI page for this repo at https://poggit.pmmp.io/ci/ClickedTran/CustomSizedInvMenu --- .poggit.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .poggit.yml diff --git a/.poggit.yml b/.poggit.yml new file mode 100644 index 0000000..38f15cf --- /dev/null +++ b/.poggit.yml @@ -0,0 +1,14 @@ +--- # Poggit-CI Manifest. Open the CI at https://poggit.pmmp.io/ci/ClickedTran/CustomSizedInvMenu +build-by-default: true +branches: +- master +projects: + CustomSizedInvMenu: + path: "" + libs: + - src: muqsit/InvMenu/InvMenu + branch: pm5 + version: ^4.6.5 + - src: NhanAZ/libBedrock/libBedrock + version: ^1.1.9 +... From efbe99afa1632d1fc7cd6d653899c00dd38fcc14 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sun, 5 May 2024 22:42:10 +0700 Subject: [PATCH 22/25] Delete src/muqsit/customsizedinvmenu directory --- .../CustomSizedActorInvMenuGraphic.php | 45 ------------- .../customsizedinvmenu/CustomSizedInvMenu.php | 63 ------------------- .../CustomSizedInvMenuType.php | 60 ------------------ 3 files changed, 168 deletions(-) delete mode 100644 src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php delete mode 100644 src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php delete mode 100644 src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php diff --git a/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php b/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php deleted file mode 100644 index 3548802..0000000 --- a/src/muqsit/customsizedinvmenu/CustomSizedActorInvMenuGraphic.php +++ /dev/null @@ -1,45 +0,0 @@ -scrollbar; - $this->size_data = "§{$this->length}§{$scroll}§r§r§r§r§r§r§r§r§r§r"; - } - - public function send(Player $player, ?string $name) : void{ - $this->inner->send($player, $this->size_data . ($name ?? $this->name ?? "Inventory")); - } - - public function sendInventory(Player $player, Inventory $inventory) : bool{ - return $this->inner->sendInventory($player, $inventory); - } - - public function remove(Player $player) : void{ - $this->inner->remove($player); - } - - public function getNetworkTranslator() : ?InvMenuGraphicNetworkTranslator{ - return $this->inner->getNetworkTranslator(); - } - - public function getAnimationDuration() : int{ - return $this->inner->getAnimationDuration(); - } -} diff --git a/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php b/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php deleted file mode 100644 index 98a6aa1..0000000 --- a/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php +++ /dev/null @@ -1,63 +0,0 @@ -register($id, CustomSizedInvMenuType::ofSize($size)); - $ids_by_size[$size] = $id; - } - return InvMenu::create($ids_by_size[$size]); - } - - protected function onEnable() : void{ - $this->saveDefaultConfig(); - ResourcePackManager::registerResourcePack($this); - - if(!InvMenuHandler::isRegistered()){ - InvMenuHandler::register($this); - } - - $packet = StaticPacketCache::getInstance()->getAvailableActorIdentifiers(); - $tag = $packet->identifiers->getRoot(); - assert($tag instanceof CompoundTag); - $id_list = $tag->getListTag("idlist"); - assert($id_list !== null); - $id_list->push(CompoundTag::create() - ->setString("bid", "") - ->setByte("hasspawnegg", 0) - ->setString("id", CustomSizedInvMenuType::ACTOR_NETWORK_ID) - ->setByte("summonable", 0) - ); - } - - protected function onDisable() : void{ - ResourcePackManager::unRegisterResourcePack($this); - } -} diff --git a/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php b/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php deleted file mode 100644 index ca067ac..0000000 --- a/src/muqsit/customsizedinvmenu/CustomSizedInvMenuType.php +++ /dev/null @@ -1,60 +0,0 @@ -setByte(EntityMetadataProperties::CONTAINER_TYPE, WindowTypes::INVENTORY); - $properties->setInt(EntityMetadataProperties::CONTAINER_BASE_SIZE, $this->size); - - $this->inner_graphic = new ActorInvMenuGraphic( - self::ACTOR_NETWORK_ID, - $actor_runtime_identifier, - $properties->getAll(), - new ActorInvMenuGraphicNetworkTranslator($actor_runtime_identifier) - ); - } - - public function createGraphic(InvMenu $menu, Player $player) : ?InvMenuGraphic{ - return new CustomSizedActorInvMenuGraphic($this->inner_graphic, $menu->getName(), $this->length, $this->scrollbar); - } - - public function createInventory() : Inventory{ - return new InvMenuInventory($this->size); - } -} From ea490977bb49df6cc78f471b0328fb886ed9386f Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sun, 5 May 2024 22:43:00 +0700 Subject: [PATCH 23/25] pm5 and support UIRESOURCEPACK --- .../customsizedinvmenu/CustomSizedInvMenu.php | 58 +++++++++ .../exception/UnexpectedValueException.php | 13 ++ .../CustomSizedActorInvMenuGraphic.php | 45 +++++++ .../manager/ResourcePackManager.php | 117 ++++++++++++++++++ .../type/CustomSizedInvMenuType.php | 60 +++++++++ 5 files changed, 293 insertions(+) create mode 100644 src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php create mode 100644 src/muqsit/customsizedinvmenu/exception/UnexpectedValueException.php create mode 100644 src/muqsit/customsizedinvmenu/graphic/CustomSizedActorInvMenuGraphic.php create mode 100644 src/muqsit/customsizedinvmenu/manager/ResourcePackManager.php create mode 100644 src/muqsit/customsizedinvmenu/type/CustomSizedInvMenuType.php diff --git a/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php b/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php new file mode 100644 index 0000000..4252357 --- /dev/null +++ b/src/muqsit/customsizedinvmenu/CustomSizedInvMenu.php @@ -0,0 +1,58 @@ +register($id, CustomSizedInvMenuType::ofSize($size)); + $ids_by_size[$size] = $id; + } + return InvMenu::create($ids_by_size[$size]); + } + + protected function onEnable() : void{ + $this->saveDefaultConfig(); + RSP::register($this); + + if(!InvMenuHandler::isRegistered()){ + InvMenuHandler::register($this); + } + + $packet = StaticPacketCache::getInstance()->getAvailableActorIdentifiers(); + $tag = $packet->identifiers->getRoot(); + assert($tag instanceof CompoundTag); + $id_list = $tag->getListTag("idlist"); + assert($id_list !== null); + $id_list->push(CompoundTag::create() + ->setString("bid", "") + ->setByte("hasspawnegg", 0) + ->setString("id", CustomSizedInvMenuType::ACTOR_NETWORK_ID) + ->setByte("summonable", 0) + ); + } + + protected function onDisable() : void{ + RSP::unRegister($this); + } +} diff --git a/src/muqsit/customsizedinvmenu/exception/UnexpectedValueException.php b/src/muqsit/customsizedinvmenu/exception/UnexpectedValueException.php new file mode 100644 index 0000000..9a158b2 --- /dev/null +++ b/src/muqsit/customsizedinvmenu/exception/UnexpectedValueException.php @@ -0,0 +1,13 @@ +scrollbar; + $this->size_data = "§{$this->length}§{$scroll}§r§r§r§r§r§r§r§r§r§r"; + } + + public function send(Player $player, ?string $name) : void{ + $this->inner->send($player, $this->size_data . ($name ?? $this->name ?? "Inventory")); + } + + public function sendInventory(Player $player, Inventory $inventory) : bool{ + return $this->inner->sendInventory($player, $inventory); + } + + public function remove(Player $player) : void{ + $this->inner->remove($player); + } + + public function getNetworkTranslator() : ?InvMenuGraphicNetworkTranslator{ + return $this->inner->getNetworkTranslator(); + } + + public function getAnimationDuration() : int{ + return $this->inner->getAnimationDuration(); + } +} diff --git a/src/muqsit/customsizedinvmenu/manager/ResourcePackManager.php b/src/muqsit/customsizedinvmenu/manager/ResourcePackManager.php new file mode 100644 index 0000000..8179dd0 --- /dev/null +++ b/src/muqsit/customsizedinvmenu/manager/ResourcePackManager.php @@ -0,0 +1,117 @@ +getLogger()->debug('Compiling resource pack'); + $zip = new \ZipArchive(); + $zip->open(Path::join($plugin->getDataFolder(), $plugin->getName() . '.mcpack'), \ZipArchive::CREATE | \ZipArchive::OVERWRITE); + + foreach ($plugin->getResources() as $resource) { + if ($resource->isFile() && str_contains($resource->getPathname(), $plugin->getName() . ' Pack')) { + $path = preg_replace("/.*[\/\\\\]{$plugin->getName()}\hPack[\/\\\\].*/U", '', $resource->getPathname()); + if (!is_string($path)) { + throw new UnexpectedValueException(); + } + $relativePath = Path::normalize($path); + $plugin->saveResource(Path::join($plugin->getName() . ' Pack', $relativePath), false); + $zip->addFile(Path::join($plugin->getDataFolder(), $plugin->getName() . ' Pack', $relativePath), $relativePath); + } + } + + $zip->close(); + Filesystem::recursiveUnlink(Path::join($plugin->getDataFolder() . $plugin->getName() . ' Pack')); + $plugin->getLogger()->debug('Resource pack compiled'); + + $plugin->getLogger()->debug('Registering resource pack'); + $plugin->getLogger()->debug('Resource pack compiled'); + self::$pack = $pack = new ZippedResourcePack(Path::join($plugin->getDataFolder(), $plugin->getName() . '.mcpack')); + $packId = $pack->getPackId(); + $manager = $plugin->getServer()->getResourcePackManager(); + + $reflection = new \ReflectionClass($manager); + + $property = $reflection->getProperty("resourcePacks"); + $currentResourcePacks = $property->getValue($manager); + if (!is_array($currentResourcePacks)) { + throw new UnexpectedValueException(); + } + $currentResourcePacks[] = $pack; + $property->setValue($manager, $currentResourcePacks); + + $property = $reflection->getProperty("uuidList"); + $currentUUIDPacks = $property->getValue($manager); + if (!is_array($currentUUIDPacks)) { + throw new UnexpectedValueException(); + } + $currentUUIDPacks[mb_strtolower($pack->getPackId())] = $pack; + $property->setValue($manager, $currentUUIDPacks); + + $property = $reflection->getProperty("serverForceResources"); + $property->setValue($manager, true); + + if ($encryptKey !== "") { + $manager->setPackEncryptionKey($packId, $encryptKey); + } + + $plugin->getLogger()->debug('Resource pack registered'); + } + + public static function unRegister(PluginBase $plugin) : void { + $manager = $plugin->getServer()->getResourcePackManager(); + $pack = self::$pack; + + $reflection = new \ReflectionClass($manager); + + $property = $reflection->getProperty("resourcePacks"); + $currentResourcePacks = $property->getValue($manager); + if (!is_array($currentResourcePacks)) { + throw new UnexpectedValueException(); + } + $key = array_search($pack, $currentResourcePacks, true); + + if ($key !== false) { + unset($currentResourcePacks[$key]); + $property->setValue($manager, $currentResourcePacks); + } + + $property = $reflection->getProperty("uuidList"); + $currentUUIDPacks = $property->getValue($manager); + + if (is_null($pack)) { + throw new UnexpectedValueException(); + } + if (isset($currentResourcePacks[mb_strtolower($pack->getPackId())])) { + if (!is_array($currentUUIDPacks)) { + throw new UnexpectedValueException(); + } + unset($currentUUIDPacks[mb_strtolower($pack->getPackId())]); + $property->setValue($manager, $currentUUIDPacks); + } + $plugin->getLogger()->debug('Resource pack unregistered'); + + unlink(Path::join($plugin->getDataFolder(), $plugin->getName() . '.mcpack')); + $plugin->getLogger()->debug('Resource pack file deleted'); + } +} diff --git a/src/muqsit/customsizedinvmenu/type/CustomSizedInvMenuType.php b/src/muqsit/customsizedinvmenu/type/CustomSizedInvMenuType.php new file mode 100644 index 0000000..2013b13 --- /dev/null +++ b/src/muqsit/customsizedinvmenu/type/CustomSizedInvMenuType.php @@ -0,0 +1,60 @@ +setByte(EntityMetadataProperties::CONTAINER_TYPE, WindowTypes::INVENTORY); + $properties->setInt(EntityMetadataProperties::CONTAINER_BASE_SIZE, $this->size); + + $this->inner_graphic = new ActorInvMenuGraphic( + self::ACTOR_NETWORK_ID, + $actor_runtime_identifier, + $properties->getAll(), + new ActorInvMenuGraphicNetworkTranslator($actor_runtime_identifier) + ); + } + + public function createGraphic(InvMenu $menu, Player $player) : ?InvMenuGraphic{ + return new CustomSizedActorInvMenuGraphic($this->inner_graphic, $menu->getName(), $this->length, $this->scrollbar); + } + + public function createInventory() : Inventory{ + return new InvMenuInventory($this->size); + } +} From 78b38c61753be1a5327597d19a5fab5ba0a0f648 Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sun, 5 May 2024 22:43:44 +0700 Subject: [PATCH 24/25] Update .poggit.yml --- .poggit.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.poggit.yml b/.poggit.yml index 38f15cf..6f94ad9 100644 --- a/.poggit.yml +++ b/.poggit.yml @@ -9,6 +9,4 @@ projects: - src: muqsit/InvMenu/InvMenu branch: pm5 version: ^4.6.5 - - src: NhanAZ/libBedrock/libBedrock - version: ^1.1.9 ... From 24248b957e7818a075f00cc9169ff3327b23e13b Mon Sep 17 00:00:00 2001 From: ClickedTran_VN <58399779+ClickedTran@users.noreply.github.com> Date: Sun, 5 May 2024 22:52:44 +0700 Subject: [PATCH 25/25] fix PHPStan --- src/muqsit/customsizedinvmenu/type/CustomSizedInvMenuType.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/muqsit/customsizedinvmenu/type/CustomSizedInvMenuType.php b/src/muqsit/customsizedinvmenu/type/CustomSizedInvMenuType.php index 2013b13..b76b51b 100644 --- a/src/muqsit/customsizedinvmenu/type/CustomSizedInvMenuType.php +++ b/src/muqsit/customsizedinvmenu/type/CustomSizedInvMenuType.php @@ -10,6 +10,7 @@ use muqsit\invmenu\type\graphic\InvMenuGraphic; use muqsit\invmenu\type\graphic\network\ActorInvMenuGraphicNetworkTranslator; use muqsit\invmenu\type\InvMenuType; +use muqsit\customsizedinvmenu\graphic\CustomSizedActorInvMenuGraphic; use pocketmine\entity\Entity; use pocketmine\inventory\Inventory; use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection;