LivingEntity: add visual support for riptide spin attack (#1551)

This commit is contained in:
Camotoy 2020-11-20 18:06:27 -05:00 committed by GitHub
parent a70d3e2150
commit 67d5993ae1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,6 +77,9 @@ public class LivingEntity extends Entity {
getHand().equals(ItemData.AIR) && getOffHand().getId() == ItemRegistry.SHIELD.getBedrockId());
metadata.getFlags().setFlag(EntityFlag.USING_ITEM, (xd & 0x01) == 0x01 && !isUsingShield);
metadata.getFlags().setFlag(EntityFlag.BLOCKING, (xd & 0x01) == 0x01);
// Riptide spin attack
metadata.getFlags().setFlag(EntityFlag.DAMAGE_NEARBY_MOBS, (xd & 0x04) == 0x04);
break;
case 8:
metadata.put(EntityData.HEALTH, entityMetadata.getValue());