I have absolutely no experience with adding windows "Inventories" at all. So I need help, anyone know where I can get more information on this. I got this from a recent thread called "Player Inventory" and I still don't clearly understand if I'm doing this right or not. PHP: <?phpnamespace OpenINV;use pocketmine\inventory\PlayerInventory;use pocketmine\inventory\FurnaceInventory;use pocketmine\inventory\DoubleChestInventory;use pocketmine\inventory\ChestInventory;use pocketmine\inventory\BrewingInventory;use pocketmine\inventory\AnvilInventory;use pocketmine\inventory\EnchantInventory;use pocketmine\plugin\PluginBase;use pocketmine\event\Listener;use pocketmine\event\inventory\InventoryOpenEvent;use pocketmine\level\sound\AnvilUseSound;use pocketmine\level\sound\EndermanTeleportSound;use pocketmine\level\sound\ButtonClickSound;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\event\Listener;use pocketmine\Player;use pocketmine\utils\TextFormat;use pocketmine\event\player\PlayerJoinEvent;class Main extends PluginBase implements Listener { public function onEnable(){ $this->getServer()->getPluginManager()->registerEvents($this, $this); } public function onJoin(PlayerJoinEvent $event){ $player = $event->getPlayer(); $player->addWindow($player->getInventory(PlayerInventory)); //Maybe?? } } What I'm asking is where would I find out how to do this, unless someone here is willing to show me
Sorry for my obsession. Spoiler: Searching functions with the word 'Window' from MCPE 0.14.0 Code: $ grep -i '.*Window.*>:$' < in/mpe0140.asm 0027c378 <[email protected]>: 0027c39c <[email protected]>: 0029e328 <ChatScreen::closeWindow()>: 002a6d8c <TouchControl::setWindowSize(int, int)>: 002a77b0 <TouchControlSet::setWindowSize(int, int)>: 002b6874 <InputHandler::setWindowSize(int, int)>: 003199f4 <mce::RenderContext::createWindowSizeDependentResources()>: 0034acac <Screen::supppressedBySubWindow()>: 003821c4 <InventoryScreen::_closeWindow()>: 004a5890 <MobEffectsScreen::_closeWindow()>: 005252c0 <PackedScrollContainer::setWindowResizedFlag(bool)>: 00578de4 <TouchMapper::setWindowSize(int, int)>: 0057b0f4 <InputDeviceMapper::setWindowSize(int, int)>: 005a7fb0 <convertAndroidKeyCodeToWindowsKeyCode(int)>: 005be8a0 <mce::RenderContextBase::createWindowSizeDependentResources()>: 0060297a <RakNet::ReliabilityLayer::UpdateWindowFromPacketloss(unsigned long long)>: 0060297c <RakNet::ReliabilityLayer::UpdateWindowFromAck(unsigned long long)>: 00608254 <RakNet::CCRakNetSlidingWindow::CCRakNetSlidingWindow()>: 00608256 <RakNet::CCRakNetSlidingWindow::~CCRakNetSlidingWindow()>: 00608258 <RakNet::CCRakNetSlidingWindow::Init(unsigned long long, unsigned int)>: 006082a4 <RakNet::CCRakNetSlidingWindow::Update(unsigned long long, bool)>: 006082a6 <RakNet::CCRakNetSlidingWindow::GetRetransmissionBandwidth(unsigned long long, unsigned long long, unsigned int, bool)>: 006082aa <RakNet::CCRakNetSlidingWindow::GetTransmissionBandwidth(unsigned long long, unsigned long long, unsigned int, bool)>: 006082d8 <RakNet::CCRakNetSlidingWindow::GetNextDatagramSequenceNumber()>: 006082de <RakNet::CCRakNetSlidingWindow::GetAndIncrementNextDatagramSequenceNumber()>: 006082ee <RakNet::CCRakNetSlidingWindow::OnSendBytes(unsigned long long, unsigned int)>: 006082f0 <RakNet::CCRakNetSlidingWindow::OnGotPacketPair(RakNet::uint24_t, unsigned int, unsigned long long)>: 006082f2 <RakNet::CCRakNetSlidingWindow::OnResend(unsigned long long, unsigned long long)>: 0060834a <RakNet::CCRakNetSlidingWindow::OnNAK(unsigned long long, RakNet::uint24_t)>: 00608368 <RakNet::CCRakNetSlidingWindow::OnDuplicateAck(unsigned long long, RakNet::uint24_t)>: 0060836a <RakNet::CCRakNetSlidingWindow::OnSendAckGetBAndAS(unsigned long long, bool*, double*, double*)>: 00608372 <RakNet::CCRakNetSlidingWindow::OnSendAck(unsigned long long, unsigned int)>: 0060837c <RakNet::CCRakNetSlidingWindow::OnSendNACK(unsigned long long, unsigned int)>: 00608380 <RakNet::CCRakNetSlidingWindow::GetRTOForRetransmission(unsigned char) const>: 006083d4 <RakNet::CCRakNetSlidingWindow::SetMTU(unsigned int)>: 006083d8 <RakNet::CCRakNetSlidingWindow::GetMTU() const>: 006083dc <RakNet::CCRakNetSlidingWindow::GetLocalReceiveRate(unsigned long long) const>: 006083e8 <RakNet::CCRakNetSlidingWindow::GetRTT() const>: 00608410 <RakNet::CCRakNetSlidingWindow::GreaterThan(RakNet::uint24_t, RakNet::uint24_t)>: 0060842e <RakNet::CCRakNetSlidingWindow::OnGotPacket(RakNet::uint24_t, bool, unsigned long long, unsigned int, unsigned int*)>: 0060849c <RakNet::CCRakNetSlidingWindow::LessThan(RakNet::uint24_t, RakNet::uint24_t)>: 006084c0 <RakNet::CCRakNetSlidingWindow::GetBytesPerSecondLimitByCongestionControl() const>: 006084c8 <RakNet::CCRakNetSlidingWindow::GetSenderRTOForACK() const>: 00608500 <RakNet::CCRakNetSlidingWindow::ShouldSendACKs(unsigned long long, unsigned long long)>: 00608534 <RakNet::CCRakNetSlidingWindow::IsInSlowStart() const>: 00608560 <RakNet::CCRakNetSlidingWindow::OnAck(unsigned long long, unsigned long long, bool, double, double, double, bool, RakNet::uint24_t)>: 0060927c <GetMyIP_Windows_Linux_IPV4(RakNet::SystemAddress*)>: 00609304 <GetMyIP_Windows_Linux(RakNet::SystemAddress*)>: 00609308 <RakNet::RNS2_Windows_Linux_360::Send_Windows_Linux_360NoVDP(int, RakNet::RNS2_SendParameters*, char const*, unsigned int)>: 0076bed4 <_methodGetWindowToken>: 0076bee0 <_methodGetWindow>: 0076bf5c <_classWindow>: And look at this line in specific: Code: 003821c4 <InventoryScreen::_closeWindow()>: And I found a call to this function from the function InventoryScreen::drawIcon(InventoryPaneType, ImageButton), which suggests that this may be the action that happens when a player clicks the "Close" button of the inventory. Another call is from InventoryScreen::handleBackEvent(bool), which suggests that this may be the action that happens when a player clicks the "Back" button when opening an inventory, leading to an inventory window closing. Another call is from InventoryScreen::_buttonClicked(Button&). Probably the same thing as the first search. I also found a call from InventoryScreen::tick(), but I cannot determine what it is about. But since this is the only call left, I guess that this is about closing inventory window when a player gets hurt. Don't have time to make a mod to NOP that instruction to prove it though