use of com.lying.variousoddities.condition.Condition in project VariousOddities by Lyinginbedmon.
the class VOBusClient method displayMindControl.
private static void displayMindControl(MatrixStack stack, PlayerEntity localPlayer) {
LivingData playerData = LivingData.forEntity(localPlayer);
List<LivingEntity> nearbyMobs = localPlayer.getEntityWorld().getEntitiesWithinAABB(LivingEntity.class, localPlayer.getBoundingBox().grow(16D));
// FIXME Display mind control icons in a row instead of on top of one another when multiple are active
for (Condition condition : Conditions.getAllConditions()) for (LivingEntity mob : nearbyMobs) {
LivingData data = LivingData.forEntity(mob);
if (data != null && data.hasCondition(condition, localPlayer))
renderConditionIconAt(stack, mob, localPlayer, condition, true);
else if (playerData.hasCondition(condition, mob))
renderConditionIconAt(stack, mob, localPlayer, condition, false);
}
}
Aggregations