ListForm image is not loaded (or MCBE crashes?)
adoswyn opened this issue · 6 comments
mcpe crashes when i add button with url image, last release pmmp
Thank you for your report @adoswyn.
I'll check it as soon as possible. please wait for a little while.
Dear @adoswyn
I couldn't confirm this in my environment. If you do not mind, could you paste the code here or in Discord(yuko fuyutsuki#9595
)?
addButton((new Button("My Button"))->setImage("https://d1u5p3l4wpay3k.cloudfront.net/minecraft_ru_gamepedia/0/02/%D0%9E%D0%BA%D0%BE_%D0%9A%D1%80%D0%B0%D1%8F.png?version=f3f8095988a0bb43a09c1c04575970b4", Button::IMAGE_TYPE_URL)
Currently, due to something bug in the client, it is considered that the form image can not be displayed.
I'll tell you again as soon as I know more details.
I attempted to paste the code presented in the sample code and tried but it did not lead to a crash just because it was not loaded.
I think that it is a bug in MCBE, so I'm sorry, please change temporarily to not use the image.
FormApi::makeListForm()->addButton(new Button("My Button"));
I will let you know here when this problem is fixed in MCBE.
@adoswyn It is the specification of the current Minecraft (v1.8.x), you can specify the image from IMAGE_TYPE_PATH
from the resource pack.
Instead, it can not be specified by the URL(#BlameMojang).
Therefore, you can write as below
$form = FormApi::makeListForm();
$form->addButton((new Button("Apple"))->setImage("textures/items/apple"));