don't display cape when no loaded

This commit is contained in:
Vitaly 2024-01-20 12:28:27 +05:30
commit 82781d1d45

View file

@ -12,6 +12,9 @@ customEvents.on('gameLoaded', () => {
if (viewer.entities.entities[e.id]?.playerObject) {
const { playerObject } = viewer.entities.entities[e.id]
playerObject.backEquipment = e.equipment.some((item) => item?.name === 'elytra') ? 'elytra' : 'cape'
if (playerObject.cape.map === null) {
playerObject.cape.visible = false
}
// todo (easy, important) elytra flying animation
// todo cleanup states
const WALKING_SPEED = 0.1