mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Fixed furnaces crashing the server
Beware ListTag indices being strings! Should be impossible, but the NBT library is poorly designed.
This commit is contained in:
parent
3150c50cac
commit
7c00982fff
@ -123,8 +123,8 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
*/
|
||||
protected function getSlotIndex(int $index) : int{
|
||||
foreach($this->namedtag->Items as $i => $slot){
|
||||
if($slot["Slot"] === $index){
|
||||
return $i;
|
||||
if((int) $slot["Slot"] === $index){
|
||||
return (int) $i;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user