iTXTech / Genisys

Feature-rich server software for Minecraft: Pocket Edition & Windows 10 Edition Beta
https://itxtech.org/genisys/
GNU General Public License v3.0
431 stars 246 forks source link

Inventory glitch #1470

Closed bulkdev closed 8 years ago

bulkdev commented 8 years ago

My plugin uses setItem to additems to the hotbar because when i used additem players had a worse glitch than setItem

basically the player loads into a duel but the items dont show until the player either:

Please fix this it's annoying. here's my code for setting Inventory ``

    public function setInv(Player $player, $level){
$player->getInventory()->clearAll();

$type = explode(".", $level);

if($type[0] == "bronze"){
$player->getInventory()->setHelmet(Item::get(298));
$player->getInventory()->setChestplate(Item::get(299));
$player->getInventory()->setLeggings(Item::get(300));
$player->getInventory()->setBoots(Item::get(301));

$player->getInventory()->setItem(0, new Item(268, 0, 1));
$player->getInventory()->setItem(1, new Item(322, 0, 3));
}

if($type[0] == "silver"){
$player->getInventory()->setHelmet(Item::get(302));
$player->getInventory()->setChestplate(Item::get(303));
$player->getInventory()->setLeggings(Item::get(304));
$player->getInventory()->setBoots(Item::get(305));

$player->getInventory()->setItem(0, new Item(272, 0, 1));
$player->getInventory()->setItem(1, new Item(322, 0, 5));
}
if($type[0] == "gold"){
$player->getInventory()->setHelmet(Item::get(315));
$player->getInventory()->setChestplate(Item::get(316));
$player->getInventory()->setLeggings(Item::get(317));
$player->getInventory()->setBoots(Item::get(318));

$player->getInventory()->setItem(0, new Item(283, 0, 1));
$player->getInventory()->setItem(1, new Item(322, 0, 8));
}
$player->getInventory()->setItem(2, new Item(364, 0, 16));
$player->getInventory()->setHotbarSlotIndex(0, 0);
$player->getInventory()->setHotbarSlotIndex(1, 1);
$player->getInventory()->setHotbarSlotIndex(2, 2);

}

ghost commented 8 years ago

setHotbarIndex i am sure

On Saturday, July 16, 2016, Bulk Developer notifications@github.com wrote:

My plugin uses setItem to additems to the hotbar because when i used additem players had a worse glitch than setItem

basically the player loads into a duel but the items dont show until the player either:

  • Opens inventory
  • Breaks block
  • Rapidly tap hotbar

Please fix this it's annoying. here's my code for setting Inventory `` public function setInv(Player $player, $level){ $player->getInventory()->clearAll();

$type = explode(".", $level);

if($type[0] == "bronze"){ $player->getInventory()->setHelmet(Item::get(298)); $player->getInventory()->setChestplate(Item::get(299)); $player->getInventory()->setLeggings(Item::get(300)); $player->getInventory()->setBoots(Item::get(301));

$player->getInventory()->setItem(0, new Item(268, 0, 1)); $player->getInventory()->setItem(1, new Item(322, 0, 3)); }

if($type[0] == "silver"){ $player->getInventory()->setHelmet(Item::get(302)); $player->getInventory()->setChestplate(Item::get(303)); $player->getInventory()->setLeggings(Item::get(304)); $player->getInventory()->setBoots(Item::get(305));

$player->getInventory()->setItem(0, new Item(272, 0, 1)); $player->getInventory()->setItem(1, new Item(322, 0, 5)); } if($type[0] == "gold"){ $player->getInventory()->setHelmet(Item::get(315)); $player->getInventory()->setChestplate(Item::get(316)); $player->getInventory()->setLeggings(Item::get(317)); $player->getInventory()->setBoots(Item::get(318));

$player->getInventory()->setItem(0, new Item(283, 0, 1)); $player->getInventory()->setItem(1, new Item(322, 0, 8)); } $player->getInventory()->setItem(2, new Item(364, 0, 16)); $player->getInventory()->setHotbarSlotIndex(0, 0); $player->getInventory()->setHotbarSlotIndex(1, 1); $player->getInventory()->setHotbarSlotIndex(2, 2);

}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iTXTech/Genisys/issues/1470, or mute the thread https://github.com/notifications/unsubscribe-auth/ALoIcZie3omjSICSw9osJEBIUwvGSAHPks5qWQ1qgaJpZM4JODKW .

ghost commented 8 years ago

Take that back the email just fully loaded

On Saturday, July 16, 2016, Savion LegendZzz saviondeavault@gmail.com wrote:

setHotbarIndex i am sure

On Saturday, July 16, 2016, Bulk Developer <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

My plugin uses setItem to additems to the hotbar because when i used additem players had a worse glitch than setItem

basically the player loads into a duel but the items dont show until the player either:

  • Opens inventory
  • Breaks block
  • Rapidly tap hotbar

Please fix this it's annoying. here's my code for setting Inventory `` public function setInv(Player $player, $level){ $player->getInventory()->clearAll();

$type = explode(".", $level);

if($type[0] == "bronze"){ $player->getInventory()->setHelmet(Item::get(298)); $player->getInventory()->setChestplate(Item::get(299)); $player->getInventory()->setLeggings(Item::get(300)); $player->getInventory()->setBoots(Item::get(301));

$player->getInventory()->setItem(0, new Item(268, 0, 1)); $player->getInventory()->setItem(1, new Item(322, 0, 3)); }

if($type[0] == "silver"){ $player->getInventory()->setHelmet(Item::get(302)); $player->getInventory()->setChestplate(Item::get(303)); $player->getInventory()->setLeggings(Item::get(304)); $player->getInventory()->setBoots(Item::get(305));

$player->getInventory()->setItem(0, new Item(272, 0, 1)); $player->getInventory()->setItem(1, new Item(322, 0, 5)); } if($type[0] == "gold"){ $player->getInventory()->setHelmet(Item::get(315)); $player->getInventory()->setChestplate(Item::get(316)); $player->getInventory()->setLeggings(Item::get(317)); $player->getInventory()->setBoots(Item::get(318));

$player->getInventory()->setItem(0, new Item(283, 0, 1)); $player->getInventory()->setItem(1, new Item(322, 0, 8)); } $player->getInventory()->setItem(2, new Item(364, 0, 16)); $player->getInventory()->setHotbarSlotIndex(0, 0); $player->getInventory()->setHotbarSlotIndex(1, 1); $player->getInventory()->setHotbarSlotIndex(2, 2);

}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iTXTech/Genisys/issues/1470, or mute the thread https://github.com/notifications/unsubscribe-auth/ALoIcZie3omjSICSw9osJEBIUwvGSAHPks5qWQ1qgaJpZM4JODKW .

bulkdev commented 8 years ago

@SavionLegendZzz ye thats supposed to work. Do you use this function?

dktapps commented 8 years ago

Known issue. This has been fixed on the Win10 beta branch and will be merged into master in the near future. Please wait for the update :)

dktapps commented 8 years ago

Also, please do not use setHotbarSlotIndex() any more; it will be deprecated in the coming update.

bulkdev commented 8 years ago

Thank you @dktapps so until the next update players will still have this bug?

dktapps commented 8 years ago

@ItzBulkDev yes. Don't worry though. I can't give an exact ETA but it will be merged with the fix in the near future.

bulkdev commented 8 years ago

@dktapps my players are really biting my ass over it. Is there an alternative. And is the gapple glitch part of this bug (players have to rop the gapple then pick it up to use it)

dktapps commented 8 years ago

@ItzBulkDev not really, unless you're willing to try a non-production build that will spam the Christ out of your terminal and may also cause other bugs.

Please be patient. A few days at most.

ZedCee commented 8 years ago

@ItzBulkDev If you try non-production builds, be sure to backup your maps. Errors can and will over time result in lost chunks and crashes. @dkapps I'm so excited!

dktapps commented 8 years ago

@ZedCee :P