mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +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{
|
protected function getSlotIndex(int $index) : int{
|
||||||
foreach($this->namedtag->Items as $i => $slot){
|
foreach($this->namedtag->Items as $i => $slot){
|
||||||
if($slot["Slot"] === $index){
|
if((int) $slot["Slot"] === $index){
|
||||||
return $i;
|
return (int) $i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user