Getting this context for switch hotbar methods

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2022-04-04 11:16:02 +03:00
1 parent 85f2ce7504
commit f5b10f2a38
1 file changed
+4 -4
+4 -4
View File
@@ -285,7 +285,7 @@ export class HotbarStore extends BaseStore<HotbarStoreModel> {
}
}
switchToPrevious() {
switchToPrevious = () => {
let index = this.activeHotbarIndex - 1;
if (index < 0) {
@@ -293,9 +293,9 @@ export class HotbarStore extends BaseStore<HotbarStoreModel> {
}
this.setActiveHotbar(index);
}
};
switchToNext() {
switchToNext = () => {
let index = this.activeHotbarIndex + 1;
if (index >= this.hotbars.length) {
@@ -303,7 +303,7 @@ export class HotbarStore extends BaseStore<HotbarStoreModel> {
}
this.setActiveHotbar(index);
}
};
/**
* Checks if entity already pinned to the active hotbar